/*! For license information please see main.688312a8.js.LICENSE.txt */
(()=>{var e={3:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v.72C7.37 5.03 5.12 7.75 5.12 11v5.82L3 18.94V20h18v-1.06zM16 13.01h-3v3h-2v-3H8V11h3V8h2v3h3z"}),"AddAlert")},630:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)([(0,o.jsx)("path",{d:"M17 11c.34 0 .67.04 1 .09V6.27L10.5 3 3 6.27v4.91c0 4.54 3.2 8.79 7.5 9.82.55-.13 1.08-.32 1.6-.55-.69-.98-1.1-2.17-1.1-3.45 0-3.31 2.69-6 6-6"},"0"),(0,o.jsx)("path",{d:"M17 13c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 1.38c.62 0 1.12.51 1.12 1.12s-.51 1.12-1.12 1.12-1.12-.51-1.12-1.12.5-1.12 1.12-1.12m0 5.37c-.93 0-1.74-.46-2.24-1.17.05-.72 1.51-1.08 2.24-1.08s2.19.36 2.24 1.08c-.5.71-1.31 1.17-2.24 1.17"},"1")],"AdminPanelSettings")},643:(e,t,n)=>{var r=n(57676)("toUpperCase");e.exports=r},1702:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout")},2086:(e,t,n)=>{"use strict";e.exports=n(95082)},2861:e=>{"use strict";var t=function(e,t){return e+n(t)},n=function(e){return null===e||"boolean"===typeof e||"undefined"===typeof e?"":"number"===typeof e?e.toString():"string"===typeof e?e:Array.isArray(e)?e.reduce(t,""):function(e){return Object.prototype.hasOwnProperty.call(e,"props")}(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?n(e.props.children):""};n.default=n,e.exports=n},3024:(e,t,n)=>{"use strict";var r=n(86267),i=n(52989);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,function(n){e=n.call(o,e,t)}),e}},3156:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"CloudUploadOutlined")},3295:(e,t,n)=>{var r=n(71775),i=n(94664),o=n(9096);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,t(e,i,o),e)}),n}},3331:(e,t,n)=>{var r=n(39676),i=n(60929),o=n(37303);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),a=void 0===a?t<n?1:-1:o(a),r(t,n,a,e)}}},3343:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},3519:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"ModeEdit")},3892:e=>{e.exports=function(e){return this.__data__.has(e)}},4262:(e,t,n)=>{var r=n(48895),i=n(54052);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},4391:(e,t,n)=>{"use strict";n.r(t),n.d(t,{capitalize:()=>i.A,createChainedFunction:()=>o.A,createSvgIcon:()=>a.A,debounce:()=>s.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>d.A,ownerWindow:()=>u.A,requirePropFactory:()=>p,setRef:()=>h,unstable_ClassNameGenerator:()=>j,unstable_useEnhancedEffect:()=>m.A,unstable_useId:()=>f.A,unsupportedProp:()=>g,useControlled:()=>v.A,useEventCallback:()=>x.A,useForkRef:()=>y.A,useIsFocusVisible:()=>b.A});var r=n(79386),i=n(6803),o=n(6593),a=n(66734),s=n(80950);const l=function(e,t){return()=>null};var c=n(27328),d=n(22427),u=n(36078);const p=function(e,t){return()=>null};const h=n(26564).A;var m=n(55013),f=n(45879);const g=function(e,t,n,r,i){return null};var v=n(54516),x=n(93319),y=n(95849),b=n(13574);const j={configure:e=>{r.A.configure(e)}}},4757:(e,t,n)=>{var r=n(56552);e.exports=function(){return r.Date.now()}},4971:(e,t,n)=>{var r=n(93086),i=n(41069),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},5538:(e,t,n)=>{var r=n(97160),i=n(84545),o=n(10793),a=n(27760),s=n(3892),l=n(76788);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},5654:(e,t,n)=>{var r=n(87937),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},5791:(e,t,n)=>{var r=n(26924),i=n(22761);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},5844:(e,t,n)=>{"use strict";var r;n.d(t,{A:()=>s});var i=n(65043);let o=0;const a=(r||(r=n.t(i,2)))["useId".toString()];function s(e){if(void 0!==a){const t=a();return null!=e?e:t}return function(e){const[t,n]=i.useState(e),r=e||t;return i.useEffect(()=>{null==t&&(o+=1,n("mui-".concat(o)))},[t]),r}(e)}},6217:(e,t,n)=>{e=n.nmd(e),ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator;function i(e,t){return e.type.lastIndexOf(t+".xml")>-1}t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},t.beautify=function(e){for(var n,o,a,s=new r(e,0,0),l=s.getCurrentToken(),c=e.getTabString(),d=t.singletonTags,u=t.blockTags,p=t.formatOptions||{},h=!1,m=!1,f=!1,g="",v="",x="",y=0,b=0,j=0,w=0,_=0,C=0,S=0,A=0,k=0,M=!1,O=!1,T=!1,E=!1,P={0:0},D=[],R=!1,N=function(){n&&n.value&&"string.regexp"!==n.type&&(n.value=n.value.replace(/^\s*/,""))},L=function(){for(var e=g.length-1;0!=e&&" "===g[e];)e-=1;g=g.slice(0,e+1)},I=function(){g=g.trimRight(),h=!1};null!==l;){if(A=s.getCurrentTokenRow(),s.$rowTokens,n=s.stepForward(),"undefined"!==typeof l){if(v=l.value,_=0,T="style"===x||"ace/mode/css"===e.$modeId,i(l,"tag-open")?(O=!0,n&&(E=-1!==u.indexOf(n.value)),"</"===v&&(E&&!h&&k<1&&k++,T&&(k=1),_=1,E=!1)):i(l,"tag-close")?O=!1:i(l,"comment.start")?E=!0:i(l,"comment.end")&&(E=!1),O||k||"paren.rparen"!==l.type||"}"!==l.value.substr(0,1)||k++,A!==o&&(k=A,o&&(k-=o)),k){for(I();k>0;k--)g+="\n";h=!0,i(l,"comment")||l.type.match(/^(comment|string)$/)||(v=v.trimLeft())}if(v){if("keyword"===l.type&&v.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(D[y]=v,N(),f=!0,v.match(/^(else|elseif)$/)&&g.match(/\}[\s]*$/)&&(I(),m=!0)):"paren.lparen"===l.type?(N(),"{"===v.substr(-1)&&(f=!0,M=!1,O||(k=1)),"{"===v.substr(0,1)&&(m=!0,"["!==g.substr(-1)&&"["===g.trimRight().substr(-1)?(I(),m=!1):")"===g.trimRight().substr(-1)?I():L())):"paren.rparen"===l.type?(_=1,"}"===v.substr(0,1)&&("case"===D[y-1]&&_++,"{"===g.trimRight().substr(-1)?I():(m=!0,T&&(k+=2))),"]"===v.substr(0,1)&&"}"!==g.substr(-1)&&"}"===g.trimRight().substr(-1)&&(m=!1,w++,I()),")"===v.substr(0,1)&&"("!==g.substr(-1)&&"("===g.trimRight().substr(-1)&&(m=!1,w++,I()),L()):"keyword.operator"!==l.type&&"keyword"!==l.type||!v.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?"punctuation.operator"===l.type&&";"===v?(I(),N(),f=!0,T&&k++):"punctuation.operator"===l.type&&v.match(/^(:|,)$/)?(I(),N(),v.match(/^(,)$/)&&S>0&&0===C&&p.lineBreaksAfterCommasInCurlyBlock?k++:(f=!0,h=!1)):"support.php_tag"!==l.type||"?>"!==v||h?i(l,"attribute-name")&&g.substr(-1).match(/^\s$/)?m=!0:i(l,"attribute-equals")?(L(),N()):i(l,"tag-close")?(L(),"/>"===v&&(m=!0)):"keyword"===l.type&&v.match(/^(case|default)$/)&&R&&(_=1):(I(),m=!0):(I(),N(),m=!0,f=!0),h&&(!l.type.match(/^(comment)$/)||v.substr(0,1).match(/^[/#]$/))&&(!l.type.match(/^(string)$/)||v.substr(0,1).match(/^['"@]$/))){if(w=j,y>b)for(w++,a=y;a>b;a--)P[a]=w;else y<b&&(w=P[y]);for(b=y,j=w,_&&(w-=_),M&&!C&&(w++,M=!1),a=0;a<w;a++)g+=c}if("keyword"===l.type&&v.match(/^(case|default)$/)?!1===R&&(D[y]=v,y++,R=!0):"keyword"===l.type&&v.match(/^(break)$/)&&D[y-1]&&D[y-1].match(/^(case|default)$/)&&(y--,R=!1),"paren.lparen"===l.type&&(C+=(v.match(/\(/g)||[]).length,S+=(v.match(/\{/g)||[]).length,y+=v.length),"keyword"===l.type&&v.match(/^(if|else|elseif|for|while)$/)?(M=!0,C=0):!C&&v.trim()&&"comment"!==l.type&&(M=!1),"paren.rparen"===l.type)for(C-=(v.match(/\)/g)||[]).length,S-=(v.match(/\}/g)||[]).length,a=0;a<v.length;a++)y--,"}"===v.substr(a,1)&&"case"===D[y]&&y--;"text"==l.type&&(v=v.replace(/\s+$/," ")),m&&!h&&(L(),"\n"!==g.substr(-1)&&(g+=" ")),g+=v,f&&(g+=" "),h=!1,m=!1,f=!1,(i(l,"tag-close")&&(E||-1!==u.indexOf(x))||i(l,"doctype")&&">"===v)&&(k=E&&n&&"</"===n.value?-1:1),n&&-1===d.indexOf(n.value)&&(i(l,"tag-open")&&"</"===v?y--:i(l,"tag-open")&&"<"===v?y++:i(l,"tag-close")&&"/>"===v&&y--),i(l,"tag-name")&&(x=v),o=A}}l=n}g=g.trim(),e.doc.setValue(g)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}),ace.require(["ace/ext/beautify"],function(t){e&&(e.exports=t)})},6219:(e,t,n)=>{var r=n(88468);e.exports=function(e,t){for(var n=-1,i=e.length;++n<i&&r(t,e[n],0)>-1;);return n}},6378:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case p:case h:return e;default:switch(e=e&&e.$$typeof){case d:case c:case u:case f:case m:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference"),t.isFragment=function(e){return v(e)===o}},6531:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(11188)},6571:(e,t,n)=>{var r=n(11629),i=n(56173);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},6593:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(42456).A},6664:(e,t,n)=>{"use strict";var r=n(86267);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},6803:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(67598).A},6806:(e,t,n)=>{var r=n(61516);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},8122:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(58168),i=n(98587),o=n(65043),a=n(69292),s=n(98610),l=n(6803),c=n(98206),d=n(34535),u=n(92532),p=n(72372);function h(e){return(0,p.Ay)("MuiSvgIcon",e)}(0,u.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var m=n(70579);const f=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,d.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.A)(n.color))],t["fontSize".concat((0,l.A)(n.fontSize))]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i,o,a,s,l,c,d,u,p,h,m,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(i=r.create)?void 0:i.call(r,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(d=t.typography)||null==(u=d.pxToRem)?void 0:u.call(d,35))||"2.1875rem"}[n.fontSize],color:null!=(p=null==(h=(t.vars||t).palette)||null==(h=h[n.color])?void 0:h.main)?p:{action:null==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.active,disabled:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.disabled,inherit:void 0}[n.color]}}),v=o.forwardRef(function(e,t){const n=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:d,className:u,color:p="inherit",component:v="svg",fontSize:x="medium",htmlColor:y,inheritViewBox:b=!1,titleAccess:j,viewBox:w="0 0 24 24"}=n,_=(0,i.A)(n,f),C=o.isValidElement(d)&&"svg"===d.type,S=(0,r.A)({},n,{color:p,component:v,fontSize:x,instanceFontSize:e.fontSize,inheritViewBox:b,viewBox:w,hasSvgAsChild:C}),A={};b||(A.viewBox=w);const k=(e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&"color".concat((0,l.A)(t)),"fontSize".concat((0,l.A)(n))]};return(0,s.A)(i,h,r)})(S);return(0,m.jsxs)(g,(0,r.A)({as:v,className:(0,a.A)(k.root,u),focusable:"false",color:y,"aria-hidden":!j||void 0,role:j?"img":void 0,ref:t},A,_,C&&d.props,{ownerState:S,children:[C?d.props.children:d,j?(0,m.jsx)("title",{children:j}):null]}))});v.muiName="SvgIcon";const x=v},8125:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},8704:e=>{function t(e,t){var n=e.length,r=new Array(n),i={},o=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});o--;)i[o]||l(e[o],o,new Set);return r;function l(e,t,o){if(o.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(p){c=""}throw new Error("Cyclic dependency"+c)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var d=a.get(e)||new Set;if(t=(d=Array.from(d)).length){o.add(e);do{var u=d[--t];l(u,s.get(u),o)}while(t);o.delete(e)}r[--n]=e}}}e.exports=function(e){return t(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)},e.exports.array=t},8820:(e,t,n)=>{var r=n(18902),i=n(75866),o=n(41558),a=n(50149),s=n(47574),l=n(58114),c=Math.min;e.exports=function(e,t,n){for(var d=n?o:i,u=e[0].length,p=e.length,h=p,m=Array(p),f=1/0,g=[];h--;){var v=e[h];h&&t&&(v=a(v,s(t))),f=c(v.length,f),m[h]=!n&&(t||u>=120&&v.length>=120)?new r(h&&v):void 0}v=e[0];var x=-1,y=m[0];e:for(;++x<u&&g.length<f;){var b=v[x],j=t?t(b):b;if(b=n||0!==b?b:0,!(y?l(y,j):d(g,j,n))){for(h=p;--h;){var w=m[h];if(!(w?l(w,j):d(e[h],j,n)))continue e}y&&y.push(j),g.push(b)}}return g}},9096:(e,t,n)=>{var r=n(39256),i=n(15029),o=n(33279),a=n(54052),s=n(63932);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},9261:(e,t,n)=>{var r=n(78420),i=n(35324),o=n(69194),a=n(46686),s=n(70914);e.exports=function(e,t,n,l){if(!a(e))return e;for(var c=-1,d=(t=i(t,e)).length,u=d-1,p=e;null!=p&&++c<d;){var h=s(t[c]),m=n;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(c!=u){var f=p[h];void 0===(m=l?l(f,h,p):void 0)&&(m=a(f)?f:o(t[c+1])?[]:{})}r(p,h,m),p=p[h]}return e}},9417:(e,t,n)=>{var r=n(46686);e.exports=function(e){return e===e&&!r(e)}},9812:(e,t,n)=>{var r=n(56552).Symbol;e.exports=r},10143:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},10155:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")},10396:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},10457:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(17868)},10652:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"BackupOutlined")},10763:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined")},10793:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},11188:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},11227:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined")},11295:(e,t,n)=>{var r=n(9812),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},11629:(e,t,n)=>{var r=n(16913),i=n(46686);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},12121:(e,t,n)=>{"use strict";var r=n(86267);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},12322:(e,t,n)=>{var r=n(16913),i=n(85990),o=n(22761),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,d=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==d}},12521:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.59 7 12 14.59 6.41 9H11V7H3v8h2v-4.59l7 7 9-9z"}),"CallMissed")},12536:(e,t,n)=>{var r=n(50149),i=n(52969),o=n(9096),a=n(38883),s=n(60320),l=n(47574),c=n(65893),d=n(33279),u=n(54052);e.exports=function(e,t,n){t=t.length?r(t,function(e){return u(e)?function(t){return i(t,1===e.length?e[0]:e)}:e}):[d];var p=-1;t=r(t,l(o));var h=a(e,function(e,n,i){return{criteria:r(t,function(t){return t(e)}),index:++p,value:e}});return s(h,function(e,t){return c(e,t,n)})}},12622:(e,t,n)=>{var r=n(70705);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},13028:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},13030:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(58168);function i(e,t){const n=(0,r.A)({},t);return Object.keys(e).forEach(o=>{if(o.toString().match(/^(components|slots)$/))n[o]=(0,r.A)({},e[o],n[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){const a=e[o]||{},s=t[o];n[o]={},s&&Object.keys(s)?a&&Object.keys(a)?(n[o]=(0,r.A)({},s),Object.keys(a).forEach(e=>{n[o][e]=i(a[e],s[e])})):n[o]=s:n[o]=a}else void 0===n[o]&&(n[o]=e[o])}),n}},13174:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalStyles:()=>w.A,StyledEngineProvider:()=>j,ThemeContext:()=>i.T,css:()=>v.AH,default:()=>_,internal_processStyles:()=>C,internal_serializeStyles:()=>A,keyframes:()=>v.i7});var r=n(58168),i=n(69369),o=n(66598),a=n(69436),s=n(81722),l=n(65043),c=n(30918),d=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,u=(0,c.A)(function(e){return d.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),p=function(e){return"theme"!==e},h=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?u:p},m=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},f=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.SF)(t,n,r),(0,a.s)(function(){return(0,s.sk)(t,n,r)}),null},g=function e(t,n){var a,c,d=t.__emotion_real===t,u=d&&t.__emotion_base||t;void 0!==n&&(a=n.label,c=n.target);var p=m(t,n,d),g=p||h(u),v=!g("as");return function(){var x=arguments,y=d&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&y.push("label:"+a+";"),null==x[0]||void 0===x[0].raw)y.push.apply(y,x);else{var b=x[0];y.push(b[0]);for(var j=x.length,w=1;w<j;w++)y.push(x[w],b[w])}var _=(0,i.w)(function(e,t,n){var r=v&&e.as||u,a="",d=[],m=e;if(null==e.theme){for(var x in m={},e)m[x]=e[x];m.theme=l.useContext(i.T)}"string"===typeof e.className?a=(0,s.Rk)(t.registered,d,e.className):null!=e.className&&(a=e.className+" ");var b=(0,o.J)(y.concat(d),t.registered,m);a+=t.key+"-"+b.name,void 0!==c&&(a+=" "+c);var j=v&&void 0===p?h(r):g,w={};for(var _ in e)v&&"as"===_||j(_)&&(w[_]=e[_]);return w.className=a,n&&(w.ref=n),l.createElement(l.Fragment,null,l.createElement(f,{cache:t,serialized:b,isStringTag:"string"===typeof r}),l.createElement(r,w))});return _.displayName=void 0!==a?a:"Styled("+("string"===typeof u?u:u.displayName||u.name||"Component")+")",_.defaultProps=t.defaultProps,_.__emotion_real=_,_.__emotion_base=u,_.__emotion_styles=y,_.__emotion_forwardProp=p,Object.defineProperty(_,"toString",{value:function(){return"."+c}}),_.withComponent=function(t,i){return e(t,(0,r.A)({},n,i,{shouldForwardProp:m(_,i,!0)})).apply(void 0,y)},_}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){g[e]=g(e)});var v=n(83290),x=n(93803),y=n(70579);const b=new Map;function j(e){const{injectFirst:t,enableCssLayer:n,children:r}=e,o=l.useMemo(()=>{const e="".concat(t,"-").concat(n);if("object"===typeof document&&b.has(e))return b.get(e);const r=function(e,t){const n=(0,x.A)({key:"css",prepend:e});if(t){const e=n.insert;n.insert=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n[1].styles.match(/^@layer\s+[^{]*$/)||(n[1].styles="@layer mui {".concat(n[1].styles,"}")),e(...n)}}return n}(t,n);return b.set(e,r),r},[t,n]);return t||n?(0,y.jsx)(i.C,{value:o,children:r}):r}var w=n(70869);function _(e,t){return g(e,t)}const C=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},S=[];function A(e){return S[0]=e,(0,o.J)(S)}},13218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},13375:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r="$$material"},13440:(e,t,n)=>{var r=n(56552)["__core-js_shared__"];e.exports=r},13574:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(65043),i=n(99303);let o=!0,a=!1;const s=new i.E,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function d(){o=!1}function u(){"hidden"===this.visibilityState&&a&&(o=!0)}function p(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return o||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!l[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}const h=function(){const e=r.useCallback(e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",d,!0),t.addEventListener("pointerdown",d,!0),t.addEventListener("touchstart",d,!0),t.addEventListener("visibilitychange",u,!0))},[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!p(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,s.start(100,()=>{a=!1}),t.current=!1,!0)},ref:e}}},13654:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,b:()=>s});var r=n(65043),i=n(13030),o=n(70579);const a=r.createContext(void 0);function s(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?(0,i.A)(o.defaultProps,r):o.styleOverrides||o.variants?r:(0,i.A)(o,r)}({props:t,name:n,theme:{components:r.useContext(a)}})}const l=function(e){let{value:t,children:n}=e;return(0,o.jsx)(a.Provider,{value:t,children:n})}},13815:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(19172);const i=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},13865:e=>{var t=new Error("Element already at target scroll position"),n=new Error("Scroll cancelled"),r=Math.min,i=Date.now;function o(e){return function(o,l,c,d){"function"==typeof(c=c||{})&&(d=c,c={}),"function"!=typeof d&&(d=s);var u=i(),p=o[e],h=c.ease||a,m=isNaN(c.duration)?350:+c.duration,f=!1;return p===l?d(t,o[e]):requestAnimationFrame(function t(a){if(f)return d(n,o[e]);var s=i(),c=r(1,(s-u)/m),g=h(c);o[e]=g*(l-p)+p,c<1?requestAnimationFrame(t):requestAnimationFrame(function(){d(null,o[e])})}),function(){f=!0}}}function a(e){return.5*(1-Math.cos(Math.PI*e))}function s(){}e.exports={left:o("scrollLeft"),top:o("scrollTop")}},14079:(e,t,n)=>{var r=n(88259),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t});e.exports=a},14202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}function x(){}function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=v.prototype;var b=y.prototype=new x;b.constructor=y,f(b,v.prototype),b.isPureReactComponent=!0;var j=Array.isArray,w=Object.prototype.hasOwnProperty,_={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,i)&&!C.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];o.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:_.current}}function A(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var k=/\/+/g;function M(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function O(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===o?"."+M(l,0):o,j(a)?(i="",null!=e&&(i=e.replace(k,"$&/")+"/"),O(a,t,i,"",function(e){return e})):null!=a&&(A(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(k,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",j(e))for(var c=0;c<e.length;c++){var d=o+M(s=e[c],c);l+=O(s,t,i,d,a)}else if(d=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"===typeof d)for(e=d.call(e),c=0;!(s=e.next()).done;)l+=O(s=s.value,t,i,d=o+M(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function T(e,t,n){if(null==e)return e;var r=[],i=0;return O(e,r,"","",function(e){return t.call(n,e,i++)}),r}function E(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},D={transition:null},R={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:D,ReactCurrentOwner:_};function N(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:T,forEach:function(e,t,n){T(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return T(e,function(){t++}),t},toArray:function(e){return T(e,function(e){return e})||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=a,t.PureComponent=y,t.StrictMode=o,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.act=N,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=f({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=_.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)w.call(t,c)&&!C.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:E}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=N,t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.1"},14318:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>d,p0:()=>s});var r=n(98587),i=n(58168);const o=["duration","easing","delay"],a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function d(e){const t=(0,i.A)({},a,e.easing),n=(0,i.A)({},s,e.duration);return(0,i.A)({getAutoHeightDuration:c,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:a=n.standard,easing:s=t.easeInOut,delay:c=0}=i;(0,r.A)(i,o);return(Array.isArray(e)?e:[e]).map(e=>"".concat(e," ").concat("string"===typeof a?a:l(a)," ").concat(s," ").concat("string"===typeof c?c:l(c))).join(",")}},e,{easing:t,duration:n})}},14657:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},15029:(e,t,n)=>{var r=n(26989),i=n(33097),o=n(53366),a=n(62597),s=n(9417),l=n(91310),c=n(70914);e.exports=function(e,t){return a(e)&&s(t)?l(c(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},15170:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(0,n(37344).A)()},15193:(e,t,n)=>{var r=n(16913),i=n(22761);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},15388:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){"undefined"==typeof i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];"undefined"==typeof r&&(r=!0);var a=r,s=this.diff_commonPrefix(e,n),l=e.substring(0,s);e=e.substring(s),n=n.substring(s),s=this.diff_commonSuffix(e,n);var c=e.substring(e.length-s);e=e.substring(0,e.length-s),n=n.substring(0,n.length-s);var d=this.diff_compute_(e,n,a,o);return l&&d.unshift(new t.Diff(0,l)),c&&d.push(new t.Diff(0,c)),this.diff_cleanupMerge(d),d},t.prototype.diff_compute_=function(e,r,i,o){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var s=e.length>r.length?e:r,l=e.length>r.length?r:e,c=s.indexOf(l);if(-1!=c)return a=[new t.Diff(1,s.substring(0,c)),new t.Diff(0,l),new t.Diff(1,s.substring(c+l.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,r)];var d=this.diff_halfMatch_(e,r);if(d){var u=d[0],p=d[1],h=d[2],m=d[3],f=d[4],g=this.diff_main(u,h,i,o),v=this.diff_main(p,m,i,o);return g.concat([new t.Diff(0,f)],v)}return i&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,o):this.diff_bisect_(e,r,o)},t.prototype.diff_lineMode_=function(e,r,i){var o=this.diff_linesToChars_(e,r);e=o.chars1,r=o.chars2;var a=o.lineArray,s=this.diff_main(e,r,!1,i);this.diff_charsToLines_(s,a),this.diff_cleanupSemantic(s),s.push(new t.Diff(0,""));for(var l=0,c=0,d=0,u="",p="";l<s.length;){switch(s[l][0]){case 1:d++,p+=s[l][1];break;case n:c++,u+=s[l][1];break;case 0:if(c>=1&&d>=1){s.splice(l-c-d,c+d),l=l-c-d;for(var h=this.diff_main(u,p,!1,i),m=h.length-1;m>=0;m--)s.splice(l,0,h[m]);l+=h.length}d=0,c=0,u="",p=""}l++}return s.pop(),s},t.prototype.diff_bisect_=function(e,r,i){for(var o=e.length,a=r.length,s=Math.ceil((o+a)/2),l=s,c=2*s,d=new Array(c),u=new Array(c),p=0;p<c;p++)d[p]=-1,u[p]=-1;d[l+1]=0,u[l+1]=0;for(var h=o-a,m=h%2!=0,f=0,g=0,v=0,x=0,y=0;y<s&&!((new Date).getTime()>i);y++){for(var b=-y+f;b<=y-g;b+=2){for(var j=l+b,w=(k=b==-y||b!=y&&d[j-1]<d[j+1]?d[j+1]:d[j-1]+1)-b;k<o&&w<a&&e.charAt(k)==r.charAt(w);)k++,w++;if(d[j]=k,k>o)g+=2;else if(w>a)f+=2;else if(m){if((S=l+h-b)>=0&&S<c&&-1!=u[S])if(k>=(C=o-u[S]))return this.diff_bisectSplit_(e,r,k,w,i)}}for(var _=-y+v;_<=y-x;_+=2){for(var C,S=l+_,A=(C=_==-y||_!=y&&u[S-1]<u[S+1]?u[S+1]:u[S-1]+1)-_;C<o&&A<a&&e.charAt(o-C-1)==r.charAt(a-A-1);)C++,A++;if(u[S]=C,C>o)x+=2;else if(A>a)v+=2;else if(!m){if((j=l+h-_)>=0&&j<c&&-1!=d[j]){var k;w=l+(k=d[j])-j;if(k>=(C=o-C))return this.diff_bisectSplit_(e,r,k,w,i)}}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),c=this.diff_main(o,a,!1,i),d=this.diff_main(s,l,!1,i);return c.concat(d)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,a=-1,s=n.length;a<e.length-1;){-1==(a=e.indexOf("\n",i))&&(a=e.length-1);var l=e.substring(i,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(s==o&&(l=e.substring(i),a=e.length),t+=String.fromCharCode(s),r[l]=s,n[s++]=l),i=a+1}return t}n[0]="";var o=4e4,a=i(e);return o=65535,{chars1:a,chars2:i(t),lineArray:n}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var o=0,a=1;;){var s=e.substring(i-a),l=t.indexOf(s);if(-1==l)return o;a+=l,0!=l&&e.substring(i-a)!=t.substring(0,a)||(o=a,a++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;var i=this;function o(e,t,n){for(var r,o,a,s,l=e.substring(n,n+Math.floor(e.length/4)),c=-1,d="";-1!=(c=t.indexOf(l,c+1));){var u=i.diff_commonPrefix(e.substring(n),t.substring(c)),p=i.diff_commonSuffix(e.substring(0,n),t.substring(0,c));d.length<p+u&&(d=t.substring(c-p,c)+t.substring(c,c+u),r=e.substring(0,n-p),o=e.substring(n+u),a=t.substring(0,c-p),s=t.substring(c+u))}return 2*d.length>=e.length?[r,o,a,s,d]:null}var a,s,l,c,d,u=o(n,r,Math.ceil(n.length/4)),p=o(n,r,Math.ceil(n.length/2));return u||p?(a=p?u&&u[4].length>p[4].length?u:p:u,e.length>t.length?(s=a[0],l=a[1],c=a[2],d=a[3]):(c=a[0],d=a[1],s=a[2],l=a[3]),[s,l,c,d,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,i=[],o=0,a=null,s=0,l=0,c=0,d=0,u=0;s<e.length;)0==e[s][0]?(i[o++]=s,l=d,c=u,d=0,u=0,a=e[s][1]):(1==e[s][0]?d+=e[s][1].length:u+=e[s][1].length,a&&a.length<=Math.max(l,c)&&a.length<=Math.max(d,u)&&(e.splice(i[o-1],0,new t.Diff(n,a)),e[i[o-1]+1][0]=1,o--,s=--o>0?i[o-1]:-1,l=0,c=0,d=0,u=0,a=null,r=!0)),s++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),s=1;s<e.length;){if(e[s-1][0]==n&&1==e[s][0]){var p=e[s-1][1],h=e[s][1],m=this.diff_commonOverlap_(p,h),f=this.diff_commonOverlap_(h,p);m>=f?(m>=p.length/2||m>=h.length/2)&&(e.splice(s,0,new t.Diff(0,h.substring(0,m))),e[s-1][1]=p.substring(0,p.length-m),e[s+1][1]=h.substring(m),s++):(f>=p.length/2||f>=h.length/2)&&(e.splice(s,0,new t.Diff(0,p.substring(0,f))),e[s-1][0]=1,e[s-1][1]=h.substring(0,h.length-f),e[s+1][0]=n,e[s+1][1]=p.substring(f),s++),s++}s++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),o=r.match(t.nonAlphaNumericRegex_),a=i.match(t.nonAlphaNumericRegex_),s=o&&r.match(t.whitespaceRegex_),l=a&&i.match(t.whitespaceRegex_),c=s&&r.match(t.linebreakRegex_),d=l&&i.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),p=d&&n.match(t.blanklineStartRegex_);return u||p?5:c||d?4:o&&!s&&l?3:s||l?2:o||a?1:0}for(var r=1;r<e.length-1;){if(0==e[r-1][0]&&0==e[r+1][0]){var i=e[r-1][1],o=e[r][1],a=e[r+1][1],s=this.diff_commonSuffix(i,o);if(s){var l=o.substring(o.length-s);i=i.substring(0,i.length-s),o=l+o.substring(0,o.length-s),a=l+a}for(var c=i,d=o,u=a,p=n(i,o)+n(o,a);o.charAt(0)===a.charAt(0);){i+=o.charAt(0),o=o.substring(1)+a.charAt(0),a=a.substring(1);var h=n(i,o)+n(o,a);h>=p&&(p=h,c=i,d=o,u=a)}e[r-1][1]!=c&&(c?e[r-1][1]=c:(e.splice(r-1,1),r--),e[r][1]=d,u?e[r+1][1]=u:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,i=[],o=0,a=null,s=0,l=!1,c=!1,d=!1,u=!1;s<e.length;)0==e[s][0]?(e[s][1].length<this.Diff_EditCost&&(d||u)?(i[o++]=s,l=d,c=u,a=e[s][1]):(o=0,a=null),d=u=!1):(e[s][0]==n?u=!0:d=!0,a&&(l&&c&&d&&u||a.length<this.Diff_EditCost/2&&l+c+d+u==3)&&(e.splice(i[o-1],0,new t.Diff(n,a)),e[i[o-1]+1][0]=1,o--,a=null,l&&c?(d=u=!0,o=0):(s=--o>0?i[o-1]:-1,d=u=!1),r=!0)),s++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,i=0,o=0,a=0,s="",l="";i<e.length;)switch(e[i][0]){case 1:a++,l+=e[i][1],i++;break;case n:o++,s+=e[i][1],i++;break;case 0:o+a>1?(0!==o&&0!==a&&(0!==(r=this.diff_commonPrefix(l,s))&&(i-o-a>0&&0==e[i-o-a-1][0]?e[i-o-a-1][1]+=l.substring(0,r):(e.splice(0,0,new t.Diff(0,l.substring(0,r))),i++),l=l.substring(r),s=s.substring(r)),0!==(r=this.diff_commonSuffix(l,s))&&(e[i][1]=l.substring(l.length-r)+e[i][1],l=l.substring(0,l.length-r),s=s.substring(0,s.length-r))),i-=o+a,e.splice(i,o+a),s.length&&(e.splice(i,0,new t.Diff(n,s)),i++),l.length&&(e.splice(i,0,new t.Diff(1,l)),i++),i++):0!==i&&0==e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,a=0,o=0,s="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(i=1;i<e.length-1;)0==e[i-1][0]&&0==e[i+1][0]&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),c=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),c=!0)),i++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var r,i=0,o=0,a=0,s=0;for(r=0;r<e.length&&(1!==e[r][0]&&(i+=e[r][1].length),e[r][0]!==n&&(o+=e[r][1].length),!(i>t));r++)a=i,s=o;return e.length!=r&&e[r][0]===n?s:s+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,i=/</g,o=/>/g,a=/\n/g,s=0;s<e.length;s++){var l=e[s][0],c=e[s][1].replace(r,"&amp;").replace(i,"&lt;").replace(o,"&gt;").replace(a,"&para;<br>");switch(l){case 1:t[s]='<ins style="background:#e6ffe6;">'+c+"</ins>";break;case n:t[s]='<del style="background:#ffe6e6;">'+c+"</del>";break;case 0:t[s]="<span>"+c+"</span>"}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},t.prototype.diff_text2=function(e){for(var t=[],r=0;r<e.length;r++)e[r][0]!==n&&(t[r]=e[r][1]);return t.join("")},t.prototype.diff_levenshtein=function(e){for(var t=0,r=0,i=0,o=0;o<e.length;o++){var a=e[o][0],s=e[o][1];switch(a){case 1:r+=s.length;break;case n:i+=s.length;break;case 0:t+=Math.max(r,i),r=0,i=0}}return t+=Math.max(r,i)},t.prototype.diff_toDelta=function(e){for(var t=[],r=0;r<e.length;r++)switch(e[r][0]){case 1:t[r]="+"+encodeURI(e[r][1]);break;case n:t[r]="-"+e[r][1].length;break;case 0:t[r]="="+e[r][1].length}return t.join("\t").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(e,r){for(var i=[],o=0,a=0,s=r.split(/\t/g),l=0;l<s.length;l++){var c=s[l].substring(1);switch(s[l].charAt(0)){case"+":try{i[o++]=new t.Diff(1,decodeURI(c))}catch(p){throw new Error("Illegal escape in diff_fromDelta: "+c)}break;case"-":case"=":var d=parseInt(c,10);if(isNaN(d)||d<0)throw new Error("Invalid number in diff_fromDelta: "+c);var u=e.substring(a,a+=d);"="==s[l].charAt(0)?i[o++]=new t.Diff(0,u):i[o++]=new t.Diff(n,u);break;default:if(s[l])throw new Error("Invalid diff operation in diff_fromDelta: "+s[l])}}if(a!=e.length)throw new Error("Delta length ("+a+") does not equal source text length ("+e.length+").");return i},t.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),i=this;function o(e,r){var o=e/t.length,a=Math.abs(n-r);return i.Match_Distance?o+a/i.Match_Distance:a?1:o}var a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(o(0,s),a),-1!=(s=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,s),a)));var l,c,d=1<<t.length-1;s=-1;for(var u,p=t.length+e.length,h=0;h<t.length;h++){for(l=0,c=p;l<c;)o(h,n+c)<=a?l=c:p=c,c=Math.floor((p-l)/2+l);p=c;var m=Math.max(1,n-c+1),f=Math.min(n+c,e.length)+t.length,g=Array(f+2);g[f+1]=(1<<h)-1;for(var v=f;v>=m;v--){var x=r[e.charAt(v-1)];if(g[v]=0===h?(g[v+1]<<1|1)&x:(g[v+1]<<1|1)&x|(u[v+1]|u[v])<<1|1|u[v+1],g[v]&d){var y=o(h,v-1);if(y<=a){if(a=y,!((s=v-1)>n))break;m=Math.max(1,2*n-s)}}}if(o(h+1,n)>a)break;u=g}return s},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(0!=n.length){if(null===e.start2)throw Error("patch not initialized");for(var r=n.substring(e.start2,e.start2+e.length1),i=0;n.indexOf(r)!=n.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=n.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=n.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new t.Diff(0,o));var a=n.substring(e.start2+e.length1,e.start2+e.length1+i);a&&e.diffs.push(new t.Diff(0,a)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+a.length,e.length2+=o.length+a.length}},t.prototype.patch_make=function(e,r,i){var o,a;if("string"==typeof e&&"string"==typeof r&&"undefined"==typeof i)o=e,(a=this.diff_main(o,r,!0)).length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&"undefined"==typeof r&&"undefined"==typeof i)a=e,o=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&"undefined"==typeof i)o=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!i||"object"!=typeof i)throw new Error("Unknown call format to patch_make.");o=e,a=i}if(0===a.length)return[];for(var s=[],l=new t.patch_obj,c=0,d=0,u=0,p=o,h=o,m=0;m<a.length;m++){var f=a[m][0],g=a[m][1];switch(c||0===f||(l.start1=d,l.start2=u),f){case 1:l.diffs[c++]=a[m],l.length2+=g.length,h=h.substring(0,u)+g+h.substring(u);break;case n:l.length1+=g.length,l.diffs[c++]=a[m],h=h.substring(0,u)+h.substring(u+g.length);break;case 0:g.length<=2*this.Patch_Margin&&c&&a.length!=m+1?(l.diffs[c++]=a[m],l.length1+=g.length,l.length2+=g.length):g.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,p),s.push(l),l=new t.patch_obj,c=0,p=h,d=u)}1!==f&&(d+=g.length),f!==n&&(u+=g.length)}return c&&(this.patch_addContext_(l,p),s.push(l)),s},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=new t.patch_obj;o.diffs=[];for(var a=0;a<i.diffs.length;a++)o.diffs[a]=new t.Diff(i.diffs[a][0],i.diffs[a][1]);o.start1=i.start1,o.start2=i.start2,o.length1=i.length1,o.length2=i.length2,n[r]=o}return n},t.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var r=this.patch_addPadding(e);t=r+t+r,this.patch_splitMax(e);for(var i=0,o=[],a=0;a<e.length;a++){var s,l,c=e[a].start2+i,d=this.diff_text1(e[a].diffs),u=-1;if(d.length>this.Match_MaxBits?-1!=(s=this.match_main(t,d.substring(0,this.Match_MaxBits),c))&&(-1==(u=this.match_main(t,d.substring(d.length-this.Match_MaxBits),c+d.length-this.Match_MaxBits))||s>=u)&&(s=-1):s=this.match_main(t,d,c),-1==s)o[a]=!1,i-=e[a].length2-e[a].length1;else if(o[a]=!0,i=s-c,d==(l=-1==u?t.substring(s,s+d.length):t.substring(s,u+this.Match_MaxBits)))t=t.substring(0,s)+this.diff_text2(e[a].diffs)+t.substring(s+d.length);else{var p=this.diff_main(d,l,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(p)/d.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(p);for(var h,m=0,f=0;f<e[a].diffs.length;f++){var g=e[a].diffs[f];0!==g[0]&&(h=this.diff_xIndex(p,m)),1===g[0]?t=t.substring(0,s+h)+g[1]+t.substring(s+h):g[0]===n&&(t=t.substring(0,s+h)+t.substring(s+this.diff_xIndex(p,m+g[1].length))),g[0]!==n&&(m+=g[1].length)}}}}return[t=t.substring(r.length,t.length-r.length),o]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,r="",i=1;i<=n;i++)r+=String.fromCharCode(i);for(i=0;i<e.length;i++)e[i].start1+=n,e[i].start2+=n;var o=e[0],a=o.diffs;if(0==a.length||0!=a[0][0])a.unshift(new t.Diff(0,r)),o.start1-=n,o.start2-=n,o.length1+=n,o.length2+=n;else if(n>a[0][1].length){var s=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],o.start1-=s,o.start2-=s,o.length1+=s,o.length2+=s}if(0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0])a.push(new t.Diff(0,r)),o.length1+=n,o.length2+=n;else if(n>a[a.length-1][1].length){s=n-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,s),o.length1+=s,o.length2+=s}return r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,i=0;i<e.length;i++)if(!(e[i].length1<=r)){var o=e[i];e.splice(i--,1);for(var a=o.start1,s=o.start2,l="";0!==o.diffs.length;){var c=new t.patch_obj,d=!0;for(c.start1=a-l.length,c.start2=s-l.length,""!==l&&(c.length1=c.length2=l.length,c.diffs.push(new t.Diff(0,l)));0!==o.diffs.length&&c.length1<r-this.Patch_Margin;){var u=o.diffs[0][0],p=o.diffs[0][1];1===u?(c.length2+=p.length,s+=p.length,c.diffs.push(o.diffs.shift()),d=!1):u===n&&1==c.diffs.length&&0==c.diffs[0][0]&&p.length>2*r?(c.length1+=p.length,a+=p.length,d=!1,c.diffs.push(new t.Diff(u,p)),o.diffs.shift()):(p=p.substring(0,r-c.length1-this.Patch_Margin),c.length1+=p.length,a+=p.length,0===u?(c.length2+=p.length,s+=p.length):d=!1,c.diffs.push(new t.Diff(u,p)),p==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(p.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var h=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==h&&(c.length1+=h.length,c.length2+=h.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=h:c.diffs.push(new t.Diff(0,h))),d||e.splice(++i,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},t.prototype.patch_fromText=function(e){var r=[];if(!e)return r;for(var i=e.split("\n"),o=0,a=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;o<i.length;){var s=i[o].match(a);if(!s)throw new Error("Invalid patch string: "+i[o]);var l=new t.patch_obj;for(r.push(l),l.start1=parseInt(s[1],10),""===s[2]?(l.start1--,l.length1=1):"0"==s[2]?l.length1=0:(l.start1--,l.length1=parseInt(s[2],10)),l.start2=parseInt(s[3],10),""===s[4]?(l.start2--,l.length2=1):"0"==s[4]?l.length2=0:(l.start2--,l.length2=parseInt(s[4],10)),o++;o<i.length;){var c=i[o].charAt(0);try{var d=decodeURI(i[o].substring(1))}catch(u){throw new Error("Illegal escape in patch_fromText: "+d)}if("-"==c)l.diffs.push(new t.Diff(n,d));else if("+"==c)l.diffs.push(new t.Diff(1,d));else if(" "==c)l.diffs.push(new t.Diff(0,d));else{if("@"==c)break;if(""!==c)throw new Error('Invalid patch mode "'+c+'" in: '+d)}o++}}return r},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],r=0;r<this.diffs.length;r++){switch(this.diffs[r][0]){case 1:e="+";break;case n:e="-";break;case 0:e=" "}t[r+1]=e+encodeURI(this.diffs[r][1])+"\n"}return t.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0},15797:(e,t,n)=>{var r=n(64816);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},16095:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},16399:(e,t,n)=>{var r=n(5538),i=n(43668),o=n(69987),a=n(45752),s=n(26924),l=n(54052),c=n(44543),d=n(51268),u="[object Arguments]",p="[object Array]",h="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,f,g,v){var x=l(e),y=l(t),b=x?p:s(e),j=y?p:s(t),w=(b=b==u?h:b)==h,_=(j=j==u?h:j)==h,C=b==j;if(C&&c(e)){if(!c(t))return!1;x=!0,w=!1}if(C&&!w)return v||(v=new r),x||d(e)?i(e,t,n,f,g,v):o(e,t,b,n,f,g,v);if(!(1&n)){var S=w&&m.call(e,"__wrapped__"),A=_&&m.call(t,"__wrapped__");if(S||A){var k=S?e.value():e,M=A?t.value():t;return v||(v=new r),g(k,M,n,f,v)}}return!!C&&(v||(v=new r),a(e,t,n,f,g,v))}},16599:(e,t,n)=>{var r=n(19841);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e===e,a=r(e),s=void 0!==t,l=null===t,c=t===t,d=r(t);if(!l&&!d&&!a&&e>t||a&&s&&c&&!l&&!d||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!d&&e<t||d&&n&&o&&!i&&!a||l&&n&&o||!s&&o||!c)return-1}return 0}},16913:(e,t,n)=>{var r=n(9812),i=n(34552),o=n(16095),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},17002:(e,t,n)=>{var r=n(27676),i=n(24746),o=n(9096),a=n(54052),s=n(60929);e.exports=function(e,t,n){var l=a(e)?r:i;return n&&s(e,t,n)&&(t=void 0),l(e,o(t,3))}},17162:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>o});var r=n(67598),i=n(89751);function o(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:o(e,n)||i,t&&(r=t(r,i,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],d=o(e.theme,s)||{};return(0,i.NI)(e,c,e=>{let i=a(d,l,e);return e===i&&"string"===typeof e&&(i=a(d,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?i:{[n]:i}})};return c.propTypes={},c.filterProps=[t],c}},17529:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},17555:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock")},17638:(e,t,n)=>{"use strict";var r=n(72762),i=n(41523);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},17868:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>r})},18280:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(58168),i=n(98587),o=n(19172),a=n(34853);const s={borderRadius:4};var l=n(28604);var c=n(58812),d=n(37758),u=n(89703);const p=["breakpoints","palette","spacing","shape"];const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:h,shape:m={}}=e,f=(0,i.A)(e,p),g=(0,a.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0===n.length?[1]:n).map(e=>{const n=t(e);return"number"===typeof n?"".concat(n,"px"):n}).join(" ")};return n.mui=!0,n}(h);let x=(0,o.A)({breakpoints:g,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},s,m)},f);x.applyStyles=u.A;for(var y=arguments.length,b=new Array(y>1?y-1:0),j=1;j<y;j++)b[j-1]=arguments[j];return x=b.reduce((e,t)=>(0,o.A)(e,t),x),x.unstable_sxConfig=(0,r.A)({},d.A,null==f?void 0:f.unstable_sxConfig),x.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},x}},18527:(e,t,n)=>{var r=n(54238),i=n(37377),o=i;o.v1=r,o.v4=i,e.exports=o},18630:(e,t,n)=>{var r=n(61516),i=n(6806),o=n(18962),a=n(11295),s=n(38710);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return a(e)}}},18698:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(58168),i=n(98587),o=n(19172),a=n(37758);const s=["sx"],l=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:a.A;return Object.keys(e).forEach(t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r};function c(e){const{sx:t}=e,n=(0,i.A)(e,s),{systemProps:a,otherProps:c}=l(n);let d;return d=Array.isArray(t)?[a,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,o.Q)(e)?(0,r.A)({},a,e):a}:(0,r.A)({},a,t),(0,r.A)({},c,{sx:d})}},18851:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6m0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4"}),"BrightnessHigh")},18902:(e,t,n)=>{var r=n(64816),i=n(86179),o=n(46704);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},18962:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},19172:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,Q:()=>o});var r=n(58168),i=n(65043);function o(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function a(e){if(i.isValidElement(e)||!o(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=a(e[n])}),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=n.clone?(0,r.A)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach(r=>{i.isValidElement(t[r])?l[r]=t[r]:o(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&o(e[r])?l[r]=s(e[r],t[r],n):n.clone?l[r]=o(t[r])?a(t[r]):t[r]:l[r]=t[r]}),l}},19185:(e,t,n)=>{var r=n(26882)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});e.exports=r},19482:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,isPlainObject:()=>r.Q});var r=n(19172)},19648:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},19778:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},19841:(e,t,n)=>{var r=n(16913),i=n(22761);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},19853:(e,t,n)=>{var r=n(26989);e.exports=function(e,t){return r(e,t)}},20067:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",m="[object Promise]",f="[object RegExp]",g="[object Set]",v="[object String]",x="[object Symbol]",y="[object WeakMap]",b="[object ArrayBuffer]",j="[object DataView]",w=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[o]=C[a]=C[b]=C[s]=C[j]=C[l]=C[c]=C[d]=C[u]=C[p]=C[h]=C[f]=C[g]=C[v]=C[y]=!1;var S="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,A="object"==typeof self&&self&&self.Object===Object&&self,k=S||A||Function("return this")(),M=t&&!t.nodeType&&t,O=M&&e&&!e.nodeType&&e,T=O&&O.exports===M,E=T&&S.process,P=function(){try{return E&&E.binding&&E.binding("util")}catch(e){}}(),D=P&&P.isTypedArray;function R(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function N(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function L(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var I,F,$=Array.prototype,B=Function.prototype,z=Object.prototype,H=k["__core-js_shared__"],W=B.toString,V=z.hasOwnProperty,U=function(){var e=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),q=z.toString,G=RegExp("^"+W.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=T?k.Buffer:void 0,Z=k.Symbol,K=k.Uint8Array,X=z.propertyIsEnumerable,Q=$.splice,J=Z?Z.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Y?Y.isBuffer:void 0,ne=(I=Object.keys,F=Object,function(e){return I(F(e))}),re=Ee(k,"DataView"),ie=Ee(k,"Map"),oe=Ee(k,"Promise"),ae=Ee(k,"Set"),se=Ee(k,"WeakMap"),le=Ee(Object,"create"),ce=Ne(re),de=Ne(ie),ue=Ne(oe),pe=Ne(ae),he=Ne(se),me=Z?Z.prototype:void 0,fe=me?me.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xe;++t<n;)this.add(e[t])}function be(e){var t=this.__data__=new ve(e);this.size=t.size}function je(e,t){var n=Fe(e),r=!n&&Ie(e),i=!n&&!r&&$e(e),o=!n&&!r&&!i&&Ve(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!V.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Re(c,l))||s.push(c);return s}function we(e,t){for(var n=e.length;n--;)if(Le(e[n][0],t))return n;return-1}function _e(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?function(e){var t=V.call(e,J),n=e[J];try{e[J]=void 0;var r=!0}catch(o){}var i=q.call(e);r&&(t?e[J]=n:delete e[J]);return i}(e):function(e){return q.call(e)}(e)}function Ce(e){return We(e)&&_e(e)==o}function Se(e,t,n,r,i){return e===t||(null==e||null==t||!We(e)&&!We(t)?e!==e&&t!==t:function(e,t,n,r,i,d){var m=Fe(e),y=Fe(t),w=m?a:De(e),_=y?a:De(t),C=(w=w==o?h:w)==h,S=(_=_==o?h:_)==h,A=w==_;if(A&&$e(e)){if(!$e(t))return!1;m=!0,C=!1}if(A&&!C)return d||(d=new be),m||Ve(e)?Me(e,t,n,r,i,d):function(e,t,n,r,i,o,a){switch(n){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!o(new K(e),new K(t)));case s:case l:case p:return Le(+e,+t);case c:return e.name==t.name&&e.message==t.message;case f:case v:return e==t+"";case u:var d=N;case g:var h=1&r;if(d||(d=L),e.size!=t.size&&!h)return!1;var m=a.get(e);if(m)return m==t;r|=2,a.set(e,t);var y=Me(d(e),d(t),r,i,o,a);return a.delete(e),y;case x:if(fe)return fe.call(e)==fe.call(t)}return!1}(e,t,w,n,r,i,d);if(!(1&n)){var k=C&&V.call(e,"__wrapped__"),M=S&&V.call(t,"__wrapped__");if(k||M){var O=k?e.value():e,T=M?t.value():t;return d||(d=new be),i(O,T,n,r,d)}}if(!A)return!1;return d||(d=new be),function(e,t,n,r,i,o){var a=1&n,s=Oe(e),l=s.length,c=Oe(t),d=c.length;if(l!=d&&!a)return!1;var u=l;for(;u--;){var p=s[u];if(!(a?p in t:V.call(t,p)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);var f=a;for(;++u<l;){var g=e[p=s[u]],v=t[p];if(r)var x=a?r(v,g,p,t,e,o):r(g,v,p,e,t,o);if(!(void 0===x?g===v||i(g,v,n,r,o):x)){m=!1;break}f||(f="constructor"==p)}if(m&&!f){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,i,d)}(e,t,n,r,Se,i))}function Ae(e){return!(!He(e)||function(e){return!!U&&U in e}(e))&&(Be(e)?G:w).test(Ne(e))}function ke(e){if(!function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||z;return e===n}(e))return ne(e);var t=[];for(var n in Object(e))V.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Me(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var d=-1,u=!0,p=2&n?new ye:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var f=a?r(m,h,d,t,e,o):r(h,m,d,e,t,o);if(void 0!==f){if(f)continue;u=!1;break}if(p){if(!R(t,function(e,t){if(a=t,!p.has(a)&&(h===e||i(h,e,n,r,o)))return p.push(t);var a})){u=!1;break}}else if(h!==m&&!i(h,m,n,r,o)){u=!1;break}}return o.delete(e),o.delete(t),u}function Oe(e){return function(e,t,n){var r=t(e);return Fe(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ue,Pe)}function Te(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ae(n)?n:void 0}ge.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(le){var n=t[e];return n===r?void 0:n}return V.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:V.call(t,e)},ge.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=le&&void 0===t?r:t,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=we(t,e);return!(n<0)&&(n==t.length-1?t.pop():Q.call(t,n,1),--this.size,!0)},ve.prototype.get=function(e){var t=this.__data__,n=we(t,e);return n<0?void 0:t[n][1]},ve.prototype.has=function(e){return we(this.__data__,e)>-1},ve.prototype.set=function(e,t){var n=this.__data__,r=we(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},xe.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(ie||ve),string:new ge}},xe.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},xe.prototype.get=function(e){return Te(this,e).get(e)},xe.prototype.has=function(e){return Te(this,e).has(e)},xe.prototype.set=function(e,t){var n=Te(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,r),this},ye.prototype.has=function(e){return this.__data__.has(e)},be.prototype.clear=function(){this.__data__=new ve,this.size=0},be.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},be.prototype.get=function(e){return this.__data__.get(e)},be.prototype.has=function(e){return this.__data__.has(e)},be.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xe(r)}return n.set(e,t),this.size=n.size,this};var Pe=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(ee(e),function(t){return X.call(e,t)}))}:function(){return[]},De=_e;function Re(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||_.test(e))&&e>-1&&e%1==0&&e<t}function Ne(e){if(null!=e){try{return W.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Le(e,t){return e===t||e!==e&&t!==t}(re&&De(new re(new ArrayBuffer(1)))!=j||ie&&De(new ie)!=u||oe&&De(oe.resolve())!=m||ae&&De(new ae)!=g||se&&De(new se)!=y)&&(De=function(e){var t=_e(e),n=t==h?e.constructor:void 0,r=n?Ne(n):"";if(r)switch(r){case ce:return j;case de:return u;case ue:return m;case pe:return g;case he:return y}return t});var Ie=Ce(function(){return arguments}())?Ce:function(e){return We(e)&&V.call(e,"callee")&&!X.call(e,"callee")},Fe=Array.isArray;var $e=te||function(){return!1};function Be(e){if(!He(e))return!1;var t=_e(e);return t==d||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ze(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function He(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function We(e){return null!=e&&"object"==typeof e}var Ve=D?function(e){return function(t){return e(t)}}(D):function(e){return We(e)&&ze(e.length)&&!!C[_e(e)]};function Ue(e){return null!=(t=e)&&ze(t.length)&&!Be(t)?je(e):ke(e);var t}e.exports=function(e,t){return Se(e,t)}},20310:(e,t,n)=>{var r=n(21817),i=n(85990),o=n(36140);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},20449:(e,t,n)=>{var r=n(26924),i=n(22761);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},20672:(e,t,n)=>{"use strict";var r=n(86267),i=n(26973),o=n(88938),a=n(56438);var s=function e(t){var n=new o(t),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(52989));s.Axios=o,s.CanceledError=n(47482),s.CancelToken=n(27690),s.isCancel=n(87767),s.VERSION=n(23104).version,s.toFormData=n(37289),s.AxiosError=n(82702),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(8125),s.isAxiosError=n(98738),e.exports=s,e.exports.default=s},20705:(e,t,n)=>{"use strict";var r=n(86267);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},20816:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(82284);function i(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},20977:(e,t,n)=>{var r=n(9096),i=n(64416);e.exports=function(e,t){return e&&e.length?i(e,r(t,2)):[]}},21337:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},21338:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline")},21817:(e,t,n)=>{var r=n(46686),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},21825:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9m0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7"}),"AccessAlarm")},22165:(e,t,n)=>{var r=n(45652);e.exports=function(e,t){var n;return r(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}},22427:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(31668).A},22505:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},22541:e=>{e.exports=function(e){return function(){return e}}},22662:(e,t,n)=>{var r=n(95575);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},22761:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},22777:(e,t,n)=>{var r=n(15193),i=n(22761),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},22794:(e,t,n)=>{var r=n(79742),i=n(97498),o=n(9096);e.exports=function(e,t){return e&&e.length?r(e,o(t,2),i):void 0}},22929:(e,t,n)=>{var r=n(56552).Uint8Array;e.exports=r},23104:e=>{e.exports={version:"0.27.2"}},23579:(e,t,n)=>{var r=n(41069),i=n(643);e.exports=function(e){return i(r(e).toLowerCase())}},23781:(e,t,n)=>{var r=n(9417),i=n(28673);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},24190:(e,t,n)=>{var r=n(61340);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},24597:(e,t,n)=>{var r=n(52587),i=n(9096),o=n(22165),a=n(54052),s=n(60929);e.exports=function(e,t,n){var l=a(e)?r:o;return n&&s(e,t,n)&&(t=void 0),l(e,i(t,3))}},24746:(e,t,n)=>{var r=n(45652);e.exports=function(e,t){var n=!0;return r(e,function(e,r,i){return n=!!t(e,r,i)}),n}},24989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,private_createBreakpoints:()=>i.A,unstable_applyStyles:()=>o.A});var r=n(18280),i=n(34853),o=n(89703)},24994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},25051:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},26480:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox")},26564:(e,t,n)=>{"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},26581:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckBox")},26600:(e,t,n)=>{var r=n(87937)(n(56552),"WeakMap");e.exports=r},26882:(e,t,n)=>{var r=n(99421),i=n(4971),o=n(87676),a=RegExp("['\u2019]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},26924:(e,t,n)=>{var r=n(97685),i=n(85204),o=n(65387),a=n(72070),s=n(26600),l=n(16913),c=n(96996),d="[object Map]",u="[object Promise]",p="[object Set]",h="[object WeakMap]",m="[object DataView]",f=c(r),g=c(i),v=c(o),x=c(a),y=c(s),b=l;(r&&b(new r(new ArrayBuffer(1)))!=m||i&&b(new i)!=d||o&&b(o.resolve())!=u||a&&b(new a)!=p||s&&b(new s)!=h)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case f:return m;case g:return d;case v:return u;case x:return p;case y:return h}return t}),e.exports=b},26973:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},26989:(e,t,n)=>{var r=n(16399),i=n(22761);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!==t&&n!==n:r(t,n,o,a,e,s))}},27328:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65043);const i=function(e,t){var n,i;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(i=e.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},27615:(e,t,n)=>{var r=n(95575);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},27676:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}},27690:(e,t,n)=>{"use strict";var r=n(47482);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;this.promise.then(function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,r=new Promise(function(e){n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},27760:e=>{e.exports=function(e){return this.__data__.get(e)}},27894:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},28189:(e,t,n)=>{var r=n(53871);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},28325:(e,t,n)=>{var r=n(22541),i=n(5654),o=n(33279),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},28575:(e,t,n)=>{e=n.nmd(e),ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,t,n){n.exports='\n\n/* ------------------------------------------------------------------------------------------\n * Editor Search Form\n * --------------------------------------------------------------------------------------- */\n.ace_search {\n    background-color: #ddd;\n    color: #666;\n    border: 1px solid #cbcbcb;\n    border-top: 0 none;\n    overflow: hidden;\n    margin: 0;\n    padding: 4px 6px 0 4px;\n    position: absolute;\n    top: 0;\n    z-index: 99;\n    white-space: normal;\n}\n.ace_search.left {\n    border-left: 0 none;\n    border-radius: 0px 0px 5px 0px;\n    left: 0;\n}\n.ace_search.right {\n    border-radius: 0px 0px 0px 5px;\n    border-right: 0 none;\n    right: 0;\n}\n\n.ace_search_form, .ace_replace_form {\n    margin: 0 20px 4px 0;\n    overflow: hidden;\n    line-height: 1.9;\n}\n.ace_replace_form {\n    margin-right: 0;\n}\n.ace_search_form.ace_nomatch {\n    outline: 1px solid red;\n}\n\n.ace_search_field {\n    border-radius: 3px 0 0 3px;\n    background-color: white;\n    color: black;\n    border: 1px solid #cbcbcb;\n    border-right: 0 none;\n    outline: 0;\n    padding: 0;\n    font-size: inherit;\n    margin: 0;\n    line-height: inherit;\n    padding: 0 6px;\n    min-width: 17em;\n    vertical-align: top;\n    min-height: 1.8em;\n    box-sizing: content-box;\n}\n.ace_searchbtn {\n    border: 1px solid #cbcbcb;\n    line-height: inherit;\n    display: inline-block;\n    padding: 0 6px;\n    background: #fff;\n    border-right: 0 none;\n    border-left: 1px solid #dcdcdc;\n    cursor: pointer;\n    margin: 0;\n    position: relative;\n    color: #666;\n}\n.ace_searchbtn:last-child {\n    border-radius: 0 3px 3px 0;\n    border-right: 1px solid #cbcbcb;\n}\n.ace_searchbtn:disabled {\n    background: none;\n    cursor: default;\n}\n.ace_searchbtn:hover {\n    background-color: #eef1f6;\n}\n.ace_searchbtn.prev, .ace_searchbtn.next {\n     padding: 0px 0.7em\n}\n.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\n     content: "";\n     border: solid 2px #888;\n     width: 0.5em;\n     height: 0.5em;\n     border-width:  2px 0 0 2px;\n     display:inline-block;\n     transform: rotate(-45deg);\n}\n.ace_searchbtn.next:after {\n     border-width: 0 2px 2px 0 ;\n}\n.ace_searchbtn_close {\n    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\n    border-radius: 50%;\n    border: 0 none;\n    color: #656565;\n    cursor: pointer;\n    font: 16px/16px Arial;\n    padding: 0;\n    height: 14px;\n    width: 14px;\n    top: 9px;\n    right: 7px;\n    position: absolute;\n}\n.ace_searchbtn_close:hover {\n    background-color: #656565;\n    background-position: 50% 100%;\n    color: white;\n}\n\n.ace_button {\n    margin-left: 2px;\n    cursor: pointer;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    -o-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n    overflow: hidden;\n    opacity: 0.7;\n    border: 1px solid rgba(100,100,100,0.23);\n    padding: 1px;\n    box-sizing:    border-box!important;\n    color: black;\n}\n\n.ace_button:hover {\n    background-color: #eee;\n    opacity:1;\n}\n.ace_button:active {\n    background-color: #ddd;\n}\n\n.ace_button.checked {\n    border-color: #3399ff;\n    opacity:1;\n}\n\n.ace_search_options{\n    margin-bottom: 3px;\n    text-align: right;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    -o-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n    clear: both;\n}\n\n.ace_search_counter {\n    float: left;\n    font-family: arial;\n    padding: 0 8px;\n}'}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),o=e("../lib/event"),a=e("./searchbox-css"),s=e("../keyboard/hash_handler").HashHandler,l=e("../lib/keys"),c=e("../config").nls;r.importCssString(a,"ace_searchbox",!1);var d=function(){function e(e,t,n){this.activeInput,this.element=r.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:c("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"\u200b"],["span",{action:"findNext",class:"ace_searchbtn next"},"\u200b"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},c("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:c("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},c("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},c("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:c("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:c("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:c("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:c("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:c("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(e),r.importCssString(a,"ace_searchbox",e.container),o.addListener(this.element,"touchstart",function(e){e.stopPropagation()},e)}return e.prototype.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},e.prototype.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},e.prototype.onEditorInput=function(){this.find(!1,!1,!0)},e.prototype.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},e.prototype.$init=function(){var e=this.element;this.$initElements(e);var t=this;o.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),o.stopPropagation(e)}),o.addListener(e,"click",function(e){var n=(e.target||e.srcElement).getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),o.stopPropagation(e)}),o.addCommandKeyListener(e,function(e,n,r){var i=l.keyCodeToString(r),a=t.$searchBarKb.findKeyCommand(n,i);a&&a.exec&&(a.exec(t),o.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),o.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),o.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),o.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},e.prototype.setSearchRange=function(e){this.searchRange=e,e?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},e.prototype.$syncOptions=function(e){r.setCssClass(this.replaceOption,"checked",this.searchRange),r.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",r.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),r.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),r.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var t=this.editor.getReadOnly();this.replaceOption.style.display=t?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!t?"":"none",this.find(!1,!1,e)},e.prototype.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},e.prototype.find=function(e,t,n){if(this.editor.session){var i=!this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange})&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",i),this.editor._emit("findSearchBox",{match:!i}),this.highlight(),this.updateCounter()}},e.prototype.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,n=t.unicode,r=0,o=0;if(t){var a=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue();e.$search.$isMultilineSearch(e.getLastSearchOptions())&&(a=a.replace(/\r\n|\r|\n/g,"\n"),e.session.doc.$autoNewLine="\n");var s=e.session.doc.positionToIndex(e.selection.anchor);this.searchRange&&(s-=e.session.doc.positionToIndex(this.searchRange.start));for(var l,d=t.lastIndex=0;(l=t.exec(a))&&(r++,(d=l.index)<=s&&o++,!(r>999))&&(l[0]||(t.lastIndex=d+=i.skipEmptyMatch(a,d,n),!(d>=a.length))););}this.searchCounter.textContent=c("search-box.search-counter","$0 of $1",[o,r>999?"999+":r])},e.prototype.findNext=function(){this.find(!0,!1)},e.prototype.findPrev=function(){this.find(!0,!0)},e.prototype.findAll=function(){var e=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},e.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},e.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},e.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},e.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},e.prototype.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=t,this.editor.$search.$options.regExp&&(e=i.escapeRegExp(e)),void 0!=e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},e.prototype.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput},e}(),u=new s;u.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.editor.getReadOnly()||(e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus())},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),u.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]);var p=new s([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]);d.prototype.$searchBarKb=u,d.prototype.$closeSearchBarKb=p,t.SearchBox=d,t.Search=function(e,t){var n=e.searchBox||new d(e),r=e.session.selection.getRange(),i=r.isMultiLine()?"":e.session.getTextRange(r);n.show(i,t)}}),ace.require(["ace/ext/searchbox"],function(t){e&&(e.exports=t)})},28604:(e,t,n)=>{"use strict";n.d(t,{LX:()=>m,MA:()=>h,_W:()=>f,Lc:()=>x,Ms:()=>y});var r=n(89751),i=n(17162),o=n(13815);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],i=s[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]}),d=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],u=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],p=[...d,...u];function h(e,t,n,r){var o;const a=null!=(o=(0,i.Yn)(e,t,!1))?o:n;return"number"===typeof a?e=>"string"===typeof e?e:a*e:Array.isArray(a)?e=>"string"===typeof e?e:a[e]:"function"===typeof a?a:()=>{}}function m(e){return h(e,"spacing",8)}function f(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function g(e,t,n,i){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=f(t,n),e),{})}(c(n),i),a=e[n];return(0,r.NI)(e,a,o)}function v(e,t){const n=m(e.theme);return Object.keys(e).map(r=>g(e,t,r,n)).reduce(o.A,{})}function x(e){return v(e,d)}function y(e){return v(e,u)}function b(e){return v(e,p)}x.propTypes={},x.filterProps=d,y.propTypes={},y.filterProps=u,b.propTypes={},b.filterProps=p},28673:(e,t,n)=>{var r=n(73204),i=n(83713),o=n(6571);e.exports=function(e){return o(e)?r(e):i(e)}},29075:(e,t,n)=>{var r=n(96614),i=n(56326);e.exports=function(e,t){return r(e,i(e),t)}},29461:(e,t,n)=>{"use strict";e.exports=n(72330)},29935:(e,t,n)=>{var r=n(61340),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},30474:(e,t,n)=>{var r=n(73204),i=n(58122),o=n(6571);e.exports=function(e){return o(e)?r(e,!0):i(e)}},30918:(e,t,n)=>{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},31170:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},31668:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},31782:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(65043),i=n(84440);const o=function(e){const t=r.useRef(e);return(0,i.A)(()=>{t.current=e}),r.useRef(function(){return(0,t.current)(...arguments)}).current}},32520:(e,t,n)=>{var r=n(75816),i=n(9096),o=n(99140),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:o(n);return l<0&&(l=a(s+l,0)),r(e,i(t,3),l)}},32706:(e,t,n)=>{"use strict";n(47358)},33097:(e,t,n)=>{var r=n(52969);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},33279:e=>{e.exports=function(e){return e}},33411:(e,t,n)=>{var r=n(50149),i=n(9096),o=n(38883),a=n(54052);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},34109:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"}),"CheckBoxOutlineBlank")},34535:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s});var r=n(38052),i=n(15170),o=n(13375),a=n(61475);const s=(0,r.Ay)({themeId:o.A,defaultTheme:i.A,rootShouldForwardProp:a.A})},34552:(e,t,n)=>{var r=n(9812),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},34612:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(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,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,d=e[c];if(0>o(l,n))c<i&&0>o(d,l)?(e[r]=d,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(d,n)))break e;e[r]=d,e[c]=n,r=c}}}return t}function o(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 a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],d=[],u=1,p=null,h=3,m=!1,f=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,x="function"===typeof clearTimeout?clearTimeout:null,y="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(d);null!==t;){if(null===t.callback)i(d);else{if(!(t.startTime<=e))break;i(d),t.sortIndex=t.expirationTime,n(c,t)}t=r(d)}}function j(e){if(g=!1,b(e),!f)if(null!==r(c))f=!0,D(w);else{var t=r(d);null!==t&&R(j,t.startTime-e)}}function w(e,n){f=!1,g&&(g=!1,x(A),A=-1),m=!0;var o=h;try{for(b(n),p=r(c);null!==p&&(!(p.expirationTime>n)||e&&!O());){var a=p.callback;if("function"===typeof a){p.callback=null,h=p.priorityLevel;var s=a(p.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?p.callback=s:p===r(c)&&i(c),b(n)}else i(c);p=r(c)}if(null!==p)var l=!0;else{var u=r(d);null!==u&&R(j,u.startTime-n),l=!1}return l}finally{p=null,h=o,m=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,C=!1,S=null,A=-1,k=5,M=-1;function O(){return!(t.unstable_now()-M<k)}function T(){if(null!==S){var e=t.unstable_now();M=e;var n=!0;try{n=S(!0,e)}finally{n?_():(C=!1,S=null)}}else C=!1}if("function"===typeof y)_=function(){y(T)};else if("undefined"!==typeof MessageChannel){var E=new MessageChannel,P=E.port2;E.port1.onmessage=T,_=function(){P.postMessage(null)}}else _=function(){v(T,0)};function D(e){S=e,C||(C=!0,_())}function R(e,n){A=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){f||m||(f=!0,D(w))},t.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"):k=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:u++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(d,e),null===r(c)&&e===r(d)&&(g?(x(A),A=-1):g=!0,R(j,o-a))):(e.sortIndex=s,n(c,e),f||m||(f=!0,D(w))),e},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},34853:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(98587),i=n(58168);const o=["values","unit","step"],a=e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,i.A)({},e,{[t.key]:t.val}),{})};function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5}=e,l=(0,r.A)(e,o),c=a(t),d=Object.keys(c);function u(e){const r="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(r).concat(n,")")}function p(e){const r="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(r-s/100).concat(n,")")}function h(e,r){const i=d.indexOf(r);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(n,") and ")+"(max-width:".concat((-1!==i&&"number"===typeof t[d[i]]?t[d[i]]:r)-s/100).concat(n,")")}return(0,i.A)({keys:d,values:c,up:u,down:p,between:h,only:function(e){return d.indexOf(e)+1<d.length?h(e,d[d.indexOf(e)+1]):u(e)},not:function(e){const t=d.indexOf(e);return 0===t?u(d[1]):t===d.length-1?p(d[t]):h(e,d[d.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},l)}},35268:(e,t,n)=>{var r=n(79160);e.exports=function(e){return r(e)&&e!=+e}},35324:(e,t,n)=>{var r=n(54052),i=n(62597),o=n(14079),a=n(41069);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},35428:(e,t,n)=>{var r=n(16913),i=n(56173),o=n(22761),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},35967:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},36078:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(63940).A},36140:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},36285:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14 8c0-2.21-1.79-4-4-4S6 5.79 6 8s1.79 4 4 4 4-1.79 4-4m3 2v2h6v-2zM2 18v2h16v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4"}),"PersonRemove")},36311:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},36631:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M17 13l-5 5-5-5h3V9h4v4z"}),"CloudDownload")},36741:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},36954:(e,t,n)=>{var r=n(11629),i=n(37857),o=n(46686),a=n(96996),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,d=l.toString,u=c.hasOwnProperty,p=RegExp("^"+d.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:s).test(a(e))}},37105:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},37159:(e,t,n)=>{var r=n(12622);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},37289:(e,t,n)=>{"use strict";var r=n(86267);e.exports=function(e,t){t=t||new FormData;var n=[];function i(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,a){if(r.isPlainObject(o)||r.isArray(o)){if(-1!==n.indexOf(o))throw Error("Circular reference detected in "+a);n.push(o),r.forEach(o,function(n,o){if(!r.isUndefined(n)){var s,l=a?a+"."+o:o;if(n&&!a&&"object"===typeof n)if(r.endsWith(o,"{}"))n=JSON.stringify(n);else if(r.endsWith(o,"[]")&&(s=r.toArray(n)))return void s.forEach(function(e){!r.isUndefined(e)&&t.append(l,i(e))});e(n,l)}}),n.pop()}else t.append(a,i(o))}(e),t}},37303:(e,t,n)=>{var r=n(40801),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},37344:(e,t,n)=>{"use strict";n.d(t,{A:()=>R});var r=n(58168),i=n(98587),o=n(17868),a=n(19172),s=n(37758),l=n(58812),c=n(18280);var d=n(67266);const u={black:"#000",white:"#fff"},p={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},h={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},m={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},f={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},x={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=["mode","contrastThreshold","tonalOffset"],b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:u.white,default:u.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},j={text:{primary:u.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:u.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,d.a)(e.main,i):"dark"===t&&(e.dark=(0,d.e$)(e.main,o)))}function _(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,l=(0,i.A)(e,y),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(t),_=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[200],light:h[50],dark:h[400]}:{main:h[500],light:h[300],dark:h[700]}}(t),C=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[500],light:m[300],dark:m[700]}:{main:m[700],light:m[400],dark:m[800]}}(t),S=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),A=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:x[400],light:x[300],dark:x[700]}:{main:x[800],light:x[500],dark:x[900]}}(t),k=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:f[400],light:f[300],dark:f[700]}:{main:"#ed6c02",light:f[500],dark:f[900]}}(t);function M(e){return(0,d.eM)(e,j.text.primary)>=n?j.text.primary:b.text.primary}const O=e=>{let{color:t,name:n,mainShade:i=500,lightShade:a=300,darkShade:l=700}=e;if(t=(0,r.A)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,o.A)(11,n?" (".concat(n,")"):"",i));if("string"!==typeof t.main)throw new Error((0,o.A)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return w(t,"light",a,s),w(t,"dark",l,s),t.contrastText||(t.contrastText=M(t.main)),t},T={dark:j,light:b};return(0,a.A)((0,r.A)({common:(0,r.A)({},u),mode:t,primary:O({color:c,name:"primary"}),secondary:O({color:_,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:O({color:C,name:"error"}),warning:O({color:k,name:"warning"}),info:O({color:S,name:"info"}),success:O({color:A,name:"success"}),grey:p,contrastThreshold:n,getContrastText:M,augmentColor:O,tonalOffset:s},T[t]),l)}const C=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const S={textTransform:"uppercase"},A='"Roboto", "Helvetica", "Arial", sans-serif';function k(e,t){const n="function"===typeof t?t(e):t,{fontFamily:o=A,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:d=500,fontWeightBold:u=700,htmlFontSize:p=16,allVariants:h,pxToRem:m}=n,f=(0,i.A)(n,C);const g=s/14,v=m||(e=>"".concat(e/p*g,"rem")),x=(e,t,n,i,a)=>{return(0,r.A)({fontFamily:o,fontWeight:e,fontSize:v(t),lineHeight:n},o===A?{letterSpacing:"".concat((s=i/t,Math.round(1e5*s)/1e5),"em")}:{},a,h);var s},y={h1:x(l,96,1.167,-1.5),h2:x(l,60,1.2,-.5),h3:x(c,48,1.167,0),h4:x(c,34,1.235,.25),h5:x(c,24,1.334,0),h6:x(d,20,1.6,.15),subtitle1:x(c,16,1.75,.15),subtitle2:x(d,14,1.57,.1),body1:x(c,16,1.5,.15),body2:x(c,14,1.43,.15),button:x(d,14,1.75,.4,S),caption:x(c,12,1.66,.4),overline:x(c,12,2.66,1,S),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,a.A)((0,r.A)({htmlFontSize:p,pxToRem:v,fontFamily:o,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:u},y),f,{clone:!1})}function M(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const O=["none",M(0,2,1,-1,0,1,1,0,0,1,3,0),M(0,3,1,-2,0,2,2,0,0,1,5,0),M(0,3,3,-2,0,3,4,0,0,1,8,0),M(0,2,4,-1,0,4,5,0,0,1,10,0),M(0,3,5,-1,0,5,8,0,0,1,14,0),M(0,3,5,-1,0,6,10,0,0,1,18,0),M(0,4,5,-2,0,7,10,1,0,2,16,1),M(0,5,5,-3,0,8,10,1,0,3,14,2),M(0,5,6,-3,0,9,12,1,0,3,16,2),M(0,6,6,-3,0,10,14,1,0,4,18,3),M(0,6,7,-4,0,11,15,1,0,4,20,3),M(0,7,8,-4,0,12,17,2,0,5,22,4),M(0,7,8,-4,0,13,19,2,0,5,24,4),M(0,7,9,-4,0,14,21,2,0,5,26,4),M(0,8,9,-5,0,15,22,2,0,6,28,5),M(0,8,10,-5,0,16,24,2,0,6,30,5),M(0,8,11,-5,0,17,26,2,0,6,32,5),M(0,9,11,-5,0,18,28,2,0,7,34,6),M(0,9,12,-6,0,19,29,2,0,7,36,6),M(0,10,13,-6,0,20,31,3,0,8,38,7),M(0,10,13,-6,0,21,33,3,0,8,40,7),M(0,10,14,-6,0,22,35,3,0,8,42,7),M(0,11,14,-7,0,23,36,3,0,9,44,8),M(0,11,15,-7,0,24,38,3,0,9,46,8)];var T=n(14318);const E={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},P=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function D(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:d={},typography:u={}}=e,p=(0,i.A)(e,P);if(e.vars&&void 0===e.generateCssVars)throw new Error((0,o.A)(18));const h=_(n),m=(0,c.A)(e);let f=(0,a.A)(m,{mixins:(g=m.breakpoints,v=t,(0,r.A)({toolbar:{minHeight:56,[g.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[g.up("sm")]:{minHeight:64}}},v)),palette:h,shadows:O.slice(),typography:k(h,u),transitions:(0,T.Ay)(d),zIndex:(0,r.A)({},E)});var g,v;f=(0,a.A)(f,p);for(var x=arguments.length,y=new Array(x>1?x-1:0),b=1;b<x;b++)y[b-1]=arguments[b];return f=y.reduce((e,t)=>(0,a.A)(e,t),f),f.unstable_sxConfig=(0,r.A)({},s.A,null==p?void 0:p.unstable_sxConfig),f.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},f}const R=D},37377:(e,t,n)=>{var r=n(93795),i=n(83950);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},37602:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0M6 16V7H4v9c0 2.76 2.24 5 5 5h6v-2H9c-1.66 0-3-1.34-3-3m14 4.07L14.93 15H11.5v-3.68c1.4 1.15 3.6 2.16 5.5 2.16v-2.16c-1.66.02-3.61-.87-4.67-2.04l-1.4-1.55c-.19-.21-.43-.38-.69-.5-.29-.14-.62-.23-.96-.23h-.03C8.01 7 7 8.01 7 9.25V15c0 1.66 1.34 3 3 3h5.07l3.5 3.5z"}),"AirlineSeatReclineNormal")},37758:(e,t,n)=>{"use strict";n.d(t,{A:()=>R});var r=n(28604),i=n(17162),o=n(13815);const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),i=e=>Object.keys(e).reduce((t,n)=>r[n]?(0,o.A)(t,r[n](e)):t,{});return i.propTypes={},i.filterProps=t.reduce((e,t)=>e.concat(t.filterProps),[]),i};var s=n(89751);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,i.Ay)({prop:e,themeKey:"borders",transform:t})}const d=c("border",l),u=c("borderTop",l),p=c("borderRight",l),h=c("borderBottom",l),m=c("borderLeft",l),f=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),x=c("borderBottomColor"),y=c("borderLeftColor"),b=c("outline",l),j=c("outlineColor"),w=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,s.NI)(e,e.borderRadius,n)}return null};w.propTypes={},w.filterProps=["borderRadius"];a(d,u,p,h,m,f,g,v,x,y,w,b,j);const _=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,s.NI)(e,e.gap,n)}return null};_.propTypes={},_.filterProps=["gap"];const C=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.columnGap,n)}return null};C.propTypes={},C.filterProps=["columnGap"];const S=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.rowGap,n)}return null};S.propTypes={},S.filterProps=["rowGap"];a(_,C,S,(0,i.Ay)({prop:"gridColumn"}),(0,i.Ay)({prop:"gridRow"}),(0,i.Ay)({prop:"gridAutoFlow"}),(0,i.Ay)({prop:"gridAutoColumns"}),(0,i.Ay)({prop:"gridAutoRows"}),(0,i.Ay)({prop:"gridTemplateColumns"}),(0,i.Ay)({prop:"gridTemplateRows"}),(0,i.Ay)({prop:"gridTemplateAreas"}),(0,i.Ay)({prop:"gridArea"}));function A(e,t){return"grey"===t?t:e}a((0,i.Ay)({prop:"color",themeKey:"palette",transform:A}),(0,i.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:A}),(0,i.Ay)({prop:"backgroundColor",themeKey:"palette",transform:A}));function k(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const M=(0,i.Ay)({prop:"width",transform:k}),O=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.zu[t];return i?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:"".concat(i).concat(e.theme.breakpoints.unit)}:{maxWidth:i}:{maxWidth:k(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};O.filterProps=["maxWidth"];const T=(0,i.Ay)({prop:"minWidth",transform:k}),E=(0,i.Ay)({prop:"height",transform:k}),P=(0,i.Ay)({prop:"maxHeight",transform:k}),D=(0,i.Ay)({prop:"minHeight",transform:k}),R=((0,i.Ay)({prop:"size",cssProperty:"width",transform:k}),(0,i.Ay)({prop:"size",cssProperty:"height",transform:k}),a(M,O,T,E,P,D,(0,i.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:w},color:{themeKey:"palette",transform:A},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:A},backgroundColor:{themeKey:"palette",transform:A},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:_},rowGap:{style:S},columnGap:{style:C},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:k},maxWidth:{style:O},minWidth:{transform:k},height:{transform:k},maxHeight:{transform:k},minHeight:{transform:k},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},37857:(e,t,n)=>{var r=n(13440),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},38052:(e,t,n)=>{"use strict";var r=n(24994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=g,rootShouldForwardProp:r=m,slotShouldForwardProp:l=m}=e,d=e=>(0,c.default)((0,i.default)({},e,{theme:x((0,i.default)({},e,{defaultTheme:n,themeId:t}))}));return d.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:u,slot:h,skipVariantsResolver:f,skipSx:g,overridesResolver:j=y(v(h))}=c,w=(0,o.default)(c,p),_=u&&u.startsWith("Mui")||h?"components":"custom",C=void 0!==f?f:h&&"Root"!==h&&"root"!==h||!1,S=g||!1;let A=m;"Root"===h||"root"===h?A=r:h?A=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(A=void 0);const k=(0,a.default)(e,(0,i.default)({shouldForwardProp:A,label:undefined},w)),M=e=>"function"===typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>{const o=x({theme:r.theme,defaultTheme:n,themeId:t});return b(e,(0,i.default)({},r,{theme:o}),o.modularCssLayers?_:void 0)}:e,O=function(r){let o=M(r);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];const c=s?s.map(M):[];u&&j&&c.push(e=>{const r=x((0,i.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[u]||!r.components[u].styleOverrides)return null;const o=r.components[u].styleOverrides,a={};return Object.entries(o).forEach(t=>{let[n,o]=t;a[n]=b(o,(0,i.default)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),j(e,a)}),u&&!C&&c.push(e=>{var r;const o=x((0,i.default)({},e,{defaultTheme:n,themeId:t}));return b({variants:null==o||null==(r=o.components)||null==(r=r[u])?void 0:r.variants},(0,i.default)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),S||c.push(d);const p=c.length-s.length;if(Array.isArray(r)&&p>0){const e=new Array(p).fill("");o=[...r,...e],o.raw=[...r.raw,...e]}const h=k(o,...c);return e.muiName&&(h.muiName=e.muiName),h};return k.withConfig&&(O.withConfig=k.withConfig),O}};var i=r(n(94634)),o=r(n(54893)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(13174)),s=n(19482),l=(r(n(87918)),r(n(83382)),r(n(24989))),c=r(n(73234));const d=["ownerState"],u=["variants"],p=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function m(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function f(e,t){return t&&e&&"object"===typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles="@layer ".concat(t,"{").concat(String(e.styles),"}")),e}const g=(0,l.default)(),v=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function x(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function y(e){return e?(t,n)=>n[e]:null}function b(e,t,n){let{ownerState:r}=t,s=(0,o.default)(t,d);const l="function"===typeof e?e((0,i.default)({ownerState:r},s)):e;if(Array.isArray(l))return l.flatMap(e=>b(e,(0,i.default)({ownerState:r},s),n));if(l&&"object"===typeof l&&Array.isArray(l.variants)){const{variants:e=[]}=l;let t=(0,o.default)(l,u);return e.forEach(e=>{let o=!0;if("function"===typeof e.props?o=e.props((0,i.default)({ownerState:r},s,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&s[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"===typeof e.style?e.style((0,i.default)({ownerState:r},s,r)):e.style;t.push(n?f((0,a.internal_serializeStyles)(o),n):o)}}),t}return n?f((0,a.internal_serializeStyles)(l),n):l}},38268:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},38499:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!==typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,d=this._events[s],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,i),!0;case 5:return d.fn.call(d.context,t,r,i,o),!0;case 6:return d.fn.call(d.context,t,r,i,o,a),!0}for(c=1,l=new Array(u-1);c<u;c++)l[c-1]=arguments[c];d.fn.apply(d.context,l)}else{var p,h=d.length;for(c=0;c<h;c++)switch(d[c].once&&this.removeListener(e,d[c].fn,void 0,!0),u){case 1:d[c].fn.call(d[c].context);break;case 2:d[c].fn.call(d[c].context,t);break;case 3:d[c].fn.call(d[c].context,t,r);break;case 4:d[c].fn.call(d[c].context,t,r,i);break;default:if(!l)for(p=1,l=new Array(u-1);p<u;p++)l[p-1]=arguments[p];d[c].fn.apply(d[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,c=[],d=s.length;l<d;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s},38541:(e,t,n)=>{var r=n(9812),i=n(50149),o=n(54052),a=n(19841),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},38710:(e,t,n)=>{var r=n(61516);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},38723:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M6 21h12V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"DeleteSharp")},38883:(e,t,n)=>{var r=n(45652),i=n(6571);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,function(e,r,i){o[++n]=t(e,r,i)}),o}},39089:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"}),"AccountCircle")},39115:(e,t,n)=>{var r=n(45967),i=n(36311),o=n(50715);e.exports=function(e){return i(e)?o(e):r(e)}},39256:(e,t,n)=>{var r=n(86532),i=n(23781),o=n(91310);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},39676:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,i,o){for(var a=-1,s=n(t((r-e)/(i||1)),0),l=Array(s);s--;)l[o?s:++a]=e,e+=i;return l}},39829:(e,t,n)=>{var r=n(38541),i=n(61141),o=n(28189),a=n(76372),s=n(6219),l=n(39115),c=n(41069);e.exports=function(e,t,n){if((e=c(e))&&(n||void 0===t))return i(e);if(!e||!(t=r(t)))return e;var d=l(e),u=l(t),p=s(d,u),h=a(d,u)+1;return o(d,p,h).join("")}},40039:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(4391)},40644:e=>{e.exports=function(e){return e!==e}},40801:(e,t,n)=>{var r=n(61141),i=n(46686),o=n(19841),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},40854:(e,t,n)=>{e.exports=n(20672)},40995:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M21 5.47 12 12 7.62 7.62 3 11V8.52L7.83 5l4.38 4.38L21 3zM21 15h-4.7l-4.17 3.34L6 12.41l-3 2.13V17l2.8-2 6.2 6 5-4h4z"}),"SsidChart")},41069:(e,t,n)=>{var r=n(38541);e.exports=function(e){return null==e?"":r(e)}},41497:(e,t,n)=>{"use strict";var r=n(13218);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},41523:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},41558:e=>{e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},41979:(e,t,n)=>{var r=n(23579),i=n(26882)(function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)});e.exports=i},42348:(e,t,n)=>{"use strict";e.exports=n(61552)},42456:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((e,t)=>null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)},()=>{})}n.d(t,{A:()=>r})},42478:(e,t,n)=>{"use strict";var r=n(23104).version,i=n(82702),o={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var a={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new i(o(r," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!a[r]&&(a[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],s=t[a];if(s){var l=e[a],c=void 0===l||s(l,a,e);if(!0!==c)throw new i("option "+a+" must be "+c,i.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new i("Unknown option "+a,i.ERR_BAD_OPTION)}},validators:o}},42734:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(65173),o=n(65043),a=n(60225),s=n(15388),l=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:n.props.value},n.onChange=n.onChange.bind(n),n.diff=n.diff.bind(n),n}return r(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.value;e!==this.state.value&&this.setState({value:e})},t.prototype.onChange=function(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)},t.prototype.diff=function(){var e=new s,t=this.state.value[0],n=this.state.value[1];if(0===t.length&&0===n.length)return[];var r=e.diff_main(t,n);e.diff_cleanupSemantic(r);var i=this.generateDiffedLines(r);return this.setCodeMarkers(i)},t.prototype.generateDiffedLines=function(e){var t=0,n=-1,r=1,i={left:[],right:[]},o={left:1,right:1};return e.forEach(function(e){var a=e[0],s=e[1],l=s.split("\n").length-1;if(0!==s.length){var c=s[0],d=s[s.length-1],u=0;switch(a){case t:o.left+=l,o.right+=l;break;case n:"\n"===c&&(o.left++,l--),0===(u=l)&&i.right.push({startLine:o.right,endLine:o.right}),"\n"===d&&(u-=1),i.left.push({startLine:o.left,endLine:o.left+u}),o.left+=l;break;case r:"\n"===c&&(o.right++,l--),0===(u=l)&&i.left.push({startLine:o.left,endLine:o.left}),"\n"===d&&(u-=1),i.right.push({startLine:o.right,endLine:o.right+u}),o.right+=l;break;default:throw new Error("Diff type was not defined.")}}}),i},t.prototype.setCodeMarkers=function(e){void 0===e&&(e={left:[],right:[]});for(var t=[],n={left:[],right:[]},r=0;r<e.left.length;r++){var i={startRow:e.left[r].startLine-1,endRow:e.left[r].endLine,type:"text",className:"codeMarker"};n.left.push(i)}for(r=0;r<e.right.length;r++){i={startRow:e.right[r].startLine-1,endRow:e.right[r].endLine,type:"text",className:"codeMarker"};n.right.push(i)}return t[0]=n.left,t[1]=n.right,t},t.prototype.render=function(){var e=this.diff();return o.createElement(a.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})},t.propTypes={cursorStart:i.number,editorProps:i.object,enableBasicAutocompletion:i.bool,enableLiveAutocompletion:i.bool,focus:i.bool,fontSize:i.number,height:i.string,highlightActiveLine:i.bool,maxLines:i.number,minLines:i.number,mode:i.string,name:i.string,className:i.string,onLoad:i.func,onPaste:i.func,onScroll:i.func,onChange:i.func,orientation:i.string,readOnly:i.bool,scrollMargin:i.array,setOptions:i.object,showGutter:i.bool,showPrintMargin:i.bool,splits:i.number,style:i.object,tabSize:i.number,theme:i.string,value:i.array,width:i.string,wrapEnabled:i.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(o.Component);t.default=l},43516:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},43668:(e,t,n)=>{var r=n(18902),i=n(52587),o=n(58114);e.exports=function(e,t,n,a,s,l){var c=1&n,d=e.length,u=t.length;if(d!=u&&!(c&&u>d))return!1;var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var m=-1,f=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++m<d;){var v=e[m],x=t[m];if(a)var y=c?a(x,v,m,t,e,l):a(v,x,m,e,t,l);if(void 0!==y){if(y)continue;f=!1;break}if(g){if(!i(t,function(e,t){if(!o(g,t)&&(v===e||s(v,e,n,a,l)))return g.push(t)})){f=!1;break}}else if(v!==x&&!s(v,x,n,a,l)){f=!1;break}}return l.delete(e),l.delete(t),f}},44288:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAceInstance=t.debounce=t.editorEvents=t.editorOptions=void 0;t.editorOptions=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];t.editorEvents=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];t.getAceInstance=function(){var e;return"undefined"===typeof window?(n.g.window={},e=n(56603),delete n.g.window):window.ace?(e=window.ace).acequire=window.ace.require||window.ace.acequire:e=n(56603),e};t.debounce=function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}}},44314:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2zM18 4h-2.5l-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1"}),"DeleteRounded")},44353:(e,t,n)=>{e=n.nmd(e);var r=n(56552),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},44448:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore")},44543:(e,t,n)=>{e=n.nmd(e);var r=n(56552),i=n(60014),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l},45465:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline")},45604:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M18.5 3H6c-1.1 0-2 .9-2 2v5.71c0 3.83 2.95 7.18 6.78 7.29 3.96.12 7.22-3.06 7.22-7v-1h.5c1.93 0 3.5-1.57 3.5-3.5S20.43 3 18.5 3M16 5v3H6V5zm2.5 3H18V5h.5c.83 0 1.5.67 1.5 1.5S19.33 8 18.5 8M4 19h16v2H4z"}),"Coffee")},45652:(e,t,n)=>{var r=n(94664),i=n(76516)(r);e.exports=i},45752:(e,t,n)=>{var r=n(59395),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,c=r(e),d=c.length;if(d!=r(t).length&&!l)return!1;for(var u=d;u--;){var p=c[u];if(!(l?p in t:i.call(t,p)))return!1}var h=s.get(e),m=s.get(t);if(h&&m)return h==t&&m==e;var f=!0;s.set(e,t),s.set(t,e);for(var g=l;++u<d;){var v=e[p=c[u]],x=t[p];if(o)var y=l?o(x,v,p,t,e,s):o(v,x,p,e,t,s);if(!(void 0===y?v===x||a(v,x,n,o,s):y)){f=!1;break}g||(g="constructor"==p)}if(f&&!g){var b=e.constructor,j=t.constructor;b==j||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof j&&j instanceof j||(f=!1)}return s.delete(e),s.delete(t),f}},45879:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(5844).A},45921:(e,t,n)=>{var r=n(20449),i=n(47574),o=n(56832),a=o&&o.isSet,s=a?i(a):r;e.exports=s},45967:e=>{e.exports=function(e){return e.split("")}},46350:(e,t,n)=>{var r=n(28325),i=n(86578)(r);e.exports=i},46686:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},46704:e=>{e.exports=function(e){return this.__data__.has(e)}},47030:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined")},47123:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},47251:(e,t,n)=>{var r=n(98724),i=n(97160),o=n(85204);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},47358:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case p:case h:return e;default:switch(e=e&&e.$$typeof){case d:case c:case u:case f:case m:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference")},47482:(e,t,n)=>{"use strict";var r=n(82702);function i(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(86267).inherits(i,r,{__CANCEL__:!0}),e.exports=i},47574:e=>{e.exports=function(e){return function(t){return e(t)}}},47903:(e,t,n)=>{"use strict";var r=n(86267);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},48734:(e,t,n)=>{var r=n(95575),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},48895:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},50046:(e,t,n)=>{var r=n(76272);e.exports=function(e){return r(e)?e:[]}},50061:e=>{e.exports=function(e,t){return e<t}},50149:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},50539:(e,t,n)=>{var r=n(79742),i=n(97498),o=n(33279);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},50715:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?",d=c+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")"+c+l+")*"),u="(?:"+[o+r+"?",r,a,s,n].join("|")+")",p=RegExp(i+"(?="+i+")|"+u+d,"g");e.exports=function(e){return e.match(p)||[]}},50805:(e,t,n)=>{"use strict";n.d(t,{HY:()=>u,Tw:()=>f,Yl:()=>d,Zz:()=>m,y$:()=>c,zH:()=>h});var r=n(89379);function i(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var o="function"===typeof Symbol&&Symbol.observable||"@@observable",a=function(){return Math.random().toString(36).substring(7).split("").join(".")},s={INIT:"@@redux/INIT"+a(),REPLACE:"@@redux/REPLACE"+a(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+a()}};function l(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function c(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(i(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(i(1));return n(c)(e,t)}if("function"!==typeof e)throw new Error(i(2));var a=e,d=t,u=[],p=u,h=!1;function m(){p===u&&(p=u.slice())}function f(){if(h)throw new Error(i(3));return d}function g(e){if("function"!==typeof e)throw new Error(i(4));if(h)throw new Error(i(5));var t=!0;return m(),p.push(e),function(){if(t){if(h)throw new Error(i(6));t=!1,m();var n=p.indexOf(e);p.splice(n,1),u=null}}}function v(e){if(!l(e))throw new Error(i(7));if("undefined"===typeof e.type)throw new Error(i(8));if(h)throw new Error(i(9));try{h=!0,d=a(d,e)}finally{h=!1}for(var t=u=p,n=0;n<t.length;n++){(0,t[n])()}return e}return v({type:s.INIT}),(r={dispatch:v,subscribe:g,getState:f,replaceReducer:function(e){if("function"!==typeof e)throw new Error(i(10));a=e,v({type:s.REPLACE})}})[o]=function(){var e,t=g;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(i(11));function n(){e.next&&e.next(f())}return n(),{unsubscribe:t(n)}}})[o]=function(){return this},e},r}var d=c;function u(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];0,"function"===typeof e[o]&&(n[o]=e[o])}var a,l=Object.keys(n);try{!function(e){Object.keys(e).forEach(function(t){var n=e[t];if("undefined"===typeof n(void 0,{type:s.INIT}))throw new Error(i(12));if("undefined"===typeof n(void 0,{type:s.PROBE_UNKNOWN_ACTION()}))throw new Error(i(13))})}(n)}catch(c){a=c}return function(e,t){if(void 0===e&&(e={}),a)throw a;for(var r=!1,o={},s=0;s<l.length;s++){var c=l[s],d=n[c],u=e[c],p=d(u,t);if("undefined"===typeof p){t&&t.type;throw new Error(i(14))}o[c]=p,r=r||p!==u}return(r=r||l.length!==Object.keys(e).length)?o:e}}function p(e,t){return function(){return t(e.apply(this,arguments))}}function h(e,t){if("function"===typeof e)return p(e,t);if("object"!==typeof e||null===e)throw new Error(i(16));var n={};for(var r in e){var o=e[r];"function"===typeof o&&(n[r]=p(o,t))}return n}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),o=function(){throw new Error(i(15))},a={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map(function(e){return e(a)});return o=m.apply(void 0,s)(n.dispatch),(0,r.A)((0,r.A)({},n),{},{dispatch:o})}}}},51052:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65043);function i(e){let{controlled:t,default:n,name:i,state:o="value"}=e;const{current:a}=r.useRef(void 0!==t),[s,l]=r.useState(n);return[a?t:s,r.useCallback(e=>{a||l(e)},[])]}},51104:(e,t,n)=>{var r=n(96614),i=n(28673);e.exports=function(e,t){return e&&r(t,i(t),e)}},51153:(e,t,n)=>{"use strict";var r=n(65043),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,d=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:d,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},51268:(e,t,n)=>{var r=n(35428),i=n(47574),o=n(56832),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},51627:(e,t,n)=>{"use strict";var r=n(50805).Zz;"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__},51720:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M17 11V3H7v4H3v14h8v-4h2v4h8V11zM7 19H5v-2h2zm0-4H5v-2h2zm0-4H5V9h2zm4 4H9v-2h2zm0-4H9V9h2zm0-4H9V5h2zm4 8h-2v-2h2zm0-4h-2V9h2zm0-4h-2V5h2zm4 12h-2v-2h2zm0-4h-2v-2h2z"}),"Apartment")},51869:(e,t,n)=>{"use strict";var r=n(75494);n(42734).default,n(60225).default,t.Ay=r.default},51937:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIosSharp")},51946:(e,t,n)=>{var r=n(61340);e.exports=function(e){return r(this.__data__,e)>-1}},52074:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},52177:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person")},52587:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},52718:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function a(e,t){try{return t in e}catch(n){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&o(e).forEach(function(t){i[t]=r(e[t],n)}),o(t).forEach(function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&n.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"===typeof n?n:l}(o,n)(e[o],t[o],n):i[o]=r(t[o],n))}),i}function l(e,n,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=r;var a=Array.isArray(n);return a===Array.isArray(e)?a?o.arrayMerge(e,n,o):s(e,n,o):r(n,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})};var c=l;e.exports=c},52866:(e,t,n)=>{var r=n(52969);e.exports=function(e){return function(t){return r(t,e)}}},52969:(e,t,n)=>{var r=n(35324),i=n(70914);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},52989:(e,t,n)=>{"use strict";var r=n(86267),i=n(12121),o=n(82702),a=n(89335),s=n(37289),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var d={transitional:a,adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(71989)),e}(),transformRequest:[function(e,t){if(i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,o=r.isObject(e),a=t&&t["Content-Type"];if((n=r.isFileList(e))||o&&"multipart/form-data"===a){var l=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,l&&new l)}return o||"application/json"===a?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o.from(s,o.ERR_BAD_RESPONSE,this,null,this.response);throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(73055)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(e){d.headers[e]={}}),r.forEach(["post","put","patch"],function(e){d.headers[e]=r.merge(l)}),e.exports=d},53366:(e,t,n)=>{var r=n(27894),i=n(99057);e.exports=function(e,t){return null!=e&&i(e,t,r)}},53536:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=16,c=32,d=64,u=128,p=256,h=1/0,m=9007199254740991,f=NaN,g=4294967295,v=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",d],["rearg",p]],x="[object Arguments]",y="[object Array]",b="[object Boolean]",j="[object Date]",w="[object Error]",_="[object Function]",C="[object GeneratorFunction]",S="[object Map]",A="[object Number]",k="[object Object]",M="[object Promise]",O="[object RegExp]",T="[object Set]",E="[object String]",P="[object Symbol]",D="[object WeakMap]",R="[object ArrayBuffer]",N="[object DataView]",L="[object Float32Array]",I="[object Float64Array]",F="[object Int8Array]",$="[object Int16Array]",B="[object Int32Array]",z="[object Uint8Array]",H="[object Uint8ClampedArray]",W="[object Uint16Array]",V="[object Uint32Array]",U=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,K=RegExp(Y.source),X=RegExp(Z.source),Q=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,de=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,me=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,xe=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,je=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Ce="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="['\u2019]",Pe="["+Ce+"]",De="["+Te+"]",Re="["+Se+"]",Ne="\\d+",Le="["+Ae+"]",Ie="["+ke+"]",Fe="[^"+Ce+Te+Ne+Ae+ke+Me+"]",$e="\\ud83c[\\udffb-\\udfff]",Be="[^"+Ce+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",We="["+Me+"]",Ve="\\u200d",Ue="(?:"+Ie+"|"+Fe+")",qe="(?:"+We+"|"+Fe+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ze="(?:"+Re+"|"+$e+")"+"?",Ke="["+Oe+"]?",Xe=Ke+Ze+("(?:"+Ve+"(?:"+[Be,ze,He].join("|")+")"+Ke+Ze+")*"),Qe="(?:"+[Le,ze,He].join("|")+")"+Xe,Je="(?:"+[Be+Re+"?",Re,ze,He,Pe].join("|")+")",et=RegExp(Ee,"g"),tt=RegExp(Re,"g"),nt=RegExp($e+"(?="+$e+")|"+Je+Xe,"g"),rt=RegExp([We+"?"+Ie+"+"+Ge+"(?="+[De,We,"$"].join("|")+")",qe+"+"+Ye+"(?="+[De,We+Ue,"$"].join("|")+")",We+"?"+Ue+"+"+Ge,We+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Qe].join("|"),"g"),it=RegExp("["+Ve+Ce+Se+Oe+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,lt={};lt[L]=lt[I]=lt[F]=lt[$]=lt[B]=lt[z]=lt[H]=lt[W]=lt[V]=!0,lt[x]=lt[y]=lt[R]=lt[b]=lt[N]=lt[j]=lt[w]=lt[_]=lt[S]=lt[A]=lt[k]=lt[O]=lt[T]=lt[E]=lt[D]=!1;var ct={};ct[x]=ct[y]=ct[R]=ct[N]=ct[b]=ct[j]=ct[L]=ct[I]=ct[F]=ct[$]=ct[B]=ct[S]=ct[A]=ct[k]=ct[O]=ct[T]=ct[E]=ct[P]=ct[z]=ct[H]=ct[W]=ct[V]=!0,ct[w]=ct[_]=ct[D]=!1;var dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,pt=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,mt="object"==typeof self&&self&&self.Object===Object&&self,ft=ht||mt||Function("return this")(),gt=t&&!t.nodeType&&t,vt=gt&&e&&!e.nodeType&&e,xt=vt&&vt.exports===gt,yt=xt&&ht.process,bt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(t){}}(),jt=bt&&bt.isArrayBuffer,wt=bt&&bt.isDate,_t=bt&&bt.isMap,Ct=bt&&bt.isRegExp,St=bt&&bt.isSet,At=bt&&bt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Mt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Dt(e,t){return!!(null==e?0:e.length)&&Wt(e,t,0)>-1}function Rt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Lt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function It(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Ft(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function $t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Bt=Gt("length");function zt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Ht(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Wt(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ht(e,Ut,n)}function Vt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Ut(e){return e!==e}function qt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:f}function Gt(e){return function(t){return null==t?i:t[e]}}function Yt(e){return function(t){return null==e?i:e[t]}}function Zt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function Kt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Qt(e){return e?e.slice(0,gn(e)+1).replace(ae,""):e}function Jt(e){return function(t){return e(t)}}function en(e,t){return Nt(t,function(t){return e[t]})}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Wt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Wt(t,e[n],0)>-1;);return n}var on=Yt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=Yt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+dt[e]}function ln(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function dn(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function pn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function mn(e){return ln(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Bt(e)}function fn(e){return ln(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function gn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var vn=Yt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var xn=function e(t){var n=(t=null==t?ft:xn.defaults(ft.Object(),t,xn.pick(ft,at))).Array,r=t.Date,se=t.Error,Ce=t.Function,Se=t.Math,Ae=t.Object,ke=t.RegExp,Me=t.String,Oe=t.TypeError,Te=n.prototype,Ee=Ce.prototype,Pe=Ae.prototype,De=t["__core-js_shared__"],Re=Ee.toString,Ne=Pe.hasOwnProperty,Le=0,Ie=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Pe.toString,$e=Re.call(Ae),Be=ft._,ze=ke("^"+Re.call(Ne).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=xt?t.Buffer:i,We=t.Symbol,Ve=t.Uint8Array,Ue=He?He.allocUnsafe:i,qe=dn(Ae.getPrototypeOf,Ae),Ge=Ae.create,Ye=Pe.propertyIsEnumerable,Ze=Te.splice,Ke=We?We.isConcatSpreadable:i,Xe=We?We.iterator:i,Qe=We?We.toStringTag:i,Je=function(){try{var e=po(Ae,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,it=r&&r.now!==ft.Date.now&&r.now,dt=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Se.ceil,mt=Se.floor,gt=Ae.getOwnPropertySymbols,vt=He?He.isBuffer:i,yt=t.isFinite,bt=Te.join,Bt=dn(Ae.keys,Ae),Yt=Se.max,yn=Se.min,bn=r.now,jn=t.parseInt,wn=Se.random,_n=Te.reverse,Cn=po(t,"DataView"),Sn=po(t,"Map"),An=po(t,"Promise"),kn=po(t,"Set"),Mn=po(t,"WeakMap"),On=po(Ae,"create"),Tn=Mn&&new Mn,En={},Pn=Fo(Cn),Dn=Fo(Sn),Rn=Fo(An),Nn=Fo(kn),Ln=Fo(Mn),In=We?We.prototype:i,Fn=In?In.valueOf:i,$n=In?In.toString:i;function Bn(e){if(ts(e)&&!Va(e)&&!(e instanceof Vn)){if(e instanceof Wn)return e;if(Ne.call(e,"__wrapped__"))return $o(e)}return new Wn(e)}var zn=function(){function e(){}return function(t){if(!es(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Hn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Zn(e){var t=this.__data__=new qn(e);this.size=t.size}function Kn(e,t){var n=Va(e),r=!n&&Wa(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&cs(e),a=n||r||i||o,s=a?Xt(e.length,Me):[],l=s.length;for(var c in e)!t&&!Ne.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yo(c,l))||s.push(c);return s}function Xn(e){var t=e.length;return t?e[Yr(0,t-1)]:i}function Qn(e,t){return No(Oi(e),sr(t,0,e.length))}function Jn(e){return No(Oi(e))}function er(e,t,n){(n!==i&&!Ba(e[t],n)||n===i&&!(t in e))&&or(e,t,n)}function tr(e,t,n){var r=e[t];Ne.call(e,t)&&Ba(r,n)&&(n!==i||t in e)||or(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function rr(e,t,n,r){return pr(e,function(e,i,o){t(r,e,n(e),o)}),r}function ir(e,t){return e&&Ti(t,Es(t),e)}function or(e,t,n){"__proto__"==t&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:As(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function lr(e,t,n,r,o,a){var s,l=1&t,c=2&t,d=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!es(e))return e;var u=Va(e);if(u){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Oi(e,s)}else{var p=fo(e),h=p==_||p==C;if(Ya(e))return _i(e,l);if(p==k||p==x||h&&!o){if(s=c||h?{}:vo(e),!l)return c?function(e,t){return Ti(e,mo(e),t)}(e,function(e,t){return e&&Ti(t,Ps(t),e)}(s,e)):function(e,t){return Ti(e,ho(e),t)}(e,ir(s,e))}else{if(!ct[p])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case R:return Ci(e);case b:case j:return new r(+e);case N:return function(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case I:case F:case $:case B:case z:case H:case W:case V:return Si(e,n);case S:return new r;case A:case E:return new r(e);case O:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new r;case P:return i=e,Fn?Ae(Fn.call(i)):{}}var i}(e,p,l)}}a||(a=new Zn);var m=a.get(e);if(m)return m;a.set(e,s),as(e)?e.forEach(function(r){s.add(lr(r,t,n,r,e,a))}):ns(e)&&e.forEach(function(r,i){s.set(i,lr(r,t,n,i,e,a))});var f=u?i:(d?c?io:ro:c?Ps:Es)(e);return Ot(f||e,function(r,i){f&&(r=e[i=r]),tr(s,i,lr(r,t,n,i,e,a))}),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ae(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function dr(e,t,n){if("function"!=typeof e)throw new Oe(o);return Eo(function(){e.apply(i,n)},t)}function ur(e,t,n,r){var i=-1,o=Dt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Nt(t,Jt(n))),r?(o=Rt,a=!1):t.length>=200&&(o=tn,a=!1,t=new Yn(t));e:for(;++i<s;){var d=e[i],u=null==n?d:n(d);if(d=r||0!==d?d:0,a&&u===u){for(var p=c;p--;)if(t[p]===u)continue e;l.push(d)}else o(t,u,r)||l.push(d)}return l}Bn.templateSettings={escape:Q,evaluate:J,interpolate:ee,variable:"",imports:{_:Bn}},Bn.prototype=Hn.prototype,Bn.prototype.constructor=Bn,Wn.prototype=zn(Hn.prototype),Wn.prototype.constructor=Wn,Vn.prototype=zn(Hn.prototype),Vn.prototype.constructor=Vn,Un.prototype.clear=function(){this.__data__=On?On(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(On){var n=t[e];return n===a?i:n}return Ne.call(t,e)?t[e]:i},Un.prototype.has=function(e){var t=this.__data__;return On?t[e]!==i:Ne.call(t,e)},Un.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=On&&t===i?a:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ze.call(t,n,1),--this.size,!0)},qn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},qn.prototype.has=function(e){return nr(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(Sn||qn),string:new Un}},Gn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return co(this,e).get(e)},Gn.prototype.has=function(e){return co(this,e).has(e)},Gn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,a),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new qn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var pr=Di(br),hr=Di(jr,!0);function mr(e,t){var n=!0;return pr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function fr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(l===i?s===s&&!ls(s):n(s,l)))var l=s,c=a}return c}function gr(e,t){var n=[];return pr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function vr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=xo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?vr(s,t-1,n,r,i):Lt(i,s):r||(i[i.length]=s)}return i}var xr=Ri(),yr=Ri(!0);function br(e,t){return e&&xr(e,t,Es)}function jr(e,t){return e&&yr(e,t,Es)}function wr(e,t){return Pt(t,function(t){return Xa(e[t])})}function _r(e,t){for(var n=0,r=(t=yi(t,e)).length;null!=e&&n<r;)e=e[Io(t[n++])];return n&&n==r?e:i}function Cr(e,t,n){var r=t(e);return Va(e)?r:Lt(r,n(e))}function Sr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Qe&&Qe in Ae(e)?function(e){var t=Ne.call(e,Qe),n=e[Qe];try{e[Qe]=i;var r=!0}catch(a){}var o=Fe.call(e);r&&(t?e[Qe]=n:delete e[Qe]);return o}(e):function(e){return Fe.call(e)}(e)}function Ar(e,t){return e>t}function kr(e,t){return null!=e&&Ne.call(e,t)}function Mr(e,t){return null!=e&&t in Ae(e)}function Or(e,t,r){for(var o=r?Rt:Dt,a=e[0].length,s=e.length,l=s,c=n(s),d=1/0,u=[];l--;){var p=e[l];l&&t&&(p=Nt(p,Jt(t))),d=yn(p.length,d),c[l]=!r&&(t||a>=120&&p.length>=120)?new Yn(l&&p):i}p=e[0];var h=-1,m=c[0];e:for(;++h<a&&u.length<d;){var f=p[h],g=t?t(f):f;if(f=r||0!==f?f:0,!(m?tn(m,g):o(u,g,r))){for(l=s;--l;){var v=c[l];if(!(v?tn(v,g):o(e[l],g,r)))continue e}m&&m.push(g),u.push(f)}}return u}function Tr(e,t,n){var r=null==(e=Mo(e,t=yi(t,e)))?e:e[Io(Ko(t))];return null==r?i:kt(r,e,n)}function Er(e){return ts(e)&&Sr(e)==x}function Pr(e,t,n,r,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=Va(e),l=Va(t),c=s?y:fo(e),d=l?y:fo(t),u=(c=c==x?k:c)==k,p=(d=d==x?k:d)==k,h=c==d;if(h&&Ya(e)){if(!Ya(t))return!1;s=!0,u=!1}if(h&&!u)return a||(a=new Zn),s||cs(e)?to(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case b:case j:case A:return Ba(+e,+t);case w:return e.name==t.name&&e.message==t.message;case O:case E:return e==t+"";case S:var s=cn;case T:var l=1&r;if(s||(s=pn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var d=to(s(e),s(t),r,i,o,a);return a.delete(e),d;case P:if(Fn)return Fn.call(e)==Fn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var m=u&&Ne.call(e,"__wrapped__"),f=p&&Ne.call(t,"__wrapped__");if(m||f){var g=m?e.value():e,v=f?t.value():t;return a||(a=new Zn),o(g,v,n,r,a)}}if(!h)return!1;return a||(a=new Zn),function(e,t,n,r,o,a){var s=1&n,l=ro(e),c=l.length,d=ro(t),u=d.length;if(c!=u&&!s)return!1;var p=c;for(;p--;){var h=l[p];if(!(s?h in t:Ne.call(t,h)))return!1}var m=a.get(e),f=a.get(t);if(m&&f)return m==t&&f==e;var g=!0;a.set(e,t),a.set(t,e);var v=s;for(;++p<c;){var x=e[h=l[p]],y=t[h];if(r)var b=s?r(y,x,h,t,e,a):r(x,y,h,e,t,a);if(!(b===i?x===y||o(x,y,n,r,a):b)){g=!1;break}v||(v="constructor"==h)}if(g&&!v){var j=e.constructor,w=t.constructor;j==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof j&&j instanceof j&&"function"==typeof w&&w instanceof w||(g=!1)}return a.delete(e),a.delete(t),g}(e,t,n,r,o,a)}(e,t,n,r,Pr,o))}function Dr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=Ae(e);o--;){var l=n[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=n[o])[0],d=e[c],u=l[1];if(s&&l[2]){if(d===i&&!(c in e))return!1}else{var p=new Zn;if(r)var h=r(d,u,c,e,t,p);if(!(h===i?Pr(u,d,3,r,p):h))return!1}}return!0}function Rr(e){return!(!es(e)||(t=e,Ie&&Ie in t))&&(Xa(e)?ze:xe).test(Fo(e));var t}function Nr(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?Va(e)?zr(e[0],e[1]):Br(e):pl(e)}function Lr(e){if(!Co(e))return Bt(e);var t=[];for(var n in Ae(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ir(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=Co(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}function Fr(e,t){return e<t}function $r(e,t){var r=-1,i=qa(e)?n(e.length):[];return pr(e,function(e,n,o){i[++r]=t(e,n,o)}),i}function Br(e){var t=uo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function zr(e,t){return jo(e)&&So(t)?Ao(Io(e),t):function(n){var r=As(n,e);return r===i&&r===t?ks(n,e):Pr(t,r,3)}}function Hr(e,t,n,r,o){e!==t&&xr(t,function(a,s){if(o||(o=new Zn),es(a))!function(e,t,n,r,o,a,s){var l=Oo(e,n),c=Oo(t,n),d=s.get(c);if(d)return void er(e,n,d);var u=a?a(l,c,n+"",e,t,s):i,p=u===i;if(p){var h=Va(c),m=!h&&Ya(c),f=!h&&!m&&cs(c);u=c,h||m||f?Va(l)?u=l:Ga(l)?u=Oi(l):m?(p=!1,u=_i(c,!0)):f?(p=!1,u=Si(c,!0)):u=[]:is(c)||Wa(c)?(u=l,Wa(l)?u=vs(l):es(l)&&!Xa(l)||(u=vo(c))):p=!1}p&&(s.set(c,u),o(u,c,r,a,s),s.delete(c));er(e,n,u)}(e,t,s,n,Hr,r,o);else{var l=r?r(Oo(e,s),a,s+"",e,t,o):i;l===i&&(l=a),er(e,s,l)}},Ps)}function Wr(e,t){var n=e.length;if(n)return yo(t+=t<0?n:0,n)?e[t]:i}function Vr(e,t,n){t=t.length?Nt(t,function(e){return Va(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e}):[rl];var r=-1;t=Nt(t,Jt(lo()));var i=$r(e,function(e,n,i){var o=Nt(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var l=Ai(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Ur(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=_r(e,a);n(s,a)&&Jr(o,yi(a,e),s)}return o}function qr(e,t,n,r){var i=r?Vt:Wt,o=-1,a=t.length,s=e;for(e===t&&(t=Oi(t)),n&&(s=Nt(e,Jt(n)));++o<a;)for(var l=0,c=t[o],d=n?n(c):c;(l=i(s,d,l,r))>-1;)s!==e&&Ze.call(s,l,1),Ze.call(e,l,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;yo(i)?Ze.call(e,i,1):ui(e,i)}}return e}function Yr(e,t){return e+mt(wn()*(t-e+1))}function Zr(e,t){var n="";if(!e||t<1||t>m)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Po(ko(e,t,rl),e+"")}function Xr(e){return Xn(Bs(e))}function Qr(e,t){var n=Bs(e);return No(n,sr(t,0,n.length))}function Jr(e,t,n,r){if(!es(e))return e;for(var o=-1,a=(t=yi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=Io(t[o]),d=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var u=l[c];(d=r?r(u,c,l):i)===i&&(d=es(u)?u:yo(t[o+1])?[]:{})}tr(l,c,d),l=l[c]}return e}var ei=Tn?function(e,t){return Tn.set(e,t),e}:rl,ti=Je?function(e,t){return Je(e,"toString",{configurable:!0,enumerable:!1,value:el(t),writable:!0})}:rl;function ni(e){return No(Bs(e))}function ri(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function ii(e,t){var n;return pr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ls(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,rl,n)}function ai(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,l=null===t,c=ls(t),d=t===i;o<a;){var u=mt((o+a)/2),p=n(e[u]),h=p!==i,m=null===p,f=p===p,g=ls(p);if(s)var v=r||f;else v=d?f&&(r||h):l?f&&h&&(r||!m):c?f&&h&&!m&&(r||!g):!m&&!g&&(r?p<=t:p<t);v?o=u+1:a=u}return yn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ba(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function li(e){return"number"==typeof e?e:ls(e)?f:+e}function ci(e){if("string"==typeof e)return e;if(Va(e))return Nt(e,ci)+"";if(ls(e))return $n?$n.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function di(e,t,n){var r=-1,i=Dt,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Rt;else if(o>=200){var c=t?null:Zi(e);if(c)return pn(c);a=!1,i=tn,l=new Yn}else l=t?[]:s;e:for(;++r<o;){var d=e[r],u=t?t(d):d;if(d=n||0!==d?d:0,a&&u===u){for(var p=l.length;p--;)if(l[p]===u)continue e;t&&l.push(u),s.push(d)}else i(l,u,n)||(l!==s&&l.push(u),s.push(d))}return s}function ui(e,t){return null==(e=Mo(e,t=yi(t,e)))||delete e[Io(Ko(t))]}function pi(e,t,n,r){return Jr(e,t,n(_r(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function mi(e,t){var n=e;return n instanceof Vn&&(n=n.value()),It(t,function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))},n)}function fi(e,t,r){var i=e.length;if(i<2)return i?di(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],l=-1;++l<i;)l!=o&&(a[o]=ur(a[o]||s,e[l],t,r));return di(vr(a,1),t,r)}function gi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var l=r<a?t[r]:i;n(s,e[r],l)}return s}function vi(e){return Ga(e)?e:[]}function xi(e){return"function"==typeof e?e:rl}function yi(e,t){return Va(e)?e:jo(e,t)?[e]:Lo(xs(e))}var bi=Kr;function ji(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ri(e,t,n)}var wi=nt||function(e){return ft.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function Ci(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Si(e,t){var n=t?Ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=ls(e),s=t!==i,l=null===t,c=t===t,d=ls(t);if(!l&&!d&&!a&&e>t||a&&s&&c&&!l&&!d||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!d&&e<t||d&&n&&o&&!r&&!a||l&&n&&o||!s&&o||!c)return-1}return 0}function ki(e,t,r,i){for(var o=-1,a=e.length,s=r.length,l=-1,c=t.length,d=Yt(a-s,0),u=n(c+d),p=!i;++l<c;)u[l]=t[l];for(;++o<s;)(p||o<a)&&(u[r[o]]=e[o]);for(;d--;)u[l++]=e[o++];return u}function Mi(e,t,r,i){for(var o=-1,a=e.length,s=-1,l=r.length,c=-1,d=t.length,u=Yt(a-l,0),p=n(u+d),h=!i;++o<u;)p[o]=e[o];for(var m=o;++c<d;)p[m+c]=t[c];for(;++s<l;)(h||o<a)&&(p[m+r[s]]=e[o++]);return p}function Oi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ti(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=r?r(n[l],e[l],l,n,e):i;c===i&&(c=e[l]),o?or(n,l,c):tr(n,l,c)}return n}function Ei(e,t){return function(n,r){var i=Va(n)?Mt:rr,o=t?t():{};return i(n,e,lo(r,2),o)}}function Pi(e){return Kr(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&bo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=Ae(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t})}function Di(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ae(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ri(e){return function(t,n,r){for(var i=-1,o=Ae(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Ni(e){return function(t){var n=ln(t=xs(t))?fn(t):i,r=n?n[0]:t.charAt(0),o=n?ji(n,1).join(""):t.slice(1);return r[e]()+o}}function Li(e){return function(t){return It(Xs(Ws(t).replace(et,"")),e,"")}}function Ii(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Fi(e){return function(t,n,r){var o=Ae(t);if(!qa(t)){var a=lo(n,3);t=Es(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function $i(e){return no(function(t){var n=t.length,r=n,a=Wn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Oe(o);if(a&&!l&&"wrapper"==ao(s))var l=new Wn([],!0)}for(r=l?r:n;++r<n;){var c=ao(s=t[r]),d="wrapper"==c?oo(s):i;l=d&&wo(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[ao(d[0])].apply(l,d[3]):1==s.length&&wo(s)?l[c]():l.thru(s)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&Va(r))return l.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}})}function Bi(e,t,r,o,a,s,l,c,d,p){var h=t&u,m=1&t,f=2&t,g=24&t,v=512&t,x=f?i:Ii(e);return function u(){for(var y=arguments.length,b=n(y),j=y;j--;)b[j]=arguments[j];if(g)var w=so(u),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,w);if(o&&(b=ki(b,o,a,g)),s&&(b=Mi(b,s,l,g)),y-=_,g&&y<p){var C=un(b,w);return Gi(e,t,Bi,u.placeholder,r,b,C,c,d,p-y)}var S=m?r:this,A=f?S[e]:e;return y=b.length,c?b=function(e,t){var n=e.length,r=yn(t.length,n),o=Oi(e);for(;r--;){var a=t[r];e[r]=yo(a,n)?o[a]:i}return e}(b,c):v&&y>1&&b.reverse(),h&&d<y&&(b.length=d),this&&this!==ft&&this instanceof u&&(A=x||Ii(A)),A.apply(S,b)}}function zi(e,t){return function(n,r){return function(e,t,n,r){return br(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Hi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=li(n),r=li(r)),o=e(n,r)}return o}}function Wi(e){return no(function(t){return t=Nt(t,Jt(lo())),Kr(function(n){var r=this;return e(t,function(e){return kt(e,r,n)})})})}function Vi(e,t){var n=(t=t===i?" ":ci(t)).length;if(n<2)return n?Zr(t,e):t;var r=Zr(t,ht(e/mn(t)));return ln(t)?ji(fn(r),0,e).join(""):r.slice(0,e)}function Ui(e){return function(t,r,o){return o&&"number"!=typeof o&&bo(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,i){for(var o=-1,a=Yt(ht((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function qi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function Gi(e,t,n,r,o,a,s,l,u,p){var h=8&t;t|=h?c:d,4&(t&=~(h?d:c))||(t&=-4);var m=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,l,u,p],f=n.apply(i,m);return wo(e)&&To(f,m),f.placeholder=r,Do(f,e,t)}function Yi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:yn(ms(n),292))&&yt(e)){var r=(xs(e)+"e").split("e");return+((r=(xs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Zi=kn&&1/pn(new kn([,-0]))[1]==h?function(e){return new kn(e)}:ll;function Ki(e){return function(t){var n=fo(t);return n==S?cn(t):n==T?hn(t):function(e,t){return Nt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Xi(e,t,r,a,h,m,f,g){var v=2&t;if(!v&&"function"!=typeof e)throw new Oe(o);var x=a?a.length:0;if(x||(t&=-97,a=h=i),f=f===i?f:Yt(ms(f),0),g=g===i?g:ms(g),x-=h?h.length:0,t&d){var y=a,b=h;a=h=i}var j=v?i:oo(e),w=[e,t,r,a,h,y,b,m,f,g];if(j&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==u&&8==n||r==u&&n==p&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?ki(c,l,t[4]):l,e[4]=c?un(e[3],s):t[4]}(l=t[5])&&(c=e[5],e[5]=c?Mi(c,l,t[6]):l,e[6]=c?un(e[5],s):t[6]);(l=t[7])&&(e[7]=l);r&u&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(w,j),e=w[0],t=w[1],r=w[2],a=w[3],h=w[4],!(g=w[9]=w[9]===i?v?0:e.length:Yt(w[9]-x,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||t==l?function(e,t,r){var o=Ii(e);return function a(){for(var s=arguments.length,l=n(s),c=s,d=so(a);c--;)l[c]=arguments[c];var u=s<3&&l[0]!==d&&l[s-1]!==d?[]:un(l,d);return(s-=u.length)<r?Gi(e,t,Bi,a.placeholder,i,l,u,i,i,r-s):kt(this&&this!==ft&&this instanceof a?o:e,this,l)}}(e,t,g):t!=c&&33!=t||h.length?Bi.apply(i,w):function(e,t,r,i){var o=1&t,a=Ii(e);return function t(){for(var s=-1,l=arguments.length,c=-1,d=i.length,u=n(d+l),p=this&&this!==ft&&this instanceof t?a:e;++c<d;)u[c]=i[c];for(;l--;)u[c++]=arguments[++s];return kt(p,o?r:this,u)}}(e,t,r,a);else var _=function(e,t,n){var r=1&t,i=Ii(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return Do((j?ei:To)(_,w),e,t)}function Qi(e,t,n,r){return e===i||Ba(e,Pe[n])&&!Ne.call(r,n)?t:e}function Ji(e,t,n,r,o,a){return es(e)&&es(t)&&(a.set(t,e),Hr(e,t,i,Ji,a),a.delete(t)),e}function eo(e){return is(e)?i:e}function to(e,t,n,r,o,a){var s=1&n,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var p=-1,h=!0,m=2&n?new Yn:i;for(a.set(e,t),a.set(t,e);++p<l;){var f=e[p],g=t[p];if(r)var v=s?r(g,f,p,t,e,a):r(f,g,p,e,t,a);if(v!==i){if(v)continue;h=!1;break}if(m){if(!$t(t,function(e,t){if(!tn(m,t)&&(f===e||o(f,e,n,r,a)))return m.push(t)})){h=!1;break}}else if(f!==g&&!o(f,g,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function no(e){return Po(ko(e,i,Uo),e+"")}function ro(e){return Cr(e,Es,ho)}function io(e){return Cr(e,Ps,mo)}var oo=Tn?function(e){return Tn.get(e)}:ll;function ao(e){for(var t=e.name+"",n=En[t],r=Ne.call(En,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Ne.call(Bn,"placeholder")?Bn:e).placeholder}function lo(){var e=Bn.iteratee||il;return e=e===il?Nr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function uo(e){for(var t=Es(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,So(i)]}return t}function po(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Rr(n)?n:i}var ho=gt?function(e){return null==e?[]:(e=Ae(e),Pt(gt(e),function(t){return Ye.call(e,t)}))}:fl,mo=gt?function(e){for(var t=[];e;)Lt(t,ho(e)),e=qe(e);return t}:fl,fo=Sr;function go(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,o=!1;++r<i;){var a=Io(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&yo(a,i)&&(Va(e)||Wa(e))}function vo(e){return"function"!=typeof e.constructor||Co(e)?{}:zn(qe(e))}function xo(e){return Va(e)||Wa(e)||!!(Ke&&e&&e[Ke])}function yo(e,t){var n=typeof e;return!!(t=null==t?m:t)&&("number"==n||"symbol"!=n&&be.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&yo(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function jo(e,t){if(Va(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ls(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ae(t))}function wo(e){var t=ao(e),n=Bn[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(Cn&&fo(new Cn(new ArrayBuffer(1)))!=N||Sn&&fo(new Sn)!=S||An&&fo(An.resolve())!=M||kn&&fo(new kn)!=T||Mn&&fo(new Mn)!=D)&&(fo=function(e){var t=Sr(e),n=t==k?e.constructor:i,r=n?Fo(n):"";if(r)switch(r){case Pn:return N;case Dn:return S;case Rn:return M;case Nn:return T;case Ln:return D}return t});var _o=De?Xa:gl;function Co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function So(e){return e===e&&!es(e)}function Ao(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ae(n)))}}function ko(e,t,r){return t=Yt(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=Yt(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var l=n(t+1);++o<t;)l[o]=i[o];return l[t]=r(s),kt(e,this,l)}}function Mo(e,t){return t.length<2?e:_r(e,ri(t,0,-1))}function Oo(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var To=Ro(ei),Eo=dt||function(e,t){return ft.setTimeout(e,t)},Po=Ro(ti);function Do(e,t,n){var r=t+"";return Po(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ot(v,function(n){var r="_."+n[0];t&n[1]&&!Dt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(de):[]}(r),n)))}function Ro(e){var t=0,n=0;return function(){var r=bn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function No(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=Yr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Lo=function(e){var t=Ra(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)}),t});function Io(e){if("string"==typeof e||ls(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Re.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function $o(e){if(e instanceof Vn)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Oi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bo=Kr(function(e,t){return Ga(e)?ur(e,vr(t,1,Ga,!0)):[]}),zo=Kr(function(e,t){var n=Ko(t);return Ga(n)&&(n=i),Ga(e)?ur(e,vr(t,1,Ga,!0),lo(n,2)):[]}),Ho=Kr(function(e,t){var n=Ko(t);return Ga(n)&&(n=i),Ga(e)?ur(e,vr(t,1,Ga,!0),i,n):[]});function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=Yt(r+i,0)),Ht(e,lo(t,3),i)}function Vo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ms(n),o=n<0?Yt(r+o,0):yn(o,r-1)),Ht(e,lo(t,3),o,!0)}function Uo(e){return(null==e?0:e.length)?vr(e,1):[]}function qo(e){return e&&e.length?e[0]:i}var Go=Kr(function(e){var t=Nt(e,vi);return t.length&&t[0]===e[0]?Or(t):[]}),Yo=Kr(function(e){var t=Ko(e),n=Nt(e,vi);return t===Ko(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Or(n,lo(t,2)):[]}),Zo=Kr(function(e){var t=Ko(e),n=Nt(e,vi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Or(n,i,t):[]});function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Kr(Qo);function Qo(e,t){return e&&e.length&&t&&t.length?qr(e,t):e}var Jo=no(function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Gr(e,Nt(t,function(e){return yo(e,n)?+e:e}).sort(Ai)),r});function ea(e){return null==e?e:_n.call(e)}var ta=Kr(function(e){return di(vr(e,1,Ga,!0))}),na=Kr(function(e){var t=Ko(e);return Ga(t)&&(t=i),di(vr(e,1,Ga,!0),lo(t,2))}),ra=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:i,di(vr(e,1,Ga,!0),i,t)});function ia(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,function(e){if(Ga(e))return t=Yt(e.length,t),!0}),Xt(t,function(t){return Nt(e,Gt(t))})}function oa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Nt(n,function(e){return kt(t,i,e)})}var aa=Kr(function(e,t){return Ga(e)?ur(e,t):[]}),sa=Kr(function(e){return fi(Pt(e,Ga))}),la=Kr(function(e){var t=Ko(e);return Ga(t)&&(t=i),fi(Pt(e,Ga),lo(t,2))}),ca=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:i,fi(Pt(e,Ga),i,t)}),da=Kr(ia);var ua=Kr(function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)});function pa(e){var t=Bn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ma=no(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&yo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)});var fa=Ei(function(e,t,n){Ne.call(e,n)?++e[n]:or(e,n,1)});var ga=Fi(Wo),va=Fi(Vo);function xa(e,t){return(Va(e)?Ot:pr)(e,lo(t,3))}function ya(e,t){return(Va(e)?Tt:hr)(e,lo(t,3))}var ba=Ei(function(e,t,n){Ne.call(e,n)?e[n].push(t):or(e,n,[t])});var ja=Kr(function(e,t,r){var i=-1,o="function"==typeof t,a=qa(e)?n(e.length):[];return pr(e,function(e){a[++i]=o?kt(t,e,r):Tr(e,t,r)}),a}),wa=Ei(function(e,t,n){or(e,n,t)});function _a(e,t){return(Va(e)?Nt:$r)(e,lo(t,3))}var Ca=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var Sa=Kr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&bo(e,t[0],t[1])?t=[]:n>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),Vr(e,vr(t,1),[])}),Aa=it||function(){return ft.Date.now()};function ka(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,u,i,i,i,i,t)}function Ma(e,t){var n;if("function"!=typeof t)throw new Oe(o);return e=ms(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Oa=Kr(function(e,t,n){var r=1;if(n.length){var i=un(n,so(Oa));r|=c}return Xi(e,r,t,n,i)}),Ta=Kr(function(e,t,n){var r=3;if(n.length){var i=un(n,so(Ta));r|=c}return Xi(t,r,e,n,i)});function Ea(e,t,n){var r,a,s,l,c,d,u=0,p=!1,h=!1,m=!0;if("function"!=typeof e)throw new Oe(o);function f(t){var n=r,o=a;return r=a=i,u=t,l=e.apply(o,n)}function g(e){var n=e-d;return d===i||n>=t||n<0||h&&e-u>=s}function v(){var e=Aa();if(g(e))return x(e);c=Eo(v,function(e){var n=t-(e-d);return h?yn(n,s-(e-u)):n}(e))}function x(e){return c=i,m&&r?f(e):(r=a=i,l)}function y(){var e=Aa(),n=g(e);if(r=arguments,a=this,d=e,n){if(c===i)return function(e){return u=e,c=Eo(v,t),p?f(e):l}(d);if(h)return wi(c),c=Eo(v,t),f(d)}return c===i&&(c=Eo(v,t)),l}return t=gs(t)||0,es(n)&&(p=!!n.leading,s=(h="maxWait"in n)?Yt(gs(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m),y.cancel=function(){c!==i&&wi(c),u=0,r=d=a=c=i},y.flush=function(){return c===i?l:x(Aa())},y}var Pa=Kr(function(e,t){return dr(e,1,t)}),Da=Kr(function(e,t,n){return dr(e,gs(t)||0,n)});function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ra.Cache||Gn),n}function Na(e){if("function"!=typeof e)throw new Oe(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Gn;var La=bi(function(e,t){var n=(t=1==t.length&&Va(t[0])?Nt(t[0],Jt(lo())):Nt(vr(t,1),Jt(lo()))).length;return Kr(function(r){for(var i=-1,o=yn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return kt(e,this,r)})}),Ia=Kr(function(e,t){var n=un(t,so(Ia));return Xi(e,c,i,t,n)}),Fa=Kr(function(e,t){var n=un(t,so(Fa));return Xi(e,d,i,t,n)}),$a=no(function(e,t){return Xi(e,p,i,i,i,t)});function Ba(e,t){return e===t||e!==e&&t!==t}var za=qi(Ar),Ha=qi(function(e,t){return e>=t}),Wa=Er(function(){return arguments}())?Er:function(e){return ts(e)&&Ne.call(e,"callee")&&!Ye.call(e,"callee")},Va=n.isArray,Ua=jt?Jt(jt):function(e){return ts(e)&&Sr(e)==R};function qa(e){return null!=e&&Ja(e.length)&&!Xa(e)}function Ga(e){return ts(e)&&qa(e)}var Ya=vt||gl,Za=wt?Jt(wt):function(e){return ts(e)&&Sr(e)==j};function Ka(e){if(!ts(e))return!1;var t=Sr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=Sr(e);return t==_||t==C||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qa(e){return"number"==typeof e&&e==ms(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=m}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=_t?Jt(_t):function(e){return ts(e)&&fo(e)==S};function rs(e){return"number"==typeof e||ts(e)&&Sr(e)==A}function is(e){if(!ts(e)||Sr(e)!=k)return!1;var t=qe(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==$e}var os=Ct?Jt(Ct):function(e){return ts(e)&&Sr(e)==O};var as=St?Jt(St):function(e){return ts(e)&&fo(e)==T};function ss(e){return"string"==typeof e||!Va(e)&&ts(e)&&Sr(e)==E}function ls(e){return"symbol"==typeof e||ts(e)&&Sr(e)==P}var cs=At?Jt(At):function(e){return ts(e)&&Ja(e.length)&&!!lt[Sr(e)]};var ds=qi(Fr),us=qi(function(e,t){return e<=t});function ps(e){if(!e)return[];if(qa(e))return ss(e)?fn(e):Oi(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=fo(e);return(t==S?cn:t==T?pn:Bs)(e)}function hs(e){return e?(e=gs(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ms(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function fs(e){return e?sr(ms(e),0,g):0}function gs(e){if("number"==typeof e)return e;if(ls(e))return f;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Qt(e);var n=ve.test(e);return n||ye.test(e)?pt(e.slice(2),n?2:8):ge.test(e)?f:+e}function vs(e){return Ti(e,Ps(e))}function xs(e){return null==e?"":ci(e)}var ys=Pi(function(e,t){if(Co(t)||qa(t))Ti(t,Es(t),e);else for(var n in t)Ne.call(t,n)&&tr(e,n,t[n])}),bs=Pi(function(e,t){Ti(t,Ps(t),e)}),js=Pi(function(e,t,n,r){Ti(t,Ps(t),e,r)}),ws=Pi(function(e,t,n,r){Ti(t,Es(t),e,r)}),_s=no(ar);var Cs=Kr(function(e,t){e=Ae(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&bo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Ps(a),l=-1,c=s.length;++l<c;){var d=s[l],u=e[d];(u===i||Ba(u,Pe[d])&&!Ne.call(e,d))&&(e[d]=a[d])}return e}),Ss=Kr(function(e){return e.push(i,Ji),kt(Rs,i,e)});function As(e,t,n){var r=null==e?i:_r(e,t);return r===i?n:r}function ks(e,t){return null!=e&&go(e,t,Mr)}var Ms=zi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n},el(rl)),Os=zi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]},lo),Ts=Kr(Tr);function Es(e){return qa(e)?Kn(e):Lr(e)}function Ps(e){return qa(e)?Kn(e,!0):Ir(e)}var Ds=Pi(function(e,t,n){Hr(e,t,n)}),Rs=Pi(function(e,t,n,r){Hr(e,t,n,r)}),Ns=no(function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,function(t){return t=yi(t,e),r||(r=t.length>1),t}),Ti(e,io(e),n),r&&(n=lr(n,7,eo));for(var i=t.length;i--;)ui(n,t[i]);return n});var Ls=no(function(e,t){return null==e?{}:function(e,t){return Ur(e,t,function(t,n){return ks(e,n)})}(e,t)});function Is(e,t){if(null==e)return{};var n=Nt(io(e),function(e){return[e]});return t=lo(t),Ur(e,n,function(e,n){return t(e,n[0])})}var Fs=Ki(Es),$s=Ki(Ps);function Bs(e){return null==e?[]:en(e,Es(e))}var zs=Li(function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)});function Hs(e){return Ks(xs(e).toLowerCase())}function Ws(e){return(e=xs(e))&&e.replace(je,on).replace(tt,"")}var Vs=Li(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Us=Li(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),qs=Ni("toLowerCase");var Gs=Li(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var Ys=Li(function(e,t,n){return e+(n?" ":"")+Ks(t)});var Zs=Li(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=Ni("toUpperCase");function Xs(e,t,n){return e=xs(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Qs=Kr(function(e,t){try{return kt(e,i,t)}catch(n){return Ka(n)?n:new se(n)}}),Js=no(function(e,t){return Ot(t,function(t){t=Io(t),or(e,t,Oa(e[t],e))}),e});function el(e){return function(){return e}}var tl=$i(),nl=$i(!0);function rl(e){return e}function il(e){return Nr("function"==typeof e?e:lr(e,1))}var ol=Kr(function(e,t){return function(n){return Tr(n,e,t)}}),al=Kr(function(e,t){return function(n){return Tr(e,n,t)}});function sl(e,t,n){var r=Es(t),i=wr(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,Es(t)));var o=!(es(n)&&"chain"in n)||!!n.chain,a=Xa(e);return Ot(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Oi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})}),e}function ll(){}var cl=Wi(Nt),dl=Wi(Et),ul=Wi($t);function pl(e){return jo(e)?Gt(Io(e)):function(e){return function(t){return _r(t,e)}}(e)}var hl=Ui(),ml=Ui(!0);function fl(){return[]}function gl(){return!1}var vl=Hi(function(e,t){return e+t},0),xl=Yi("ceil"),yl=Hi(function(e,t){return e/t},1),bl=Yi("floor");var jl=Hi(function(e,t){return e*t},1),wl=Yi("round"),_l=Hi(function(e,t){return e-t},0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Oe(o);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=ka,Bn.assign=ys,Bn.assignIn=bs,Bn.assignInWith=js,Bn.assignWith=ws,Bn.at=_s,Bn.before=Ma,Bn.bind=Oa,Bn.bindAll=Js,Bn.bindKey=Ta,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},Bn.chain=pa,Bn.chunk=function(e,t,r){t=(r?bo(e,t,r):t===i)?1:Yt(ms(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,l=n(ht(o/t));a<o;)l[s++]=ri(e,a,a+=t);return l},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Lt(Va(r)?Oi(r):[r],vr(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=lo();return e=t?Nt(e,function(e){if("function"!=typeof e[1])throw new Oe(o);return[n(e[0]),e[1]]}):[],Kr(function(n){for(var r=-1;++r<t;){var i=e[r];if(kt(i[0],this,n))return kt(i[1],this,n)}})},Bn.conforms=function(e){return function(e){var t=Es(e);return function(n){return cr(n,e,t)}}(lr(e,1))},Bn.constant=el,Bn.countBy=fa,Bn.create=function(e,t){var n=zn(e);return null==t?n:ir(n,t)},Bn.curry=function e(t,n,r){var o=Xi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Bn.curryRight=function e(t,n,r){var o=Xi(t,l,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Bn.debounce=Ea,Bn.defaults=Cs,Bn.defaultsDeep=Ss,Bn.defer=Pa,Bn.delay=Da,Bn.difference=Bo,Bn.differenceBy=zo,Bn.differenceWith=Ho,Bn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=n||t===i?1:ms(t))<0?0:t,r):[]},Bn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,0,(t=r-(t=n||t===i?1:ms(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?hi(e,lo(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?hi(e,lo(t,3),!0):[]},Bn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&bo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ms(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ms(r))<0&&(r+=o),r=n>r?0:fs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Bn.filter=function(e,t){return(Va(e)?Pt:gr)(e,lo(t,3))},Bn.flatMap=function(e,t){return vr(_a(e,t),1)},Bn.flatMapDeep=function(e,t){return vr(_a(e,t),h)},Bn.flatMapDepth=function(e,t,n){return n=n===i?1:ms(n),vr(_a(e,t),n)},Bn.flatten=Uo,Bn.flattenDeep=function(e){return(null==e?0:e.length)?vr(e,h):[]},Bn.flattenDepth=function(e,t){return(null==e?0:e.length)?vr(e,t=t===i?1:ms(t)):[]},Bn.flip=function(e){return Xi(e,512)},Bn.flow=tl,Bn.flowRight=nl,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Bn.functions=function(e){return null==e?[]:wr(e,Es(e))},Bn.functionsIn=function(e){return null==e?[]:wr(e,Ps(e))},Bn.groupBy=ba,Bn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Bn.intersection=Go,Bn.intersectionBy=Yo,Bn.intersectionWith=Zo,Bn.invert=Ms,Bn.invertBy=Os,Bn.invokeMap=ja,Bn.iteratee=il,Bn.keyBy=wa,Bn.keys=Es,Bn.keysIn=Ps,Bn.map=_a,Bn.mapKeys=function(e,t){var n={};return t=lo(t,3),br(e,function(e,r,i){or(n,t(e,r,i),e)}),n},Bn.mapValues=function(e,t){var n={};return t=lo(t,3),br(e,function(e,r,i){or(n,r,t(e,r,i))}),n},Bn.matches=function(e){return Br(lr(e,1))},Bn.matchesProperty=function(e,t){return zr(e,lr(t,1))},Bn.memoize=Ra,Bn.merge=Ds,Bn.mergeWith=Rs,Bn.method=ol,Bn.methodOf=al,Bn.mixin=sl,Bn.negate=Na,Bn.nthArg=function(e){return e=ms(e),Kr(function(t){return Wr(t,e)})},Bn.omit=Ns,Bn.omitBy=function(e,t){return Is(e,Na(lo(t)))},Bn.once=function(e){return Ma(2,e)},Bn.orderBy=function(e,t,n,r){return null==e?[]:(Va(t)||(t=null==t?[]:[t]),Va(n=r?i:n)||(n=null==n?[]:[n]),Vr(e,t,n))},Bn.over=cl,Bn.overArgs=La,Bn.overEvery=dl,Bn.overSome=ul,Bn.partial=Ia,Bn.partialRight=Fa,Bn.partition=Ca,Bn.pick=Ls,Bn.pickBy=Is,Bn.property=pl,Bn.propertyOf=function(e){return function(t){return null==e?i:_r(e,t)}},Bn.pull=Xo,Bn.pullAll=Qo,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,lo(n,2)):e},Bn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,i,n):e},Bn.pullAt=Jo,Bn.range=hl,Bn.rangeRight=ml,Bn.rearg=$a,Bn.reject=function(e,t){return(Va(e)?Pt:gr)(e,Na(lo(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=lo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Gr(e,i),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new Oe(o);return Kr(e,t=t===i?t:ms(t))},Bn.reverse=ea,Bn.sampleSize=function(e,t,n){return t=(n?bo(e,t,n):t===i)?1:ms(t),(Va(e)?Qn:Qr)(e,t)},Bn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Bn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Jr(e,t,n,r)},Bn.shuffle=function(e){return(Va(e)?Jn:ni)(e)},Bn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&bo(e,t,n)?(t=0,n=r):(t=null==t?0:ms(t),n=n===i?r:ms(n)),ri(e,t,n)):[]},Bn.sortBy=Sa,Bn.sortedUniq=function(e){return e&&e.length?si(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?si(e,lo(t,2)):[]},Bn.split=function(e,t,n){return n&&"number"!=typeof n&&bo(e,t,n)&&(t=n=i),(n=n===i?g:n>>>0)?(e=xs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&ln(e)?ji(fn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Oe(o);return t=null==t?0:Yt(ms(t),0),Kr(function(n){var r=n[t],i=ji(n,0,t);return r&&Lt(i,r),kt(e,this,i)})},Bn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ms(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ms(t)))<0?0:t,r):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?hi(e,lo(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?hi(e,lo(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Oe(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ea(e,t,{leading:r,maxWait:t,trailing:i})},Bn.thru=ha,Bn.toArray=ps,Bn.toPairs=Fs,Bn.toPairsIn=$s,Bn.toPath=function(e){return Va(e)?Nt(e,Io):ls(e)?[e]:Oi(Lo(xs(e)))},Bn.toPlainObject=vs,Bn.transform=function(e,t,n){var r=Va(e),i=r||Ya(e)||cs(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Xa(o)?zn(qe(e)):{}}return(i?Ot:br)(e,function(e,r,i){return t(n,e,r,i)}),n},Bn.unary=function(e){return ka(e,1)},Bn.union=ta,Bn.unionBy=na,Bn.unionWith=ra,Bn.uniq=function(e){return e&&e.length?di(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?di(e,lo(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?di(e,i,t):[]},Bn.unset=function(e,t){return null==e||ui(e,t)},Bn.unzip=ia,Bn.unzipWith=oa,Bn.update=function(e,t,n){return null==e?e:pi(e,t,xi(n))},Bn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:pi(e,t,xi(n),r)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:en(e,Ps(e))},Bn.without=aa,Bn.words=Xs,Bn.wrap=function(e,t){return Ia(xi(t),e)},Bn.xor=sa,Bn.xorBy=la,Bn.xorWith=ca,Bn.zip=da,Bn.zipObject=function(e,t){return gi(e||[],t||[],tr)},Bn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Jr)},Bn.zipWith=ua,Bn.entries=Fs,Bn.entriesIn=$s,Bn.extend=bs,Bn.extendWith=js,sl(Bn,Bn),Bn.add=vl,Bn.attempt=Qs,Bn.camelCase=zs,Bn.capitalize=Hs,Bn.ceil=xl,Bn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=gs(n))===n?n:0),t!==i&&(t=(t=gs(t))===t?t:0),sr(gs(e),t,n)},Bn.clone=function(e){return lr(e,4)},Bn.cloneDeep=function(e){return lr(e,5)},Bn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:i)},Bn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:i)},Bn.conformsTo=function(e,t){return null==t||cr(e,t,Es(t))},Bn.deburr=Ws,Bn.defaultTo=function(e,t){return null==e||e!==e?t:e},Bn.divide=yl,Bn.endsWith=function(e,t,n){e=xs(e),t=ci(t);var r=e.length,o=n=n===i?r:sr(ms(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Bn.eq=Ba,Bn.escape=function(e){return(e=xs(e))&&X.test(e)?e.replace(Z,an):e},Bn.escapeRegExp=function(e){return(e=xs(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Bn.every=function(e,t,n){var r=Va(e)?Et:mr;return n&&bo(e,t,n)&&(t=i),r(e,lo(t,3))},Bn.find=ga,Bn.findIndex=Wo,Bn.findKey=function(e,t){return zt(e,lo(t,3),br)},Bn.findLast=va,Bn.findLastIndex=Vo,Bn.findLastKey=function(e,t){return zt(e,lo(t,3),jr)},Bn.floor=bl,Bn.forEach=xa,Bn.forEachRight=ya,Bn.forIn=function(e,t){return null==e?e:xr(e,lo(t,3),Ps)},Bn.forInRight=function(e,t){return null==e?e:yr(e,lo(t,3),Ps)},Bn.forOwn=function(e,t){return e&&br(e,lo(t,3))},Bn.forOwnRight=function(e,t){return e&&jr(e,lo(t,3))},Bn.get=As,Bn.gt=za,Bn.gte=Ha,Bn.has=function(e,t){return null!=e&&go(e,t,kr)},Bn.hasIn=ks,Bn.head=qo,Bn.identity=rl,Bn.includes=function(e,t,n,r){e=qa(e)?e:Bs(e),n=n&&!r?ms(n):0;var i=e.length;return n<0&&(n=Yt(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Wt(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=Yt(r+i,0)),Wt(e,t,i)},Bn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=yn(t,n)&&e<Yt(t,n)}(e=gs(e),t,n)},Bn.invoke=Ts,Bn.isArguments=Wa,Bn.isArray=Va,Bn.isArrayBuffer=Ua,Bn.isArrayLike=qa,Bn.isArrayLikeObject=Ga,Bn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Sr(e)==b},Bn.isBuffer=Ya,Bn.isDate=Za,Bn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Va(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||cs(e)||Wa(e)))return!e.length;var t=fo(e);if(t==S||t==T)return!e.size;if(Co(e))return!Lr(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Pr(e,t)},Bn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Pr(e,t,i,n):!!r},Bn.isError=Ka,Bn.isFinite=function(e){return"number"==typeof e&&yt(e)},Bn.isFunction=Xa,Bn.isInteger=Qa,Bn.isLength=Ja,Bn.isMap=ns,Bn.isMatch=function(e,t){return e===t||Dr(e,t,uo(t))},Bn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Dr(e,t,uo(t),n)},Bn.isNaN=function(e){return rs(e)&&e!=+e},Bn.isNative=function(e){if(_o(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=rs,Bn.isObject=es,Bn.isObjectLike=ts,Bn.isPlainObject=is,Bn.isRegExp=os,Bn.isSafeInteger=function(e){return Qa(e)&&e>=-9007199254740991&&e<=m},Bn.isSet=as,Bn.isString=ss,Bn.isSymbol=ls,Bn.isTypedArray=cs,Bn.isUndefined=function(e){return e===i},Bn.isWeakMap=function(e){return ts(e)&&fo(e)==D},Bn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Sr(e)},Bn.join=function(e,t){return null==e?"":bt.call(e,t)},Bn.kebabCase=Vs,Bn.last=Ko,Bn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ms(n))<0?Yt(r+o,0):yn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ht(e,Ut,o,!0)},Bn.lowerCase=Us,Bn.lowerFirst=qs,Bn.lt=ds,Bn.lte=us,Bn.max=function(e){return e&&e.length?fr(e,rl,Ar):i},Bn.maxBy=function(e,t){return e&&e.length?fr(e,lo(t,2),Ar):i},Bn.mean=function(e){return qt(e,rl)},Bn.meanBy=function(e,t){return qt(e,lo(t,2))},Bn.min=function(e){return e&&e.length?fr(e,rl,Fr):i},Bn.minBy=function(e,t){return e&&e.length?fr(e,lo(t,2),Fr):i},Bn.stubArray=fl,Bn.stubFalse=gl,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=jl,Bn.nth=function(e,t){return e&&e.length?Wr(e,ms(t)):i},Bn.noConflict=function(){return ft._===this&&(ft._=Be),this},Bn.noop=ll,Bn.now=Aa,Bn.pad=function(e,t,n){e=xs(e);var r=(t=ms(t))?mn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Vi(mt(i),n)+e+Vi(ht(i),n)},Bn.padEnd=function(e,t,n){e=xs(e);var r=(t=ms(t))?mn(e):0;return t&&r<t?e+Vi(t-r,n):e},Bn.padStart=function(e,t,n){e=xs(e);var r=(t=ms(t))?mn(e):0;return t&&r<t?Vi(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),jn(xs(e).replace(ae,""),t||0)},Bn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&bo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=wn();return yn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Yr(e,t)},Bn.reduce=function(e,t,n){var r=Va(e)?It:Zt,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},Bn.reduceRight=function(e,t,n){var r=Va(e)?Ft:Zt,i=arguments.length<3;return r(e,lo(t,4),n,i,hr)},Bn.repeat=function(e,t,n){return t=(n?bo(e,t,n):t===i)?1:ms(t),Zr(xs(e),t)},Bn.replace=function(){var e=arguments,t=xs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var r=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Io(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Bn.round=wl,Bn.runInContext=e,Bn.sample=function(e){return(Va(e)?Xn:Xr)(e)},Bn.size=function(e){if(null==e)return 0;if(qa(e))return ss(e)?mn(e):e.length;var t=fo(e);return t==S||t==T?e.size:Lr(e).length},Bn.snakeCase=Gs,Bn.some=function(e,t,n){var r=Va(e)?$t:ii;return n&&bo(e,t,n)&&(t=i),r(e,lo(t,3))},Bn.sortedIndex=function(e,t){return oi(e,t)},Bn.sortedIndexBy=function(e,t,n){return ai(e,t,lo(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Ba(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return ai(e,t,lo(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},Bn.startCase=Ys,Bn.startsWith=function(e,t,n){return e=xs(e),n=null==n?0:sr(ms(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Bn.subtract=_l,Bn.sum=function(e){return e&&e.length?Kt(e,rl):0},Bn.sumBy=function(e,t){return e&&e.length?Kt(e,lo(t,2)):0},Bn.template=function(e,t,n){var r=Bn.templateSettings;n&&bo(e,t,n)&&(t=i),e=xs(e),t=js({},t,r,Qi);var o,a,s=js({},t.imports,r.imports,Qi),l=Es(s),c=en(s,l),d=0,u=t.interpolate||we,p="__p += '",h=ke((t.escape||we).source+"|"+u.source+"|"+(u===ee?me:we).source+"|"+(t.evaluate||we).source+"|$","g"),m="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,function(t,n,r,i,s,l){return r||(r=i),p+=e.slice(d,l).replace(_e,sn),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=l+t.length,t}),p+="';\n";var f=Ne.call(t,"variable")&&t.variable;if(f){if(pe.test(f))throw new se("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(U,""):p).replace(q,"$1").replace(G,"$1;"),p="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Qs(function(){return Ce(l,m+"return "+p).apply(i,c)});if(g.source=p,Ka(g))throw g;return g},Bn.times=function(e,t){if((e=ms(e))<1||e>m)return[];var n=g,r=yn(e,g);t=lo(t),e-=g;for(var i=Xt(r,t);++n<e;)t(n);return i},Bn.toFinite=hs,Bn.toInteger=ms,Bn.toLength=fs,Bn.toLower=function(e){return xs(e).toLowerCase()},Bn.toNumber=gs,Bn.toSafeInteger=function(e){return e?sr(ms(e),-9007199254740991,m):0===e?e:0},Bn.toString=xs,Bn.toUpper=function(e){return xs(e).toUpperCase()},Bn.trim=function(e,t,n){if((e=xs(e))&&(n||t===i))return Qt(e);if(!e||!(t=ci(t)))return e;var r=fn(e),o=fn(t);return ji(r,nn(r,o),rn(r,o)+1).join("")},Bn.trimEnd=function(e,t,n){if((e=xs(e))&&(n||t===i))return e.slice(0,gn(e)+1);if(!e||!(t=ci(t)))return e;var r=fn(e);return ji(r,0,rn(r,fn(t))+1).join("")},Bn.trimStart=function(e,t,n){if((e=xs(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ci(t)))return e;var r=fn(e);return ji(r,nn(r,fn(t))).join("")},Bn.truncate=function(e,t){var n=30,r="...";if(es(t)){var o="separator"in t?t.separator:o;n="length"in t?ms(t.length):n,r="omission"in t?ci(t.omission):r}var a=(e=xs(e)).length;if(ln(e)){var s=fn(e);a=s.length}if(n>=a)return e;var l=n-mn(r);if(l<1)return r;var c=s?ji(s,0,l).join(""):e.slice(0,l);if(o===i)return c+r;if(s&&(l+=c.length-l),os(o)){if(e.slice(l).search(o)){var d,u=c;for(o.global||(o=ke(o.source,xs(fe.exec(o))+"g")),o.lastIndex=0;d=o.exec(u);)var p=d.index;c=c.slice(0,p===i?l:p)}}else if(e.indexOf(ci(o),l)!=l){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Bn.unescape=function(e){return(e=xs(e))&&K.test(e)?e.replace(Y,vn):e},Bn.uniqueId=function(e){var t=++Le;return xs(e)+t},Bn.upperCase=Zs,Bn.upperFirst=Ks,Bn.each=xa,Bn.eachRight=ya,Bn.first=qo,sl(Bn,function(){var e={};return br(Bn,function(t,n){Ne.call(Bn.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),Bn.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bn[e].placeholder=Bn}),Ot(["drop","take"],function(e,t){Vn.prototype[e]=function(n){n=n===i?1:Yt(ms(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Ot(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Ot(["head","last"],function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}}),Ot(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}}),Vn.prototype.compact=function(){return this.filter(rl)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Kr(function(e,t){return"function"==typeof e?new Vn(this):this.map(function(n){return Tr(n,e,t)})}),Vn.prototype.reject=function(e){return this.filter(Na(lo(e)))},Vn.prototype.slice=function(e,t){e=ms(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ms(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(g)},br(Vn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Bn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof Vn,c=s[0],d=l||Va(t),u=function(e){var t=o.apply(Bn,Lt([e],s));return r&&p?t[0]:t};d&&n&&"function"==typeof c&&1!=c.length&&(l=d=!1);var p=this.__chain__,h=!!this.__actions__.length,m=a&&!p,f=l&&!h;if(!a&&d){t=f?t:new Vn(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[u],thisArg:i}),new Wn(g,p)}return m&&f?e.apply(this,s):(g=this.thru(u),m?r?g.value()[0]:g.value():g)})}),Ot(["pop","push","shift","sort","splice","unshift"],function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Va(i)?i:[],e)}return this[n](function(n){return t.apply(Va(n)?n:[],e)})}}),br(Vn.prototype,function(e,t){var n=Bn[t];if(n){var r=n.name+"";Ne.call(En,r)||(En[r]=[]),En[r].push({name:t,func:n})}}),En[Bi(i,2).name]=[{name:"wrapper",func:i}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=Oi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oi(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Va(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yn(t,e+a);break;case"takeRight":e=Yt(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,d=this.__iteratees__,u=d.length,p=0,h=yn(l,this.__takeCount__);if(!n||!r&&i==l&&h==l)return mi(e,this.__actions__);var m=[];e:for(;l--&&p<h;){for(var f=-1,g=e[c+=t];++f<u;){var v=d[f],x=v.iteratee,y=v.type,b=x(g);if(2==y)g=b;else if(!b){if(1==y)continue e;break e}}m[p++]=g}return m},Bn.prototype.at=ma,Bn.prototype.chain=function(){return pa(this)},Bn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===i&&(this.__values__=ps(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof Hn;){var r=$o(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Wn(t,this.__chain__)}return this.thru(ea)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Xe&&(Bn.prototype[Xe]=function(){return this}),Bn}();ft._=xn,(r=function(){return xn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},53871:e=>{e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},54052:e=>{var t=Array.isArray;e.exports=t},54160:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},54238:(e,t,n)=>{var r,i,o=n(93795),a=n(83950),s=0,l=0;e.exports=function(e,t,n){var c=t&&n||0,d=t||[],u=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:i;if(null==u||null==p){var h=o();null==u&&(u=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=i=16383&(h[6]<<8|h[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,g=m-s+(f-l)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||m>s)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=m,l=f,i=p;var v=(1e4*(268435455&(m+=122192928e5))+f)%4294967296;d[c++]=v>>>24&255,d[c++]=v>>>16&255,d[c++]=v>>>8&255,d[c++]=255&v;var x=m/4294967296*1e4&268435455;d[c++]=x>>>8&255,d[c++]=255&x,d[c++]=x>>>24&15|16,d[c++]=x>>>16&255,d[c++]=p>>>8|128,d[c++]=255&p;for(var y=0;y<6;++y)d[c+y]=u[y];return t||a(d)}},54320:(e,t,n)=>{var r=n(83713),i=n(26924),o=n(22777),a=n(54052),s=n(6571),l=n(44543),c=n(36140),d=n(51268),u=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||d(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(u.call(e,n))return!1;return!0}},54444:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M7.58 4.08 6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42m12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42M18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2"}),"NotificationsActive")},54469:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow")},54516:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(51052).A},54536:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown")},54575:e=>{"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var n=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,i=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=new t(512),l=new t(512),c=new t(512);function d(e){return s.get(e)||s.set(e,u(e).map(function(e){return e.replace(a,"$2")}))}function u(e){return e.match(n)||[""]}function p(e){return"string"===typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function h(e){return!p(e)&&(function(e){return e.match(i)&&!e.match(r)}(e)||function(e){return o.test(e)}(e))}e.exports={Cache:t,split:u,normalizePath:d,setter:function(e){var t=d(e);return l.get(e)||l.set(e,function(e,n){for(var r=0,i=t.length,o=e;r<i-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;o=o[t[r++]]}o[t[r]]=n})},getter:function(e,t){var n=d(e);return c.get(e)||c.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(p(t)||r.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,o,a,s=e.length;for(i=0;i<s;i++)(r=e[i])&&(h(r)&&(r='"'+r+'"'),o=!(a=p(r))&&/^\d+$/.test(r),t.call(n,r,a,o,i,e))}(Array.isArray(e)?e:u(e),t,n)}}},54878:(e,t,n)=>{e=n.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";var r,i=e("./lib/oop"),o=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),a=e("./editor").Editor,s=e("./virtual_renderer").VirtualRenderer,l=e("./edit_session").EditSession;(function(){i.implement(this,o),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new a(new s(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new l(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;n=null==t?this.$cEditor:this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var r=t/this.$splits,i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=r+"px",e.container.style.top="0px",e.container.style.left=i*r+"px",e.container.style.height=n+"px",e.resize();else{var o=n/this.$splits;for(i=0;i<this.$splits;i++)(e=this.$editors[i]).container.style.width=t+"px",e.container.style.top=i*o+"px",e.container.style.left="0px",e.container.style.height=o+"px",e.resize()}}}).call((r=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))}).prototype),t.Split=r}),ace.define("ace/ext/split",["require","exports","module","ace/ext/split","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")}),ace.require(["ace/ext/split"],function(t){e&&(e.exports=t)})},54893:e=>{e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},55013:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(84440).A},55119:(e,t,n)=>{var r=n(96614),i=n(30474);e.exports=function(e,t){return e&&r(t,i(t),e)}},55636:(e,t,n)=>{var r=n(31170),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=n(l),r(e,this,c)}}},55647:(e,t,n)=>{var r=n(33279),i=n(55636),o=n(46350);e.exports=function(e,t){return o(i(e,t,r),e+"")}},55722:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"}),"CalendarMonth")},55906:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}},56173:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},56326:(e,t,n)=>{var r=n(48895),i=n(85990),o=n(69621),a=n(57828),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},56434:(e,t,n)=>{var r=n(97132);e.exports=function(e){return r(e,5)}},56438:(e,t,n)=>{"use strict";var r=n(86267);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)}),n}},56552:(e,t,n)=>{var r=n(37105),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},56559:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)([(0,o.jsx)("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22z"},"0"),(0,o.jsx)("path",{d:"M13 16h-2v2h2zm0-6h-2v5h2z"},"1")],"WarningAmber")},56603:(e,t,n)=>{e=n.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,r){"string"===typeof e?(2==arguments.length&&(r=n),t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"===typeof t){var i=o(e,t);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var a=[],s=0,l=t.length;s<l;++s){var c=o(e,t[s]);if(void 0==c&&r.original)return;a.push(c)}return n&&n.apply(null,a)||!0}},r=function(e,t){var i=n("",e,t);return void 0==i&&r.original?r.original.apply(this,arguments):i},i=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return i(e,n[0])+"!"+i(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&r!=t;){var r=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},o=function(e,r){r=i(e,r);var o=t.modules[r];if(!o){if("function"===typeof(o=t.payloads[r])){var a={},s={id:r,uri:"",exports:a,packaged:!0};a=o(function(e,t){return n(r,e,t)},a,s)||s.exports,t.modules[r]=a,delete t.payloads[r]}o=t.modules[r]=a||o}return o};!function(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]),i.define&&i.define.packaged||(t.original=i.define,i.define=t,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}("ace")}(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,"startsWith",function(e,t){return t=t||0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,"endsWith",function(e,t){var n=this;(void 0===t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),String.prototype.repeat||r(String.prototype,"repeat",function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||r(String.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Object.assign||(Object.assign=function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];void 0!==r&&null!==r&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,"find",function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}}),Array.prototype.findIndex||r(Array.prototype,"findIndex",function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}}),Array.prototype.includes||r(Array.prototype,"includes",function(e,t){return-1!=this.indexOf(e,t)}),Array.prototype.fill||r(Array.prototype,"fill",function(e){for(var t=this,n=t.length>>>0,r=arguments[1]|0,i=r<0?Math.max(n+r,0):Math.min(r,n),o=arguments[2],a=void 0===o?n:o|0,s=a<0?Math.max(n+a,0):Math.min(a,n);i<s;)t[i]=e,i++;return t}),Array.of||r(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,t,n){"use strict";e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,t,n){t.deepCopy=function e(t){if("object"!==typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){null==n&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r="object"==typeof navigator?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||["other"])[0].toLowerCase(),o=r.userAgent||"",a=r.appName||"";t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(o.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";var r,i=e("./useragent");t.buildDom=function e(t,n,r){if("string"==typeof t&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],a=0;a<t.length;a++){var s=e(t[a],n,r);s&&o.push(s)}return o}var l=document.createElement(t[0]),c=t[1],d=1;c&&"object"==typeof c&&!Array.isArray(c)&&(d=2);for(a=d;a<t.length;a++)e(t[a],l,r);return 2==d&&Object.keys(c).forEach(function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?r&&(r[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)}),n&&n.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(-1==r)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(-1==i)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,r=0;if(n=(t=t||document).querySelectorAll("style"))for(;r<n.length;)if(n[r++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var o=[];function a(){var e=o;o=null,e&&e.forEach(function(e){s(e[0],e[1])})}function s(e,n,i){if("undefined"!=typeof document){if(o)if(i)a();else if(!1===i)return o.push([e,n]);if(!r){var s=i;i&&i.getRootNode&&(s=i.getRootNode())&&s!=i||(s=document);var l=s.ownerDocument||s;if(n&&t.hasCssString(n,s))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),s==l&&(s=t.getDocumentHead(l)),s.insertBefore(c,s.firstChild)}}}if(t.useStrictCSP=function(e){r=e,0==e?a():o||(o=[])},t.importCssString=s,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var o=e&&e.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(r);var a=n.offsetWidth;i.overflow="scroll";var s=n.offsetWidth;return a===s&&(s=r.clientWidth),o.removeChild(r),a-s},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!i.isWin||"undefined"!==typeof window&&window.devicePixelRatio>=1.5,i.isChromeOS&&(t.HI_DPI=!1),"undefined"!==typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),i.isEdge||"undefined"===typeof l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){!n&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(n.length||r){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var a=0;a<n.length&&(n[a](t,this),!t.propagationStopped);a++);return r&&!t.defaultPrevented?r(t,this):void 0}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;if(this.on(e,function r(){n.off(e,r),t.apply(null,arguments)}),!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var o=i.indexOf(t);-1!=o&&i.splice(o,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);-1!=i&&r.splice(i,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),-1==r.indexOf(t)&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,t,n){t.reportError=function(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"}}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,t,n){var r,i,o=e("./oop"),a=e("./event_emitter").EventEmitter,s=e("./report_error").reportError,l=e("./default_english_messages").defaultEnglishMessages,c={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var n=this.$options;e=Object.keys(n).filter(function(e){return!n[e].hidden})}return e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return d('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:d('misspelled option "'+e+'"')}};function d(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var u=function(){function e(){this.$defaultOptions={},r=l,i="dollarSigns"}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];"string"==typeof r&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)}),o.implement(e,c),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},e.prototype.setMessages=function(e,t){r=e,t&&t.placeholders&&(i=t.placeholders)},e.prototype.nls=function(e,t,n){r[e]||(d("No message found for the key '"+e+"' in messages with id "+r.$id+", trying to find a translation for the default string '"+t+"'."),r[t]||d("No message found for the default string '"+t+"' in the provided messages. Falling back to the default English message."));var o=r[e]||r[t]||t;return n&&("dollarSigns"===i&&(o=o.replace(/\$(\$|[\d]+)/g,function(e,t){return"$"==t?"$":n[t]})),"curlyBrackets"===i&&(o=o.replace(/\{([^\}]+)\}/g,function(e,t){return n[t]}))),o},e}();u.prototype.warn=d,u.prototype.reportError=s,o.implement(u.prototype,a),t.AppConfig=u}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,t,n){n.exports='.ace-tm .ace_gutter {\n  background: #f0f0f0;\n  color: #333;\n}\n\n.ace-tm .ace_print-margin {\n  width: 1px;\n  background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n    background-color: #6B72E6;\n}\n\n.ace-tm {\n  background-color: #FFFFFF;\n  color: black;\n}\n\n.ace-tm .ace_cursor {\n  color: black;\n}\n        \n.ace-tm .ace_invisible {\n  color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n  color: blue;\n}\n\n.ace-tm .ace_constant {\n  color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n  color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n  color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n  color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n  background-color: rgba(255, 0, 0, 0.1);\n  color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n  color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n  color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n  color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n  color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n  color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n  color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n  color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n  color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n  color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n  color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n  color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n  color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n  color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n  color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n  color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n  color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n  background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n  box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n  background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n  background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n  margin: -1px 0 0 -1px;\n  border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n  background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n    background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n  background: rgb(250, 250, 255);\n  border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/net"),o=e("./lib/dom"),a=e("./lib/app_config").AppConfig;n.exports=t=new a;var s={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!s.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return s[e]},t.set=function(e,t){if(s.hasOwnProperty(e))s[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&o.useStrictCSP(t)},t.all=function(){return r.copyObject(s)},t.$modes={},t.moduleUrl=function(e,t){if(s.$moduleUrls[e])return s.$moduleUrls[e];var n=e.split("/"),r="snippets"==(t=t||n[n.length-2]||"")?"/":"-",i=n[n.length-1];if("worker"==t&&"-"==r){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(o,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var a=s[t+"Path"];return null==a?a=s.basePath:"/"==r&&(t=r=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return s.$moduleUrls[e]=t};var l;t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(n,r){var o;if(Array.isArray(n))var a=n[0],s=n[1];else if("string"==typeof n)s=n;var d=function(n){if(n&&!t.$loading[s])return r&&r(n);if(t.$loading[s]||(t.$loading[s]=[]),t.$loading[s].push(r),!(t.$loading[s].length>1)){var o=function(){!function(t,n){"ace/theme/textmate"===t||"./theme/textmate"===t?n(null,e("./theme/textmate")):l?l(t,n):console.error("loader is not configured")}(s,function(e,n){n&&(t.$loaded[s]=n),t._emit("load.module",{name:s,module:n});var r=t.$loading[s];t.$loading[s]=null,r.forEach(function(e){e&&e(n)})})};if(!t.get("packaged"))return o();i.loadScript(t.moduleUrl(s,a),o),c()}};if(t.dynamicModules[s])t.dynamicModules[s]().then(function(e){e.default?d(e.default):d(e)});else{try{o=this.$require(s)}catch(u){}d(o||t.$loaded[s])}},t.$require=function(e){if("function"==typeof n.require){return n.require(e)}},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var c=function(){s.basePath||s.workerPath||s.modePath||s.themePath||Object.keys(s.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var i=e("./config");i.setLoader(function(t,n){e([t],function(e){n(null,e)})});var o=function(){return this||"undefined"!=typeof window&&window}();function a(t){if(o&&o.document){i.set("packaged",t||e.packaged||r.packaged||o.define&&n.amdD.packaged);var a={},l="",c=document.currentScript||document._currentScript,d=c&&c.ownerDocument||document;c&&c.src&&(l=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var u=d.getElementsByTagName("script"),p=0;p<u.length;p++){var h=u[p],m=h.src||h.getAttribute("src");if(m){for(var f=h.attributes,g=0,v=f.length;g<v;g++){var x=f[g];0===x.name.indexOf("data-ace-")&&(a[s(x.name.replace(/^data-ace-/,""))]=x.value)}var y=m.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);y&&(l=y[1])}}for(var b in l&&(a.base=a.base||l,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base,a)"undefined"!==typeof a[b]&&i.set(b,a[b])}}function s(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}r.exports=function(t){i.init=a,i.$require=e,t.require=e,t.define=n.amdD},a(!0)}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(r.row,r.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(r.row,r.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.row<t)r={row:t,column:0};if(this.start.row>n)var i={row:n+1,column:0};else if(this.start.row<t)i={row:t,column:0};return e.fromPoints(i||this.start,r||this.end)},e.prototype.extend=function(t,n){var r=this.compare(t,n);if(0==r)return this;if(-1==r)var i={row:t,column:n};else var o={row:t,column:n};return e.fromPoints(i||this.start,o||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new e(n.row,n.column,r.row,r.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){"use strict";for(var r=e("./oop"),i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},o={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)o["Digit"+a]=48+a,o["Numpad"+a]=96+a,i.PRINTABLE_KEYS[48+a]=""+a,i.FUNCTION_KEYS[96+a]="Numpad"+a;for(a=65;a<91;a++){var s=String.fromCharCode(a+32);o["Key"+s.toUpperCase()]=a,i.PRINTABLE_KEYS[a]=s}for(a=1;a<13;a++)o["F"+a]=111+a,i.FUNCTION_KEYS[111+a]="F"+a;var l={Shift:16,Control:17,Alt:18,Meta:224};for(var c in l)o[c]=o[c+"Left"]=o[c+"Right"]=l[c];for(var d in t.$codeToKeyCode=o,i.PRINTABLE_KEYS[173]="-",i.FUNCTION_KEYS){var u=i.FUNCTION_KEYS[d].toLowerCase();i[u]=parseInt(d,10)}for(var d in i.PRINTABLE_KEYS){u=i.PRINTABLE_KEYS[d].toLowerCase();i[u]=parseInt(d,10)}r.mixin(i,i.MODIFIER_KEYS),r.mixin(i,i.PRINTABLE_KEYS),r.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter(function(e){return t&i.KEY_MODS[e]}).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",r.mixin(t,i),t.default=t,t.keyCodeToString=function(e){var t=i[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var r,i=e("./keys"),o=e("./useragent"),a=null,s=0;function l(){return void 0==r&&function(){r=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return r={passive:!1},!0}})}catch(e){}}(),r}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}c.prototype.destroy=function(){u(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=t.addListener=function(e,t,n,r){e.addEventListener(t,n,l()),r&&r.$toDestroy.push(new c(e,t,n))},u=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};function p(e){return(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}function h(){a=Object.create(null)}if(t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function i(e){t&&t(e),n&&n(e),u(r,"mousemove",t),u(r,"mouseup",i),u(r,"dragstart",i)}return d(r,"mousemove",t),d(r,"mouseup",i),d(r,"dragstart",i),i},t.addMouseWheelListener=function(e,t,n){d(e,"wheel",function(e){var n=e.deltaX||0,r=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*r;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*r;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*r}t(e)},n)},t.addMultiMouseDownListener=function(e,n,r,i,a){var s,l,c,u=0,p={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?u=0:e.detail>1?++u>4&&(u=1):u=1,o.isIE){var a=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-l)>5;c&&!a||(u=1),c&&clearTimeout(c),c=setTimeout(function(){c=null},n[u-1]||600),1==u&&(s=e.clientX,l=e.clientY)}if(e._clicks=u,r[i]("mousedown",e),u>4)u=0;else if(u>1)return r[i](p[u],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){d(e,"mousedown",h,a)})},t.getModifierString=function(e){return i.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,r){var l=null;d(e,"keydown",function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=function(e,t,n){var r=p(t);if(!n&&t.code&&(n=i.$codeToKeyCode[t.code]||n),!o.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(r|=8),a.altGr){if(3==(3&r))return;a.altGr=0}if(18===n||17===n){var l=t.location;17===n&&1===l?1==a[n]&&(s=t.timeStamp):18===n&&3===r&&2===l&&t.timeStamp-s<50&&(a.altGr=!0)}}if(n in i.MODIFIER_KEYS&&(n=-1),r||13!==n||3!==t.location||(e(t,r,-n),!t.defaultPrevented)){if(o.isChromeOS&&8&r){if(e(t,r,n),t.defaultPrevented)return;r&=-9}return!!(r||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,r,n)}}(n,e,e.keyCode);return l=e.defaultPrevented,t},r),d(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)},r),d(e,"keyup",function(e){a[e.keyCode]=null},r),a||(h(),d(window,"focus",h))},"object"==typeof window&&window.postMessage&&!o.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++,i=function(o){o.data==r&&(t.stopPropagation(o),u(n,"message",i),e())};d(n,"message",i),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout(function n(){t.$idleBlocked?setTimeout(n,100):e()},n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout(function(){t.$idleBlocked=!1},e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,t,n){"use strict";var r;n.exports={lineMode:!1,pasteCancelled:function(){return!!(r&&r>Date.now()-50)||(r=!1)},cancel:function(){r=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../config").nls,o=e("../lib/useragent"),a=e("../lib/dom"),s=e("../lib/lang"),l=e("../clipboard"),c=o.isChrome<18,d=o.isIE,u=o.isChrome>63,p=400,h=e("../lib/keys"),m=h.KEY_MODS,f=o.isIOS,g=f?/\s/:/\n/,v=o.isMobile,x=function(){function e(e,t){var n=this;this.host=t,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",e.insertBefore(this.text,e.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",v||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch(i){}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),r.addListener(this.text,"blur",function(e){n.ignoreFocusEvents||(t.onBlur(e),n.$isFocused=!1)},t),r.addListener(this.text,"focus",function(e){if(!n.ignoreFocusEvents){if(n.$isFocused=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(n.resetSelection.bind(n)):n.resetSelection()}},t),this.$focusScroll=!1,t.on("beforeEndOperation",function(){var e=t.curOp,r=e&&e.command&&e.command.name;if("insertstring"!=r){var i=r&&(e.docChanged||e.selectionChanged);n.inComposition&&i&&(n.lastValue=n.text.value="",n.onCompositionEnd()),n.resetSelection()}}),t.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=f?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&t.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,r.addCommandKeyListener(this.text,function(e,r,i){if(!n.inComposition)return t.onCommandKey(e,r,i)},t),r.addListener(this.text,"select",this.onSelect.bind(this),t),r.addListener(this.text,"input",this.onInput.bind(this),t),r.addListener(this.text,"cut",this.onCut.bind(this),t),r.addListener(this.text,"copy",this.onCopy.bind(this),t),r.addListener(this.text,"paste",this.onPaste.bind(this),t),"oncut"in this.text&&"oncopy"in this.text&&"onpaste"in this.text||r.addListener(e,"keydown",function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:n.onCopy(e);break;case 86:n.onPaste(e);break;case 88:n.onCut(e)}},t),this.syncComposition=s.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),r.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),t),r.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),t),r.addListener(this.text,"keyup",this.onKeyup.bind(this),t),r.addListener(this.text,"keydown",this.syncComposition.bind(this),t),r.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),t),this.closeTimeout,r.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),t),r.addListener(this.text,"mousedown",function(e){e.preventDefault(),n.onContextMenuClose()},t),r.addListener(t.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),t),r.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),t),f&&this.addIosSelectionHandler(e,t,this.text)}return e.prototype.addIosSelectionHandler=function(e,t,n){var r=this,i=null,o=!1;n.addEventListener("keydown",function(e){i&&clearTimeout(i),o=!0},!0),n.addEventListener("keyup",function(e){i=setTimeout(function(){o=!1},100)},!0);var a=function(e){if(document.activeElement===n&&!(o||r.inComposition||t.$mouseHandler.isMousePressed)&&!r.copied){var i=n.selectionStart,a=n.selectionEnd,s=null,l=0;if(0==i?s=h.up:1==i?s=h.home:a>r.lastSelectionEnd&&"\n"==r.lastValue[a]?s=h.end:i<r.lastSelectionStart&&" "==r.lastValue[i-1]?(s=h.left,l=m.option):i<r.lastSelectionStart||i==r.lastSelectionStart&&r.lastSelectionEnd!=r.lastSelectionStart&&i==a?s=h.left:a>r.lastSelectionEnd&&r.lastValue.slice(0,a).split("\n").length>2?s=h.down:a>r.lastSelectionEnd&&" "==r.lastValue[a-1]?(s=h.right,l=m.option):(a>r.lastSelectionEnd||a==r.lastSelectionEnd&&r.lastSelectionEnd!=r.lastSelectionStart&&i==a)&&(s=h.right),i!==a&&(l|=m.shift),s){if(!t.onCommandKey({},l,s)&&t.commands){s=h.keyCodeToString(s);var c=t.commands.findKeyCommand(l,s);c&&t.execCommand(c)}r.lastSelectionStart=i,r.lastSelectionEnd=a,r.resetSelection("")}}};document.addEventListener("selectionchange",a),t.on("destroy",function(){document.removeEventListener("selectionchange",a)})},e.prototype.onContextMenuClose=function(){var e=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){e.tempStyle&&(e.text.style.cssText=e.tempStyle,e.tempStyle=""),e.host.renderer.$isMousePressed=!1,e.host.renderer.$keepTextAreaAtCursor&&e.host.renderer.$moveTextAreaToCursor()},0)},e.prototype.$onContextMenu=function(e){this.host.textInput.onContextMenu(e),this.onContextMenuClose()},e.prototype.onKeyup=function(e){27==e.keyCode&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},e.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},e.prototype.onCompositionStart=function(e){if(!this.inComposition&&this.host.onCompositionStart&&!this.host.$readOnly&&(this.inComposition={},!this.commandMode)){e.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var t=this.host.getSelectionRange();t.end.row=t.start.row,t.end.column=t.start.column,this.inComposition.markerRange=t,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},e.prototype.onCompositionUpdate=function(){if(this.inComposition&&this.host.onCompositionUpdate&&!this.host.$readOnly){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var e=this.text.value;this.sendText(e),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},e.prototype.onCompositionEnd=function(e){this.host.onCompositionEnd&&!this.host.$readOnly&&(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),e&&this.onInput())},e.prototype.onCut=function(e){this.doCopy(e,!0)},e.prototype.onCopy=function(e){this.doCopy(e,!1)},e.prototype.onPaste=function(e){var t=this.handleClipboardData(e);l.pasteCancelled()||("string"==typeof t?(t&&this.host.onPaste(t,e),o.isIE&&setTimeout(this.resetSelection),r.preventDefault(e)):(this.text.value="",this.pasted=!0))},e.prototype.doCopy=function(e,t){var n=this,i=this.host.getCopyText();if(!i)return r.preventDefault(e);this.handleClipboardData(e,i)?(f&&(this.resetSelection(i),this.copied=i,setTimeout(function(){n.copied=!1},10)),t?this.host.onCut():this.host.onCopy(),r.preventDefault(e)):(this.copied=!0,this.text.value=i,this.text.select(),setTimeout(function(){n.copied=!1,n.resetSelection(),t?n.host.onCut():n.host.onCopy()}))},e.prototype.handleClipboardData=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(r&&!c){var i=d||n?"Text":"text/plain";try{return t?!1!==r.setData(i,t):r.getData(i)}catch(e){if(!n)return this.handleClipboardData(e,t,!0)}}},e.prototype.onInput=function(e){if(this.inComposition)return this.onCompositionUpdate();if(e&&e.inputType){if("historyUndo"==e.inputType)return this.host.execCommand("undo");if("historyRedo"==e.inputType)return this.host.execCommand("redo")}var t=this.text.value,n=this.sendText(t,!0);(t.length>500||g.test(n)||v&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},e.prototype.sendText=function(e,t){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),e&&this.host.onPaste(e),this.pasted=!1,"";for(var n=this.text.selectionStart,r=this.text.selectionEnd,i=this.lastSelectionStart,a=this.lastValue.length-this.lastSelectionEnd,s=e,l=e.length-n,c=e.length-r,d=0;i>0&&this.lastValue[d]==e[d];)d++,i--;for(s=s.slice(d),d=1;a>0&&this.lastValue.length-d>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-d]==e[e.length-d];)d++,a--;l-=d-1,c-=d-1;var u=s.length-d+1;if(u<0&&(i=-u,u=0),s=s.slice(0,u),!t&&!s&&!l&&!i&&!a&&!c)return"";this.sendingText=!0;var p=!1;return o.isAndroid&&". "==s&&(s="  ",p=!0),s&&!i&&!a&&!l&&!c||this.commandMode?this.host.onTextInput(s):this.host.onTextInput(s,{extendLeft:i,extendRight:a,restoreStart:l,restoreEnd:c}),this.sendingText=!1,this.lastValue=e,this.lastSelectionStart=n,this.lastSelectionEnd=r,this.lastRestoreEnd=c,p?"\n":s},e.prototype.onSelect=function(e){var t=this;if(!this.inComposition){var n;this.copied?this.copied=!1:0===(n=this.text).selectionStart&&n.selectionEnd>=t.lastValue.length&&n.value===t.lastValue&&t.lastValue&&n.selectionEnd!==t.lastSelectionEnd?(this.host.selectAll(),this.resetSelection()):v&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},e.prototype.$resetSelectionIOS=function(e){if(this.$isFocused&&(!this.copied||e)&&!this.sendingText){e||(e="");var t="\n ab"+e+"cde fg\n";t!=this.text.value&&(this.text.value=this.lastValue=t);var n=4+(e.length||(this.host.selection.isEmpty()?0:1));4==this.lastSelectionStart&&this.lastSelectionEnd==n||this.text.setSelectionRange(4,n),this.lastSelectionStart=4,this.lastSelectionEnd=n}},e.prototype.$resetSelection=function(){var e=this;if(!this.inComposition&&!this.sendingText&&(this.$isFocused||this.afterContextMenu)){this.inComposition=!0;var t=0,n=0,r="",i=function(t,n){for(var r=n,i=1;i<=t-e.rowStart&&i<2*e.numberOfExtraLines+1;i++)r+=e.host.session.getLine(t-i).length+1;return r};if(this.host.session){var o=this.host.selection,a=o.getRange(),s=o.cursor.row;s===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):s===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(s<this.rowStart-1||s>this.rowEnd+1)&&(this.rowStart=s>this.numberOfExtraLines?s-this.numberOfExtraLines:0,this.rowEnd=s>this.numberOfExtraLines?s+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var l=[],c=this.rowStart;c<=this.rowEnd;c++)l.push(this.host.session.getLine(c));if(r=l.join("\n"),t=i(a.start.row,a.start.column),n=i(a.end.row,a.end.column),a.start.row<this.rowStart){var d=this.host.session.getLine(this.rowStart-1);t=a.start.row<this.rowStart-1?0:t,n+=d.length+1,r=d+"\n"+r}else if(a.end.row>this.rowEnd){var u=this.host.session.getLine(this.rowEnd+1);n=a.end.row>this.rowEnd+1?u.length:a.end.column,n+=r.length+1,r=r+"\n"+u}else v&&s>0&&(r="\n"+r,n+=1,t+=1);r.length>p&&(t<p&&n<p?r=r.slice(0,p):(r="\n",t==n?t=n=0:(t=0,n=1)));var h=r+"\n\n";h!=this.lastValue&&(this.text.value=this.lastValue=h,this.lastSelectionStart=this.lastSelectionEnd=h.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=n||this.lastSelectionStart!=t||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(t,n),this.lastSelectionStart=t,this.lastSelectionEnd=n}catch(m){}this.inComposition=!1}},e.prototype.setHost=function(e){this.host=e},e.prototype.setNumberOfExtraLines=function(e){this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=e<0?0:e},e.prototype.setAriaLabel=function(){var e="";if(this.host.$textInputAriaLabel&&(e+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var t=this.host.session.selection.cursor.row;e+=i("text-input.aria-label","Cursor at row $0",[t+1])}this.text.setAttribute("aria-label",e)},e.prototype.setAriaOptions=function(e){e.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",e.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",e.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),e.role&&this.text.setAttribute("role",e.role),e.setLabel&&(this.text.setAttribute("aria-roledescription",i("text-input.aria-roledescription","editor")),this.setAriaLabel())},e.prototype.focus=function(){var e=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||u||"browser"==this.$focusScroll)return this.text.focus({preventScroll:!0});var t=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var n=0!=this.text.getBoundingClientRect().top}catch(o){return}var r=[];if(n)for(var i=this.text.parentElement;i&&1==i.nodeType;)r.push(i),i.setAttribute("ace_nocontext","true"),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;this.text.focus({preventScroll:!0}),n&&r.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){e.text.style.position="","0px"==e.text.style.top&&(e.text.style.top=t)},0)},e.prototype.blur=function(){this.text.blur()},e.prototype.isFocused=function(){return this.$isFocused},e.prototype.setInputHandler=function(e){this.inputHandler=e},e.prototype.getInputHandler=function(){return this.inputHandler},e.prototype.getElement=function(){return this.text},e.prototype.setCommandMode=function(e){this.commandMode=e,this.text.readOnly=!1},e.prototype.setReadOnly=function(e){this.commandMode||(this.text.readOnly=e)},e.prototype.setCopyWithEmptySelection=function(e){},e.prototype.onContextMenu=function(e){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:e}),this.moveToMouse(e,!0)},e.prototype.moveToMouse=function(e,t){var n=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(t?"z-index:100000;":"")+(o.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var i=this.host.container.getBoundingClientRect(),s=a.computedStyle(this.host.container),l=i.top+(parseInt(s.borderTopWidth)||0),c=i.left+(parseInt(s.borderLeftWidth)||0),d=i.bottom-l-this.text.clientHeight-2,u=function(e){a.translate(n.text,e.clientX-c-2,Math.min(e.clientY-l-2,d))};u(e),"mousedown"==e.type&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),o.isWin&&r.capture(this.host.container,u,this.onContextMenuClose.bind(this)))},e.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},e}();t.TextInput=x,t.$setUserAgentForTests=function(e,t){v=e,f=t}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/useragent"),i=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,o=e.getButton();return 0!==o?((i.getSelectionRange().isEmpty()||1==o)&&i.selection.moveToPosition(n),void(2==o&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(-1==r)e=this.$clickSelection.end;else if(1==r)e=this.$clickSelection.start;else{var i=o(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(i.start),s=this.$clickSelection.comparePoint(i.end);if(-1==a&&s<=0)t=this.$clickSelection.end,i.end.row==r.row&&i.end.column==r.column||(r=i.start);else if(1==s&&a>=0)t=this.$clickSelection.start,i.start.row==r.row&&i.start.column==r.column||(r=i.end);else if(-1==a&&1==s)r=i.end,t=i.start;else{var l=o(this.$clickSelection,r);r=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,n,r,i=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,r=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))),o=Date.now();(i>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=r,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,a=i?e.wheelY/i:n.vy;i<550&&(o=(o+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(o/a),l=!1;if(s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)n.allowed=r;else if(r-n.allowed<550){Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=r):n.allowed=0}return n.t=r,n.vx=o,n.vy=a,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}i.prototype.selectEnd=i.prototype.selectByLinesEnd,i.prototype.selectAllEnd=i.prototype.selectByLinesEnd,i.prototype.selectByWordsEnd=i.prototype.selectByLinesEnd,t.DefaultHandlers=i}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/dom"),a=(e("./lib/event"),e("./range").Range),s=e("./lib/scroll").preventParentScroll,l="ace_tooltip",c=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=o.createElement("div"),this.$element.className=l,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){var n=this.getElement(),r=n.offsetParent&&n.offsetParent.getBoundingClientRect();n.style.left=e-(r?r.left:0)+"px",n.style.top=t-(r?r.top:0)+"px"},e.prototype.setClassName=function(e){o.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=l+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=l,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),d=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,r;this.popups.sort(function(e,t){return t.priority-e.priority});var o=[];try{for(var a=i(this.popups),s=a.next();!s.done;s=a.next()){var l=s.value,c=!0;try{for(var d=(n=void 0,i(o)),u=d.next();!u.done;u=d.next()){var p=u.value;if(this.doPopupsOverlap(p,l)){c=!1;break}}}catch(h){n={error:h}}finally{try{u&&!u.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}c?o.push(l):l.hide()}}catch(m){e={error:m}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),r=t.getElement().getBoundingClientRect();return n.left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top},e}());t.popupManager=d,t.Tooltip=c;var u=function(e){function t(t){void 0===t&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var r=n.getElement();return r.style.whiteSpace="pre-wrap",r.style.pointerEvents="auto",r.addEventListener("mouseout",n.onMouseOut),r.tabIndex=-1,r.addEventListener("blur",function(){r.contains(document.activeElement)||this.hide()}.bind(n)),r.addEventListener("wheel",s),n}return r(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var r=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(r.row,r.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),r=t.session.getLine(n.row);if(n.column==r.length){var i=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),o=t.session.documentToScreenPosition(n.row,n.column);if(o.column!=i.column||o.row!=i.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,r){if((!r||r==this.lastEvent)&&(!this.isOpen||document.activeElement!=this.getElement())){var i=e.renderer;this.isOpen||(d.addPopup(this),this.$registerCloseEvents(),this.setTheme(i.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=a.fromPoints(t.start,t.end);var o=i.textToScreenCoordinates(t.start.row,t.start.column),s=i.scroller.getBoundingClientRect();o.pageX<s.left&&(o.pageX=s.left);var l=this.getElement();l.innerHTML="",l.appendChild(n),l.style.maxHeight="",l.style.display="block";var c=l.clientHeight,u=l.clientWidth,p=window.innerHeight-o.pageY-i.lineHeight,h=!0;o.pageY-c<0&&o.pageY<p&&(h=!1),l.style.maxHeight=(h?o.pageY:p)-10+"px",l.style.top=h?"":o.pageY+i.lineHeight+"px",l.style.bottom=h?window.innerHeight-o.pageY+"px":"",l.style.left=Math.min(o.pageX,window.innerWidth-u-10)+"px"}},t.prototype.addMarker=function(e,t){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=t,this.marker=t&&t.addMarker(e,"ace_highlight-marker","text")},t.prototype.hide=function(e){(e||document.activeElement!=this.getElement())&&(e&&e.target&&("keydown"!=e.type||e.ctrlKey||e.metaKey)&&this.$element.contains(e.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,d.removePopup(this))))},t.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},t.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},t.prototype.onMouseOut=function(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||e.relatedTarget.classList.contains("ace_content")||this.hide())},t}(c);t.HoverTooltip=u}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("../lib/dom"),a=e("../lib/event"),s=e("../tooltip").Tooltip,l=e("../config").nls;t.GUTTER_TOOLTIP_LEFT_OFFSET=5,t.GUTTER_TOOLTIP_TOP_OFFSET=3,t.GutterHandler=function(e){var t,n,r=e.editor,i=r.renderer.$gutterLayer,s=new c(r,!0);function l(e){e&&"keydown"===e.type&&(e.ctrlKey||e.metaKey)||(!e||"mouseout"!==e.type||e.relatedTarget&&!s.getElement().contains(e.relatedTarget))&&(t&&(t=clearTimeout(t)),s.isOpen&&(s.hideTooltip(),r.off("mousewheel",l),r.off("changeSession",l),window.removeEventListener("keydown",l,!0)))}function d(e){s.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",function(t){if(r.isFocused()&&0==t.getButton()&&"foldWidgets"!=i.getRegion(t)){var n=t.getDocumentPosition().row,o=r.session.selection;if(t.getShiftKey())o.selectTo(n,0);else{if(2==t.domEvent.detail)return r.selectAll(),t.preventDefault();e.$clickSelection=r.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(a){var c=a.domEvent.target||a.domEvent.srcElement;if(o.hasCssClass(c,"ace_fold-widget")||o.hasCssClass(c,"ace_custom-widget"))return l();s.isOpen&&e.$tooltipFollowsMouse&&d(a),n=a,t||(t=setTimeout(function(){t=null,n&&!e.isMousePressed&&function(){var t=n.getDocumentPosition().row;if(t==r.session.getLength()){var o=r.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>r.session.documentToScreenRow(a.row,a.column))return l()}if(s.showTooltip(t),s.isOpen)if(r.on("mousewheel",l),r.on("changeSession",l),window.addEventListener("keydown",l,!0),e.$tooltipFollowsMouse)d(n);else{var c=n.getGutterRow(),u=i.$lines.get(c);if(u){var p=u.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),h=s.getElement().style;h.left=p.right-5+"px",h.top=p.bottom-3+"px"}else d(n)}}()},50))}),a.addListener(r.renderer.$gutter,"mouseout",function(e){n=null,s.isOpen&&(t=setTimeout(function(){t=null,l(e)},50))},r)};var c=function(e){function t(n,r){void 0===r&&(r=!1);var i=e.call(this,n.container)||this;i.id="gt"+ ++t.$uid,i.editor=n,i.visibleTooltipRow;var o=i.getElement();return o.setAttribute("role","tooltip"),o.setAttribute("id",i.id),o.style.pointerEvents="auto",r&&(i.onMouseOut=i.onMouseOut.bind(i),o.addEventListener("mouseout",i.onMouseOut)),i}return r(t,e),t.prototype.onMouseOut=function(e){this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||this.hideTooltip())},t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),o=this.getHeight();(e+=15)+i>n&&(e-=e+i-n),(t+=15)+o>r&&(t-=20+o),s.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:l("gutter-tooltip.aria-label.error.singular","error"),plural:l("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:l("gutter-tooltip.aria-label.security.singular","security finding"),plural:l("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:l("gutter-tooltip.aria-label.warning.singular","warning"),plural:l("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:l("gutter-tooltip.aria-label.info.singular","information message"),plural:l("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:l("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:l("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,r,i=this.editor.renderer.$gutterLayer,a=i.$annotations[e];r=a?{displayText:Array.from(a.displayText),type:Array.from(a.type)}:{displayText:[],type:[]};var s=i.session.getFoldLine(e);if(s&&i.$showFoldedAnnotations){for(var l,c={error:[],security:[],warning:[],info:[],hint:[]},d={error:1,security:2,warning:3,info:4,hint:5},u=e+1;u<=s.end.row;u++)if(i.$annotations[u])for(var p=0;p<i.$annotations[u].text.length;p++){var h=i.$annotations[u].type[p];c[h].push(i.$annotations[u].text[p]),(!l||d[h]<d[l])&&(l=h)}if(["error","security","warning"].includes(l)){var m="".concat(t.annotationsToSummaryString(c)," in folded code.");r.displayText.push(m),r.type.push(l+"_fold")}}if(0===r.displayText.length)return this.hideTooltip();var f={error:[],security:[],warning:[],info:[],hint:[]},g=i.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(u=0;u<r.displayText.length;u++){var v=o.createElement("span"),x=o.createElement("span");(n=x.classList).add.apply(n,["ace_".concat(r.type[u]),g]),x.setAttribute("aria-label","".concat(t.annotationLabels[r.type[u].replace("_fold","")].singular)),x.setAttribute("role","img"),x.appendChild(o.createTextNode(" ")),v.appendChild(x),v.appendChild(o.createTextNode(r.displayText[u])),v.appendChild(o.createElement("br")),f[r.type[u].replace("_fold","")].push(v)}var y=this.getElement();o.removeChildren(y),f.error.forEach(function(e){return y.appendChild(e)}),f.security.forEach(function(e){return y.appendChild(e)}),f.warning.forEach(function(e){return y.appendChild(e)}),f.info.forEach(function(e){return y.appendChild(e)}),f.hint.forEach(function(e){return y.appendChild(e)}),y.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var b=this.$findLinkedAnnotationNode(e);b&&b.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=e,this.editor._signal("showGutterTooltip",this)},t.prototype.$findLinkedAnnotationNode=function(e){var t=this.$findCellByRow(e);if(t){var n=t.element;if(n.childNodes.length>2)return n.childNodes[2]}},t.prototype.$findCellByRow=function(e){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(t){return t.row===e})},t.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),void 0!=this.visibleTooltipRow){var e=this.$findLinkedAnnotationNode(this.visibleTooltipRow);e&&e.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},t.annotationsToSummaryString=function(e){var n,r,o=[];try{for(var a=i(["error","security","warning","info","hint"]),s=a.next();!s.done;s=a.next()){var l=s.value;if(e[l].length){var c=1===e[l].length?t.annotationLabels[l].singular:t.annotationLabels[l].plural;o.push("".concat(e[l].length," ").concat(c))}}}catch(d){n={error:d}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o.join(", ")},t}(s);c.$uid=0,t.GutterTooltip=c}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},e.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},e.prototype.getButton=function(){return r.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return i.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=o}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/event"),o=e("../lib/useragent");function a(e){var t=e.editor,n=r.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xa0";["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),t.on("mousedown",this.onMouseDown.bind(e));var a,l,c,d,u,p,h,m,f,g,v,x=t.container,y=0;function b(){var e=p;(function(e,n){var r=Date.now(),i=!n||e.row!=n.row,o=!n||e.column!=n.column;!g||i||o?(t.moveCursorToPosition(e),g=r,v={x:l,y:c}):s(v.x,v.y,l,c)>5?g=null:r-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(p=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:l-a.left,right:a.right-l},y:{top:c-a.top,bottom:a.bottom-c}},d=Math.min(s.x.left,s.x.right),u=Math.min(s.y.top,s.y.bottom),p={row:e.row,column:e.column};d/o<=2&&(p.column+=s.x.left<s.x.right?-3:2),u/i<=1&&(p.row+=s.y.top<s.y.bottom?-1:1);var h=e.row!=p.row,m=e.column!=p.column,g=!n||e.row!=n.row;h||m&&!g?f?r-f>=200&&t.renderer.scrollCursorIntoView(p):f=r:f=null}(p,e)}function j(){u=t.selection.toOrientedRange(),a=t.session.addMarker(u,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),b(),d=setInterval(b,20),y=0,i.addListener(document,"mousemove",C)}function w(){clearInterval(d),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(u),t.isFocused()&&!m&&t.$resetCursorStyle(),u=null,p=null,y=0,f=null,g=null,i.removeListener(document,"mousemove",C)}this.onDragStart=function(e){if(this.cancelDrag||!x.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}u=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),i.setDragImage&&i.setDragImage(n,0,0),setTimeout(function(){t.container.removeChild(n)}),i.clearData(),i.setData("Text",t.session.getTextRange()),m=!0,this.setState("drag")},this.onDragEnd=function(e){if(x.draggable=!1,m=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;h||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&S(e.dataTransfer))return l=e.clientX,c=e.clientY,a||j(),y++,e.dataTransfer.dropEffect=h=A(e),i.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&S(e.dataTransfer))return l=e.clientX,c=e.clientY,a||(j(),y++),null!==_&&(_=null),e.dataTransfer.dropEffect=h=A(e),i.preventDefault(e)},this.onDragLeave=function(e){if(--y<=0&&a)return w(),h=null,i.preventDefault(e)},this.onDrop=function(e){if(p){var n=e.dataTransfer;if(m)switch(h){case"move":u=u.contains(p.row,p.column)?{start:p,end:p}:t.moveText(u,p);break;case"copy":u=t.moveText(u,p,!0)}else{var r=n.getData("Text");u={start:p,end:t.session.insert(p,r)},t.focus(),h=null}return w(),i.preventDefault(e)}},i.addListener(x,"dragstart",this.onDragStart.bind(e),t),i.addListener(x,"dragend",this.onDragEnd.bind(e),t),i.addListener(x,"dragenter",this.onDragEnter.bind(e),t),i.addListener(x,"dragover",this.onDragOver.bind(e),t),i.addListener(x,"dragleave",this.onDragLeave.bind(e),t),i.addListener(x,"drop",this.onDrop.bind(e),t);var _=null;function C(){null==_&&(_=setTimeout(function(){null!=_&&a&&w()},20))}function S(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function A(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,r="uninitialized";try{r=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var i="none";return n&&t.indexOf(r)>=0?i="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(r)>=0?i="move":t.indexOf(r)>=0&&(i="copy"),i}}function s(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if(1===(e.domEvent.detail||1)&&0===r&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in i&&(i.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,i=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,s,l,c,d,u,p,h,m="scroll",f=0,g=0,v=0,x=0;function y(){var e=window.navigator&&window.navigator.clipboard,n=!1,r=function(e){return t.commands.canExecute(e,t)},i=function(i){var a=i.target.getAttribute("action");if("more"==a||!n)return n=!n,function(){var i=t.getCopyText(),a=t.session.getUndoManager().hasUndo();h.replaceChild(o.buildDom(n?["span",!i&&r("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&r("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&r("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&r("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],a&&r("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],r("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],r("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),h.firstChild)}();"paste"==a?e.readText().then(function(e){t.execCommand(a,e)}):a&&("cut"!=a&&"copy"!=a||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(a)),h.firstChild.style.display="none",n=!1,"openCommandPalette"!=a&&t.focus()};h=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){m="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),i(e)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function b(){if(t.getOption("enableMobileMenu")){h||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,i=t.renderer.scrollLeft,o=t.container.getBoundingClientRect();h.style.top=n.pageY-o.top-3+"px",n.pageX-o.left<o.width-70?(h.style.left="",h.style.right="10px"):(h.style.right="",h.style.left=r+i-o.left+"px"),h.style.display="",h.firstChild.style.display="none",t.on("input",j)}else h&&j()}function j(e){h&&(h.style.display="none"),t.off("input",j)}function w(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(u.row,u.column);!e.isEmpty()&&n||(t.selection.moveToPosition(u),t.selection.selectWord()),m="wait",b()}i.addListener(e,"contextmenu",function(e){p&&t.textInput.getElement().focus()},t),i.addListener(e,"touchstart",function(e){var i=e.touches;if(c||i.length>1)return clearTimeout(c),c=null,s=-1,void(m="zoom");p=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,d=t.renderer.layerConfig.lineHeight,h=e.timeStamp;l=h;var y=i[0],b=y.clientX,j=y.clientY;Math.abs(n-b)+Math.abs(a-j)>o&&(s=-1),n=e.clientX=b,a=e.clientY=j,v=x=0;var _=new r(e,t);if(u=_.getDocumentPosition(),h-s<500&&1==i.length&&!f)g++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=g>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),m="wait"}();else{g=0;var C=t.selection.cursor,S=t.selection.isEmpty()?C:t.selection.anchor,A=t.renderer.$cursorLayer.getPixelPosition(C,!0),k=t.renderer.$cursorLayer.getPixelPosition(S,!0),M=t.renderer.scroller.getBoundingClientRect(),O=t.renderer.layerConfig.offset,T=t.renderer.scrollLeft,E=function(e,t){return(e/=d)*e+(t=t/o-.75)*t};if(e.clientX<M.left)return void(m="zoom");var P=E(e.clientX-M.left-A.left+T,e.clientY-M.top-A.top+O),D=E(e.clientX-M.left-k.left+T,e.clientY-M.top-k.top+O);P<3.5&&D<3.5&&(m=P>D?"cursor":"anchor"),m=D<3.5?"anchor":P<3.5?"cursor":"scroll",c=setTimeout(w,450)}s=h},t),i.addListener(e,"touchend",function(e){p=t.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),"zoom"==m?(m="",f=0):c?(t.selection.moveToPosition(u),f=0,b()):"scroll"==m?(f+=60,d=setInterval(function(){f--<=0&&(clearInterval(d),d=null),Math.abs(v)<.01&&(v=0),Math.abs(x)<.01&&(x=0),f<20&&(v*=.9),f<20&&(x*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*x),e==t.session.getScrollTop()&&(f=0)},10),j()):b(),clearTimeout(c),c=null},t),i.addListener(e,"touchmove",function(e){c&&(clearTimeout(c),c=null);var i=e.touches;if(!(i.length>1||"zoom"==m)){var o=i[0],s=n-o.clientX,d=a-o.clientY;if("wait"==m){if(!(s*s+d*d>4))return e.preventDefault();m="cursor"}n=o.clientX,a=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var u=e.timeStamp,p=u-l;if(l=u,"scroll"==m){var h=new r(e,t);h.speed=1,h.wheelX=s,h.wheelY=d,10*Math.abs(s)<Math.abs(d)&&(s=0),10*Math.abs(d)<Math.abs(s)&&(d=0),0!=p&&(v=s/p,x=d/p),t._emit("mousewheel",h),h.propagationStopped||(v=x=0)}else{var f=new r(e,t).getDocumentPosition();"cursor"==m?t.selection.moveCursorToPosition(f):"anchor"==m&&t.selection.setSelectionAnchor(f.row,f.column),t.renderer.scrollCursorIntoView(f),e.preventDefault()}}},t)}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,d=e("../config"),u=function(){function e(e){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var t=this;this.editor=e,new o(this),new a(this),new l(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus(),setTimeout(function(){e.isFocused()||e.focus()})},s=e.renderer.getMouseEventTarget();r.addListener(s,"click",this.onMouseEvent.bind(this,"click"),e),r.addListener(s,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),r.addMultiMouseDownListener([s,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var d=e.renderer.$gutter;r.addListener(d,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),r.addListener(d,"click",this.onMouseEvent.bind(this,"gutterclick"),e),r.addListener(d,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),r.addListener(d,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),r.addListener(s,"mousedown",n,e),r.addListener(d,"mousedown",n,e),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),r.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),o=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?o.setCursorStyle("default"):o.setCursorStyle("")}},e)}return e.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new s(t,this.editor))},e.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new s(t,this.editor))},e.prototype.onMouseWheel=function(e,t){var n=new s(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},e.prototype.setState=function(e){this.state=e},e.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,o=this.editor.renderer;o.$isMousePressed=!0;var a=this,l=!0,c=function(e){if(e){if(i.isWebKit&&!e.which&&a.releaseMouse)return a.releaseMouse();a.x=e.clientX,a.y=e.clientY,t&&t(e),a.mouseEvent=new s(e,a.editor),a.$mouseMoved=!0}},d=function(e){n.off("beforeEndOperation",h),l=!1,n.session&&u(),a[a.state+"End"]&&a[a.state+"End"](e),a.state="",a.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),a.$onCaptureMouseMove=a.releaseMouse=null,e&&a.onMouseEvent("mouseup",e),n.endOperation()},u=function(){a[a.state]&&a[a.state](),a.$mouseMoved=!1},p=function(){l&&(u(),r.nextFrame(p))};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){d(e)});var h=function(e){a.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(a[a.state+"End"]&&a[a.state+"End"](),a.state="",a.releaseMouse())};n.on("beforeEndOperation",h),n.startOperation({command:{name:"mouse"}}),a.$onCaptureMouseMove=c,a.releaseMouse=r.capture(this.editor.container,c,d),p()},e.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();u.prototype.releaseMouse=null,d.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(e){e.on("click",function(t){var n=t.getDocumentPosition(),i=e.session,o=i.getFoldAt(n.row,n.column,1);o&&(t.getAccelKey()?i.removeFold(o):i.expandFold(o),t.stop());var a=t.domEvent&&t.domEvent.target;a&&r.hasCssClass(a,"ace_inline_button")&&r.hasCssClass(a,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),e.renderer.scrollCursorIntoView())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,r=e.session,i=r.getParentFoldRangeData(n,!0),o=i.range||i.firstRange;if(o){n=o.start.row;var a=r.getFoldAt(n,r.getLine(n).length,1);a?r.removeFold(a):(r.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})};t.FoldHandler=i}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../lib/event"),o=function(){function e(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}return e.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},e.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},e.prototype.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},e.prototype.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},e.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},e.prototype.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},e.prototype.$callKeyboardHandlers=function(e,t,n,r){for(var o,a=!1,s=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,r))&&o.command&&((a="null"==o.command||s.exec(o.command,this.$editor,o.args,r))&&r&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&i.stopEvent(r),a)););return a||-1!=e||(o={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),a},e.prototype.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},e.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},e}();t.KeyBinding=o}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){"use strict";var r=0,i=0,o=!1,a=!1,s=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],d=11,u=18,p=[u,u,u,u,u,u,u,u,u,6,5,6,8,5,u,u,u,u,u,u,u,u,u,u,u,u,u,u,5,5,5,6,8,4,4,d,d,d,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,u,u,u,u,u,u,5,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,9,4,d,d,d,d,4,4,4,4,0,4,4,u,4,4,d,d,2,2,4,0,4,4,4,2,0,4,4,4,4,4],h=[8,8,8,8,8,8,8,8,8,8,8,u,u,u,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,d,d,d,d,d,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function m(e,t,n){if(!(i<e))if(1!=e||1!=r||a)for(var o,s,l,c,d=n.length,u=0;u<d;){if(t[u]>=e){for(o=u+1;o<d&&t[o]>=e;)o++;for(s=u,l=o-1;s<l;s++,l--)c=n[s],n[s]=n[l],n[l]=c;u=o}u++}else n.reverse()}function f(e,t,n,i){var l,c,p,h,m=t[i];switch(m){case 0:case 1:o=!1;case 4:case 3:return m;case 2:return o?3:2;case 7:return o=!0,1;case 8:return 4;case 9:return i<1||i+1>=t.length||2!=(l=n[i-1])&&3!=l||2!=(c=t[i+1])&&3!=c?4:(o&&(c=3),c==l?c:4);case 10:return 2==(l=i>0?n[i-1]:5)&&i+1<t.length&&2==t[i+1]?2:4;case d:if(i>0&&2==n[i-1])return 2;if(o)return 4;for(h=i+1,p=t.length;h<p&&t[h]==d;)h++;return h<p&&2==t[h]?2:4;case 12:for(p=t.length,h=i+1;h<p&&12==t[h];)h++;if(h<p){var f=e[i],g=f>=1425&&f<=2303||64286==f;if(l=t[h],g&&(1==l||7==l))return 1}return i<1||5==(l=t[i-1])?4:n[i-1];case 5:return o=!1,a=!0,r;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case u:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:p[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?d:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?h[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,n,d){if(e.length<2)return{};var p=e.split(""),h=new Array(p.length),v=new Array(p.length),x=[];r=d?1:0,function(e,t,n,d){var u=r?c:l,p=null,h=null,m=null,v=0,x=null,y=-1,b=null,j=null,w=[];if(!d)for(b=0,d=[];b<n;b++)d[b]=g(e[b]);for(i=r,o=!1,a=!1,s=!1,j=0;j<n;j++){if(p=v,w[j]=h=f(e,d,w,j),x=240&(v=u[p][h]),v&=15,t[j]=m=u[v][5],x>0)if(16==x){for(b=y;b<j;b++)t[b]=1;y=-1}else y=-1;if(u[v][6])-1==y&&(y=j);else if(y>-1){for(b=y;b<j;b++)t[b]=m;y=-1}5==d[j]&&(t[j]=0),i|=m}if(s)for(b=0;b<n;b++)if(6==d[b]){t[b]=r;for(var _=b-1;_>=0&&8==d[_];_--)t[_]=r}}(p,x,p.length,n);for(var y=0;y<h.length;h[y]=y,y++);m(2,x,h),m(1,x,h);for(y=0;y<h.length-1;y++)3===n[y]?x[y]=t.AN:1===x[y]&&(n[y]>7&&n[y]<13||4===n[y]||n[y]===u)?x[y]=t.ON_R:y>0&&"\u0644"===p[y-1]&&/\u0622|\u0623|\u0625|\u0627/.test(p[y])&&(x[y-1]=x[y]=t.R_H,y++);p[p.length-1]===t.DOT&&(x[p.length-1]=t.B),"\u202b"===p[0]&&(x[0]=t.RLE);for(y=0;y<h.length;y++)v[y]=x[h[y]];return{logicalFromVisual:h,bidiLevels:v}},t.hasBidiCharacters=function(e,t){for(var n=!1,r=0;r<e.length;r++)t[r]=g(e.charAt(r)),n||1!=t[r]&&7!=t[r]&&3!=t[r]||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,t,n){"use strict";var r=e("./lib/bidiutil"),i=e("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function e(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=r,this.charWidths=[],this.EOL="\xac",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xb6",this.RLE="\u202b",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=o.test(e.getValue())}return e.prototype.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},e.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&o.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},e.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===r;)r=n,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=t<o.length?this.line.substring(o[t-1],o[t]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[t]),t==o.length&&(this.line+=this.showInvisibles?n:r.DOT))}else this.line+=this.showInvisibles?n:r.DOT;var a,s=this.session,l=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||s.isFullWidth(e.charCodeAt(0))?(a="\t"===e?s.getScreenTabSize(t+l):2,l+=a-1,i.stringRepeat(r.DOT,a)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==r.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},e.prototype.updateBidiMap=function(){var e=[];r.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=r.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},e.prototype.markAsDirty=function(){this.currentRow=null},e.prototype.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("\u05d4");this.charWidths[r.L]=this.charWidths[r.EN]=this.charWidths[r.ON_R]=t,this.charWidths[r.R]=this.charWidths[r.AN]=n,this.charWidths[r.R_H]=.45*n,this.charWidths[r.B]=this.charWidths[r.RLE]=0,this.currentRow=null}},e.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},e.prototype.setEolChar=function(e){this.EOL=e},e.prototype.setContentWidth=function(e){this.contentWidth=e},e.prototype.isRtlLine=function(e){return!!this.$isRtl||(void 0!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},e.prototype.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),r=e.selection.getSelectionAnchor().row;r<=n.row;r++)t||e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:r},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(r,0,1)},e.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,i=r.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&o[i]%2!==0&&i++;for(var s=0;s<i;s++)a+=this.charWidths[o[s]];return!this.session.getOverwrite()&&e>t&&o[i]%2===0&&(a+=this.charWidths[o[i]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},e.prototype.getSelections=function(e,t){var n,r=this.bidiMap,i=r.bidiLevels,o=[],a=0,s=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,d=!1,u=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var p,h=0;h<i.length;h++)p=r.logicalFromVisual[h],n=i[h],(c=p>=s&&p<l)&&!d?u=a:!c&&d&&o.push({left:u,width:a-u}),a+=this.charWidths[n],d=c;if(c&&h===i.length&&o.push({left:u,width:a-u}),this.isRtlDir)for(var m=0;m<o.length;m++)o[m].left+=this.rtlLineOffset;return o},e.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),r=0,i=this.bidiMap.bidiLevels,o=this.charWidths[i[r]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+o/2;){if(n+=o,r===i.length-1){o=0;break}o=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!==0&&i[r]%2===0?(e<n&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&i[r-1]%2===0&&i[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&0===o&&i[r-1]%2===0||!this.isRtlDir&&0===r&&i[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!==0&&0!==o&&r--,t=this.bidiMap.logicalFromVisual[r]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")})}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},e.prototype.$setSelection=function(e,t,n,r){if(!this.$silent){var i=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||o)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},e.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n,r="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(r);return i?(r=i.start.row,n=i.end.row):n=r,!0===t?new a(r,0,n,this.session.getLine(n).length):new a(r,0,n+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},e.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column).match(/^\s*/);i[0].length==t||this.session.$useEmacsStyleLineStart||(r.column+=i[0].length),this.moveCursorToPosition(r)},e.prototype.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i)this.moveCursorTo(i.end.row,i.end.column);else{if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(r)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},e.prototype.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var r=this.session.getFoldStringAt(t,n,-1);null==r&&(r=this.doc.getLine(t).substring(0,n));var o=i.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&r.test(t);)n++;if(n<1)for(i.lastIndex=0;(t=e[n])&&!i.test(t);)if(i.lastIndex=0,n++,r.test(t)){if(n>2){n--;break}for(;(t=e[n])&&r.test(t);)n++;if(n>2)break}}return i.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,r=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var a=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+a)},e.prototype.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var r=this.session.getLine(t).substring(0,n);if(0===n){do{t--,r=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(r));n=r.length,/\s+$/.test(r)||(r="")}var o=i.stringReverse(r),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-a)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var o=this.session.screenToDocumentPosition(r.row+e,r.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(r){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(void 0==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();s.prototype.setSelectionAnchor=s.prototype.setAnchor,s.prototype.getSelectionAnchor=s.prototype.getAnchor,s.prototype.setSelectionRange=s.prototype.setRange,r.implement(s.prototype,o),t.Selection=s}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,t,n){"use strict";var r=e("./lib/report_error").reportError,i=2e3,o=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],i=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&-1===a.indexOf("i")&&(a+="i"),c.unicode&&-1===a.indexOf("u")&&(a+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var d=c.regex,u=new RegExp("(?:("+d+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==u?c.token=c.token[0]:u-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:u-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=u>1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?d=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(u=1,d=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||s.push(c)),o[i]=l,i+=u,r.push(d),c.onMatch||(c.onMatch=null)}}r.length||(o[0]=0,r.push("$")),s.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",a)}}return e.prototype.$setMaxTokenCount=function(e){i=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var r=[],i=0,o=n.length;i<o;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},e.prototype.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],r=this.tokenArray,i=0,o=r.length;i<o;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},e.prototype.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(e,t){return t?"(?:":e})},e.prototype.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,a,s,l){return r?r="]"!=s:s?r=!0:a?(n==i.stack&&(i.end=l+1,i.stack=-1),n--):o&&(n++,1!=o.length&&(i.stack=n,i.start=l)),e}),null!=i.end&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},e.prototype.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);"#tmp"===(t=n[0])&&(n.shift(),t=n.shift())}else n=[];var r=t||"start",o=this.states[r];o||(r="start",o=this.states[r]);var a=this.matchMappings[r],s=this.regExps[r];s.lastIndex=0;for(var l,c=[],d=0,u=0,p={type:null,value:""};l=s.exec(e);){var h=a.defaultToken,m=null,f=l[0],g=s.lastIndex;if(g-f.length>d){var v=e.substring(d,g-f.length);p.type==h?p.value+=v:(p.type&&c.push(p),p={type:h,value:v})}for(var x=0;x<l.length-2;x++)if(void 0!==l[x+1]){h=(m=o[a[x]]).onMatch?m.onMatch(f,r,n,e):m.token,m.next&&(r="string"==typeof m.next?m.next:m.next(r,n),(o=this.states[r])||(this.reportError("state doesn't exist",r),r="start",o=this.states[r]),a=this.matchMappings[r],d=g,(s=this.regExps[r]).lastIndex=g),m.consumeLineEnd&&(d=g);break}if(f)if("string"===typeof h)m&&!1===m.merge||p.type!==h?(p.type&&c.push(p),p={type:h,value:f}):p.value+=f;else if(h){p.type&&c.push(p),p={type:null,value:""};for(x=0;x<h.length;x++)c.push(h[x])}if(d==e.length)break;if(d=g,u++>i){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});d<e.length;)p.type&&c.push(p),p={value:e.substring(d,d+=500),type:"overflow"};r="start",n=[];break}}return p.type&&c.push(p),n.length>1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:c,state:n.length?n:r}},e}();o.prototype.reportError=r,t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";var r,i=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var r=e[n],i=0;i<r.length;i++){var o=r[i];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=r}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,r,o){var a="function"==typeof e?(new e).getRules():e;if(r)for(var s=0;s<r.length;s++)r[s]=t+r[s];else for(var l in r=[],a)r.push(t+l);if(this.addRules(a,t),n){var c=Array.prototype[o?"push":"unshift"];for(s=0;s<r.length;s++)c.apply(this.$rules[r[s]],i(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,r=this.$rules;Object.keys(r).forEach(function i(o){var a=r[o];a.processed=!0;for(var s=0;s<a.length;s++){var l=a[s],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var d=l.next||l.push;if(d&&Array.isArray(d)){var u=l.stateName;u||("string"!=typeof(u=l.token)&&(u=u[0]||""),r[u]&&(u+=n++)),r[u]=d,l.next=u,i(u)}else"pop"==d&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var p in l.rules)r[p]?r[p].push&&r[p].push.apply(r[p],l.rules[p]):r[p]=l.rules[p];var h="string"==typeof l?l:l.include;if(h&&("$self"===h&&(h="start"),c=Array.isArray(h)?h.map(function(e){return r[e]}):r[h]),c){var m=[s,1].concat(c);l.noEscape&&(m=m.filter(function(e){return!e.next})),a.splice.apply(a,m),s--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}},this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach(function(t){for(var o=e[t].split(r||"|"),a=o.length;a--;){var s=o[a];this.$keywordList.push(s),n&&(s=s.toLowerCase()),i[s]=t}},this),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call((r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}).prototype),t.TextHighlightRules=r}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var r;(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"===typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call((r=function(){this.$behaviours={}}).prototype),t.Behaviour=r}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range,i=function(){function e(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1}return e.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},e.prototype.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,i,o=e("../../lib/oop"),a=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],d=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},p={'"':'"',"'":"'"},h=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return r=u[t];r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},m=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}};(i=function(e){e=e||{},this.add("braces","insertion",function(t,n,o,a,s){var c=o.getCursorPosition(),d=a.doc.getLine(c.row);if("{"==s){h(o);var u=o.getSelectionRange(),p=a.doc.getTextRange(u),f=a.getTokenAt(c.row,c.column);if(""!==p&&"{"!==p&&o.getWrapBehavioursEnabled())return m(u,p,"{","}");if(f&&/(?:string)\.quasi|\.xml/.test(f.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some(function(e){return e.test(f.type)})||/(string)\.quasi/.test(f.type)&&"$"!==f.value[c.column-f.start-1])return;return i.recordAutoInsert(o,a,"}"),{text:"{}",selection:[1,1]}}if(i.isSaneInsertion(o,a))return/[\]\}\)]/.test(d[c.column])||o.inMultiSelectMode||e.braces?(i.recordAutoInsert(o,a,"}"),{text:"{}",selection:[1,1]}):(i.recordMaybeInsert(o,a,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(h(o),"}"==d.substring(c.column,c.column+1))if(null!==a.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&i.isAutoInsertedClosing(c,d,s))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){h(o);var g="";if(i.isMaybeInsertedClosing(c,d)&&(g=l.stringRepeat("}",r.maybeInsertedBrackets),i.clearMaybeInsertedClosing()),"}"===d.substring(c.column,c.column+1)){var v=a.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!v)return null;var x=this.$getIndent(a.getLine(v.row))}else{if(!g)return void i.clearMaybeInsertedClosing();x=this.$getIndent(d)}var y=x+a.getTabString();return{text:"\n"+y+"\n"+x+g,selection:[1,y.length,1,y.length]}}i.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var a=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){if(h(n),"}"==i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){h(n);var a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&n.getWrapBehavioursEnabled())return m(a,s,"(",")");if(i.isSaneInsertion(n,r))return i.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){h(n);var l=n.getCursorPosition(),c=r.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&i.isAutoInsertedClosing(l,c,o))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o&&(h(n),")"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){h(n);var a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&n.getWrapBehavioursEnabled())return m(a,s,"[","]");if(i.isSaneInsertion(n,r))return i.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){h(n);var l=n.getCursorPosition(),c=r.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&i.isAutoInsertedClosing(l,c,o))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o&&(h(n),"]"==r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)))return i.end.column++,i}),this.add("string_dquotes","insertion",function(e,t,n,r,i){var o=r.$mode.$quotes||p;if(1==i.length&&o[i]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(i))return;h(n);var a=i,s=n.getSelectionRange(),l=r.doc.getTextRange(s);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return m(s,l,a,a);if(!l){var c=n.getCursorPosition(),d=r.doc.getLine(c.row),u=d.substring(c.column-1,c.column),f=d.substring(c.column,c.column+1),g=r.getTokenAt(c.row,c.column),v=r.getTokenAt(c.row,c.column+1);if("\\"==u&&g&&/escape/.test(g.type))return null;var x,y=g&&/string|escape/.test(g.type),b=!v||/string|escape/.test(v.type);if(f==a)(x=y!==b)&&/string\.end/.test(v.type)&&(x=!1);else{if(y&&!b)return null;if(y&&b)return null;var j=r.$mode.tokenRe;j.lastIndex=0;var w=j.test(u);j.lastIndex=0;var _=j.test(f),C=r.$mode.$pairQuotesAfter;if(!(C&&C[a]&&C[a].test(u))&&w||_)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;var S=d[c.column-2];if(u==a&&(S==a||j.test(S)))return null;x=!0}return{text:x?a+a:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.$mode.$quotes||p,a=r.doc.getTextRange(i);if(!i.isMultiLine()&&o.hasOwnProperty(a)&&(h(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==a))return i.end.column++,i}),!1!==e.closeDocComment&&this.add("doc comment end","insertion",function(e,t,n,r,i){if("doc-start"===e&&("\n"===i||"\r\n"===i)&&n.selection.isEmpty()){var o=n.getCursorPosition();if(0===o.column)return;for(var a=r.doc.getLine(o.row),s=r.doc.getLine(o.row+1),l=r.getTokens(o.row),c=0,d=0;d<l.length;d++){c+=l[d].value.length;var u=l[d];if(c>=o.column){if(c===o.column){if(!/\.doc/.test(u.type))return;if(/\*\//.test(u.value)){var p=l[d+1];if(!p||!/\.doc/.test(p.type))return}}var h=o.column-(c-u.value.length),m=u.value.indexOf("*/"),f=u.value.indexOf("/**",m>-1?m+2:0);if(-1!==f&&h>f&&h<f+3)return;if(-1!==m&&-1!==f&&h>=m&&h<=f||!/\.doc/.test(u.type))return;break}}var g=this.$getIndent(a);if(/\s*\*/.test(s))return/^\s*\*/.test(a)?{text:i+g+"* ",selection:[1,2+g.length,1,2+g.length]}:{text:i+g+" * ",selection:[1,3+g.length,1,3+g.length]};if(/\/\*\*/.test(a.substring(0,o.column)))return{text:i+g+" * "+i+" "+g+"*/",selection:[1,4+g.length,1,4+g.length]}}})}).isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",d)},i.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},i.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},i.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},i.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},i.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},i.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},i.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(i,a),t.CstyleBehaviour=i}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";for(var r=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],i=0,o=[],a=0;a<r.length;a+=2)o.push(i+=r[a]),r[a+1]&&o.push(45,i+=r[a+1]);t.wordChars=String.fromCharCode.apply(null,o)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var r,i=e("../config"),o=e("../tokenizer").Tokenizer,a=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),d=e("../token_iterator").TokenIterator,u=e("../range").Range;(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){var i=t.doc,o=!0,a=!0,s=1/0,l=t.getTabSize(),d=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))f=this.lineCommentStart.map(c.escapeRegExp).join("|"),h=this.lineCommentStart[0];else f=c.escapeRegExp(this.lineCommentStart),h=this.lineCommentStart;f=new RegExp("^(\\s*)(?:"+f+") ?"),d=t.getUseSoftTabs();x=function(e,t){var n=e.match(f);if(n){var r=n[1].length,o=n[0].length;p(e,r,o)||" "!=n[0][o-1]||o--,i.removeInLine(t,r,o)}};var u=h+" ",p=(v=function(e,t){o&&!/\S/.test(e)||(p(e,s,s)?i.insertInLine({row:t,column:s},u):i.insertInLine({row:t,column:s},h))},y=function(e,t){return f.test(e)},function(e,t,n){for(var r=0;t--&&" "==e.charAt(t);)r++;if(r%l!=0)return!1;for(r=0;" "==e.charAt(n++);)r++;return l>2?r%l!=l-1:r%l==0})}else{if(!this.blockComment)return!1;var h=this.blockComment.start,m=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+c.escapeRegExp(h)+")"),g=new RegExp("(?:"+c.escapeRegExp(m)+")\\s*$"),v=function(e,t){y(e,t)||o&&!/\S/.test(e)||(i.insertInLine({row:t,column:e.length},m),i.insertInLine({row:t,column:s},h))},x=function(e,t){var n;(n=e.match(g))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(f))&&i.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(f.test(e))return!0;for(var r=t.getTokens(n),i=0;i<r.length;i++)if("comment"===r[i].type)return!0}}function b(e){for(var t=n;t<=r;t++)e(i.getLine(t),t)}var j=1/0;b(function(e,t){var n=e.search(/\S/);-1!==n?(n<s&&(s=n),a&&!y(e,t)&&(a=!1)):j>e.length&&(j=e.length)}),s==1/0&&(s=j,o=!1,a=!1),d&&s%l!=0&&(s=Math.floor(s/l)*l),b(a?x:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var o,a,s=(f=new d(t,r.row,r.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(s&&/comment/.test(s.type)){for(var c,p;s&&/comment/.test(s.type);){if(-1!=(g=s.value.indexOf(i.start))){var h=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g;c=new u(h,m,h,m+i.start.length);break}s=f.stepBackward()}var f;for(s=(f=new d(t,r.row,r.column)).getCurrentToken();s&&/comment/.test(s.type);){var g;if(-1!=(g=s.value.indexOf(i.end))){h=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g;p=new u(h,m,h,m+i.end.length);break}s=f.stepForward()}p&&t.remove(p),c&&(t.remove(c),o=c.start.row,a=-i.start.length)}else a=i.start.length,o=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==o&&(l.start.column+=a),l.end.row==o&&(l.end.column+=a),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],r=n.prototype.$id,o=i.$modes[r];o||(i.$modes[r]=o=new n),i.$modes[t]||(i.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],s=function(e){!function(t){var n=a[e],r=t[n];t[a[e]]=function(){return this.$delegator(n,arguments,r)}}(l)},l=this;for(t=0;t<a.length;t++)s(t)},this.$delegator=function(e,t,n){var r=t[0]||"start";if("string"!=typeof r){if(Array.isArray(r[2])){var i=r[2][r[2].length-1];if(a=this.$modes[i])return a[e].apply(a,[r[1]].concat([].slice.call(t,1)))}r=r[0]||"start"}for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var a,s=r.split(this.$embeds[o]);if(!s[0]&&s[1])return t[0]=s[1],(a=this.$modes[this.$embeds[o]])[e].apply(a,t)}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var a in o)if(o[a][t]){var s=o[a][t].apply(this,arguments);if(s)return s}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t)for(var i=t[r],o=0,a=i.length;o<a;o++)if("string"===typeof i[o].token)/keyword|support|storage/.test(i[o].token)&&n.push(i[o].regex);else if("object"===typeof i[o].token)for(var s=0,l=i[o].token.length;s<l;s++)if(/keyword|support|storage/.test(i[o].token[s])){r=i[o].regex.match(/\(.+?\)/g)[s];n.push(r.substr(1,r.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call((r=function(){this.HighlightRules=a}).prototype),t.Mode=r}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./lib/dom"),i=function(){function e(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return e.prototype.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},e.prototype.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},e.prototype.$onChangeEditor=function(e){this.attach(e.editor)},e.prototype.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},e.prototype.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},e.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var r=e.data,i=r.start.row,o=r.end.row,a="add"==e.action,s=i+1;s<o;s++)n[s]&&(n[s].hidden=a);n[o]&&(a?n[i]?n[o].hidden=a:n[i]=n[o]:(n[i]==n[o]&&(n[i]=void 0),n[o].hidden=a))}},e.prototype.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,r=e.end.row-n;if(0===r);else if("remove"==e.action){var i=t.splice(n+1,r);!t[n]&&i[i.length-1]&&(t[n]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var o=new Array(r);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget}),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=r.createElement("div"),e.el.textContent=e.text),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&r.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var i=this.session.lineWidgets;e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(n&&n.length){for(var i=1/0,o=0;o<n.length;o++){var a=n[o];if(a&&a.el&&a.session==this.session){if(!a._inDocument){if(this.session.lineWidgets[a.row]!=a)continue;a._inDocument=!0,t.container.appendChild(a.el)}a.h=a.el.offsetHeight,a.fixedWidth||(a.w=a.el.offsetWidth,a.screenWidth=Math.ceil(a.w/r.characterWidth));var s=a.h/r.lineHeight;a.coverLine&&(s-=this.session.getRowLineCount(a.row))<0&&(s=0),a.rowCount!=s&&(a.rowCount=s,a.row<i&&(i=a.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},e.prototype.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(r){for(var i=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,r.length);i>0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=i;a<=o;a++){var s=r[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=l-n.offset+"px";var c=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(c-=t.scrollLeft),s.el.style.left=c+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}},e}();t.LineWidgets=i}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,o=e[r]||"";switch(t.action){case"insert":if(1===t.lines.length)e[r]=o.substring(0,i)+t.lines[0]+o.substring(i);else{var a=[r,1].concat(t.lines);e.splice.apply(e,a),e[r]=o.substring(0,i)+e[r],e[r+t.lines.length-1]+=o.substring(i)}break;case"remove":var s=t.end.column,l=t.end.row;r===l?e[r]=o.substring(0,i)+o.substring(s):e.splice(r,l-r+1,o.substring(0,i)+e[l].substring(s))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if((e.start.row!=e.end.row||e.start.row==this.row)&&!(e.start.row>this.row)){var t=function(e,t,n){var r="insert"==e.action,i=(r?1:-1)*(e.end.row-e.start.row),o=(r?1:-1)*(e.end.column-e.start.column),s=e.start,l=r?s:e.end;if(a(t,s,n))return{row:t.row,column:t.column};if(a(l,t,!n))return{row:t.row+i,column:t.column+(t.row==l.row?o:0)};return{row:s.row,column:s.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var r;if(r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function a(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}o.prototype.$insertRight=!1,r.implement(o.prototype,i),t.Anchor=o}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,l=function(){function e(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new s(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},e.prototype.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return void 0==t&&(t=r.length),{row:e,column:t=Math.min(Math.max(t,0),r.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,o=n?this.getLine(i).length:0,s=r?t+1:t,l=r?0:this.getLine(s).length,c=new a(i,o,s,l),d=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),d},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length-t+1,i=e.start.row,o=e.start.column,a=0,s=0;a<r;a=s){s+=t-1;var l=n.slice(a,s);l.push(""),this.applyDelta({start:this.pos(i+a,o),end:this.pos(i+s,o=0),action:e.action,lines:l},!0)}e.lines=n.slice(a),e.start.row=i+a,e.start.column=o,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,o=n.length;i<o;i++)if((e-=n[i].length+r)<0)return{row:i,column:e+n[i].length+r};return{row:o-1,column:e+n[o-1].length+r}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,o=Math.min(e.row,n.length),a=t||0;a<o;++a)i+=n[a].length+r;return i+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",r.implement(l.prototype,o),t.Document=l}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,o=function(){function e(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,r=-1,i=n.doc,o=t;n.lines[t];)t++;var a=i.getLength(),s=0;for(n.running=!1;t<a;){n.$tokenizeRow(t),r=t;do{t++}while(n.lines[t]);if(++s%5===0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==r&&(r=t),o<=r&&n.fireUpdateEvent(o,r)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();r.implement(o.prototype,i),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./range").Range,o=function(){function e(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,o){if(this.regExp){for(var a=o.firstRow,s=o.lastRow,l={},c=n.$editor&&n.$editor.$search,d=c&&c.$isMultilineSearch(n.$editor.getLastSearchOptions()),u=a;u<=s;u++){var p=this.cache[u];if(null==p||n.getValue().length!=this.docLen){if(d){p=[];var h=c.$multiLineForward(n,this.regExp,u,s);if(h){var m=h.endRow<=s?h.endRow-1:s;m>u&&(u=m),p.push(new i(h.startRow,h.startCol,h.endRow,h.endCol))}p.length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES))}else(p=r.getMatchOffsets(n.getLine(u),this.regExp)).length>this.MAX_RANGES&&(p=p.slice(0,this.MAX_RANGES)),p=p.map(function(e){return new i(u,e.offset,u,e.offset+e.length)});this.cache[u]=p.length?p:""}if(0!==p.length)for(var f=p.length;f--;){var g=p[f].toScreenRange(n),v=g.toString();l[v]||(l[v]=!0,t.drawSingleLineMarker(e,g,this.clazz,o))}}this.docLen=n.getValue().length}},e}();o.prototype.MAX_RANGES=500,t.SearchHighlight=o}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var r=this.$undoStack.length;r>this.$undoDepth-1&&this.$undoStack.splice(0,r-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=n.length;r--;){var i=n[r][0];if(i.id<=e)break;i.id<t&&(i.ignore=!0)}this.lastDeltas=null},e.prototype.getSelection=function(e,t){for(var n=this.selections,r=n.length;r--;){var i=n[r];if(i.rev<e)return t&&(i=n[r+1]),i}},e.prototype.getRevision=function(){return this.$rev},e.prototype.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,r=null,i=0,o=n.length;o--;){var a=n[o][0];if(a.id<t&&!r&&(r=o+1),a.id<=e){i=o+1;break}}return n.slice(i,r)},e.prototype.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(function(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){for(;n<t-1;){var i=d(e[n],e[n+1]);e[n]=i[0],e[n+1]=i[1],n++}return!0}}}(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var r=n.pop(),i=null;return r&&(i=e.undoChanges(r,t),this.$redoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i}},e.prototype.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(e,t){for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.length;i++)f(e,r[i])}(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(e){e[0].id=++this.$maxRev},this)}var r=this.$redoStack.pop(),i=null;return r&&(i=e.redoChanges(r,t),this.$undoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i},e.prototype.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},e.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},e.prototype.canUndo=function(){return this.$undoStack.length>0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?s(e):s(this.$undoStack)+"\n---\n"+s(this.$redoStack)},e}();r.prototype.hasUndo=r.prototype.canUndo,r.prototype.hasRedo=r.prototype.canRedo,r.prototype.isClean=r.prototype.isAtBookmark,r.prototype.markClean=r.prototype.bookmark;var i=e("./range").Range,o=i.comparePoints;i.comparePoints;function a(e){return{row:e.row,column:e.column}}function s(e){if(e=e||this,Array.isArray(e))return e.map(s).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)if(o(t.start,e.end)>=0)p(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;p(e,t,1)}else if(n&&!r)if(o(t.start,e.end)>=0)p(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;p(e,t,-1)}else if(!n&&r)if(o(t.start,e.start)>=0)p(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;p(e,t,1)}else if(!n&&!r)if(o(t.start,e.start)>=0)p(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;p(e,t,-1)}return[t,e]}function d(e,t){for(var n=e.length;n--;)for(var r=0;r<t.length;r++)if(!c(e[n],t[r])){for(;n<e.length;){for(;r--;)c(t[r],e[n]);r=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function u(e,t){var n="insert"==e.action,r="insert"==t.action;if(n&&r)o(e.start,t.start)<0?p(t,e,1):p(e,t,1);else if(n&&!r)o(e.start,t.end)>=0?p(e,t,-1):(o(e.start,t.start)<=0||p(e,i.fromPoints(t.start,e.start),-1),p(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?p(t,e,-1):(o(t.start,e.start)<=0||p(t,i.fromPoints(e.start,t.start),-1),p(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)p(t,e,-1);else{var a,s;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(a=e,e=m(e,t.start)),o(e.end,t.end)>0&&(s=m(e,t.end)),h(t.end,e.start,e.end,-1),s&&!a&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,a,s].filter(Boolean);p(e,t,-1)}return[t,e]}function p(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,r){e.row==(1==r?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function m(e,t){var n=e.lines,r=e.end;e.end=a(t);var i=e.end.row-e.start.row,o=n.splice(i,n.length),s=i?t.column:t.column-e.start.column;return n.push(o[0].substring(0,s)),o[0]=o[0].substr(s),{start:a(t),end:r,lines:o,action:e.action}}function f(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var r=e[n],i=0;i<r.length;i++){var o=u(r[i],t);t=o[0],2!=o.length&&(o[2]?(r.splice(i+1,1,o[1],o[2]),i++):o[1]||(r.splice(i,1),i--))}r.length||e.splice(n,1)}return e}t.UndoManager=r}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var r,i,o=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<a.length;l++){if(-1==(i=(r=a[l]).range.compareStart(t,n)))return void e(null,t,n,o,s);if(!e(null,r.start.row,r.start.column,o,s)&&e(r.placeholder,r.start.row,r.start.column,o)||0===i)return;s=!r.sameRow,o=r.end.column}e(null,t,n,o,s)},e.prototype.getNextFoldTo=function(e,t){for(var n,r,i=0;i<this.folds.length;i++){if(-1==(r=(n=this.folds[i]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===r)return{fold:n,kind:"inside"}}return null},e.prototype.addRemoveChars=function(e,t,n){var r,i,o=this.getNextFoldTo(e,t);if(o)if(r=o.fold,"inside"==o.kind&&r.start.column!=t&&r.start.row!=e)window.console&&window.console.log(e,t,r);else if(r.start.row==e){var a=(i=this.folds).indexOf(r);for(0===a&&(this.start.column+=n);a<i.length;a++){if((r=i[a]).start.column+=n,!r.sameRow)return;r.end.column+=n}this.end.column+=n}},e.prototype.split=function(t,n){var r=this.getNextFoldTo(t,n);if(!r||"inside"==r.kind)return null;var i=r.fold,o=this.folds,a=this.foldData,s=o.indexOf(i),l=o[s-1];this.end.row=l.end.row,this.end.column=l.end.column;var c=new e(a,o=o.splice(s,o.length-s));return a.splice(a.indexOf(this)+1,0,c),c},e.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},e.prototype.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push("  "+t.toString())}),e.push("]"),e.join("\n")},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if((e-=r.start.column-t)<0)return{row:r.start.row,column:r.start.column+e};if((e-=r.placeholder.length)<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}},e}();t.FoldLine=i}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("./range").Range.comparePoints,i=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var a=i[o],s=r(e,a.end);if(!(s>0)){var l=r(e,a.start);return 0===s?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],n=this.ranges,i=(n=n.sort(function(e,t){return r(e.start,t.start)}))[0],o=1;o<n.length;o++){e=i,i=n[o];var a=r(e.end,i.start);a<0||(0!=a||e.isEmpty()||i.isEmpty())&&(r(e.end,i.end)<0&&(e.end.row=i.end.row,e.end.column=i.end.column),n.splice(o,1),t.push(i),i=e,o--)}return this.ranges=n,t},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var o=[],a=r;a<i;a++)o.push(n[a]);return o},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},e.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,r=t.row,i=n.row,o=this.ranges,a=0,s=o.length;a<s;a++){if((d=o[a]).end.row>=r)break}if("insert"==e.action)for(var l=i-r,c=-t.column+n.column;a<s;a++){if((d=o[a]).start.row>r)break;if(d.start.row==r&&d.start.column>=t.column&&(d.start.column==t.column&&this.$bias<=0||(d.start.column+=c,d.start.row+=l)),d.end.row==r&&d.end.column>=t.column){if(d.end.column==t.column&&this.$bias<0)continue;d.end.column==t.column&&c>0&&a<s-1&&d.end.column>d.start.column&&d.end.column==o[a+1].start.column&&(d.end.column-=c),d.end.column+=c,d.end.row+=l}}else for(l=r-i,c=t.column-n.column;a<s;a++){if((d=o[a]).start.row>i)break;d.end.row<i&&(r<d.end.row||r==d.end.row&&t.column<d.end.column)?(d.end.row=r,d.end.column=t.column):d.end.row==i?d.end.column<=n.column?(l||d.end.column>t.column)&&(d.end.column=t.column,d.end.row=t.row):(d.end.column+=c,d.end.row+=l):d.end.row>i&&(d.end.row+=l),d.start.row<i&&(r<d.start.row||r==d.start.row&&t.column<d.start.column)?(d.start.row=r,d.start.column=t.column):d.start.row==i?d.start.column<=n.column?(l||d.start.column>t.column)&&(d.start.column=t.column,d.start.row=t.row):(d.start.column+=c,d.start.row+=l):d.start.row>i&&(d.start.row+=l)}if(0!=l&&a<s)for(;a<s;a++){var d;(d=o[a]).start.row+=l,d.end.row+=l}},e}();i.prototype.comparePoints=r,t.RangeList=i}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e){function t(t,n){var r=e.call(this)||this;return r.foldLine=null,r.placeholder=n,r.range=t,r.start=t.start,r.end=t.end,r.sameRow=t.start.row==t.end.row,r.subFolds=r.ranges=[],r}return r(t,e),t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},t.prototype.clone=function(){var e=new t(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(t){e.subFolds.push(t.clone())}),e.collapseChildren=this.collapseChildren,e},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){var t,n;t=e,n=this.start,o(t.start,n),o(t.end,n);for(var r=e.start.row,i=e.start.column,a=0,s=-1;a<this.subFolds.length&&1==(s=this.subFolds[a].range.compare(r,i));a++);var l=this.subFolds[a],c=0;if(0==s){if(l.range.containsRange(e))return l.addSubFold(e);c=1}r=e.range.end.row,i=e.range.end.column;var d=a;for(s=-1;d<this.subFolds.length&&1==(s=this.subFolds[d].range.compare(r,i));d++);0==s&&d++;for(var u=this.subFolds.splice(a,d-a,e),p=0==s?u.length-1:u.length,h=c;h<p;h++)e.addSubFold(u[h]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)},t}(e("../range_list").RangeList);function o(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}t.Fold=i}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("./fold_line").FoldLine,o=e("./fold").Fold,a=e("../token_iterator").TokenIterator,s=e("../mouse/mouse_event").MouseEvent;t.Folding=function(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var i=r.folds,o=0;o<i.length;o++){var a=i[o].range;if(a.contains(e,t)){if(1==n&&a.isEnd(e,t)&&!a.isEmpty())continue;if(-1==n&&a.isStart(e,t)&&!a.isEmpty())continue;return i[o]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var o=0;o<r.length;o++){var a=r[o].range.compareRange(e);if(2!=a){if(-2==a)break;for(var s=r[o].folds,l=0;l<s.length;l++){var c=s[l];if(-2==(a=c.range.compareRange(e)))break;if(2!=a){if(42==a)break;i.push(c)}}}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(!(r=r||this.getFoldLine(e)))return null;for(var i,o,a={end:{column:0}},s=0;s<r.folds.length;s++){var l=(o=r.folds[s]).range.compareEnd(e,t);if(-1==l){i=this.getLine(o.start.row).substring(a.end.column,o.start.column);break}if(0===l)return null;a=o}return i||(i=this.getLine(o.start.row).substring(a.end.column)),-1==n?i.substring(0,t-a.end.column):1==n?i.substring(t-a.end.column):i},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),-1==r&&(r=0);r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i<n.length;i++){var o=n[i],a=o.end.row,s=o.start.row;if(a>=t){s<t&&(s>=e?r-=t-s:r=0);break}a>=e&&(r-=s>=e?a-s:a-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,r=this.$foldData,a=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,c=n.end.row,d=n.end.column,u=this.getFoldAt(s,l,1),p=this.getFoldAt(c,d,-1);if(u&&p==u)return u.addSubFold(n);u&&!u.range.isStart(s,l)&&this.removeFold(u),p&&!p.range.isEnd(c,d)&&this.removeFold(p);var h=this.getFoldsInRange(n.range);h.length>0&&(this.removeFolds(h),n.collapseChildren||h.forEach(function(e){n.addSubFold(e)}));for(var m=0;m<r.length;m++){var f=r[m];if(c==f.start.row){f.addFold(n),a=!0;break}if(s==f.end.row){if(f.addFold(n),a=!0,!n.sameRow){var g=r[m+1];if(g&&g.start.row==c){f.merge(g);break}}break}if(c<=f.start.row)break}return a||(f=this.$addFoldLine(new i(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(f.start.row,f.start.row):this.$updateRowLengthCache(f.start.row,f.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,o=t.folds;if(1==o.length)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var a=t.split(e.start.row,e.start.column);(o=a.folds).shift(),a.start.row=o[0].start.row,a.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;if(null==e)n=new r(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new r(e,0,e,this.getLine(e).length);else if("row"in e)n=r.fromPoints(e,e);else{if(Array.isArray(e))return i=[],e.forEach(function(e){i=i.concat(this.unfold(e))},this),i;n=e}for(var o=i=this.getFoldsInRangeList(n);1==i.length&&r.comparePoints(i[0].start,n.start)<0&&r.comparePoints(i[0].end,n.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(i):this.expandFolds(i),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){null==r&&(r=e.start.row),null==i&&(i=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk(function(e,t,n,s){if(!(t<r)){if(t==r){if(n<i)return;s=Math.max(i,s)}a+=null!=e?e:o.getLine(t).substring(s,n)}},t,n),a},this.getDisplayLine=function(e,t,n,r){var i,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,n,r):(i=this.doc.getLine(e)).substring(r||0,t||i.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)})},this.toggleFold=function(e){var t,n,r=this.selection.getRange();if(r.isEmpty()){var i=r.start;if(t=this.getFoldAt(i.row,i.column))return void this.expandFold(t);if(e){var o=this.getFoldLine(i.row);return void(o&&this.expandFolds(o.folds))}(n=this.findMatchingBracket(i))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(i.row,i.column)||r}else{var a=this.getFoldsInRange(r);if(e&&a.length)return void this.expandFolds(a);1==a.length&&(t=a[0])}if(t||(t=this.getFoldAt(r.start.row,r.start.column)),t&&t.range.toString()==r.toString())this.expandFold(t);else{var s="...";if(!r.isMultiLine()){if((s=this.getTextRange(r)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,r)}},this.getCommentFoldRange=function(e,t,n){var i=new a(this,e,t),o=i.getCurrentToken(),s=o&&o.type;if(o&&/^comment|string/.test(s)){"comment"==(s=s.match(/comment|string/)[0])&&(s+="|doc-start|\\.doc");var l=new RegExp(s),c=new r;if(1!=n){do{o=i.stepBackward()}while(o&&l.test(o.type));o=i.stepForward()}c.start.row=i.getCurrentTokenRow(),c.start.column=i.getCurrentTokenColumn()+o.value.length,i=new a(this,e,t);var d=this.getState(i.$row);if(-1!=n){var u=-1;do{if(o=i.stepForward(),-1==u){var p=this.getState(i.$row);d.toString()!==p.toString()&&(u=i.$row)}else if(i.$row>u)break}while(o&&l.test(o.type));o=i.stepBackward()}else o=i.getCurrentToken();if(c.end.row=i.getCurrentTokenRow(),c.end.column=i.getCurrentTokenColumn(),c.start.row==c.end.row&&c.start.column>c.end.column)return;return c}},this.foldAll=function(e,t,n,r){void 0==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var o=e=e||0;o<t;o++)if(null==i[o]&&(i[o]=this.getFoldWidget(o)),"start"==i[o]&&(!r||r(o))){var a=this.getFoldWidgetRange(o);a&&a.isMultiLine()&&a.end.row<=t&&a.start.row>=e&&(o=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){for(var n=e.getTokens(t),r=0;r<n.length;r++){var i=n[r];if("text"!=i.type||!/^\s+$/.test(i.value))return!!/comment/.test(i.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r,i=e-1;i>=0;){var o=n[i];if(null==o&&(o=n[i]=this.getFoldWidget(i)),"start"==o){var a=this.getFoldWidgetRange(i);if(r||(r=a),a&&a.end.row>=e)break}i--}return{range:-1!==i&&a,firstRange:r}},this.onFoldWidgetClick=function(e,t){t instanceof s&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i="end"===n?-1:1,o=this.getFoldAt(e,-1===i?0:r.length,i);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,c=s.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=a?a.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),r=!0,o=n.charAt(e.column-1),a=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(a||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(/([\(\[\{])|([\)\]\}])/),r=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=i.fromPoints(e,s),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=i.fromPoints(s,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),r=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),a=o&&o.match(r);if(a||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(r)),!a)return null;var s=new i(e.row,e.column-1,e.row,e.column),l=a[1]?this.$findClosingBracket(a[1],e):this.$findOpeningBracket(a[2],e);return l?[s,new i(l.row,l.column,l.row,l.column+1)]:[s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,c=s.value;;){for(;l>=0;){var d=c.charAt(l);if(d==i){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else d==e&&(o+=1);l-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;l=(c=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,a=new r(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var c=s.value,d=c.length;l<d;){var u=c.charAt(l);if(u==i){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else u==e&&(o+=1);l+=1}do{s=a.stepForward()}while(s&&!n.test(s.type));if(null==s)break;l=0}return null}},this.getMatchingTags=function(e){var t=new r(this,e.row,e.column),n=this.$findTagName(t);if(n)return"<"===t.stepBackward().value?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,r=!1;if(t&&-1===t.type.indexOf("tag-name"))do{(t=r?e.stepBackward():e.stepForward())&&("/>"===t.value?r=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,r=t.value,o=t.value,a=0,s=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(n=t).type.indexOf("tag-close")&&!c){var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward()){if(">"===t.value&&!c){d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(-1!==t.type.indexOf("tag-name")){if(o===(r=t.value))if("<"===n.value)a++;else if("</"===n.value&&--a<0){e.stepBackward();var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),!t||">"!==t.value)return;var h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else if(o===r&&"/>"===t.value&&--a<0)h=p=u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=new i(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(t&&a>=0);if(s&&d&&u&&h&&l&&p)return{openTag:new i(s.start.row,s.start.column,d.end.row,d.end.column),closeTag:new i(u.start.row,u.start.column,h.end.row,h.end.column),openTagName:l,closeTagName:p}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),r=t.value,o=0,a=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),l=s+2,c=new i(a,s,a,l);e.stepForward();var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,a=e.getCurrentTokenRow(),l=(s=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(r===t.value)if("<"===n.value){if(++o>0){var p=new i(a,s,a,l),h=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var m=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===n.value&&o--}else if("/>"===t.value){for(var f=0,g=n;g;){if(-1!==g.type.indexOf("tag-name")&&g.value===r){o--;break}if("<"===g.value)break;g=e.stepBackward(),f++}for(var v=0;v<f;v++)e.stepForward()}}while(n&&o<=0);return h&&m&&c&&u&&p&&d?{openTag:new i(h.start.row,h.start.column,m.end.row,m.end.column),closeTag:new i(c.start.row,c.start.column,u.end.row,u.end.column),openTagName:p,closeTagName:d}:void 0}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),o=e("./bidihandler").BidiHandler,a=e("./config"),s=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,d=e("./range").Range,u=e("./line_widgets").LineWidgets,p=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,m=e("./search_highlight").SearchHighlight,f=e("./undomanager").UndoManager,g=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.$gutterCustomWidgets={},this.bgTokenizer=new h((new c).getTokenizer(),this);var r=this;this.bgTokenizer.on("update",function(e){r._signal("tokenizerUpdate",e)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new p(t)),this.setDocument(t),this.selection=new l(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new o(this),a.resetOptions(this),this.setMode(n),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on("change",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0},!0),this.on("changeSelection",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0},!0),this.$operationResetTimer=i.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(e={}),this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null,void this._signal("endOperation",e);if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new u(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,o=e[i];if(t>o)n=i+1;else{if(!(t<o))return i;r=i-1}}return n-1},e.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},e.prototype.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},e.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},e.prototype.onSelectionChange=function(){this._signal("changeSelection")},e.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},e.fromJSON=function(t){"string"==typeof t&&(t=JSON.parse(t));var n=new f;n.$undoStack=t.history.undo,n.$redoStack=t.history.redo,n.mark=t.history.mark,n.$rev=t.history.rev;var r=new e(t.value);return t.folds.forEach(function(e){r.addFold("...",d.fromPoints(e.start,e.end))}),r.setAnnotations(t.annotations),r.setBreakpoints(t.breakpoints),r.setMode(t.mode),r.setScrollLeft(t.scrollLeft),r.setScrollTop(t.scrollTop),r.setUndoManager(n),r.selection.fromJSON(t.selection),r},e.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(e){return e.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},e.prototype.toString=function(){return this.doc.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.getState=function(e){return this.bgTokenizer.getState(e)},e.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},e.prototype.getTokenAt=function(e,t){var n,r=this.bgTokenizer.getTokens(e),i=0;if(null==t){var o=r.length-1;i=this.getLine(e).length}else for(o=0;o<r.length&&!((i+=r[o].value.length)>=t);o++);return(n=r[o])?(n.index=o,n.start=i-n.value.length,n):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterCustomWidget=function(e){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(e)},e.prototype.addGutterCustomWidget=function(e,t){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},e.prototype.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.addMarker=function(e,t,n,r){var i=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=o,this._signal("changeFrontMarker")):(this.$backMarkers[i]=o,this._signal("changeBackMarker")),i},e.prototype.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},e.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},e.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},e.prototype.highlight=function(e){if(!this.$searchHighlight){var t=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},e.prototype.highlightLines=function(e,t,n,r){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var i=new d(e,0,t,1/0);return i.id=this.addMarker(i,n,"fullLine",r),i},e.prototype.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},e.prototype.getAnnotations=function(){return this.$annotations||[]},e.prototype.clearAnnotations=function(){this.setAnnotations([])},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},e.prototype.getWordRange=function(e,t){var n=this.getLine(e),r=!1;if(t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe)),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))i=/\s/;else i=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(i));o++}for(var a=t;a<n.length&&n.charAt(a).match(i);)a++;return new d(e,o,e,a)},e.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),r=this.getLine(n.end.row);r.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},e.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},e.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},e.prototype.setUseWorker=function(e){this.setOption("useWorker",e)},e.prototype.getUseWorker=function(){return this.$useWorker},e.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},e.prototype.setMode=function(e,t){if(e&&"object"===typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[r]&&!n)return this.$onChangeMode(this.$modes[r]),void(t&&t());this.$modeId=r,a.loadModule(["mode",r],function(e){if(!this.destroyed){if(this.$modeId!==r)return t&&t();this.$modes[r]&&!n?this.$onChangeMode(this.$modes[r]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e)),t&&t()}}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},e.prototype.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var r=e.getTokenizer();if(void 0!==r.on){var i=this.onReloadTokenizer.bind(this);r.on("update",i)}this.bgTokenizer.setTokenizer(r),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},e.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},e.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){a.warn("Could not load worker",e),this.$worker=null}},e.prototype.getMode=function(){return this.$mode},e.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},e.prototype.getScrollTop=function(){return this.$scrollTop},e.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},e.prototype.getScrollLeft=function(){return this.$scrollLeft},e.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},e.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,o=this.$foldData[i],a=o?o.start.row:1/0,s=t.length,l=0;l<s;l++){if(l>a){if((l=o.end.row+1)>=s)break;a=(o=this.$foldData[i++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>r&&(r=n[l])}this.screenWidth=r}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var r=e[n];"insert"==r.action||"remove"==r.action?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var r=e[n];"insert"!=r.action&&"remove"!=r.action||this.doc.$safeApplyDelta(r)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},e.prototype.setUndoSelect=function(e){this.$undoSelect=e},e.prototype.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var r,i,o=0;o<e.length;o++){var a=e[o];a.start&&(r?n(a)?(i=a.start,-1==r.compare(i.row,i.column)&&r.setStart(i),i=a.end,1==r.compare(i.row,i.column)&&r.setEnd(i)):(i=a.start,-1==r.compare(i.row,i.column)&&(r=d.fromPoints(a.start,a.start))):r=n(a)?d.fromPoints(a.start,a.end):d.fromPoints(a.start,a.start))}return r},e.prototype.replace=function(e,t){return this.doc.replace(e,t)},e.prototype.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),o=d.fromPoints(t,t);if(!n){this.remove(e);var a=e.start.row-e.end.row;(c=a?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,r),i.length){var s=e.start,l=o.start,c=(a=l.row-s.row,l.column-s.column);this.addFolds(i.map(function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=c),e.end.row==s.row&&(e.end.column+=c),e.start.row+=a,e.end.row+=a,e}))}return o},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new d(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var o=this.getLine(i);n.start.row=i,n.end.row=i;for(var a=0;a<r&&" "==o.charAt(a);++a);a<r&&"\t"==o.charAt(a)?(n.start.column=a,n.end.column=a+1):(n.start.column=0,n.end.column=a),this.remove(n)}},e.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((i=this.getRowFoldStart(e+n))<0)return 0;var r=i-e}else if(n>0){var i;if((i=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;r=i-t}else{e=this.$clipRowToDocument(e);r=(t=this.$clipRowToDocument(t))-e+1}var o=new d(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=r,e.end.row+=r,e}),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+r,s),a.length&&this.addFolds(a),r},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,o=r.row,a=i.row,s=a-o,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var d=0;if(f=this.getFoldLine(i.row)){f.addRemoveChars(i.row,i.column,r.column-i.column),f.shiftRow(-s);var u=this.getFoldLine(o);u&&u!==f&&(u.merge(f),f=u),d=c.indexOf(f)+1}for(;d<c.length;d++){(f=c[d]).start.row>=i.row&&f.shiftRow(-s)}a=o}else{var p=Array(s);p.unshift(o,0);var h=t?this.$wrapData:this.$rowLengthCache;h.splice.apply(h,p);c=this.$foldData,d=0;if(f=this.getFoldLine(o)){var m=f.range.compareInside(r.row,r.column);0==m?(f=f.split(r.row,r.column))&&(f.shiftRow(s),f.addRemoveChars(a,0,i.column-r.column)):-1==m&&(f.addRemoveChars(o,0,i.column-r.column),f.shiftRow(s)),d=c.indexOf(f)+1}for(;d<c.length;d++){var f;(f=c[d]).start.row>=o&&f.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s),(f=this.getFoldLine(o))&&f.addRemoveChars(o,r.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n,r,i=this.doc.getAllLines(),o=this.getTabSize(),a=this.$wrapData,s=this.$wrapLimit,l=e;for(t=Math.min(t,i.length-1);l<=t;)(r=this.getFoldLine(l,r))?(n=[],r.walk(function(e,t,r,o){var a;if(null!=e){(a=this.$getDisplayTokens(e,n.length))[0]=y;for(var s=1;s<a.length;s++)a[s]=b}else a=this.$getDisplayTokens(i[t].substring(o,r),n.length);n=n.concat(a)}.bind(this),r.end.row,i[r.end.row].length+1),a[r.start.row]=this.$computeWrapSplits(n,s,o),l=r.end.row+1):(n=this.$getDisplayTokens(i[l]),a[l]=this.$computeWrapSplits(n,s,o),l++)},e.prototype.$computeWrapSplits=function(e,t,n){if(0==e.length)return[];var r=[],i=e.length,o=0,a=0,s=this.$wrapAsCode,l=this.$indentedSoftWrap,c=t<=Math.max(2*n,8)||!1===l?0:Math.floor(t/2);function d(t){for(var i=t-o,d=o;d<t;d++){var p=e[d];12!==p&&2!==p||(i-=1)}r.length||(u=function(){var t=0;if(0===c)return t;if(l)for(var r=0;r<e.length;r++){var i=e[r];if(i==w)t+=1;else{if(i!=_){if(i==C)continue;break}t+=n}}return s&&!1!==l&&(t+=n),Math.min(t,c)}(),r.indent=u),a+=i,r.push(a),o=t}for(var u=0;i-o>t-u;){var p=o+t-u;if(e[p-1]>=w&&e[p]>=w)d(p);else if(e[p]!=y&&e[p]!=b){for(var h=Math.max(p-(t-(t>>2)),o-1);p>h&&e[p]<y;)p--;if(s){for(;p>h&&e[p]<y;)p--;for(;p>h&&e[p]==j;)p--}else for(;p>h&&e[p]<w;)p--;p>h?d(++p):(e[p=o+t]==x&&p--,d(p-u))}else{for(;p!=o-1&&e[p]!=y;p--);if(p>o){d(p);continue}for(p=o+t;p<e.length&&e[p]==b;p++);if(p==e.length)break;d(p)}}return r},e.prototype.$getDisplayTokens=function(e,t){var n,r=[];t=t||0;for(var i=0;i<e.length;i++){var o=e.charCodeAt(i);if(9==o){n=this.getScreenTabSize(r.length+t),r.push(_);for(var a=1;a<n;a++)r.push(C)}else 32==o?r.push(w):o>39&&o<48||o>57&&o<64?r.push(j):o>=4352&&S(o)?r.push(v,x):r.push(v)}return r},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var r,i;for(null==t&&(t=1/0),n=n||0,i=0;i<e.length&&(9==(r=e.charCodeAt(i))?n+=this.getScreenTabSize(n):r>=4352&&S(r)?n+=2:n+=1,!(n>t));i++);return[n,i]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},e.prototype.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},e.prototype.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},e.prototype.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},e.prototype.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},e.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},e.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},e.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},e.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var r,i,o=0,a=0,s=0,l=0,c=this.$screenRowCache,d=this.$getRowCacheIndex(c,e),u=c.length;if(u&&d>=0){s=c[d],o=this.$docRowCache[d];var p=e>c[u-1]}else p=!u;for(var h=this.getLength()-1,m=this.getNextFoldLine(o),f=m?m.start.row:1/0;s<=e&&!(s+(l=this.getRowLength(o))>e||o>=h);)s+=l,++o>f&&(o=m.end.row+1,f=(m=this.getNextFoldLine(o,m))?m.start.row:1/0),p&&(this.$docRowCache.push(o),this.$screenRowCache.push(s));if(m&&m.start.row<=o)r=this.getFoldDisplayLine(m),o=m.start.row;else{if(s+l<=e||o>h)return{row:h,column:this.getLine(h).length};r=this.getLine(o),m=null}var g=0,v=Math.floor(e-s);if(this.$useWrapMode){var x=this.$wrapData[o];x&&(i=x[v],v>0&&x.length&&(g=x.indent,a=x[v-1]||x[x.length-1],r=r.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&a>=i&&(a=i-1),m?m.idxToPosition(a):{row:o,column:a}},e.prototype.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r,i=0,o=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var a,s=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),d=l.length;if(d&&c>=0){s=l[c],i=this.$screenRowCache[c];var u=e>l[d-1]}else u=!d;for(var p=this.getNextFoldLine(s),h=p?p.start.row:1/0;s<e;){if(s>=h){if((a=p.end.row+1)>e)break;h=(p=this.getNextFoldLine(a,p))?p.start.row:1/0}else a=s+1;i+=this.getRowLength(s),s=a,u&&(this.$docRowCache.push(s),this.$screenRowCache.push(i))}var m="";p&&s>=h?(m=this.getFoldDisplayLine(p,e,t),o=p.start.row):(m=this.getLine(e).substring(0,t),o=e);var f=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var v=0;m.length>=g[v];)i++,v++;m=m.substring(g[v-1]||0,m.length),f=v>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(i+=this.lineWidgets[s].rowsAbove),{row:i,column:f+this.$getStringScreenWidth(m)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);r<n;){var o=this.$wrapData[r];e+=o?o.length+1:1,++r>i&&(r=t.end.row+1,i=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;s<a.length;s++)e-=(t=a[s]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,r){if(0===n)return[0,0];var i,o;for(n||(n=1/0),r=r||0,o=0;o<t.length&&!((r+="\t"===(i=t.charAt(o))?this.getScreenTabSize(r):e.getCharacterWidth(i))>n);o++);return[r,o]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();g.$uid=0,g.prototype.$modes=a.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=S,r.implement(g.prototype,s);var v=1,x=2,y=3,b=4,j=9,w=10,_=11,C=12;function S(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),a.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./lib/oop"),o=e("./range").Range,a=function(){function e(){this.$options={}}return e.prototype.set=function(e){return i.mixin(this.$options,e),this},e.prototype.getOptions=function(){return r.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i,a){return r=new o(e,n,i,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&r.isEqual(t.start))||(r=null,!1)}),r},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,c=s.length,d=i.length-c;e:for(var u=s.offset||0;u<=d;u++){for(var p=0;p<c;p++)if(-1==i[u+p].search(s[p]))continue e;var h=i[u],m=i[u+c-1],f=h.length-h.match(s[0])[0].length,g=m.match(s[c-1])[0].length;l&&l.end.row===u&&l.end.column>f||(a.push(l=new o(u,f,u+c-1,g)),c>2&&(u=u+c-2))}}else for(var v,x=0;x<i.length;x++)if(this.$isMultilineSearch(t)){var y=i.length-1;if(v=this.$multiLineForward(e,s,x,y)){var b=v.endRow<=y?v.endRow-1:y;b>x&&(x=b),a.push(new o(v.startRow,v.startCol,v.endRow,v.endCol))}}else{v=r.getMatchOffsets(i[x],s);for(p=0;p<v.length;p++){var j=v[p];a.push(new o(x,j.offset,x,j.offset+j.length))}}if(n){var w=n.start.column,_=n.end.column;for(x=0,p=a.length-1;x<p&&a[x].start.column<w&&0==a[x].start.row;)x++;for(var C=n.end.row-n.start.row;x<p&&a[p].end.column>_&&a[p].end.row==C;)p--;for(a=a.slice(x,p+1),x=0,p=a.length;x<p;x++)a[x].start.row+=n.start.row,a[x].end.row+=n.start.row}return a},e.prototype.parseReplaceString=function(e){for(var t=36,n=38,r=48,i=49,o=57,a=92,s=110,l=116,c="",d=0,u=e.length;d<u;d++){var p=e.charCodeAt(d);if(p!==a){if(p===t){if(++d>=u){c+="$";break}var h=e.charCodeAt(d);if(h===t){c+="$$";continue}if(h===r||h===n){c+="$&";continue}if(i<=h&&h<=o){c+="$"+e[d];continue}}c+=e[d]}else{if(++d>=u){c+="\\";break}switch(e.charCodeAt(d)){case a:c+="\\";break;case s:c+="\n";break;case l:c+="\t"}}}return c||e},e.prototype.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(r){var i=this.$isMultilineSearch(n);i&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var o=r.exec(e);if(!o||!i&&o[0].length!=e.length)return null;if(t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(r,t),n.preserveCase){t=t.split("");for(var a=Math.min(e.length,e.length);a--;){var s=e[a];s&&s.toLowerCase()!=s?t[a]=t[a].toUpperCase():t[a]=t[a].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n));var i=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,i+="u"}catch(a){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=function(e,t){var n=r.supportsLookbehind();function i(e,r){return void 0===r&&(r=!0),(n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?n&&t.$supportsUnicodeFlag?r?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var o=Array.from(e),a=o[0],s=o[o.length-1];return i(a)+e+i(s,!1)}(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var o=new RegExp(n,i)}catch(a){o=!1}return e.re=o},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[],i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(o){return!1}return r},e.prototype.$isMultilineSearch=function(e){return e.re&&/\\r\\n|\\r|\\n/.test(e.re.source)&&e.regExp&&!e.$isMultiLine},e.prototype.$multiLineForward=function(e,t,n,r){for(var i,o=l(e,n),a=n;a<=r;){for(var s=0;s<o&&!(a>r);s++){var c=e.getLine(a++);i=null==i?c:i+"\n"+c}var d=t.exec(i);if(t.lastIndex=0,d){var u=i.slice(0,d.index).split("\n"),p=d[0].split("\n"),h=n+u.length-1,m=u[u.length-1].length;return{startRow:h,startCol:m,endRow:h+p.length-1,endCol:1==p.length?m+p[0].length:p[p.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,n,r,i){for(var o,a=l(e,r),c=e.getLine(r).length-n,d=r;d>=i;){for(var u=0;u<a&&d>=i;u++){var p=e.getLine(d--);o=null==o?p:p+"\n"+o}var h=s(o,t,c);if(h){var m=o.slice(0,h.index).split("\n"),f=h[0].split("\n"),g=d+m.length,v=m[m.length-1].length;return{startRow:g,startCol:v,endRow:g+f.length-1,endCol:1==f.length?v+f[0].length:f[f.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this.$isMultilineSearch(t),o=this.$multiLineForward,a=this.$multiLineBackward,s=1==t.backwards,l=0!=t.skipCurrent,c=n.unicode,d=t.range,u=t.start;u||(u=d?d[s?"end":"start"]:e.selection.getRange()),u.start&&(u=u[l!=s?"end":"start"]);var p=d?d.start.row:0,h=d?d.end.row:e.getLength()-1;if(s)var m=function(e){var n=u.row;if(!g(n,u.column,e)){for(n--;n>=p;n--)if(g(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=h,p=u.row;n>=p;n--)if(g(n,Number.MAX_VALUE,e))return}};else m=function(e){var n=u.row;if(!g(n,u.column,e)){for(n+=1;n<=h;n++)if(g(n,0,e))return;if(0!=t.wrap)for(n=p,h=u.row;n<=h;n++)if(g(n,0,e))return}};if(t.$isMultiLine)var f=n.length,g=function(t,r,i){var o=s?t-f+1:t;if(!(o<0||o+f>e.getLength())){var a=e.getLine(o),l=a.search(n[0]);if(!(!s&&l<r||-1===l)){for(var c=1;c<f;c++)if(-1==(a=e.getLine(o+c)).search(n[c]))return;var d=a.match(n[f-1])[0].length;if(!(s&&d>r))return!!i(o,l,o+f-1,d)||void 0}}};else if(s)g=function(t,o,s){if(i){var l=a(e,n,o,t,p);if(!l)return!1;if(s(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else{var d,u=e.getLine(t),h=[],m=0;for(n.lastIndex=0;d=n.exec(u);){var f=d[0].length;if(m=d.index,!f){if(m>=u.length)break;n.lastIndex=m+=r.skipEmptyMatch(u,m,c)}if(d.index+f>o)break;h.push(d.index,f)}for(var g=h.length-1;g>=0;g-=2){var v=h[g-1];if(s(t,v,t,v+(f=h[g])))return!0}}};else g=function(t,a,s){if(n.lastIndex=a,i){var l=o(e,n,t,h);if(l){var d=l.endRow<=h?l.endRow-1:h;d>t&&(t=d)}if(!l)return!1;if(s(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else for(var u,p,m=e.getLine(t);p=n.exec(m);){var f=p[0].length;if(s(t,u=p.index,t,u+f))return!0;if(!f&&(n.lastIndex=u+=r.skipEmptyMatch(m,u,c),u>=m.length))return!1}};return{forEach:m}},e}();function s(e,t,n){for(var r=null,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function l(e,t){var n={row:t,column:0},r=e.doc.positionToIndex(n)+5e3;return e.doc.indexToPosition(r).row+1}t.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("../lib/keys"),o=e("../lib/useragent"),a=i.KEY_MODS,s=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var o=r[i];if(o==e)delete r[i];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(r[i]=o[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var r="";if(-1!=e.indexOf(" ")){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=a[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var o=this.parseKeys(e),s=a[o.hashId]+o.key;this._addCommandToBinding(r+s,t,n)},this)},e.prototype._addCommandToBinding=function(e,t,n){var r,i=this.commandKeyBinding;if(t)if(!i[e]||this.$singleCommand)i[e]=t;else{Array.isArray(i[e])?-1!=(r=i[e].indexOf(t))&&i[e].splice(r,1):i[e]=[i[e]],"number"!=typeof n&&(n=l(t));var o=i[e];for(r=0;r<o.length;r++){if(l(o[r])>n)break}o.splice(r,0,t)}else delete i[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,a=t.length;a--;){var s=i.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;o|=s}return{key:n,hashId:o}},e.prototype.findKeyCommand=function(e,t){var n=a[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=a[t]+n,o=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=" "+i,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||r>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-i.length-1)),{command:o}):(e.$keyChain=e.$keyChain||i,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function l(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.$singleCommand=!0,r}return r(t,e),t}(s);c.call=function(e,t,n){s.prototype.$init.call(e,t,n,!0)},s.call=function(e,t,n){s.prototype.$init.call(e,t,n,!1)},t.HashHandler=c,t.MultiHashHandler=s}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,a=e("../lib/event_emitter").EventEmitter,s=function(e){function t(t,n){var r=e.call(this,n,t)||this;return r.byName=r.commands,r.setDefaultHandler("exec",function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}),r}return r(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}"string"===typeof e&&(e=this.commands[e]);var i={editor:t,command:e,args:n};return this.canExecute(e,t)?(i.returnValue=this._emit("exec",i),this._signal("afterExec",i),!1!==i.returnValue):(this._signal("commandUnavailable",i),!1)},t.prototype.canExecute=function(e,t){return"string"===typeof e&&(e=this.commands[e]),!!e&&(!(t&&t.$readOnly&&!e.readOnly)&&!(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t)))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})},t}(o);i.implement(s.prototype,a),t.CommandManager=s}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";var r=e("../lib/lang"),i=e("../config"),o=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!==typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var d=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),l+=d}i.row+1<e.session.doc.getLength()-1&&(l+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(n.row,0,i.row+2,0),l),s>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var a=0;a<r.length;a++)a==r.length-1&&(r[a].end.row===t&&r[a].end.column===n||i.push(new o(r[a].end.row,r[a].end.column,t,n))),0===a?0===r[a].start.row&&0===r[a].start.column||i.push(new o(0,0,r[a].start.row,r[a].start.column)):i.push(new o(r[a-1].end.row,r[a-1].end.column,r[a].start.row,r[a].start.column));e.exitMultiSelectMode(),e.clearSelection();for(a=0;a<i.length;a++)e.selection.addRange(i[a],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(e){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),e.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var s=1;s<9;s++)t.commands.push({name:"foldToLevel"+s,description:"Fold To Level "+s,level:s,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,t,n){"use strict";var r=e("../lib/keys"),i=e("../mouse/default_gutter_handler").GutterTooltip,o=function(){function e(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new i(this.editor)}return e.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},e.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},e.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen)return e.preventDefault(),void(e.keyCode===r.escape&&this.annotationTooltip.hideTooltip());if(e.target===this.element){if(e.keyCode!=r.enter)return;e.preventDefault();var t=this.editor.getCursorPosition().row;return this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),void setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldLaneWidget(e),n=this.$findNearestAnnotation(e);if(null!==t||null!==n)return this.$findClosestNumber(t,n,e)===t?(this.activeLane="fold",this.activeRowIndex=t,this.$isCustomWidgetVisible(t)?void this.$focusCustomWidget(this.activeRowIndex):void this.$focusFoldWidget(this.activeRowIndex)):(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex))}.bind(this),10)}this.$handleGutterKeyboardInteraction(e),setTimeout(function(){this.editor._signal("gutterkeydown",new a(e,this))}.bind(this),10)},e.prototype.$handleGutterKeyboardInteraction=function(e){if(e.keyCode!==r.tab){if(e.keyCode===r.escape)return e.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(e.keyCode!==r.up)if(e.keyCode!==r.down){if(e.keyCode===r.left)return e.preventDefault(),void this.$switchLane("annotation");if(e.keyCode===r.right)return e.preventDefault(),void this.$switchLane("fold");if(e.keyCode!==r.enter&&e.keyCode!==r.space);else switch(e.preventDefault(),this.activeLane){case"fold":var t=this.$rowIndexToRow(this.activeRowIndex),n=this.editor.session.$gutterCustomWidgets[t];if(n)n.callbacks&&n.callbacks.onClick&&n.callbacks.onClick(e,t);else{if("start"===this.gutterLayer.session.foldWidgets[t]){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),e),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break}return;case"annotation":var i=this.lines.cells[this.activeRowIndex].element.childNodes[2].getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=i.right+"px",o.top=i.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}}else e.preventDefault()},e.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},e.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getFoldWidget(e).style.display;return t&&n},e.prototype.$isCustomWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n=!!this.$getCustomWidget(e);return t&&n},e.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getAnnotation(e).style.display;return t&&n},e.prototype.$getFoldWidget=function(e){return this.lines.get(e).element.childNodes[1]},e.prototype.$getCustomWidget=function(e){return this.lines.get(e).element.childNodes[3]},e.prototype.$getAnnotation=function(e){return this.lines.get(e).element.childNodes[2]},e.prototype.$findNearestFoldLaneWidget=function(e){if(this.$isCustomWidgetVisible(e))return e;if(this.$isFoldWidgetVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isCustomWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(e+t))return e+t;if(e-t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(e-++t>=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusCustomWidget=function(e){if(null!=e){var t=this.$getCustomWidget(e);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurCustomWidget=function(e){var t=this.$getCustomWidget(e);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,void(this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,void(this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},e.prototype.$moveAnnotationUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$findClosestNumber=function(e,t,n){return null===e?t:null===t||Math.abs(n-e)<=Math.abs(n-t)?e:t},e.prototype.$switchLane=function(e){switch(e){case"annotation":if("annotation"===this.activeLane)break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(null==t)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if("fold"===this.activeLane)break;var n=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(null===n)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$isCustomWidgetVisible(n)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex)}},e.prototype.$rowIndexToRow=function(e){var t=this.lines.get(e);return t?t.row:null},e.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++){if(this.lines.get(t).row==e)return t}return null},e}();t.GutterKeyboardHandler=o;var a=function(){function e(e,t){this.gutterKeyboardHandler=t,this.domEvent=e}return e.prototype.getKey=function(){return r.keyCodeToString(this.domEvent.keyCode)},e.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},e.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},e.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane},e}();t.GutterKeyboardEvent=a}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("./lib/oop"),o=e("./lib/dom"),a=e("./lib/lang"),s=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,d=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,p=e("./edit_session").EditSession,h=e("./search").Search,m=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,x=e("./config"),y=e("./token_iterator").TokenIterator,b=e("./keyboard/gutter_handler").GutterKeyboardHandler,j=e("./config").nls,w=e("./clipboard"),_=e("./lib/keys"),C=e("./lib/event"),S=e("./tooltip").HoverTooltip,A=function(){function e(t,n,r){this.id="editor"+ ++e.$uid,this.session,this.$toDestroy=[];var i=t.getContainerElement();this.container=i,this.renderer=t,this.commands=new g(s.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new d(this)),this.keyBinding=new u(this),this.$search=(new h).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(n||r&&r.session||new p("")),x.resetOptions(this),r&&this.setOptions(r),x._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var i=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;x.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(e,t)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach(function(e){t.removeMarker(e)}),t.$bracketHighlight=null);var n=e.getCursorPosition(),r=e.getKeyboardHandler(),i=r&&r.$getDirectionForHighlight&&r.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(n,i);if(!o){var a=new y(t,n.row,n.column).getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var s=t.getMatchingTags(n);s&&(o=[s.openTagName.isEmpty()?s.openTag:s.openTagName,s.closeTagName.isEmpty()?s.closeTag:s.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),o){var l="ace_bracket";Array.isArray(o)?1==o.length&&(l="ace_error_bracket"):o=[o],2==o.length&&(0==m.comparePoints(o[0].end,o[1].start)?o=[m.fromPoints(o[0].start,o[1].end)]:0==m.comparePoints(o[0].start,o[1].end)&&(o=[m.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map(function(e){return t.addMarker(e,l,"text")})},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}},50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new m(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),o=i.substring(n,r);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),s=i.substring(n-1,r+1);if(a.test(s))return a}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),i=0;i<r.length;i++){var o=r[i];i&&r[i-1].start.row==o.start.row||(e+=this.session.getLine(o.start.row)+t)}}var a={text:e};return this._signal("copy",a),w.lineMode=!!n&&a.text,a.text},e.prototype.onCopy=function(){this.commands.exec("copy",this)},e.prototype.onCut=function(){this.commands.exec("cut",this)},e.prototype.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},e.prototype.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t===w.lineMode,r=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?r.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach(function(e){r.insert({row:e.start.row,column:0},t)});else{var i=t.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,a=2==i.length&&(!i[0]||!i[1]);if(i.length!=o.length||a)return this.commands.exec("insertstring",this,t);for(var s=o.length;s--;){var l=o[s];l.isEmpty()||r.remove(l),r.insert(l.start,i[s])}}},e.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},e.prototype.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=r.transformAction(n.getState(i.row),"insertion",this,n,e);o&&(e!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(a=m.fromPoints(i,i)).end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();i=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=n.getLine(i.row);if(i.column>s.search(/\S|$/)){var l=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+l)}}this.clearSelection();var c=i.column,d=n.getState(i.row),u=(s=n.getLine(i.row),r.checkOutdent(d,s,e));if(n.insert(i,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new m(i.row,c+o.selection[0],i.row,c+o.selection[1])):this.selection.setSelectionRange(new m(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var p=r.getNextLineIndent(d,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},p)}u&&r.autoOutdent(d,n,i.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new m(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),r="",i="",o="",a=e.getTabString(),s=0;s<n.length;s++)for(var l=n[s].start.row,c=n[s].end.row,d=l;d<=c;d++){d>0&&(r=e.getState(d-1),i=e.getLine(d-1),o=t.getNextLineIndent(r,i,a));var u=e.getLine(d),p=t.$getIndent(u);if(o!==p){if(p.length>0){var h=new m(d,0,d,p.length);e.remove(h)}o.length>0&&e.insert({row:d,column:0},o)}t.autoOutdent(r,e,d)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,r,i=this.session.getLine(e.row);t<i.length?(n=i.charAt(t)+i.charAt(t-1),r=new m(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),r=new m(e.row,t-2,e.row,t)),this.session.replace(r,n),this.session.selection.moveToPosition(r.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n)){d=this.$getSelectedRows();return void e.indentRows(d.first,d.last,"\t")}}var r=e.getLine(t.start.row),i=t.start,o=e.getTabSize(),s=e.documentToScreenColumn(i.row,i.column);if(this.session.getUseSoftTabs())var l=o-s%o,c=a.stringRepeat(" ",l);else{for(l=s%o;" "==r[t.start.column-1]&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var d=this.$getSelectedRows();e.indentRows(d.first,d.last,"\t")},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var i=new m(0,0,0,0);for(r=e.first;r<=e.last;r++){var o=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,t.replace(i,n[r-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new m(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,l=parseFloat(o.value);l*=Math.pow(10,s),a!==o.end&&n<a?e*=Math.pow(10,o.end-n-1):e*=Math.pow(10,o.end-n),l+=e;var c=(l/=Math.pow(10,s)).toFixed(s),d=new m(t,o.start,t,o.end);this.session.replace(d,c),this.moveCursorTo(t,Math.max(o.start+1,n+c.length-o.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),r=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=t-r-1;o<0&&(o=0);var s=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach(function(t,i){l=s+t.length,o>=s&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,s+r),c.selection.selectTo(e,l+r)),s=l});for(var d,u=this.$toggleWordPairs,p=0;p<u.length;p++)for(var h=u[p],m=0;m<=1;m++){var f=+!m,g=n.match(new RegExp("^\\s?_?("+a.escapeRegExp(h[m])+")\\s?$","i"));if(g)n.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(g[1])+")($|\\s)","g"))&&(d=n.replace(new RegExp(a.escapeRegExp(h[m]),"i"),function(e){var t=h[f];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+h[f].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(d),d="")}},e.prototype.findLinkAt=function(e,t){var n,i,o=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),a=t;a<0&&(a=0);var s,l=0,c=0;try{for(var d=r(o),u=d.next();!u.done;u=d.next()){var p=u.value;if(c=l+p.length,a>=l&&a<=c&&p.match(/((?:https?|ftp):\/\/[\S]+)/)){s=p.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(h){n={error:h}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return s},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var o=r?n.start:n.end,a=t.insert(o,t.getTextRange(n));n.start=o,n.end=a,e.setSelectionRange(n,r)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var o=i.toOrientedRange();n=this.$getSelectedRows(o),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(r=0),o.moveBy(r,0),i.fromOrientedRange(o)}else{var a=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,l=0,c=a.length,d=0;d<c;d++){var u=d;a[d].moveBy(s,0);for(var p=(n=this.$getSelectedRows(a[d])).first,h=n.last;++d<c;){l&&a[d].moveBy(l,0);var m=this.$getSelectedRows(a[d]);if(t&&m.first!=h)break;if(!t&&m.first>h+1)break;h=m.last}for(d--,s=this.session.$moveLines(p,h,t?0:e),t&&-1==e&&(u=d+1);u<=d;)a[u].moveBy(s,0),u++;t||(s=0),l+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):!1===t&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,i*r.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),o=0;i&&-1!==i.type.indexOf("tag-name")&&(i=r.stepBackward());var a=i||r.stepForward();if(a){var s,l,c=!1,d={},u=n.column-a.start,p={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(a.value.match(/[{}()\[\]]/g)){for(;u<a.value.length&&!c;u++)if(p[a.value[u]])switch(l=p[a.value[u]]+"."+a.type.replace("rparen","lparen"),isNaN(d[l])&&(d[l]=0),a.value[u]){case"(":case"[":case"{":d[l]++;break;case")":case"]":case"}":d[l]--,-1===d[l]&&(s="bracket",c=!0)}}else-1!==a.type.indexOf("tag-name")&&(isNaN(d[a.value])&&(d[a.value]=0),"<"===i.value&&o>1?d[a.value]++:"</"===i.value&&d[a.value]--,-1===d[a.value]&&(s="tag",c=!0));c||(i=a,o++,a=r.stepForward(),u=0)}while(a&&!c);if(s){var h,f;if("bracket"===s)(h=this.session.getBracketRange(n))||(f=(h=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1)).start,(t||f.row===n.row&&Math.abs(f.column-n.column)<2)&&(h=this.session.getBracketRange(f)));else if("tag"===s){if(!a||-1===a.type.indexOf("tag-name"))return;if(0===(h=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2)).compare(n.row,n.column)){var g=this.session.getMatchingTags(n);g&&(g.openTag.contains(n.row,n.column)?f=(h=g.closeTag).start:(h=g.openTag,f=g.closeTag.start.row===n.row&&g.closeTag.start.column===n.column?h.end:h.start))}f=f||h.start}(f=h&&h.cursor||f)&&(e?h&&t?this.selection.setRange(h):h&&h.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column):this.selection.moveTo(f.row,f.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),r):r},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&r++;return this.selection.setSelectionRange(i),r},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&i.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(e){e.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var o=this.on("changeSelection",function(){r=!0}),a=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;null!=(r=o.top>=0&&s+t.top<0||!(o.top<a.height&&o.top+t.top+a.lineHeight>window.innerHeight)&&null)&&(i.style.top=s+"px",i.style.left=o.left+"px",i.style.height=a.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var r=this;x.loadModule("ace/ext/prompt",function(i){i.prompt(r,e,t,n)})},e}();A.$uid=0,A.prototype.curOp=null,A.prototype.prevOp={},A.prototype.$mergeableCommands=["backspace","del","insertstring"],A.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],i.implement(A.prototype,f),x.defineOptions(A.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;if(this.textInput.setReadOnly(e),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var n=!1;if(e&&"keydown"==e.type){if(e&&e.key&&!e.ctrlKey&&!e.metaKey&&(" "==e.key&&e.preventDefault(),n=1==e.key.length),!n)return}else e&&"exec"!==e.type&&(n=!0);if(n){t.hoverTooltip||(t.hoverTooltip=new S);var r=o.createElement("div");r.textContent=j("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),r)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var n=this.textInput.getElement();e?(C.addListener(n,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(C.removeListener(n,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?k.attach(this):k.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},r=function(e){if(e.target==this.renderer.scroller&&e.keyCode===_.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(s.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",j("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",j("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",r.bind(this)),this.commands.addCommand(n),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",j("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",j("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new b(this)),t.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",r.bind(this)),this.commands.removeCommand(n),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var k={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=A}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){r.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,i){var o=this.cellCache.pop();if(!o){var a=r.createElement("div");i&&i(a),this.element.appendChild(a),o={element:a,text:"",row:e}}return o.row=e,o},e}();t.Lines=i}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,s=e("./lines").Lines,l=e("../config").nls,c=function(){function e(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new s(this.element),this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[],type:[],displayText:[]});var a=n.text,s=n.text,l=n.type;a=a?o.escapeHTML(a):n.html||"",s=s||(n.html||""),-1===i.text.indexOf(a)&&(i.text.push(a),i.type.push(l),i.displayText.push(s));var c=n.className;c?i.className=c:"error"===l?i.className=" ace_error":"security"!==l||/\bace_error\b/.test(i.className)?"warning"!==l||/\bace_(error|security)\b/.test(i.className)?"info"!==l||i.className?"hint"!==l||i.className||(i.className=" ace_hint"):i.className=" ace_info":i.className=" ace_warning":i.className=" ace_security"}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var r=new Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=r,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var i=t.getNextFoldLine(n),o=i?i.start.row:1/0,a=null,s=-1,l=n;;){if(l>o&&(l=i.end.row+1,o=(i=t.getNextFoldLine(l,i))?i.start.row:1/0),l>r){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}(a=this.$lines.get(++s))?a.row=l:(a=this.$lines.createCell(l,e,this.session,d),this.$lines.push(a)),this.$renderCell(a,e,i,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+r-1);var o=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(o+=a.left+a.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var r=t[n];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(r>n)for(i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>r&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var r=[],i=t,o=this.session.getNextFoldLine(i),a=o?o.start.row:1/0;i>a&&(i=o.end.row+1,a=(o=this.session.getNextFoldLine(i,o))?o.start.row:1/0),!(i>n);){var s=this.$lines.createCell(i,e,this.session,d);this.$renderCell(s,e,o,i),r.push(s),i++}return r},e.prototype.$renderCell=function(e,t,n,i){var o=e.element,a=this.session,s=o.childNodes[0],c=o.childNodes[1],d=o.childNodes[2],u=o.childNodes[3],p=d.firstChild,h=a.$firstLineNumber,m=a.$breakpoints,f=a.$decorations,g=a.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&a.foldWidgets,x=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",b=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",w=(g?g.getText(a,i):i+h).toString();if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&i>=x&&this.$cursorRow<=n.end.row)&&(b+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),m[i]&&(b+=m[i]),f[i]&&(b+=f[i]),this.$annotations[i]&&i!==x&&(b+=this.$annotations[i].className),v){var _=v[i];null==_&&(_=v[i]=a.getFoldWidget(i))}if(_){var C="ace_fold-widget ace_"+_,S="start"==_&&i==x&&i<n.end.row;if(S){C+=" ace_closed";for(var A="",k=!1,M=i+1;M<=n.end.row;M++)if(this.$annotations[M]){if(" ace_error"===this.$annotations[M].className){k=!0,A=" ace_error_fold";break}" ace_security"===this.$annotations[M].className?(k=!0,A=" ace_security_fold"):" ace_warning"===this.$annotations[M].className&&" ace_security_fold"!==A&&(k=!0,A=" ace_warning_fold")}b+=A}else C+=" ace_open";c.className!=C&&(c.className=C),r.setStyle(c.style,"height",y),r.setStyle(c.style,"display","inline-block"),c.setAttribute("role","button"),c.setAttribute("tabindex","-1");var O=a.getFoldWidgetRange(i);O?c.setAttribute("aria-label",l("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[O.start.row+1,O.end.row+1])):n?c.setAttribute("aria-label",l("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[i+1])),S?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("gutter.code-folding.closed.title","Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("gutter.code-folding.open.title","Fold code")))}else c&&(r.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));var T=this.session.$gutterCustomWidgets[i];if(T?this.$addCustomWidget(i,T,e):u&&this.$removeCustomWidget(i,e),k&&this.$showFoldedAnnotations){switch(d.className="ace_gutter_annotation",p.className=j,p.className+=A,r.setStyle(p.style,"height",y),r.setStyle(d.style,"display","block"),r.setStyle(d.style,"height",y),A){case" ace_error_fold":E=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[w]);break;case" ace_security_fold":E=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[w]);break;case" ace_warning_fold":E=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[w])}d.setAttribute("aria-label",E),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else if(this.$annotations[i]){var E;switch(d.className="ace_gutter_annotation",p.className=j,this.$useSvgGutterIcons?p.className+=this.$annotations[i].className:o.classList.add(this.$annotations[i].className.replace(" ","")),r.setStyle(p.style,"height",y),r.setStyle(d.style,"display","block"),r.setStyle(d.style,"height",y),this.$annotations[i].className){case" ace_error":E=l("gutter.annotation.aria-label.error","Error, read annotations row $0",[w]);break;case" ace_security":E=l("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[w]);break;case" ace_warning":E=l("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[w]);break;case" ace_info":E=l("gutter.annotation.aria-label.info","Info, read annotations row $0",[w]);break;case" ace_hint":E=l("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[w])}d.setAttribute("aria-label",E),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else r.setStyle(d.style,"display","none"),d.removeAttribute("aria-label"),d.removeAttribute("role"),d.setAttribute("tabindex","0");return w!==s.data&&(s.data=w),o.className!=b&&(o.className=b),r.setStyle(e.element.style,"height",this.$lines.computeLineHeight(i,t,a)+"px"),r.setStyle(e.element.style,"top",this.$lines.computeLineTop(i,t,a)+"px"),e.text=w,"none"!==d.style.display||"none"!==c.style.display||T?e.element.setAttribute("aria-hidden",!1):e.element.setAttribute("aria-hidden",!0),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$hideFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&r.setStyle(i.style,"display","none")}},e.prototype.$showFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&this.session.foldWidgets&&this.session.foldWidgets[n.row]&&r.setStyle(i.style,"display","inline-block")}},e.prototype.$getGutterCell=function(e){var t=this.$lines.cells,n=this.session.documentToScreenRow(e,0);return t[e-this.config.firstRowScreen-(e-n)]},e.prototype.$addCustomWidget=function(e,t,n){var i=t.className,o=t.label,a=t.title,s=t.callbacks;this.session.$gutterCustomWidgets[e]={className:i,label:o,title:a,callbacks:s},this.$hideFoldWidget(e,n);var l=n||this.$getGutterCell(e);if(l&&l.element){var c=l.element.querySelector(".ace_custom-widget");c&&c.remove(),(c=r.createElement("span")).className="ace_custom-widget ".concat(i),c.setAttribute("tabindex","-1"),c.setAttribute("role","button"),c.setAttribute("aria-label",o),c.setAttribute("title",a),r.setStyle(c.style,"display","inline-block"),r.setStyle(c.style,"height","inherit"),s&&s.onClick&&c.addEventListener("click",function(t){s.onClick(t,e),t.stopPropagation()}),l.element.appendChild(c)}},e.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var n=t||this.$getGutterCell(e);if(n&&n.element){var r=n.element.querySelector(".ace_custom-widget");r&&n.element.removeChild(r)}},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0},e}();function d(e){var t=document.createTextNode("");e.appendChild(t);var n=r.createElement("span");e.appendChild(n);var i=r.createElement("span");e.appendChild(i);var o=r.createElement("span");return i.appendChild(o),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,i.implement(c.prototype,a),t.Gutter=c}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/dom"),o=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var r=this.markers[n];if(r.range){var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var o=this.$getTop(i.start.row,e),a=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,a,o,e)}else"fullLine"==r.type?this.drawFullLineMarker(t,i,r.clazz,e):"screenLine"==r.type?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?"text"==r.type?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start ace_br15",e)}else r.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,i,o){for(var s=this.session,l=t.start.row,c=t.end.row,d=l,u=0,p=0,h=s.getScreenLastRowColumn(d),m=new r(d,t.start.column,d,p);d<=c;d++)m.start.row=m.end.row=d,m.start.column=d==l?t.start.column:s.getRowWrapIndent(d),m.end.column=h,u=p,p=h,h=d+1<c?s.getScreenLastRowColumn(d+1):d==c?0:t.end.column,this.drawSingleLineMarker(e,m,n+(d==l?" ace_start":"")+" ace_br"+a(d==l||d==l+1&&t.start.column,u<p,p>h,d==c),i,d==c?0:1,o)},e.prototype.drawMultiLineMarker=function(e,t,n,r,i){var o=this.$padding,a=r.lineHeight,s=this.$getTop(t.start.row,r),l=o+t.start.column*r.characterWidth;(i=i||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",r,null,i)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:"+o+"px;top:"+s+"px;left:"+l+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",r,null,i)}else{s=this.$getTop(t.end.row,r);var d=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+d+"px;top:"+s+"px;left:"+o+"px;"+(i||""))}if(!((a=(t.end.row-t.start.row-1)*r.lineHeight)<=0)){s=this.$getTop(t.start.row+1,r);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+a+"px;right:"+o+"px;top:"+s+"px;left:"+o+"px;"+(i||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,r,i,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,o);var a=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,l=this.$getTop(t.start.row,r),c=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+a+"px;width:"+s+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,r,i,o){var a=r.lineHeight,s=this.$getTop(t.start.row,r),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(n,"height:"+a+"px;width:"+(e.width+(i||0))+"px;top:"+s+"px;left:"+(l+e.left)+"px;"+(o||""))},this)},e.prototype.drawFullLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,r)-o),this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(i||""))},e.prototype.drawScreenLineMarker=function(e,t,n,r,i){var o=this.$getTop(t.start.row,r),a=r.lineHeight;this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(i||""))},e}();function a(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}o.prototype.$padding=0,t.Marker=o}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,t,n){var r=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return r.has(e)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,d=function(){function e(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++){if(this.showTabs)(r=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",r.textContent=o.stringRepeat(this.TAB_CHAR,n),t.push(r);else t.push(this.dom.createTextNode(o.stringRepeat(" ",n),this.element))}if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r,i="ace_indent-guide",a=this.showSpaces?" ace_invisible ace_invisible_space":"",s=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):s;(r=this.dom.createElement("span")).className=i+a,r.textContent=s,this.$tabStrings[" "]=r,(r=this.dom.createElement("span")).className=i+l,r.textContent=c,this.$tabStrings["\t"]=r}},e.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),o=this.element.childNodes,a=0,s=e.firstRow;s<r;s++){if(l=this.session.getFoldLine(s)){if(l.containsRow(r)){r=l.start.row;break}s=l.end.row}a++}for(var l,c=!1,d=(s=r,(l=this.session.getNextFoldLine(s))?l.start.row:1/0);s>d&&(s=l.end.row+1,d=(l=this.session.getNextFoldLine(s,l))?l.start.row:1/0),!(s>i);){var u=o[a++];if(u){this.dom.removeChildren(u),this.$renderLine(u,s,s==d&&l),c&&(u.style.top=this.$lines.computeLineTop(s,e,this.session)+"px");var p=e.lineHeight*this.session.getRowLength(s)+"px";u.style.height!=p&&(c=!0,u.style.height=p)}s++}if(c)for(;a<this.$lines.cells.length;){var h=this.$lines.cells[a++];h.element.style.top=this.$lines.computeLineTop(h.row,e,this.session)+"px"}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,r=t?t.lastRow:-1;if(!t||r<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var r=[],o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;o>s&&(o=a.end.row+1,s=(a=this.session.getNextFoldLine(o,a))?a.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),i.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),i.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==s&&a),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",r.push(l),o++}return r},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,r){for(var i,a=this,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,d=this.dom.createFragment(this.element),u=0;i=s.exec(r);){var p=i[1],h=i[2],m=i[3],f=i[4],g=i[5];if(a.showSpaces||!h){var v=u!=i.index?r.slice(u,i.index):"";if(u=i.index+i[0].length,v&&d.appendChild(this.dom.createTextNode(v,this.element)),p){var x=a.session.getScreenTabSize(t+i.index),y=a.$tabStrings[x].cloneNode(!0);y.charCount=1,d.appendChild(y),t+=x-1}else if(h){if(a.showSpaces)(j=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",j.textContent=o.stringRepeat(a.SPACE_CHAR,h.length),d.appendChild(j);else d.appendChild(this.dom.createTextNode(h,this.element))}else if(m){(j=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",j.textContent=o.stringRepeat(a.SPACE_CHAR,m.length),d.appendChild(j)}else if(f){t+=1,(j=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",j.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",j.textContent=a.showSpaces?a.SPACE_CHAR:f,d.appendChild(j)}else if(g){t+=1,(j=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",j.className="ace_cjk",j.textContent=g,d.appendChild(j)}}}if(d.appendChild(this.dom.createTextNode(u?r.slice(u):r,this.element)),c(n.type))e.appendChild(d);else{var b="ace_"+n.type.replace(/\./g," ace_"),j=this.dom.createElement("span");"fold"==n.type&&(j.style.width=n.value.length*this.config.characterWidth+"px",j.setAttribute("title",l("inline-fold.closed.title","Unfold code"))),j.className=b,j.appendChild(d),e.appendChild(j)}return t+r.length},e.prototype.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(" "==t[0]){for(var i=(r-=r%this.tabSize)/this.tabSize,o=0;o<i;o++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}if("\t"==t[0]){for(o=0;o<r;o++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}return this.$highlightIndentGuide(),t},e.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,r=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:r,start:t.row},this.session.$bracketHighlight)for(var i=this.session.$bracketHighlight.ranges,o=0;o<i.length;o++)if(t.row!==i[o].start.row){this.$highlightIndentGuideMarker.end=i[o].start.row+1,t.row>i[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(o=t.row+1;o<e.length;o++){var a=e[o],s=/^\s*/.exec(a)[0].length;if(""!==a&&(this.$highlightIndentGuideMarker.end=o,s<=n))break}}this.$renderHighlightIndentGuide()}}},e.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),t=0;t<e.length;t++)e[t].classList.remove("ace_indent-guide-active")},e.prototype.$setIndentGuideActive=function(e,t){if(""!==this.session.doc.getLine(e.row)){var n=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group")){if(!(e.element.childNodes.length>0))return;n=e.element.childNodes[0]}var r=n.childNodes;if(r){var i=r[t-1];i&&i.classList&&i.classList.contains("ace_indent-guide")&&i.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<e.length;n++){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row>=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}else for(n=e.length-1;n>=0;n--){r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row<this.$highlightIndentGuideMarker.start){if(r.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}}},e.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},e.prototype.$renderWrappedLine=function(e,t,n){var r=0,i=0,a=n[0],s=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var d=t[c],u=d.value;if(0==c&&this.displayIndentGuides){if(r=u.length,!(u=this.renderIndentGuide(l,u,a)))continue;r-=u.length}if(r+u.length<a)s=this.$renderToken(l,s,d,u),r+=u.length;else{for(;r+u.length>=a;){s=this.$renderToken(l,s,d,u.substring(0,a-r)),u=u.substring(a-r),r=a,l=this.$createLineElement(),e.appendChild(l);var p=this.dom.createTextNode(o.stringRepeat("\xa0",n.indent),this.element);p.charCount=0,l.appendChild(p),s=0,a=n[++i]||Number.MAX_VALUE}0!=u.length&&(r+=u.length,s=this.$renderToken(l,s,d,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,s,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,r=0;r<t.length;r++){var i=t[r],o=i.value;if(0!=r||!this.displayIndentGuides||(o=this.renderIndentGuide(e,o))){if(n+o.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,o);n=this.$renderToken(e,n,i,o)}}},e.prototype.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=i?"<hide>":"<click to see more...>",e.appendChild(o)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);var i=e;if(r.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,r,o);i=e.lastChild}else{i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(a)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,r=[];var i=n.getTokens(e);return t.walk(function(e,t,o,a,s){null!=e?r.push({type:"fold",value:e}):(s&&(i=n.getTokens(t)),i.length&&function(e,t,n){for(var i=0,o=0;o+e[i].value.length<t;)if(o+=e[i].value.length,++i==e.length)return;for(o!=t&&((a=e[i].value.substring(t-o)).length>n-t&&(a=a.substring(0,n-t)),r.push({type:e[i].type,value:a}),o=t+a.length,i+=1);o<n&&i<e.length;){var a;(a=e[i].value).length+o>n?r.push({type:e[i].type,value:a.substring(0,n-o)}):r.push(e[i]),o+=a.length,i+=1}}(i,a,o))},t.end.row,this.session.getLine(t.end.row).length),r},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();d.prototype.EOF_CHAR="\xb6",d.prototype.EOL_CHAR_LF="\xac",d.prototype.EOL_CHAR_CRLF="\xa4",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="\u2014",d.prototype.SPACE_CHAR="\xb7",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,r.implement(d.prototype,s),t.Text=d}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(){function e(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},e.prototype.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var o=t.length;n<o;n++){var a=this.getPixelPosition(t[n].cursor,!0);if(!((a.top>e.height+e.offset||a.top<0)&&n>1)){var s=this.cursors[i++]||this.addCursor(),l=s.style;this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(r.setStyle(l,"display","block"),r.translate(s,a.left,a.top),r.setStyle(l,"width",Math.round(e.characterWidth)+"px"),r.setStyle(l,"height",e.lineHeight+"px")):r.setStyle(l,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=a,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();i.prototype.$padding=0,i.prototype.drawCursor=null,t.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./lib/oop"),o=e("./lib/dom"),a=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,l=32768,c=function(){function e(e,t){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(c.prototype,s);var d=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,n.$scrollbarWidth=r.width=o.scrollbarWidth(t.ownerDocument),r.inner.style.width=r.element.style.width=(r.width||15)+5+"px",r.$minWidth=0,r}return r(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>l?(this.coeff=l/e,e=l):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var u=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.height=n.$scrollbarWidth,r.inner.style.height=r.element.style.height=(r.height||15)+5+"px",r}return r(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(c);t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=u,t.VScrollBar=d,t.HScrollBar=u}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./lib/oop"),o=e("./lib/dom"),a=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;o.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n  position: absolute;\n  background: rgba(128, 128, 128, 0.6);\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  border: 1px solid #bbb;\n  border-radius: 2px;\n  z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n  position: absolute;\n  z-index: 6;\n  background: none;\n  overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n  z-index: 6;\n  right: 0;\n  top: 0;\n  width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n  z-index: 8;\n  right: 0;\n  width: 100%;\n}\n.ace_editor>.ace_sb-h {\n  bottom: 0;\n  left: 0;\n  height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n  bottom: 0;\n  height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n  z-index: 8;\n  background: #000;\n}","ace_scrollbar.css",!1);var l=function(){function e(e,t){this.element=o.createElement("div"),this.element.className="ace_sb"+t,this.inner=o.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(l.prototype,s);var c=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,r.parent=t,r.width=r.VScrollWidth,r.renderer=n,r.inner.style.width=r.element.style.width=(r.width||15)+"px",r.$minWidth=0,r}return r(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,r=t.clientY,i=t.clientY,o=this.thumbTop;a.capture(this.inner,function(e){r=e.clientY},function(){clearInterval(s)});var s=setInterval(function(){if(void 0!==r){var e=n.scrollTopFromThumbTop(o+r-i);e!==n.scrollTop&&n._emit("scroll",{data:e})}},20);return a.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),a.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(l);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var d=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.scrollWidth=0,r.height=r.HScrollHeight,r.inner.style.height=r.element.style.height=(r.height||12)+"px",r.renderer=n,r}return r(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,r=t.clientX,i=t.clientX,o=this.thumbLeft;a.capture(this.inner,function(e){r=e.clientX},function(){clearInterval(s)});var s=setInterval(function(){if(void 0!==r){var e=n.scrollLeftFromThumbLeft(o+r-i);e!==n.scrollLeft&&n._emit("scroll",{data:e})}},20);return a.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),a.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(l);d.prototype.setInnerWidth=d.prototype.setScrollWidth,t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=d,t.VScrollBar=c,t.HScrollBar=d}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),i=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=i}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/event"),s=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,d="function"==typeof ResizeObserver,u=200,p=function(){function e(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver(function(t){e.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle(function t(){e.checkForSizeChanges(),a.onIdle(t,500)},500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},e.prototype.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function i(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var s=a(this.els[0]),l=a(this.els[1]),c=a(this.els[2]),d=a(this.els[3]),p=n(r(d,l),r(d,c),r(i(l,c),i(d,s))),h=o(1+p[0],r(l,s)),m=o(1+p[1],r(c,s));if(t){var f=t,g=p[0]*f[0]/u+p[1]*f[1]/u+1,v=i(o(f[0],h),o(f[1],m));return i(o(1/g/u,v),s)}var x=r(e,s),y=n(r(h,o(p[0],x)),r(m,o(p[1],x)),x);return o(u,y)},e}();p.prototype.$characterSize={width:0,height:0},r.implement(p.prototype,l),t.FontMetrics=p}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius    : 3px;}\n.ace_br2 {border-top-right-radius   : 3px;}\n.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}\n.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}\n.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\n.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\n.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\n.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n    position: relative;\n    overflow: hidden;\n    padding: 0;\n    font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n    direction: ltr;\n    text-align: left;\n    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n    forced-color-adjust: none;\n}\n\n.ace_scroller {\n    position: absolute;\n    overflow: hidden;\n    top: 0;\n    bottom: 0;\n    background-color: inherit;\n    -ms-user-select: none;\n    -moz-user-select: none;\n    -webkit-user-select: none;\n    user-select: none;\n    cursor: text;\n}\n\n.ace_content {\n    position: absolute;\n    box-sizing: border-box;\n    min-width: 100%;\n    contain: style size layout;\n    font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n    font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n    box-shadow: inset 0 0 0 2px #5E9ED6;\n    outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    content: \'\';\n    background: rgba(250, 250, 250, 0.01);\n    z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n    background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n    position: absolute;\n    overflow : hidden;\n    width: auto;\n    top: 0;\n    bottom: 0;\n    left: 0;\n    cursor: default;\n    z-index: 4;\n    -ms-user-select: none;\n    -moz-user-select: none;\n    -webkit-user-select: none;\n    user-select: none;\n    contain: style size layout;\n}\n\n.ace_gutter-active-line {\n    position: absolute;\n    left: 0;\n    right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n    content: "";\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n    pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    padding-left: 19px;\n    padding-right: 6px;\n    background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n    margin-left: -14px;\n    float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n    margin-left: -19px;\n    float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n    background-repeat: no-repeat;\n    background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n    background-repeat: no-repeat;\n    background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n    background-repeat: no-repeat;\n    background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n    background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n    background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n    background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n    background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n    background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n    background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n    -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n    background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n    background-color: darkorange;\n}\n\n.ace_scrollbar {\n    contain: strict;\n    position: absolute;\n    right: 0;\n    bottom: 0;\n    z-index: 6;\n}\n\n.ace_scrollbar-inner {\n    position: absolute;\n    cursor: text;\n    left: 0;\n    top: 0;\n}\n\n.ace_scrollbar-v{\n    overflow-x: hidden;\n    overflow-y: scroll;\n    top: 0;\n}\n\n.ace_scrollbar-h {\n    overflow-x: scroll;\n    overflow-y: hidden;\n    left: 0;\n}\n\n.ace_print-margin {\n    position: absolute;\n    height: 100%;\n}\n\n.ace_text-input {\n    position: absolute;\n    z-index: 0;\n    width: 0.5em;\n    height: 1em;\n    opacity: 0;\n    background: transparent;\n    -moz-appearance: none;\n    appearance: none;\n    border: none;\n    resize: none;\n    outline: none;\n    overflow: hidden;\n    font: inherit;\n    padding: 0 1px;\n    margin: 0 -1px;\n    contain: strict;\n    -ms-user-select: text;\n    -moz-user-select: text;\n    -webkit-user-select: text;\n    user-select: text;\n    /*with `pre-line` chrome inserts &nbsp; instead of space*/\n    white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n    background: transparent;\n    color: inherit;\n    z-index: 1000;\n    opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n    border-bottom: 1px solid;\n    position: absolute;\n    border-radius: 0;\n    margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n    transform: none!important;\n    filter: none!important;\n    clip-path: none!important;\n    mask : none!important;\n    contain: none!important;\n    perspective: none!important;\n    mix-blend-mode: initial!important;\n    z-index: auto;\n}\n\n.ace_layer {\n    z-index: 1;\n    position: absolute;\n    overflow: hidden;\n    /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n    word-wrap: normal;\n    white-space: pre;\n    height: 100%;\n    width: 100%;\n    box-sizing: border-box;\n    /* setting pointer-events: auto; on node under the mouse, which changes\n        during scroll, will break mouse wheel scrolling in Safari */\n    pointer-events: none;\n}\n\n.ace_gutter-layer {\n    position: relative;\n    width: auto;\n    text-align: right;\n    pointer-events: auto;\n    height: 1000000px;\n    contain: style size layout;\n}\n\n.ace_text-layer {\n    font: inherit !important;\n    position: absolute;\n    height: 1000000px;\n    width: 1000000px;\n    contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n    contain: style size layout;\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n    contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n    contain: strict;\n}\n\n.ace_cjk {\n    display: inline-block;\n    text-align: center;\n}\n\n.ace_cursor-layer {\n    z-index: 4;\n}\n\n.ace_cursor {\n    z-index: 4;\n    position: absolute;\n    box-sizing: border-box;\n    border-left: 2px solid;\n    /* workaround for smooth cursor repaintng whole screen in chrome */\n    transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n    border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n    border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n    border-left-width: 0;\n    border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n    opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n    opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n    transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n    animation-duration: 1000ms;\n    animation-timing-function: step-end;\n    animation-name: blink-ace-animate;\n    animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n    animation-duration: 1000ms;\n    animation-timing-function: ease-in-out;\n    animation-name: blink-ace-animate-smooth;\n}\n    \n@keyframes blink-ace-animate {\n    from, to { opacity: 1; }\n    60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n    from, to { opacity: 1; }\n    45% { opacity: 1; }\n    60% { opacity: 0; }\n    85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n    position: absolute;\n    z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n    position: absolute;\n    z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n    position: absolute;\n    z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n    position: absolute;\n    border-bottom: 1px solid #DE5555;\n    border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n    position: absolute;\n    z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n    position: absolute;\n    z-index: 4;\n    box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n    box-sizing: border-box;\n\n    display: inline-block;\n    height: 11px;\n    margin-top: -2px;\n    vertical-align: middle;\n\n    background-image:\n        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n    background-repeat: no-repeat, repeat-x;\n    background-position: center center, top left;\n    color: transparent;\n\n    border: 1px solid black;\n    border-radius: 2px;\n\n    cursor: pointer;\n    pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n    background-image:\n        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n    background-color: #f5f5f5;\n    border: 1px solid gray;\n    border-radius: 1px;\n    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n    color: black;\n    padding: 3px 4px;\n    position: absolute;\n    z-index: 999999;\n    box-sizing: border-box;\n    cursor: default;\n    white-space: pre-wrap;\n    word-wrap: break-word;\n    line-height: normal;\n    font-style: normal;\n    font-weight: normal;\n    letter-spacing: normal;\n    pointer-events: none;\n    overflow: auto;\n    max-width: min(33em, 66vw);\n    overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n    white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n    background-color: #636363;\n    color: #fff;\n}\n\n.ace_tooltip:focus {\n    outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n    display: inline-block;\n    width: 18px;\n    vertical-align: top;\n}\n\n.ace_icon_svg {\n    display: inline-block;\n    width: 12px;\n    vertical-align: top;\n    -webkit-mask-repeat: no-repeat;\n    -webkit-mask-size: 12px;\n    -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n    padding-right: 13px;\n}\n\n.ace_fold-widget, .ace_custom-widget {\n    box-sizing: border-box;\n\n    margin: 0 -12px 0 1px;\n    display: none;\n    width: 11px;\n    vertical-align: top;\n\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n    background-repeat: no-repeat;\n    background-position: center;\n\n    border-radius: 3px;\n    \n    border: 1px solid transparent;\n    cursor: pointer;\n    pointer-events: auto;\n}\n\n.ace_custom-widget {\n    background: none;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n    display: inline-block;   \n}\n\n.ace_fold-widget.ace_end {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n    border: 1px solid rgba(0, 0, 0, 0.3);\n    background-color: rgba(255, 255, 255, 0.2);\n    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n    border: 1px solid rgba(0, 0, 0, 0.4);\n    background-color: rgba(0, 0, 0, 0.05);\n    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n    background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n    border: 1px solid lightgray;\n    display: inline-block;\n    margin: -1px 8px;\n    padding: 0 5px;\n    pointer-events: auto;\n    cursor: pointer;\n}\n.ace_inline_button:hover {\n    border-color: gray;\n    background: rgba(200,200,200,0.2);\n    display: inline-block;\n    pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n    background-color: #FFB4B4;\n    border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n    transition: opacity 0.4s ease 0.05s;\n    opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n    transition: opacity 0.05s ease 0.05s;\n    opacity:1;\n}\n\n.ace_underline {\n    text-decoration: underline;\n}\n\n.ace_bold {\n    font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n    font-weight: normal;\n}\n\n.ace_italic {\n    font-style: italic;\n}\n\n\n.ace_error-marker {\n    background-color: rgba(255, 0, 0,0.2);\n    position: absolute;\n    z-index: 9;\n}\n\n.ace_highlight-marker {\n    background-color: rgba(255, 255, 0,0.2);\n    position: absolute;\n    z-index: 8;\n}\n\n.ace_mobile-menu {\n    position: absolute;\n    line-height: 1.5;\n    border-radius: 4px;\n    -ms-user-select: none;\n    -moz-user-select: none;\n    -webkit-user-select: none;\n    user-select: none;\n    background: white;\n    box-shadow: 1px 3px 2px grey;\n    border: 1px solid #dcdcdc;\n    color: black;\n}\n.ace_dark > .ace_mobile-menu {\n    background: #333;\n    color: #ccc;\n    box-shadow: 1px 3px 2px grey;\n    border: 1px solid #444;\n\n}\n.ace_mobile-button {\n    padding: 2px;\n    cursor: pointer;\n    overflow: hidden;\n}\n.ace_mobile-button:hover {\n    background-color: #eee;\n    opacity:1;\n}\n.ace_mobile-button:active {\n    background-color: #ddd;\n}\n\n.ace_placeholder {\n    position: relative;\n    font-family: arial;\n    transform: scale(0.9);\n    transform-origin: left;\n    white-space: pre;\n    opacity: 0.7;\n    margin: 0 10px;\n    z-index: 1;\n}\n\n.ace_ghost_text {\n    opacity: 0.5;\n    font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n    white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n    content: "\u21a9";\n    position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n    margin: 0px 4px\n}\n\n.ace_screenreader-only {\n    position:absolute;\n    left:-10000px;\n    top:auto;\n    width:1px;\n    height:1px;\n    overflow:hidden;\n}\n\n.ace_hidden_token {\n    display: none;\n}'}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,a=function(){function e(e,t){this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(e)}return e.prototype.$createCanvas=function(){this.canvas=r.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},e.prototype.setScrollBarV=function(e){this.$createCanvas(),this.scrollbarV=e,e.element.appendChild(this.canvas),this.setDimensions()},e.prototype.$updateDecorators=function(e){if("function"===typeof this.canvas.getContext){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;this.setDimensions(e);var n=this.canvas.getContext("2d"),r=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),r){var i={info:1,warning:2,error:3};r.forEach(function(e){e.priority=i[e.type]||null}),r=r.sort(function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0});for(var o=0;o<r.length;o++){var a=r[o].row,s=this.getVerticalOffsetForRow(a),l=s+this.lineHeight,c=Math.round(this.heightRatio*s),d=Math.round(this.heightRatio*l),u=Math.round((c+d)/2),p=d-u;p<this.halfMinDecorationHeight&&(p=this.halfMinDecorationHeight),u-p<0&&(u=p),u+p>this.canvasHeight&&(u=this.canvasHeight-p);var h=u-p,m=u+p-h;n.fillStyle=t[r[o].type]||null,n.fillRect(0,h,Math.round(this.oneZoneWidth-1),m)}}var f=this.renderer.session.selection.getCursor();if(f){var g=Math.round(this.getVerticalOffsetForRow(f.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,g,this.canvasWidth,2)}}},e.prototype.getVerticalOffsetForRow=function(e){return e|=0,this.renderer.session.documentToScreenRow(e,0)*this.lineHeight},e.prototype.setDimensions=function(e){e=e||this.renderer.layerConfig,this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},e.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},e.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},e}();i.implement(a.prototype,o),t.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/lang"),a=e("./config"),s=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,d=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,p=e("./scrollbar").VScrollBar,h=e("./scrollbar_custom").HScrollBar,m=e("./scrollbar_custom").VScrollBar,f=e("./renderloop").RenderLoop,g=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,x=e("./css/editor-css"),y=e("./layer/decorators").Decorator,b=e("./lib/useragent"),j=e("./layer/text_util").isTextToken;i.importCssString(x,"ace_editor.css",!1);var w=function(){function e(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==a.get("useStrictCSP")&&a.set("useStrictCSP",!1),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var r=this.$textLayer=new c(this.content);this.canvas=r.element,this.$markerFront=new l(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new g(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},e.prototype.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),!r&&this.$maxLines&&this.lineHeight>1&&(i.style.height&&"0px"!=i.style.height||(i.style.height="1px",r=i.clientHeight||i.scrollHeight)),n||(n=i.clientWidth||i.scrollWidth);var o=this.$updateCachedSize(e,t,n,r);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var o=0,a=this.$size,s={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(r&&(e||a.height!=r)&&(a.height=r,o|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(a.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){o|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",l),i.setStyle(this.scroller.style,"right",l),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(a.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return a.$dirty=!n||!r,o&&this._signal("resize",s),o},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,o=n.top,a=n.left;o-=r.offset;var s=t&&t.useTextareaForIME||b.isMobile?this.lineHeight:1;if(o<0||o>r.height-s)i.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-s;if(t)if(t.useTextareaForIME){var d=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(d)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-l&&(a=this.$size.scrollerWidth-l),a+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",s+"px"),i.setStyle(e,"width",l+"px"),i.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-l),Math.min(o,c))}}}else i.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,r){var i=this.margin;i.top=0|e,i.bottom=0|t,i.right=0|r,i.left=0|n,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",a=n.minHeight+"px";i.setStyle(this.content.style,"width",o),i.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),a=this.$horizScroll!==o;a&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),n=t.height<=2*this.lineHeight);var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=c;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,r-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+d.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+c<0||this.scrollTop>d.top),p=s!==u;p&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var h,m,f=this.scrollTop%this.lineHeight,g=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),x=v+g,y=this.lineHeight;v=e.screenToDocumentRow(v,0);var b=e.getFoldLine(v);b&&(v=b.start.row),h=e.documentToScreenRow(v,0),m=e.getRowLength(v)*y,x=Math.min(e.screenToDocumentRow(x,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(x)*y+m,(f=this.scrollTop-h*y)<0&&h>0&&(h=Math.max(0,h+Math.floor(f/y)),f=this.scrollTop-h*y);var j=0;return(this.layerConfig.width!=i||a)&&(j=this.CHANGE_H_SCROLL),(a||p)&&(j|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:v,firstRowScreen:h,lastRow:x,lineHeight:y,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:f,gutterOffset:y?Math.max(0,Math.ceil((f+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(i-this.$padding),j},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},e.prototype.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var r=this.$cursorLayer.getPixelPosition(e),i=r.left,o=r.top,a=n&&n.top||0,s=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+a>o?(t&&l+a>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-s<o+this.lineHeight&&(t&&l+this.$size.scrollerHeight-s<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight+s-this.$size.scrollerHeight));var c=this.scrollLeft,d=2*this.layerConfig.characterWidth;i-d<c?((i-=d)<this.$padding+d&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):(i+=d,c+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&i-c<this.characterWidth&&this.session.setScrollLeft(0))}},e.prototype.getScrollTop=function(){return this.session.getScrollTop()},e.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},e.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},e.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},e.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},e.prototype.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},e.prototype.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],o=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)i.push(o(n/this.STEPS,e,t-e));return i},e.prototype.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(i-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(i),!1!==n&&this.animateScrolling(o,r)},e.prototype.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var r=this;if(e!=n){if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length&&(e=i[0])==n)return}var o=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),r.session.setScrollTop(o.shift()),r.session.$scrollTop=n,this.$timer=setInterval(function(){if(!r.$stopAnimation)return r.session?void(o.length?(r.session.setScrollTop(o.shift()),r.session.$scrollTop=n):null!=n?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):a()):clearInterval(r.$timer);a()},10)}}function a(){r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,r.$stopAnimation=!1,t&&t()}},e.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},e.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},e.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},e.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},e.prototype.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(o):Math.round(o);return{row:a,column:s,side:o-s>0?1:-1,offsetX:i}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,o=i/this.characterWidth,a=this.$blockCursor?Math.floor(o):Math.round(o),s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(s,Math.max(a,0),i)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),o=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+o-this.scrollTop}},e.prototype.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,r=t||{row:n.row,column:n.column};this.removeGhostText();var o=this.$calculateWrappedTextChunks(e,r);this.addToken(o[0].text,"ghost_text",r.row,r.column),this.$ghostText={text:e,position:{row:r.row,column:r.column}};var a=i.createElement("div");if(o.length>1){var s,l=this.hideTokensAfterPosition(r.row,r.column);o.slice(1).forEach(function(e){var t=i.createElement("div"),n=i.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),n.appendChild(i.createTextNode(e.text)),t.appendChild(n),a.appendChild(t),s=t}),l.forEach(function(e){var t=i.createElement("span");j(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(i.createTextNode(e.value)),s.appendChild(t)}),this.$ghostTextWidget={el:a,row:r.row,column:r.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(r,!0),d=this.container.getBoundingClientRect().height,u=o.length*this.lineHeight;if(u<d-c.top)return;u<d?this.scrollBy(0,(o.length-1)*this.lineHeight):this.scrollToRow(r.row)}},e.prototype.$calculateWrappedTextChunks=function(e,t){var n=this.$size.scrollerWidth-2*this.$padding,r=Math.floor(n/this.characterWidth)-2;r=r<=0?60:r;for(var i=e.split(/\r?\n/),o=[],a=0;a<i.length;a++){var s=this.session.$getDisplayTokens(i[a],t.column),l=this.session.$computeWrapSplits(s,r,this.session.$tabSize);if(l.length>0){var c=0;l.push(i[a].length);for(var d=0;d<l.length;d++){var u=i[a].slice(c,l[d]);o.push({text:u,wrapped:!0}),c=l[d]}}else o.push({text:i[a],wrapped:!1})}return o},e.prototype.removeGhostText=function(){if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},e.prototype.addToken=function(e,t,n,r){var i=this.session;i.bgTokenizer.lines[n]=null;var o={type:t,value:e},a=i.getTokens(n);if(null!=r&&a.length)for(var s=0,l=0;l<a.length;l++){var c=a[l];if(r<=(s+=c.value.length)){var d=c.value.length-(s-r),u=c.value.slice(0,d),p=c.value.slice(d);a.splice(l,1,{type:c.type,value:u},o,{type:c.type,value:p});break}}else a.push(o);this.updateLines(n,n)},e.prototype.hideTokensAfterPosition=function(e,t){for(var n=this.session.getTokens(e),r=0,i=!1,o=[],a=0;a<n.length;a++){var s=n[a];r+=s.value.length,"ghost_text"!==s.type&&(i?(o.push({type:s.type,value:s.value}),s.type="hidden_token"):r===t&&(i=!0))}return this.updateLines(e,e),o},e.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},e.prototype.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)o(e);else{var r=e||this.$options.theme.initialValue;a.loadModule(["theme",r],o)}function o(r){if(n.$themeId!=e)return t&&t();if(!r||!r.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");r.$id&&(n.$themeId=r.$id),i.importCssString(r.cssText,r.cssClass,n.container),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var o="padding"in r?r.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,"ace_dark",r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t(),b.isSafari&&n.scroller&&(n.scroller.style.background="red",n.scroller.style.background="")}},e.prototype.getTheme=function(){return this.$themeId},e.prototype.setStyle=function(e,t){i.setCssClass(this.container,e,!1!==t)},e.prototype.unsetStyle=function(e){i.removeCssClass(this.container,e)},e.prototype.setCursorStyle=function(e){i.setStyle(this.scroller.style,"cursor",e)},e.prototype.setMouseCursor=function(e){i.setStyle(this.scroller.style,"cursor",e)},e.prototype.attachToShadowRoot=function(){i.importCssString(x,"ace_editor.css",this.container)},e.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},e.prototype.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),!0===e?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new y(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new p(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}))},e.prototype.$addResizeObserver=function(){if(window.ResizeObserver&&!this.$resizeObserver){var e=this;this.$resizeTimer=o.delayedCall(function(){e.destroyed||e.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(t){var n=t[0].contentRect.width,r=t[0].contentRect.height;Math.abs(e.$size.width-n)>1||Math.abs(e.$size.height-r)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},e}();w.prototype.CHANGE_CURSOR=1,w.prototype.CHANGE_MARKER=2,w.prototype.CHANGE_GUTTER=4,w.prototype.CHANGE_SCROLL=8,w.prototype.CHANGE_LINES=16,w.prototype.CHANGE_TEXT=32,w.prototype.CHANGE_SIZE=64,w.prototype.CHANGE_MARKER_BACK=128,w.prototype.CHANGE_MARKER_FRONT=256,w.prototype.CHANGE_FULL=512,w.prototype.CHANGE_H_SCROLL=1024,w.prototype.$changes=0,w.prototype.$padding=null,w.prototype.$frozen=!1,w.prototype.STEPS=8,r.implement(w.prototype,v),a.defineOptions(w.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),t.VirtualRenderer=w}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,a=e("../config");function s(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(r){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,o),this.$createWorkerFromOldConfig=function(t,n,r,i,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)i=i||a.moduleUrl(n,"worker");else{var l=this.$normalizePath;i=i||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach(function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(i),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:r}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype);t.UIWorkerClient=function(e,t,n){var r=null,i=!1,s=Object.create(o),c=[],d=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),r&&(i?setTimeout(u):u())}});d.setEmitSync=function(e){i=e};var u=function(){var e=c.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){d.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],function(e){for(r=new e[n](s);c.length;)u()}),d},t.WorkerClient=l,t.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),a=function(){function e(e,t,n,r,i,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},e.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(l=this.others[a]).row,column:l.column+o};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var l;s={row:(l=this.others[a]).row,column:l.column+o};this.doc.remove(new r(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},e}();o.implement(a.prototype,i),t.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,a=t.shiftKey,s=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(s&&i.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(s||n||l){if(0===c){var d,u=e.editor,p=u.selection,h=u.inMultiSelectMode,m=e.getDocumentPosition(),f=p.getCursor(),g=e.inSelection()||p.isEmpty()&&o(m,f),v=e.x,x=e.y,y=u.session,b=u.renderer.pixelToScreenCoordinates(v,x),j=b;if(u.$mouseHandler.$enableJumpToDef)s&&n||l&&n?d=a?"block":"add":n&&u.$blockSelectEnabled&&(d="block");else if(l&&!n){if(d="add",!h&&a)return}else n&&u.$blockSelectEnabled&&(d="block");if(d&&i.isMac&&t.ctrlKey&&u.$mouseHandler.cancelContextMenu(),"add"==d){if(!h&&g)return;if(!h){var w=p.toOrientedRange();u.addSelectionMarker(w)}var _=p.rangeList.rangeAtPoint(m);u.inVirtualSelectionMode=!0,a&&(_=null,w=p.ranges[0]||w,u.removeSelectionMarker(w)),u.once("mouseup",function(){var e=p.toOrientedRange();_&&e.isEmpty()&&o(_.cursor,e.cursor)?p.substractPoint(e.cursor):(a?p.substractPoint(w.cursor):w&&(u.removeSelectionMarker(w),p.addRange(w)),p.addRange(e)),u.inVirtualSelectionMode=!1})}else if("block"==d){var C;e.stop(),u.inVirtualSelectionMode=!0;var S=[],A=function(){var e=u.renderer.pixelToScreenCoordinates(v,x),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);o(j,e)&&o(t,p.lead)||(j=e,u.selection.moveToPosition(t),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(S),S=p.rectangularRangeBlock(j,b),u.$mouseHandler.$clickSelection&&1==S.length&&S[0].isEmpty()&&(S[0]=u.$mouseHandler.$clickSelection.clone()),S.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers())};h&&!l?p.toSingleRange():!h&&l&&(C=p.toOrientedRange(),u.addSelectionMarker(C)),a?b=y.documentToScreenPosition(p.lead):p.moveToPosition(m),j={row:-1,column:-1};var k=A;r.capture(u.container,function(e){v=e.clientX,x=e.clientY},function(e){A(),clearInterval(M),u.removeSelectionMarkers(S),S.length||(S=[p.toOrientedRange()]),C&&(u.removeSelectionMarker(C),p.toSingleRange(C));for(var t=0;t<S.length;t++)p.addRange(S[t]);u.inVirtualSelectionMode=!1,u.$mouseHandler.$clickSelection=null});var M=setInterval(function(){k()},20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){var r=e("./range_list").RangeList,i=e("./range").Range,o=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var d=new(0,e("./search").Search);var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new r,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var r=e[n],o=r.start.row,a=r.end.row;if(o===a)t.push(r.clone());else{for(t.push(new i(o,r.start.column,o,this.session.getLine(o).length));++o<a;)t.push(this.getLineRange(o,!0));t.push(new i(a,0,a,r.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}this.toSingleRange();for(n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],o=e.column<t.column;if(o)var a=e.column,s=t.column,l=e.offsetX,c=t.offsetX;else a=t.column,s=e.column,l=t.offsetX,c=e.offsetX;var d,u=e.row<t.row;if(u)var p=e.row,m=t.row;else p=t.row,m=e.row;a<0&&(a=0),p<0&&(p=0),p==m&&(n=!0);for(var f=p;f<=m;f++){var g=i.fromPoints(this.session.screenToDocumentPosition(f,a,l),this.session.screenToDocumentPosition(f,s,c));if(g.isEmpty()){if(d&&h(g.end,d))break;d=g.end}g.cursor=o?g.start:g.end,r.push(g)}if(u&&r.reverse(),!n){for(var v=r.length-1;r[v].isEmpty()&&v>0;)v--;if(v>0)for(var x=0;r[x].isEmpty();)x++;for(var y=v;y>=x;y--)r[y].isEmpty()&&r.splice(y,1)}return r}}.call(o.prototype);var p=e("./editor").Editor;function h(e,t){return e.row==t.row&&e.column==t.column}function m(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(c.defaultCommands),function(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}s.addListener(t,"keydown",function(t){var i=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()},e),s.addListener(t,"keyup",r,e),s.addListener(t,"blur",r,e)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?r=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?r=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r,i=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,l=this.selection,c=l.rangeList,d=(i?l:c).ranges;if(!d.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var p=new o(s);this.inVirtualSelectionMode=!0;for(var h=d.length;h--;){if(a)for(;h>0&&d[h].start.row==d[h-1].end.row;)h--;p.fromOrientedRange(d[h]),p.index=h,this.selection=s.selection=p;var m=e.exec?e.exec(this,t||{}):e(this,t||{});r||void 0===m||(r=m),p.toOrientedRange(d[h])}p.detach(),this.selection=s.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),r}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();(e=n.join(i)).length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,void 0==t.needle){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;var o=this.multiSelect;n||o.toSingleRange(i[0]);for(var a=i.length;a--;)o.addRange(i[a],!0);return r&&o.rangeList.rangeAtPoint(r.start)&&o.addRange(r,!0),i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var a,s=this.session.screenToDocumentPosition(o.row+e,o.column);if(n.isEmpty())c=s;else var l=this.session.documentToScreenPosition(r?n.end:n.start),c=this.session.screenToDocumentPosition(l.row+e,l.column);r?(a=i.fromPoints(s,c)).cursor=a.start:(a=i.fromPoints(c,s)).cursor=a.end;if(a.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var d=n.cursor}else this.selection.addRange(n);this.selection.addRange(a),d&&this.selection.substractPoint(d)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,r=n.ranges,i=r.length;i--;){if((s=r[i]).isEmpty()){var o=t.getWordRange(s.start.row,s.start.column);s.start.row=o.start.row,s.start.column=o.start.column,s.end.row=o.end.row,s.end.column=o.end.column}}n.mergeOverlappingRanges();var a=[];for(i=r.length;i--;){var s=r[i];a.unshift(t.getTextRange(s))}e<0?a.unshift(a.pop()):a.push(a.shift());for(i=r.length;i--;){var l=(s=r[i]).clone();t.replace(s,a[i]),s.start.row=l.start.row,s.start.column=l.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var r=this.session,i=r.multiSelect.toOrientedRange();if(!i.isEmpty()||((i=r.getWordRange(i.start.row,i.start.column)).cursor=-1==e?i.start:i.end,this.multiSelect.addRange(i),!n)){var o=r.getTextRange(i),a=function(e,t,n){return d.$options.wrap=!0,d.$options.needle=t,d.$options.backwards=-1==n,d.find(e)}(r,o,e);a&&(a.cursor=-1==e?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(i.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,o=n.filter(function(e){if(e.cursor.row==r)return!0;r=e.cursor.row});if(n.length&&o.length!=n.length-1){o.forEach(function(e){t.substractPoint(e.cursor)});var a=0,s=1/0,c=n.map(function(t){var n=t.cursor,r=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>a&&(a=n.column),r<s&&(s=r),r});n.forEach(function(t,n){var r=t.cursor,o=a-r.column,d=c[n]-s;o>d?e.insert(r,l.stringRepeat(" ",o-d)):e.remove(new i(r.row,r.column,r.row,r.column-o+d)),t.start.column=t.end.column=a,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var d=this.selection.getRange(),u=d.start.row,p=d.end.row,h=u==p;if(h){var m,f=this.session.getLength();do{m=this.session.getLine(p)}while(/[=:]/.test(m)&&++p<f);do{m=this.session.getLine(u)}while(/[=:]/.test(m)&&--u>0);u<0&&(u=0),p>=f&&(p=f-1)}var g=this.session.removeFullLines(u,p);g=this.$reAlignText(g,h),this.session.insert({row:u,column:0},g.join("\n")+"\n"),h||(d.start.column=0,d.end.column=g[g.length-1].length),this.selection.setRange(d)}},this.$reAlignText=function(e,t){var n,r,i,o=!0,a=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,r=t[2].length,i=t[3].length,t):(n+r+i!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),r<t[2].length&&(r=t[2].length),i>t[3].length&&(i=t[3].length),t):[e]}).map(t?c:o?a?function(e){return e[2]?s(n+r-e[2].length)+e[2]+s(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?s(n)+e[2]+s(i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?s(n)+e[2]+s(r-e[2].length+i)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(p.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),a=o.search(i);if(-1!=a){for(var s=n||o.length,l=e.getLength(),c=t,d=t;++t<l;){var u=e.getLine(t).search(i);if(-1!=u){if(u<=a){var p=e.getTokenAt(t,0);if(!p||"string"!==p.type)break}d=t}}if(d>c){var h=e.getLine(d).length;return new r(c,s,d,h)}}},this.openingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i+1},s=e.$findClosingBracket(t,a,o);if(s){var l=e.foldWidgets[s.row];return null==l&&(l=e.getFoldWidget(s.row)),"start"==l&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,i,o){var a={row:n,column:i},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,r.fromPoints(s,a)}}).call(i.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../range").Range,o=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session,a=e.getCursorPosition(),s=a.row,l=n.widgetManager.getWidgetsAtRow(s).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():s-=t;var c,d=function(e,t,n){var r=e.getAnnotations().sort(i.comparePoints);if(r.length){var o=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=r+i>>1,a=n(t,e[o]);if(a>0)r=o+1;else{if(!(a<0))return o;i=o-1}}return-(r+1)}(r,{row:t,column:-1},i.comparePoints);o<0&&(o=-o-1),o>=r.length?o=n>0?0:r.length-1:0===o&&n<0&&(o=r.length-1);var a=r[o];if(a&&n){if(a.row===t){do{a=r[o+=n]}while(a&&a.row===t);if(!a)return r.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=r[o+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(d){var u=d[0];a.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,a.row=u.row,c=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;c={displayText:[o("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var p={row:a.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},h=p.el.appendChild(r.createElement("div")),m=p.el.appendChild(r.createElement("div"));m.className="error_widget_arrow "+c.className;var f=e.renderer.$cursorLayer.getPixelPosition(a).left;m.style.left=f+e.renderer.gutterWidth-5+"px",p.el.className="error_widget_wrapper",h.className="error_widget "+c.className,c.displayText.forEach(function(e,t){h.appendChild(r.createTextNode(e)),t<c.displayText.length-1&&h.appendChild(r.createElement("br"))}),h.appendChild(r.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return p.destroy(),{command:"null"}};p.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(p),e.off("changeSelection",p.destroy),e.off("changeSession",p.destroy),e.off("mouseup",p.destroy),e.off("change",p.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",p.destroy),e.on("changeSession",p.destroy),e.on("mouseup",p.destroy),e.on("change",p.destroy),e.session.widgetManager.addLineWidget(p),p.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:p.el.offsetHeight})},r.importCssString("\n    .error_widget_wrapper {\n        background: inherit;\n        color: inherit;\n        border:none\n    }\n    .error_widget {\n        border-top: solid 2px;\n        border-bottom: solid 2px;\n        margin: 5px 0;\n        padding: 10px 40px;\n        white-space: pre-wrap;\n    }\n    .error_widget.ace_error, .error_widget_arrow.ace_error{\n        border-color: #ff5a5a\n    }\n    .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n        border-color: #F1D817\n    }\n    .error_widget.ace_info, .error_widget_arrow.ace_info{\n        border-color: #5a5a5a\n    }\n    .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n        border-color: #5aaa5a\n    }\n    .error_widget_arrow {\n        position: absolute;\n        border: solid 5px;\n        border-top-color: transparent!important;\n        border-right-color: transparent!important;\n        border-left-color: transparent!important;\n        top: -5px;\n    }\n","error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,t,n){"use strict";e("./loader_build")(t);var r=e("./lib/dom"),i=e("./range").Range,o=e("./editor").Editor,a=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var s=e;a=s.value,e=r.createElement("pre"),s.parentNode.replaceChild(e,s)}else e&&(a=e.textContent,e.innerHTML="");var c=t.createEditSession(a),d=new o(new l(e),c,n),u={document:c,editor:d,onResize:d.resize.bind(d,null)};return s&&(u.textarea=s),d.on("destroy",function(){u.editor.container.env=null}),d.container.env=d.env=u,d},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new s),n},t.Range=i,t.Editor=o,t.EditSession=a,t.UndoManager=s,t.VirtualRenderer=l;var c=t.config.version;t.version=c}),ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var n=function(){return this}();for(var r in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=t),t)t.hasOwnProperty(r)&&(n.ace[r]=t[r]);n.ace.default=n.ace,e&&(e.exports=n.ace)})},56658:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext")},56776:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)([(0,o.jsx)("path",{d:"M19.5 3.5 18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2v14H3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V2zM19 19c0 .55-.45 1-1 1s-1-.45-1-1v-3H8V5h11z"},"0"),(0,o.jsx)("path",{d:"M9 7h6v2H9zm7 0h2v2h-2zm-7 3h6v2H9zm7 0h2v2h-2z"},"1")],"ReceiptLong")},56832:(e,t,n)=>{e=n.nmd(e);var r=n(37105),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s},56874:(e,t,n)=>{var r=n(12622);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},56893:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group")},57566:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd")},57676:(e,t,n)=>{var r=n(28189),i=n(36311),o=n(39115),a=n(41069);e.exports=function(e){return function(t){t=a(t);var n=i(t)?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return s[e]()+l}}},57828:e=>{e.exports=function(){return[]}},57887:(e,t,n)=>{var r=n(5791),i=n(47574),o=n(56832),a=o&&o.isMap,s=a?i(a):r;e.exports=s},58114:e=>{e.exports=function(e,t){return e.has(t)}},58122:(e,t,n)=>{var r=n(46686),i=n(36140),o=n(43516),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},58168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},58812:(e,t,n)=>{"use strict";n.d(t,{A:()=>d,k:()=>l});var r=n(67598),i=n(13815),o=n(17162),a=n(89751),s=n(37758);function l(){function e(e,t,n,i){const s={[e]:t,theme:n},l=i[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:d,transform:u,style:p}=l;if(null==t)return null;if("typography"===d&&"inherit"===t)return{[e]:t};const h=(0,o.Yn)(n,d)||{};if(p)return p(s);return(0,a.NI)(s,t,t=>{let n=(0,o.BO)(h,u,t);return t===n&&"string"===typeof t&&(n=(0,o.BO)(h,u,"".concat(e).concat("default"===t?"":(0,r.A)(t)),t)),!1===c?n:{[c]:n}})}return function t(n){var r;const{sx:o,theme:l={},nested:c}=n||{};if(!o)return null;const d=null!=(r=l.unstable_sxConfig)?r:s.A;function u(n){let r=n;if("function"===typeof n)r=n(l);else if("object"!==typeof n)return n;if(!r)return null;const o=(0,a.EU)(l.breakpoints),s=Object.keys(o);let u=o;return Object.keys(r).forEach(n=>{const o=(s=r[n],c=l,"function"===typeof s?s(c):s);var s,c;if(null!==o&&void 0!==o)if("object"===typeof o)if(d[n])u=(0,i.A)(u,e(n,o,l,d));else{const e=(0,a.NI)({theme:l},o,e=>({[n]:e}));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(r);return t.every(e=>i.size===Object.keys(e).length)}(e,o)?u=(0,i.A)(u,e):u[n]=t({sx:o,theme:l,nested:!0})}else u=(0,i.A)(u,e(n,o,l,d))}),!c&&l.modularCssLayers?{"@layer sx":(0,a.vf)(s,u)}:(0,a.vf)(s,u)}return Array.isArray(o)?o.map(u):u(o)}}const c=l();c.filterProps=["sx"];const d=c},59131:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-2 16-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9z"}),"VerifiedUser")},59364:(e,t,n)=>{var r=n(79742),i=n(9096),o=n(50061);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},59395:(e,t,n)=>{var r=n(4262),i=n(69621),o=n(28673);e.exports=function(e){return r(e,o,i)}},60014:e=>{e.exports=function(){return!1}},60225:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(44288),a=(0,o.getAceInstance)(),s=n(56603),l=n(54878),c=n(65173),d=n(65043),u=n(20067),p=n(92043),h=function(e){function t(t){var n=e.call(this,t)||this;return o.editorEvents.forEach(function(e){n[e]=n[e].bind(n)}),n.debounce=o.debounce,n}return r(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,i=t.mode,s=t.focus,c=t.theme,d=t.fontSize,u=t.value,h=t.defaultValue,m=t.cursorStart,f=t.showGutter,g=t.wrapEnabled,v=t.showPrintMargin,x=t.scrollMargin,y=void 0===x?[0,0,0,0]:x,b=t.keyboardHandler,j=t.onLoad,w=t.commands,_=t.annotations,C=t.markers,S=t.splits;this.editor=a.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(c)),r&&r(a);var A=Object.keys(this.props.editorProps),k=new l.Split(this.editor.container,"ace/theme/".concat(c),S);this.editor.env.split=k,this.splitEditor=k.getEditor(0),this.split=k,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var M=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),k.forEach(function(t,n){for(var r=0;r<A.length;r++)t[A[r]]=e.props.editorProps[A[r]];var s=p(h,n),l=p(u,n,"");t.session.setUndoManager(new a.UndoManager),t.setTheme("ace/theme/".concat(c)),t.renderer.setScrollMargin(y[0],y[1],y[2],y[3]),t.getSession().setMode("ace/mode/".concat(i)),t.setFontSize(d),t.renderer.setShowGutter(f),t.getSession().setUseWrapMode(g),t.setShowPrintMargin(v),t.on("focus",e.onFocus),t.on("blur",e.onBlur),t.on("input",e.onInput),t.on("copy",e.onCopy),t.on("paste",e.onPaste),t.on("change",e.onChange),t.getSession().selection.on("changeSelection",e.onSelectionChange),t.getSession().selection.on("changeCursor",e.onCursorChange),t.session.on("changeScrollTop",e.onScroll),t.setValue(void 0===s?l:s,m);var x=p(_,n,[]),j=p(C,n,[]);t.getSession().setAnnotations(x),j&&j.length>0&&e.handleMarkers(j,t);for(r=0;r<o.editorOptions.length;r++){var S=o.editorOptions[r];M.hasOwnProperty(S)?t.setOption(S,e.props[S]):e.props[S]&&console.warn("ReaceAce: editor option ".concat(S," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}e.handleOptions(e.props,t),Array.isArray(w)&&w.forEach(function(e){"string"===typeof e.exec?t.commands.bindKey(e.bindKey,e.exec):t.commands.addCommand(e)}),b&&t.setKeyboardHandler("ace/keyboard/"+b)}),n&&(this.refEditor.className+=" "+n),s&&this.splitEditor.focus();var O=this.editor.env.split;O.setOrientation("below"===this.props.orientation?O.BELOW:O.BESIDE),O.resize(!0),j&&j(O)},t.prototype.componentDidUpdate=function(e){var t=this,n=e,r=this.props,i=this.editor.env.split;if(r.splits!==n.splits&&i.setSplits(r.splits),r.orientation!==n.orientation&&i.setOrientation("below"===r.orientation?i.BELOW:i.BESIDE),i.forEach(function(e,i){r.mode!==n.mode&&e.getSession().setMode("ace/mode/"+r.mode),r.keyboardHandler!==n.keyboardHandler&&(r.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+r.keyboardHandler):e.setKeyboardHandler(null)),r.fontSize!==n.fontSize&&e.setFontSize(r.fontSize),r.wrapEnabled!==n.wrapEnabled&&e.getSession().setUseWrapMode(r.wrapEnabled),r.showPrintMargin!==n.showPrintMargin&&e.setShowPrintMargin(r.showPrintMargin),r.showGutter!==n.showGutter&&e.renderer.setShowGutter(r.showGutter);for(var a=0;a<o.editorOptions.length;a++){var s=o.editorOptions[a];r[s]!==n[s]&&e.setOption(s,r[s])}u(r.setOptions,n.setOptions)||t.handleOptions(r,e);var l=p(r.value,i,"");if(e.getValue()!==l){t.silent=!0;var c=e.session.selection.toJSON();e.setValue(l,r.cursorStart),e.session.selection.fromJSON(c),t.silent=!1}var d=p(r.annotations,i,[]),h=p(n.annotations,i,[]);u(d,h)||e.getSession().setAnnotations(d);var m=p(r.markers,i,[]),f=p(n.markers,i,[]);!u(m,f)&&Array.isArray(m)&&t.handleMarkers(m,e)}),r.className!==n.className){var a=this.refEditor.className.trim().split(" ");n.className.trim().split(" ").forEach(function(e){var t=a.indexOf(e);a.splice(t,1)}),this.refEditor.className=" "+r.className+" "+a.join(" ")}r.theme!==n.theme&&i.setTheme("ace/theme/"+r.theme),r.focus&&!n.focus&&this.splitEditor.focus(),r.height===this.props.height&&r.width===this.props.width||this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getValue())}),this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getSelection())}),this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=[];this.editor.env.split.forEach(function(e){t.push(e.getSelection())}),this.props.onCursorChange(t,e)}},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e)},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e)},t.prototype.onCopy=function(e){this.props.onCopy&&this.props.onCopy(e)},t.prototype.onPaste=function(e){this.props.onPaste&&this.props.onPaste(e)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e,t){for(var n=Object.keys(e.setOptions),r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])},t.prototype.handleMarkers=function(e,t){var n=t.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);for(var r in n=t.getSession().getMarkers(!1))n.hasOwnProperty(r)&&t.getSession().removeMarker(n[r].id);e.forEach(function(e){var n=e.startRow,r=e.startCol,i=e.endRow,o=e.endCol,a=e.className,l=e.type,c=e.inFront,d=void 0!==c&&c,u=new s.Range(n,r,i,o);t.getSession().addMarker(u,a,l,d)})},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,o=e.style,a=i({width:n,height:r},o);return d.createElement("div",{ref:this.updateRef,id:t,style:a})},t.propTypes={className:c.string,debounceChangePeriod:c.number,defaultValue:c.arrayOf(c.string),focus:c.bool,fontSize:c.oneOfType([c.number,c.string]),height:c.string,mode:c.string,name:c.string,onBlur:c.func,onChange:c.func,onCopy:c.func,onFocus:c.func,onInput:c.func,onLoad:c.func,onPaste:c.func,onScroll:c.func,orientation:c.string,showGutter:c.bool,splits:c.number,theme:c.string,value:c.arrayOf(c.string),width:c.string,onSelectionChange:c.func,onCursorChange:c.func,onBeforeLoad:c.func,minLines:c.number,maxLines:c.number,readOnly:c.bool,highlightActiveLine:c.bool,tabSize:c.number,showPrintMargin:c.bool,cursorStart:c.number,editorProps:c.object,setOptions:c.object,style:c.object,scrollMargin:c.array,annotations:c.array,markers:c.array,keyboardHandler:c.string,wrapEnabled:c.bool,enableBasicAutocompletion:c.oneOfType([c.bool,c.array]),enableLiveAutocompletion:c.oneOfType([c.bool,c.array]),commands:c.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(d.Component);t.default=h},60320:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},60929:(e,t,n)=>{var r=n(93211),i=n(6571),o=n(69194),a=n(46686);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},60991:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm1 14h-2v-2h2zm0-4h-2V7h2z"}),"GppMaybe")},61141:(e,t,n)=>{var r=n(10143),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},61143:(e,t,n)=>{var r=n(13028)(Object.keys,Object);e.exports=r},61340:(e,t,n)=>{var r=n(93211);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},61460:(e,t,n)=>{var r=n(50149),i=n(8820),o=n(55647),a=n(50046),s=o(function(e){var t=r(e,a);return t.length&&t[0]===e[0]?i(t):[]});e.exports=s},61475:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(47123);const i=e=>(0,r.A)(e)&&"classes"!==e},61516:(e,t,n)=>{var r=n(22929);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},61540:e=>{var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+o+"]",s="\\d+",l="["+n+"]",c="["+r+"]",d="[^"+t+o+s+n+r+i+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",h="["+i+"]",m="(?:"+c+"|"+d+")",f="(?:"+h+"|"+d+")",g="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",v="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",x="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",y="[\\ufe0e\\ufe0f]?",b=y+x+("(?:\\u200d(?:"+["[^"+t+"]",u,p].join("|")+")"+y+x+")*"),j="(?:"+[l,u,p].join("|")+")"+b,w=RegExp([h+"?"+c+"+"+g+"(?="+[a,h,"$"].join("|")+")",f+"+"+v+"(?="+[a,h+m,"$"].join("|")+")",h+"?"+m+"+"+g,h+"+"+v,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",s,j].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},61552:(e,t)=>{"use strict";var n=60103,r=60106,i=60107,o=60108,a=60114,s=60109,l=60110,c=60112,d=60113,u=60120,p=60115,h=60116,m=60121,f=60122,g=60117,v=60129,x=60131;if("function"===typeof Symbol&&Symbol.for){var y=Symbol.for;n=y("react.element"),r=y("react.portal"),i=y("react.fragment"),o=y("react.strict_mode"),a=y("react.profiler"),s=y("react.provider"),l=y("react.context"),c=y("react.forward_ref"),d=y("react.suspense"),u=y("react.suspense_list"),p=y("react.memo"),h=y("react.lazy"),m=y("react.block"),f=y("react.server.block"),g=y("react.fundamental"),v=y("react.debug_trace_mode"),x=y("react.legacy_hidden")}function b(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case d:case u:return e;default:switch(e=e&&e.$$typeof){case l:case c:case h:case p:case s:return e;default:return t}}case r:return t}}}t.isContextConsumer=function(e){return b(e)===l}},61714:(e,t,n)=>{var r=n(61340);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},62117:(e,t,n)=>{var r=n(36741),i=n(99057);e.exports=function(e,t){return null!=e&&i(e,t,r)}},62597:(e,t,n)=>{var r=n(54052),i=n(19841),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},63101:(e,t,n)=>{"use strict";var r=n(86267),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},63102:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning")},63462:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(65043),i=n(26564);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo(()=>t.every(e=>null==e)?null:e=>{t.forEach(t=>{(0,i.A)(t,e)})},t)}},63538:(e,t,n)=>{var r=n(80755),i=n(33411);e.exports=function(e,t){return r(i(e,t),1)}},63709:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3m-3 11H8v-5h8zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-1-9H6v4h12z"}),"Print")},63932:(e,t,n)=>{var r=n(10396),i=n(52866),o=n(62597),a=n(70914);e.exports=function(e){return o(e)?r(a(e)):i(e)}},63940:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(31668);function i(e){return(0,r.A)(e).defaultView||window}},64395:(e,t,n)=>{"use strict";var r=n(86267),i=n(3024),o=n(87767),a=n(52989),s=n(47482);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t},function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},64416:(e,t,n)=>{var r=n(18902),i=n(75866),o=n(41558),a=n(58114),s=n(68182),l=n(52074);e.exports=function(e,t,n){var c=-1,d=i,u=e.length,p=!0,h=[],m=h;if(n)p=!1,d=o;else if(u>=200){var f=t?null:s(e);if(f)return l(f);p=!1,d=a,m=new r}else m=t?[]:h;e:for(;++c<u;){var g=e[c],v=t?t(g):g;if(g=n||0!==g?g:0,p&&v===v){for(var x=m.length;x--;)if(m[x]===v)continue e;t&&m.push(v),h.push(g)}else d(m,v,n)||(m!==h&&m.push(v),h.push(g))}return h}},64467:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(20816);function i(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},64816:(e,t,n)=>{var r=n(47251),i=n(37159),o=n(80438),a=n(69394),s=n(56874);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},65043:(e,t,n)=>{"use strict";e.exports=n(14202)},65173:(e,t,n)=>{e.exports=n(41497)()},65387:(e,t,n)=>{var r=n(87937)(n(56552),"Promise");e.exports=r},65893:(e,t,n)=>{var r=n(16599);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,l=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=l?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}},66360:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search")},66366:e=>{"use strict";var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,i="undefined"!==typeof Element;function o(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){var s,l,c,d=t(e),u=t(a);if(d&&u){if((l=e.length)!=a.length)return!1;for(s=l;0!==s--;)if(!o(e[s],a[s]))return!1;return!0}if(d!=u)return!1;var p=e instanceof Date,h=a instanceof Date;if(p!=h)return!1;if(p&&h)return e.getTime()==a.getTime();var m=e instanceof RegExp,f=a instanceof RegExp;if(m!=f)return!1;if(m&&f)return e.toString()==a.toString();var g=n(e);if((l=g.length)!==n(a).length)return!1;for(s=l;0!==s--;)if(!r.call(a,g[s]))return!1;if(i&&e instanceof Element&&a instanceof Element)return e===a;for(s=l;0!==s--;)if(("_owner"!==(c=g[s])||!e.$$typeof)&&!o(e[c],a[c]))return!1;return!0}return e!==e&&a!==a}e.exports=function(e,t){try{return o(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},66598:(e,t,n)=>{"use strict";n.d(t,{J:()=>g});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(30918),o=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},d=(0,i.A)(function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()}),u=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,function(e,t,n){return m={name:t,styles:n,next:m},t})}return 1===r[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},p="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function h(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return m={name:i.name,styles:i.styles,next:m},i.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)m={name:s.name,styles:s.styles,next:m},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=h(e,t,n[i])+";";else for(var a in n){var s=n[a];if("object"!==typeof s){var l=s;null!=t&&void 0!==t[l]?r+=a+"{"+t[l]+"}":c(l)&&(r+=d(a)+":"+u(a,l)+";")}else{if("NO_COMPONENT_SELECTOR"===a&&o)throw new Error(p);if(!Array.isArray(s)||"string"!==typeof s[0]||null!=t&&void 0!==t[s[0]]){var m=h(e,t,s);switch(a){case"animation":case"animationName":r+=d(a)+":"+m+";";break;default:r+=a+"{"+m+"}"}}else for(var f=0;f<s.length;f++)c(s[f])&&(r+=d(a)+":"+u(a,s[f])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var l=m,f=n(e);return m=l,h(e,t,f)}}var g=n;if(null==t)return g;var v=t[g];return void 0!==v?v:g}var m,f=/label:\s*([^\s;{]+)\s*(;|$)/g;function g(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";m=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=h(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=h(n,t,e[a]),r)i+=o[a]}f.lastIndex=0;for(var s,l="";null!==(s=f.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:m}}},66723:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},r=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},i={p:r,P:function(e,t){var i,o=e.match(/(P+)(p+)?/)||[],a=o[1],s=o[2];if(!s)return n(e,t);switch(a){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",n(a,t)).replace("{{time}}",r(s,t))}};t.default=i,e.exports=t.default},66734:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(58168),i=n(65043),o=n(8122),a=n(70579);function s(e,t){function n(n,i){return(0,a.jsx)(o.A,(0,r.A)({"data-testid":"".concat(t,"Icon"),ref:i},n,{children:e}))}return n.muiName=o.A.muiName,i.memo(i.forwardRef(n))}},67266:(e,t,n)=>{"use strict";var r=n(24994);t.X4=h,t.e$=m,t.tL=g,t.eM=function(e,t){const n=p(e),r=p(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.a=f;var i=r(n(10457)),o=r(n(6531));function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,o.default)(e,t,n)}function s(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(s(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,i.default)(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,i.default)(10,r))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:r}}const c=e=>{const t=l(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?"".concat(e,"%"):e).join(" ")};function d(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function u(e){e=l(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),d({type:s,values:c})}function p(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(u(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function h(e,t){return e=l(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,d(e)}function m(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return d(e)}function f(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return d(e)}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return p(e)>.5?m(e,t):f(e,t)}},67395:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 10h11v2H3zm0-4h11v2H3zm0 8h7v2H3zm17.59-2.07-4.25 4.24-2.12-2.12-1.41 1.41L16.34 19 22 13.34z"}),"PlaylistAddCheck")},67445:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2m-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9"}),"SettingsBackupRestore")},67500:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done")},67598:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(17868);function i(e){if("string"!==typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},68182:(e,t,n)=>{var r=n(72070),i=n(75713),o=n(52074),a=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=a},68592:(e,t,n)=>{var r=n(4262),i=n(56326),o=n(30474);e.exports=function(e){return r(e,o,i)}},68859:(e,t,n)=>{e=n.nmd(e),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},o.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(o,i),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=o}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*",s=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},n=this.createKeywordMapper(t,"identifier"),r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",o="(function)(\\s*)(\\*?)",s={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),c("no_regex"),s,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)"+o+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+o+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+o+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:n,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:o+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[c("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:r},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),e&&0==e.jsx||l.call(this)),this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};function l(){var e=a.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r="/"==e.charAt(1)?2:1;return 1==r?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==r&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==r?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"</?(?:"+e+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function c(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}r.inherits(s,o),t.JavaScriptHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var a=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,o=e("../../token_iterator").TokenIterator;function a(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var s=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var c=n.getCursorPosition(),d=r.doc.getLine(c.row).substring(c.column,c.column+1),u=new o(r,c.row,c.column),p=u.getCurrentToken();if(d==s&&(a(p,"attribute-value")||a(p,"string")))return{text:"",selection:[1,1]};if(p||(p=u.stepBackward()),!p)return;for(;a(p,"tag-whitespace")||a(p,"whitespace");)p=u.stepBackward();var h=!d||d.match(/\s/);if(a(p,"attribute-equals")&&(h||">"==d)||a(p,"decl-attribute-equals")&&(h||"?"==d))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)&&r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==o)return i.end.column++,i}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getSelectionRange().start,l=new o(r,s.row,s.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(a(c,"tag-name")||a(c,"tag-whitespace")||a(c,"attribute-name")||a(c,"attribute-equals")||a(c,"attribute-value")))return;if(a(c,"reference.attribute-value"))return;if(a(c,"attribute-value")){var d=l.getCurrentTokenColumn()+c.value.length;if(s.column<d)return;if(s.column==d){var u=l.stepForward();if(u&&a(u,"attribute-value"))return;l.stepBackward()}}if(/^\s*>/.test(r.getLine(s.row).slice(s.column)))return;for(;!a(c,"tag-name");)if("<"==(c=l.stepBackward()).value){c=l.stepForward();break}var p=l.getCurrentTokenRow(),h=l.getCurrentTokenColumn();if(a(l.stepBackward(),"end-tag-open"))return;var m=c.value;if(p==s.row&&(m=m.substring(0,s.column-h)),this.voidElements&&this.voidElements.hasOwnProperty(m.toLowerCase()))return;return{text:"></"+m+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if("\n"==i){var s=n.getCursorPosition(),l=r.getLine(s.row),c=new o(r,s.row,s.column),d=c.getCurrentToken();if(a(d,"")&&-1!==d.type.indexOf("tag-close")){if("/>"==d.value)return;for(;d&&-1===d.type.indexOf("tag-name");)d=c.stepBackward();if(!d)return;var u=d.value,p=c.getCurrentTokenRow();if(!(d=c.stepBackward())||-1!==d.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[u]||!this.voidElements){var h=r.getTokenAt(s.row,s.column+1),m=(l=r.getLine(p),this.$getIndent(l)),f=m+r.getTabString();return h&&"</"===h.value?{text:"\n"+f+"\n"+m,selection:[1,f.length,1,f.length]}:{text:"\n"+f}}}}})};r.inherits(s,i),t.XmlBehaviour=s}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../token_iterator").TokenIterator,o=e("../behaviour/cstyle").CstyleBehaviour,a=e("../behaviour/xml").XmlBehaviour,s=function(){var e=new a({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(e),this.inherit(o),this.add("autoclosing-fragment","insertion",function(e,t,n,r,o){if(">"==o){var a=n.getSelectionRange().start,s=new i(r,a.row,a.column),l=s.getCurrentToken()||s.stepBackward();if(!l)return;if("<"==l.value)return{text:"></>",selection:[1,1]}}})};r.inherits(s,o),t.JavaScriptBehaviour=s}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e,t){o.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(a,o);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function l(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?"markbeginend"===t?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())||this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/<!-/.test(e.getLine(t))?"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new s,i=0;i<n.length;i++){var o=n[i];if(l(o,"tag-open")){if(r.end.column=r.start.column+o.value.length,r.closing=l(o,"end-tag-open"),!(o=n[++i]))return null;if(r.tagName=o.value,""===o.value){if(!(o=n[++i]))return null;r.tagName=o.value}for(r.end.column+=o.value.length,i++;i<n.length;i++)if(o=n[i],r.end.column+=o.value.length,l(o,"tag-close")){r.selfClosing="/>"==o.value;break}return r}if(l(o,"tag-close"))return r.selfClosing="/>"==o.value,r;r.start.column+=o.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),o=0,a=0;a<i.length;a++){var s=i[a];if(!((o+=s.value.length)<r-1)&&l(s,"end-tag-open")&&(l(s=i[a+1],"tag-name")&&""===s.value&&(s=i[a+2]),s&&s.value==n))return!0}return!1},this.getFoldWidgetRange=function(e,t,n){if(!this._getFirstTagInLine(e,n))return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var r=e.getMatchingTags({row:n,column:0});return r?new i(r.openTag.end.row,r.openTag.end.column,r.closeTag.start.row,r.closeTag.start.column):void 0}}).call(a.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(i=o.match(this.foldingStartMarker)){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(i=o.match(this.foldingStopMarker))){a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length,s=t+=1,l=e.getLength();++t<l;){var c=(n=e.getLine(t)).search(/\S/);if(-1!==c){if(r>c)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=o)break;if(d.isMultiLine())t=d.end.row;else if(r==c)break}s=t}}return new i(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var c=s.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(n>a)return new i(a,r,n,t.length)}}.call(a.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,o=e("./cstyle").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(a,o),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r||this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i||this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/javascript").JavaScriptBehaviour,c=e("./folding/javascript").FoldMode,d=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(d,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens,a=i.state;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e||"no_regex"==e)t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/)&&(r+=n);else if("doc-start"==e&&("start"==a||"no_regex"==a))return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(d.prototype),t.Mode=d}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",l=t.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",u=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",h=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":o,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(h,i),t.CssHighlightRules=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"===typeof e[t]){var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){if(this.completionsDefined||this.defineCompletions(),"ruleset"===e||"ace/mode/scss"==t.$mode.$id){var i=t.getLine(n.row).substr(0,n.column),o=/\([^)]*$/.test(i);return o&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,o)}return[]},this.getPropertyCompletions=function(e,t,n,i,o){return o=o||!1,Object.keys(r).map(function(e){return{caption:e,snippet:e+": $0"+(o?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var o=t.getLine(n.row).substr(0,n.column),a=(/([\w\-]+):[^:]*$/.exec(o)||{})[1];if(!a)return[];var s=[];return a in r&&"object"===typeof r[a]&&(s=Object.keys(r[a])),s.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),o=e("../../token_iterator").TokenIterator,a=function(){this.inherit(i),this.add("colon","insertion",function(e,t,n,r,i){if(":"===i&&n.selection.isEmpty()){var a=n.getCursorPosition(),s=new o(r,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var c=r.doc.getLine(a.row);if(":"===c.substring(a.column,a.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(c.substring(a.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new o(r,s.row,s.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type)if(";"===r.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1))return i.end.column++,i}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(";"===i&&n.selection.isEmpty()){var o=n.getCursorPosition();if(";"===r.doc.getLine(o.row).substring(o.column,o.column+1))return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if("!"===i&&n.selection.isEmpty()){var o=n.getCursorPosition(),a=r.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(a.substring(o.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(a,i),t.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,d=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new d};r.inherits(u,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return i.length&&"comment"==i[i.length-1].type||t.match(/^.*\{\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(e){var t="[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:t},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+t+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"--\x3e",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+t+":)?"+t+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:t},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===o&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(</)("+n+"(?=\\s|>|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(o,i),t.XmlHighlightRules=o}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),o=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(o,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===c&&this.normalizeRules()};r.inherits(c,s),t.HtmlHighlightRules=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(o,i),function(){this.$getMode=function(e){for(var t in"string"!=typeof e&&(e=e[0]),this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));return r&&r.getFoldWidget(e,t,n)||(r=this.$getMode(e.getState(n))),r&&r.getFoldWidget(e,t,n)||(r=this.defaultMode),r.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,o=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){i.call(this,new o(e,t),{"js-":new a,"css-":new a})};r.inherits(s,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"].concat(["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"]),o={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(o);function s(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){for(var n=new r(e,t.row,t.column),i=n.getCurrentToken();i&&!s(i,"tag-name");)i=n.stepBackward();if(i)return i.value}var c=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(s(i,"tag-name")||s(i,"tag-open")||s(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(s(i,"tag-whitespace")||s(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(s(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var o=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(o)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var a=l(t,n);if(!a)return[];var s=i;return a in o&&(s=s.concat(Object.keys(o[a]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,i){var a=l(t,n),c=function(e,t){for(var n=new r(e,t.row,t.column),i=n.getCurrentToken();i&&!s(i,"attribute-name");)i=n.stepBackward();if(i)return i.value}(t,n);if(!a)return[];var d=[];return a in o&&c in o[a]&&"object"===typeof o[a][c]&&(d=Object.keys(o[a][c])),d.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){return["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"].map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(c.prototype),t.HtmlCompletions=c}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),o=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,d=e("./folding/html").FoldMode,u=e("./html_completions").HtmlCompletions,p=e("../worker/worker_client").WorkerClient,h=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],f=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new c,this.$completer=new u,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new d(this.voidElements,i.arrayToMap(m))};r.inherits(f,o),function(){this.blockComment={start:"\x3c!--",end:"--\x3e"},this.voidElements=i.arrayToMap(h),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor==f){var t=new p(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(f.prototype),t.Mode=f}),ace.require(["ace/mode/html"],function(t){e&&(e.exports=t)})},68864:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort")},69062:(e,t,n)=>{"use strict";e.exports=n(6378)},69120:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},69194:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},69292:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}n.d(t,{A:()=>i});const i=function(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},69369:(e,t,n)=>{"use strict";n.d(t,{C:()=>c,E:()=>g,T:()=>u,c:()=>m,h:()=>p,w:()=>d});var r=n(65043),i=n(93803),o=n(81722),a=n(66598),s=n(69436),l=r.createContext("undefined"!==typeof HTMLElement?(0,i.A)({key:"css"}):null),c=l.Provider,d=function(e){return(0,r.forwardRef)(function(t,n){var i=(0,r.useContext)(l);return e(t,i,n)})},u=r.createContext({});var p={}.hasOwnProperty,h="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",m=function(e,t){var n={};for(var r in t)p.call(t,r)&&(n[r]=t[r]);return n[h]=e,n},f=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,o.SF)(t,n,r),(0,s.s)(function(){return(0,o.sk)(t,n,r)}),null},g=d(function(e,t,n){var i=e.css;"string"===typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var s=e[h],l=[i],c="";"string"===typeof e.className?c=(0,o.Rk)(t.registered,l,e.className):null!=e.className&&(c=e.className+" ");var d=(0,a.J)(l,void 0,r.useContext(u));c+=t.key+"-"+d.name;var m={};for(var g in e)p.call(e,g)&&"css"!==g&&g!==h&&(m[g]=e[g]);return m.className=c,n&&(m.ref=n),r.createElement(r.Fragment,null,r.createElement(f,{cache:t,serialized:d,isStringTag:"string"===typeof s}),r.createElement(s,m))})},69394:(e,t,n)=>{var r=n(12622);e.exports=function(e){return r(this,e).has(e)}},69436:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>s,s:()=>a});var i=n(65043),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},69613:(e,t,n)=>{var r=n(9261);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},69621:(e,t,n)=>{var r=n(17529),i=n(57828),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return o.call(e,t)}))}:i;e.exports=s},69987:(e,t,n)=>{var r=n(9812),i=n(22929),o=n(93211),a=n(43668),s=n(54160),l=n(52074),c=r?r.prototype:void 0,d=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,u,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!u(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var m=1&r;if(h||(h=l),e.size!=t.size&&!m)return!1;var f=p.get(e);if(f)return f==t;r|=2,p.set(e,t);var g=a(h(e),h(t),r,c,u,p);return p.delete(e),g;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},69995:(e,t,n)=>{var r=n(9096),i=n(6571),o=n(28673);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var l=r(n,3);t=o(t),n=function(e){return l(s[e],e,s)}}var c=e(t,n,a);return c>-1?s[l?t[c]:c]:void 0}}},70245:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-1 6h2v2h-2zm0 4h2v6h-2z"}),"PrivacyTip")},70569:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 4h5v8l-2.5-1.5L6 12z"}),"Book")},70579:(e,t,n)=>{"use strict";e.exports=n(51153)},70705:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},70869:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(65043);var r=n(83290),i=n(70579);function o(e){const{styles:t,defaultTheme:n={}}=e,o="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,i.jsx)(r.mL,{styles:o})}},70914:(e,t,n)=>{var r=n(19841);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},71612:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined")},71723:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)([(0,o.jsx)("path",{d:"M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6z"},"0"),(0,o.jsx)("path",{d:"m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6z"},"1")],"KeyboardDoubleArrowRightOutlined")},71775:(e,t,n)=>{var r=n(5654);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},71989:(e,t,n)=>{"use strict";var r=n(86267),i=n(93229),o=n(47903),a=n(86735),s=n(17638),l=n(63101),c=n(20705),d=n(89335),u=n(82702),p=n(47482),h=n(93403);e.exports=function(e){return new Promise(function(t,n){var m,f=e.data,g=e.headers,v=e.responseType;function x(){e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m)}r.isFormData(f)&&r.isStandardBrowserEnv()&&delete g["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",j=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+j)}var w=s(e.baseURL,e.url);function _(){if(y){var r="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,o={data:v&&"text"!==v&&"json"!==v?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:e,request:y};i(function(e){t(e),x()},function(e){n(e),x()},o),y=null}}if(y.open(e.method.toUpperCase(),a(w,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=_:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(_)},y.onabort=function(){y&&(n(new u("Request aborted",u.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new u("Network Error",u.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new u(t,r.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,e,y)),y=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||c(w))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;C&&(g[e.xsrfHeaderName]=C)}"setRequestHeader"in y&&r.forEach(g,function(e,t){"undefined"===typeof f&&"content-type"===t.toLowerCase()?delete g[t]:y.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),v&&"json"!==v&&(y.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(m=function(e){y&&(n(!e||e&&e.type?new p:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m))),f||(f=null);var S=h(w);S&&-1===["http","https","file"].indexOf(S)?n(new u("Unsupported protocol "+S+":",u.ERR_BAD_REQUEST,e)):y.send(f)})}},72023:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{fillRule:"evenodd",d:"m9 17 3-2.94c-.39-.04-.68-.06-1-.06-2.67 0-8 1.34-8 4v2h9zm2-5c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m4.47 8.5L12 17l1.4-1.41 2.07 2.08 5.13-5.17 1.4 1.41z"}),"HowToReg")},72037:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},72070:(e,t,n)=>{var r=n(87937)(n(56552),"Set");e.exports=r},72154:(e,t,n)=>{var r=n(95575),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},72330:(e,t,n)=>{"use strict";var r=n(65043);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var d="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,d=r[1];return s(function(){i.value=n,i.getSnapshot=t,c(i)&&d({inst:i})},[e,n,t]),a(function(){return c(i)&&d({inst:i}),e(function(){c(i)&&d({inst:i})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:d},72372:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>o});var r=n(79386);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const o=i[t];return o?"".concat(n,"-").concat(o):"".concat(r.A.generate(e),"-").concat(t)}},72450:function(e,t,n){var r,i,o;i=[],void 0===(o="function"===typeof(r=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,n){var s=a.URL||a.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):i(l.href)?r(e,t,n):o(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){o(l)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),n);else if(i(e))r(e,n,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout(function(){o(s)})}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var o="application/octet-stream"===e.type,l=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||o&&l||s)&&"undefined"!=typeof FileReader){var d=new FileReader;d.onloadend=function(){var e=d.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},d.readAsDataURL(e)}else{var u=a.URL||a.webkitURL,p=u.createObjectURL(e);i?i.location=p:location.href=p,i=null,setTimeout(function(){u.revokeObjectURL(p)},4e4)}});a.saveAs=l.saveAs=l,e.exports=l})?r.apply(t,i):r)||(e.exports=o)},72762:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},72819:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},73055:e=>{e.exports=null},73204:(e,t,n)=>{var r=n(3343),i=n(22777),o=n(54052),a=n(44543),s=n(69194),l=n(51268),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),d=!n&&i(e),u=!n&&!d&&a(e),p=!n&&!d&&!u&&l(e),h=n||d||u||p,m=h?r(e.length,String):[],f=m.length;for(var g in e)!t&&!c.call(e,g)||h&&("length"==g||u&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,f))||m.push(g);return m}},73234:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>i.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>o.A});var r=n(58812),i=n(18698),o=n(37758)},74065:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},74175:function(e){var t;"undefined"!==typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(45),s=n(46),l=n(47),c=n(48),d=n(49),u=n(12),p=n(32),h=n(33),m=n(31),f=n(1),g={Scope:f.Scope,create:f.create,find:f.find,query:f.query,register:f.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:c.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:d.default,Attributor:{Attribute:u.default,Class:p.default,Style:h.default,Store:m.default}};t.default=g},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return r(t,e),t}(Error);t.ParchmentError=i;var o,a={},s={},l={},c={};function d(e,t){var n;if(void 0===t&&(t=o.ANY),"string"===typeof e)n=c[e]||a[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=c.text;else if("number"===typeof e)e&o.LEVEL&o.BLOCK?n=c.block:e&o.LEVEL&o.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=s[r[i]])break;n=n||l[e.tagName]}return null==n?null:t&o.LEVEL&n.scope&&t&o.TYPE&n.scope?n:null}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(o=t.Scope||(t.Scope={})),t.create=function(e,t){var n=d(e);if(null==n)throw new i("Unable to create "+e+" blot");var r=n,o=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t);return new r(o,t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=d,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map(function(t){return e(t)});var r=t[0];if("string"!==typeof r.blotName&&"string"!==typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");return c[r.blotName||r.attrName]=r,"string"===typeof r.keyName?a[r.keyName]=r:(null!=r.className&&(s[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(e){return e.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(e){null!=l[e]&&null!=r.className||(l[e]=r)}))),r}},function(e,t,n){var r=n(51),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"===typeof n){if("number"===typeof e.delete&&"number"===typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"===typeof n.delete&&null!=e.insert&&(t-=1,"object"!==typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"===typeof e.insert&&"string"===typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"===typeof e.retain&&"number"===typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e},0)},l.prototype.length=function(){return this.reduce(function(e,t){return e+a.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!==typeof t&&(t=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i<t&&r.hasNext();){var o;i<e?o=r.next(e-i):(o=r.next(t-i),n.push(o)),i+=a.length(o)}return new l(n)},l.prototype.compose=function(e){var t=a.iterator(this.ops),n=a.iterator(e.ops),r=[],o=n.peek();if(null!=o&&"number"===typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===t.peekType()&&t.peekLength()<=s;)s-=t.peekLength(),r.push(t.next());o.retain-s>0&&n.next(o.retain-s)}for(var c=new l(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())c.push(n.next());else if("delete"===t.peekType())c.push(t.next());else{var d=Math.min(t.peekLength(),n.peekLength()),u=t.next(d),p=n.next(d);if("number"===typeof p.retain){var h={};"number"===typeof u.retain?h.retain=d:h.insert=u.insert;var m=a.attributes.compose(u.attributes,p.attributes,"number"===typeof u.retain);if(m&&(h.attributes=m),c.push(h),!n.hasNext()&&i(c.ops[c.ops.length-1],h)){var f=new l(t.rest());return c.concat(f).chop()}}else"number"===typeof p.delete&&"number"===typeof u.retain&&c.push(p)}return c.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map(function(t){return t.map(function(n){if(null!=n.insert)return"string"===typeof n.insert?n.insert:s;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")}).join("")}),o=new l,c=r(n[0],n[1],t),d=a.iterator(this.ops),u=a.iterator(e.ops);return c.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(u.peekLength(),t),o.push(u.next(n));break;case r.DELETE:n=Math.min(t,d.peekLength()),d.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(d.peekLength(),u.peekLength(),t);var s=d.next(n),l=u.next(n);i(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l).delete(n)}t-=n}}),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),c="string"===typeof o.insert?o.insert.indexOf(t,s)-s:-1;if(c<0)r.push(n.next());else if(c>0)r.push(n.next(c));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"===typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),c=r.next(o);if(s.delete)continue;c.delete?i.push(c):i.retain(o,a.attributes.transform(s.attributes,c.attributes,t))}else i.retain(a.length(n.next()));return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r<e||!t)&&(e+=i),r+=i):e-=Math.min(i,e-r)}return e},e.exports=l},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return"undefined"===typeof t||n.call(e,t)},l=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,d,u=arguments[0],p=1,h=arguments.length,m=!1;for("boolean"===typeof u&&(m=u,u=arguments[1]||{},p=2),(null==u||"object"!==typeof u&&"function"!==typeof u)&&(u={});p<h;++p)if(null!=(t=arguments[p]))for(n in t)r=c(u,n),u!==(i=c(t,n))&&(m&&i&&(s(i)||(o=a(i)))?(o?(o=!1,d=r&&a(r)?r:[]):d=r&&s(r)?r:{},l(u,{name:n,newValue:e(m,d,i)})):"undefined"!==typeof i&&l(u,{name:n,newValue:i}));return u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=u(n(3)),a=u(n(2)),s=u(n(0)),l=u(n(16)),c=u(n(6)),d=u(n(7));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return p(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m(t,e),r(t,[{key:"attach",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new a.default).insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=s.default.query(e,s.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"===typeof n&&n.endsWith("\n")){var o=s.default.create(g.blotName);this.parent.insertBefore(o,0===e?this:this.next),o.insertAt(0,n.slice(0,-1))}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(s.default.Embed);f.scope=s.default.Scope.BLOCK_BLOT;var g=function(e){function t(e){p(this,t);var n=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return m(t,e),r(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(s.default.Leaf).reduce(function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))},new a.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,o){n<=0||(s.default.query(r,s.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,o):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,o),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var o=n.split("\n"),a=o.shift();a.length>0&&(e<this.length()-1||null==this.children.tail?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var s=this;o.reduce(function(e,t){return(s=s.split(e,!0)).insertAt(0,t),t.length},e+a.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof l.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},o}}]),t}(s.default.Block);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"===typeof e.formats&&(t=(0,o.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:v(e.parent,t))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[c.default,s.default.Embed,d.default],t.bubbleFormats=v,t.BlockEmbed=f,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(50);var a=g(n(2)),s=g(n(14)),l=g(n(8)),c=g(n(9)),d=g(n(0)),u=n(15),p=g(u),h=g(n(3)),m=g(n(10)),f=g(n(34));function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=(0,m.default)("quill"),y=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=b(t,r),this.container=this.options.container,null==this.container)return x.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=d.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new p.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e){e===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(l.default.events.SCROLL_UPDATE,function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;j.call(n,function(){return n.editor.update(null,t,i)},e)});var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),m.default.level(e)}},{key:"find",value:function(e){return e.__quill||d.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&x.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!==typeof e){var i=e.attrName||e.blotName;"string"===typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach(function(r){n.register(r,e[r],t)})}else null==this.imports[e]||r||x.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?d.default.register(t):e.startsWith("modules")&&"function"===typeof t.register&&t.register()}}]),o(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"===typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,o=w(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],j.call(this,function(){return r.editor.deleteText(e,t)},n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return j.call(this,function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(d.default.query(e,d.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,v({},e,t));else{if(0===r.length)return n.selection.format(e,t),i;i=n.editor.formatText(r.index,r.length,v({},e,t))}return n.setSelection(r,l.default.sources.SILENT),i},r)}},{key:"formatLine",value:function(e,t,n,r,o){var a,s=this,l=w(e,t,n,r,o),c=i(l,4);return e=c[0],t=c[1],a=c[2],o=c[3],j.call(this,function(){return s.editor.formatLine(e,t,a)},o,e,0)}},{key:"formatText",value:function(e,t,n,r,o){var a,s=this,l=w(e,t,n,r,o),c=i(l,4);return e=c[0],t=c[1],a=c[2],o=c[3],j.call(this,function(){return s.editor.formatText(e,t,a)},o,e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"===typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=w(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"===typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!==typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=w(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return j.call(this,function(){return i.editor.insertEmbed(t,n,r)},o,t)}},{key:"insertText",value:function(e,t,n,r,o){var a,s=this,l=w(e,0,n,r,o),c=i(l,4);return e=c[0],a=c[2],o=c[3],j.call(this,function(){return s.editor.insertText(e,t,a)},o,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,o=w(e,t,n),a=i(o,4);return e=a[0],t=a[1],n=a[3],j.call(this,function(){return r.editor.removeFormat(e,t)},n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return j.call(this,function(){e=new a.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"===typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)},n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var o=w(t,n,r),a=i(o,4);t=a[0],n=a[1],r=a[3],this.selection.setRange(new u.Range(t,n),r),r!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return j.call(this,function(){return e=new a.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();function b(e,t){if((t=(0,h.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==y.DEFAULTS.theme){if(t.theme=y.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=f.default;var n=(0,h.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){!0===e.modules[t]&&(e.modules[t]={})})});var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce(function(e,t){var n=y.import("modules/"+t);return null==n?x.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e},{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,h.default)(!0,{},y.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach(function(e){"string"===typeof t[e]&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e},{}),t}function j(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===l.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=_(i,s,t):0!==r&&(i=_(i,n,r,t)),this.setSelection(i,l.default.sources.SILENT)),s.length()>0){var c,d,u=[l.default.events.TEXT_CHANGE,s,o,t];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(u)),t!==l.default.sources.SILENT&&(d=this.emitter).emit.apply(d,u)}return s}function w(e,t,n,i,o){var a={};return"number"===typeof e.index&&"number"===typeof e.length?"number"!==typeof t?(o=i,i=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!==typeof t&&(o=i,i=n,n=t,t=0),"object"===("undefined"===typeof n?"undefined":r(n))?(a=n,o=i):"string"===typeof n&&(null!=i?a[n]=i:o=n),[e,t,a,o=o||l.default.sources.API]}function _(e,t,n,r){if(null==e)return null;var o=void 0,s=void 0;if(t instanceof a.default){var c=[e.index,e.index+e.length].map(function(e){return t.transformPosition(e,r!==l.default.sources.USER)}),d=i(c,2);o=d[0],s=d[1]}else{var p=[e.index,e.index+e.length].map(function(e){return e<t||e===t&&r===l.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)}),h=i(p,2);o=h[0],s=h[1]}return new u.Range(o,s-o)}y.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},y.events=l.default.events,y.sources=l.default.sources,y.version="1.3.7",y.imports={delta:a.default,parchment:d.default,"core/module":c.default,"core/theme":f.default},t.expandConfig=b,t.overload=w,t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=s(n(7)),a=s(n(0));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"formatAt",value:function(e,n,r,o){if(t.compare(this.statics.blotName,r)<0&&a.default.query(r,a.default.Scope.BLOT)){var s=this.isolate(e,n);o&&s.wrap(r,o)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,o)}},{key:"optimize",value:function(e){if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}}]),t}(a.default.Inline);l.allowedChildren=[l,a.default.Embed,o.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default.Text);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=a(n(54));function a(e){return e&&e.__esModule?e:{default:e}}var s=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(e){document.addEventListener(e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)})})});var l=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",s.error),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"emit",value:function(){s.log.apply(s,arguments),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.listeners[e.type]||[]).forEach(function(t){var r=t.node,i=t.handler;(e.target===r||r.contains(e.target))&&i.apply(void 0,[e].concat(n))})}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(o.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(e){if(r.indexOf(e)<=r.indexOf(i)){for(var t,n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(t=console)[e].apply(t,o)}}function a(e){return r.reduce(function(t,n){return t[n]=o.bind(console,n,e),t},{})}o.level=a.level=function(e){i=e},t.default=a},function(e,t,n){var r=Array.prototype.slice,i=n(52),o=n(53),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var c,d;if(s(e)||s(t))return!1;if(e.prototype!==t.prototype)return!1;if(o(e))return!!o(t)&&(e=r.call(e),t=r.call(t),a(e,t,n));if(l(e)){if(!l(t))return!1;if(e.length!==t.length)return!1;for(c=0;c<e.length;c++)if(e[c]!==t[c])return!1;return!0}try{var u=i(e),p=i(t)}catch(h){return!1}if(u.length!=p.length)return!1;for(u.sort(),p.sort(),c=u.length-1;c>=0;c--)if(u[c]!=p[c])return!1;for(c=u.length-1;c>=0;c--)if(d=u[c],!a(e[d],t[d],n))return!1;return typeof e===typeof t}(e,t,n))};function s(e){return null===e||void 0===e}function l(e){return!(!e||"object"!==typeof e||"number"!==typeof e.length)&&"function"===typeof e.copy&&"function"===typeof e.slice&&!(e.length>0&&"number"!==typeof e[0])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"===typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=u(n(2)),s=u(n(0)),l=u(n(4)),c=u(n(6)),d=u(n(7));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return p(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m(t,e),t}(c.default);f.blotName="code",f.tagName="CODE";var g=function(e){function t(){return p(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return m(t,e),i(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(function(t,n){return t.insert(n).insert("\n",e.formats())},new a.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var i=this.descendant(d.default,this.length()-1),a=r(i,1)[0];null!=a&&a.deleteAt(a.length()-1,1),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,r,i){if(0!==n&&null!=s.default.query(r,s.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(e);if(!(o<0||o>=e+n)){var a=this.newlineIndex(e,!0)+1,l=o-a+1,c=this.isolate(a,l),d=c.next;c.format(r,i),d instanceof t&&d.formatAt(0,e-a+n-l,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var i=this.descendant(d.default,e),o=r(i,2),a=o[0],s=o[1];a.insertAt(s,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var t=s.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof s.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB="  ",t.Code=f,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=v(n(2)),s=v(n(20)),l=v(n(0)),c=v(n(13)),d=v(n(24)),u=n(4),p=v(u),h=v(n(16)),m=v(n(21)),f=v(n(11)),g=v(n(3));function v(e){return e&&e.__esModule?e:{default:e}}var x=/^[ -~]*$/,y=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scroll=t,this.delta=this.getDelta()}return o(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(e=function(e){return e.reduce(function(e,t){if(1===t.insert){var n=(0,m.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||((t=(0,m.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"===typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)},new a.default)}(e)).reduce(function(e,a){var c=a.retain||a.delete||a.insert.length||1,d=a.attributes||{};if(null!=a.insert){if("string"===typeof a.insert){var h=a.insert;h.endsWith("\n")&&n&&(n=!1,h=h.slice(0,-1)),e>=o&&!h.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,h);var m=t.scroll.line(e),f=i(m,2),v=f[0],x=f[1],y=(0,g.default)({},(0,u.bubbleFormats)(v));if(v instanceof p.default){var b=v.descendant(l.default.Leaf,x),j=i(b,1)[0];y=(0,g.default)(y,(0,u.bubbleFormats)(j))}d=s.default.attributes.diff(y,d)||{}}else if("object"===r(a.insert)){var w=Object.keys(a.insert)[0];if(null==w)return e;t.scroll.insertAt(e,w,a.insert[w])}o+=c}return Object.keys(d).forEach(function(n){t.scroll.formatAt(e,c,n,d[n])}),e+c},0),e.reduce(function(e,n){return"number"===typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new a.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),a=t;o.forEach(function(t){var o=t.length();if(t instanceof c.default){var s=e-t.offset(n.scroll),l=t.newlineIndex(s+a)-s+1;t.formatAt(s,l,i,r[i])}else t.format(i,r[i]);a-=o})}}),this.scroll.optimize(),this.update((new a.default).retain(e).retain(t,(0,m.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t,i,r[i])}),this.update((new a.default).retain(e).retain(t,(0,m.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach(function(e){var t=i(e,1)[0];t instanceof p.default?n.push(t):t instanceof l.default.Leaf&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(l.default.Leaf,e,t));var o=[n,r].map(function(e){if(0===e.length)return{};for(var t=(0,u.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=b((0,u.bubbleFormats)(n),t)}return t});return g.default.apply(g.default,o)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter(function(e){return"string"===typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new a.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t.length,i,r[i])}),this.update((new a.default).retain(e).insert(t,(0,m.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===p.default.blotName&&!(e.children.length>1)&&e.children.head instanceof h.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),o=i(r,2),s=o[0],l=o[1],d=0,u=new a.default;null!=s&&(d=s instanceof c.default?s.newlineIndex(l)-l+1:s.length()-l,u=s.delta().slice(l,l+d-1).insert("\n"));var p=this.getContents(e,t+d).diff((new a.default).insert(n).concat(u)),h=(new a.default).retain(e).concat(p);return this.applyDelta(h)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(x)&&l.default.find(t[0].target)){var i=l.default.find(t[0].target),o=(0,u.bubbleFormats)(i),s=i.offset(this.scroll),c=t[0].oldValue.replace(d.default.CONTENTS,""),p=(new a.default).insert(c),h=(new a.default).insert(i.value());e=(new a.default).retain(s).concat(p.diff(h,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)},new a.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,f.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function b(e,t){return Object.keys(t).reduce(function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n},{})}t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(0)),a=c(n(21)),s=c(n(11)),l=c(n(8));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=(0,c(n(10)).default)("quill:selection"),h=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;u(this,e),this.index=t,this.length=n},m=function(){function e(t,n){var r=this;u(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new h(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,l.default.sources.USER),1)}),this.emitter.on(l.default.events.EDITOR_CHANGE,function(e,t){e===l.default.events.TEXT_CHANGE&&t.length()>0&&r.update(l.default.sources.SILENT)}),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(l.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(t){}})}}),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var n=t.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s)}}),this.update(l.default.sources.SILENT)}return i(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",function(){e.composing=!0}),this.root.addEventListener("compositionend",function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout(function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,function(){e.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){e.mouseDown=!1,e.update(l.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(e,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var i=void 0,o=this.scroll.leaf(e),a=r(o,2),s=a[0],l=a[1];if(null==s)return null;var c=s.position(l,!0),d=r(c,2);i=d[0],l=d[1];var u=document.createRange();if(t>0){u.setStart(i,l);var p=this.scroll.leaf(e+t),h=r(p,2);if(s=h[0],l=h[1],null==s)return null;var m=s.position(l,!0),f=r(m,2);return i=f[0],l=f[1],u.setEnd(i,l),u.getBoundingClientRect()}var g="left",v=void 0;return i instanceof Text?(l<i.data.length?(u.setStart(i,l),u.setEnd(i,l+1)):(u.setStart(i,l-1),u.setEnd(i,l),g="right"),v=u.getBoundingClientRect()):(v=s.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return p.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var i=n.map(function(e){var n=r(e,2),i=n[0],a=n[1],s=o.default.find(i,!0),l=s.offset(t.scroll);return 0===a?l:s instanceof o.default.Container?l+s.length():l+s.index(i,a)}),a=Math.min(Math.max.apply(Math,d(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(d(i)));return new h(s,a-s)}},{key:"normalizeNative",value:function(e){if(!f(this.root,e.startContainer)||!e.collapsed&&!f(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n}),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],i=[],o=this.scroll.length();return n.forEach(function(e,n){e=Math.min(o-1,e);var a,s=t.scroll.leaf(e),l=r(s,2),c=l[0],d=l[1],u=c.position(d,0!==n),p=r(u,2);a=p[0],d=p[1],i.push(a,d)}),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(t.index,i)),a=r(o,1)[0],s=a;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,i));s=r(l,1)[0]}if(null!=a&&null!=s){var c=e.getBoundingClientRect();n.top<c.top?e.scrollTop-=c.top-n.top:n.bottom>c.bottom&&(e.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(e,t),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"===typeof t&&(n=t,t=!1),p.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,d(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],c=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(t,this.lastRange)){var d;!this.composing&&null!=c&&c.native.collapsed&&c.start.node!==this.cursor.textNode&&this.cursor.restore();var u,p=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(t),e];(d=this.emitter).emit.apply(d,[l.default.events.EDITOR_CHANGE].concat(p)),e!==l.default.sources.SILENT&&(u=this.emitter).emit.apply(u,p)}}}]),e}();function f(e,t){try{t.parentNode}catch(n){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=h,t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"insertInto",value:function(e,n){0===e.children.length?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default.Embed);s.blotName="break",s.tagName="BR",t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(44),o=n(30),a=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return r(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=l(t);e.insertBefore(n,e.children.head||void 0)}catch(r){if(r instanceof a.ParchmentError)return;throw r}})},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,n){e.deleteAt(t,n)})},t.prototype.descendant=function(e,n){var r=this.children.find(n),i=r[0],o=r[1];return null==e.blotName&&e(i)||null!=e.blotName&&i instanceof e?[i,o]:i instanceof t?i.descendant(e,o):[null,-1]},t.prototype.descendants=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,function(n,r,a){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,o))),o-=a}),i},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,function(e,t,i){e.formatAt(t,i,n,r)})},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),i=r[0],o=r[1];if(i)i.insertAt(o,t,n);else{var s=null==n?a.create("text",t):a.create(t,n);this.appendChild(s)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new a.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(n){e.insertBefore(n,t)})},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),i=r[0],o=r[1],a=[[this,e]];return i instanceof t?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),function(e,r,i){e=e.split(r,t),n.appendChild(e)}),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,r=[],i=[];e.forEach(function(e){e.target===n.domNode&&"childList"===e.type&&(r.push.apply(r,e.addedNodes),i.push.apply(i,e.removedNodes))}),i.forEach(function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=a.find(e);null!=t&&(null!=t.domNode.parentNode&&t.domNode.parentNode!==n.domNode||t.detach())}}),r.filter(function(e){return e.parentNode==n.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var t=null;null!=e.nextSibling&&(t=a.find(e.nextSibling));var r=l(e);r.next==t&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,t||void 0))})},t}(o.default);function l(e){var t=a.find(e);if(null==t)try{t=a.create(e)}catch(n){t=a.create(a.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),o=n(31),a=n(17),s=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new o.default(n.domNode),n}return r(t,e),t.formats=function(e){return"string"===typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=s.query(e);n instanceof i.default?this.attributes.attribute(n,t):t&&(null==n||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some(function(e){return e.target===r.domNode&&"attributes"===e.type})&&this.attributes.build()},t.prototype.wrap=function(n,r){var i=e.prototype.wrap.call(this,n,r);return i instanceof t&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},t}(a.default);t.default=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(30),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=o.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){var r=n(11),i=n(3),o={attributes:{compose:function(e,t,n){"object"!==typeof e&&(e={}),"object"!==typeof t&&(t={});var r=i(!0,{},t);for(var o in n||(r=Object.keys(r).reduce(function(e,t){return null!=r[t]&&(e[t]=r[t]),e},{})),e)void 0!==e[o]&&void 0===t[o]&&(r[o]=e[o]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!==typeof e&&(e={}),"object"!==typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,i){return r(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!==typeof e)return t;if("object"===typeof t){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return void 0===e[r]&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"===typeof e.delete?e.delete:"number"===typeof e.retain?e.retain:"string"===typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=o.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"===typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"===typeof t.retain?i.retain=e:"string"===typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"===typeof this.ops[this.index].delete?"delete":"number"===typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}return[]},e.exports=o},function(e,t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(s){t=function(){}}try{n=Set}catch(s){n=function(){}}try{r=Promise}catch(s){r=function(){}}function i(o,s,l,c,d){"object"===typeof s&&(l=s.depth,c=s.prototype,d=s.includeNonEnumerable,s=s.circular);var u=[],p=[],h="undefined"!=typeof Buffer;return"undefined"==typeof s&&(s=!0),"undefined"==typeof l&&(l=1/0),function o(l,m){if(null===l)return null;if(0===m)return l;var f,g;if("object"!=typeof l)return l;if(e(l,t))f=new t;else if(e(l,n))f=new n;else if(e(l,r))f=new r(function(e,t){l.then(function(t){e(o(t,m-1))},function(e){t(o(e,m-1))})});else if(i.__isArray(l))f=[];else if(i.__isRegExp(l))f=new RegExp(l.source,a(l)),l.lastIndex&&(f.lastIndex=l.lastIndex);else if(i.__isDate(l))f=new Date(l.getTime());else{if(h&&Buffer.isBuffer(l))return f=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(f),f;e(l,Error)?f=Object.create(l):"undefined"==typeof c?(g=Object.getPrototypeOf(l),f=Object.create(g)):(f=Object.create(c),g=c)}if(s){var v=u.indexOf(l);if(-1!=v)return p[v];u.push(l),p.push(f)}for(var x in e(l,t)&&l.forEach(function(e,t){var n=o(t,m-1),r=o(e,m-1);f.set(n,r)}),e(l,n)&&l.forEach(function(e){var t=o(e,m-1);f.add(t)}),l){var y;g&&(y=Object.getOwnPropertyDescriptor(g,x)),y&&null==y.set||(f[x]=o(l[x],m-1))}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(l);for(x=0;x<b.length;x++){var j=b[x];(!(_=Object.getOwnPropertyDescriptor(l,j))||_.enumerable||d)&&(f[j]=o(l[j],m-1),_.enumerable||Object.defineProperty(f,j,{enumerable:!1}))}}if(d){var w=Object.getOwnPropertyNames(l);for(x=0;x<w.length;x++){var _,C=w[x];(_=Object.getOwnPropertyDescriptor(l,C))&&_.enumerable||(f[C]=o(l[C],m-1),Object.defineProperty(f,C,{enumerable:!1}))}}return f}(o,l)}function o(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=o,i.__isDate=function(e){return"object"===typeof e&&"[object Date]"===o(e)},i.__isArray=function(e){return"object"===typeof e&&"[object Array]"===o(e)},i.__isRegExp=function(e){return"object"===typeof e&&"[object RegExp]"===o(e)},i.__getRegExpFlags=a,i}();"object"===typeof e&&e.exports&&(e.exports=n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=h(n(0)),s=h(n(8)),l=n(4),c=h(l),d=h(n(16)),u=h(n(13)),p=h(n(25));function h(e){return e&&e.__esModule?e:{default:e}}function m(e){return e instanceof c.default||e instanceof l.BlockEmbed}var f=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var i=this.line(e),a=r(i,2),s=a[0],c=a[1],p=this.line(e+n),h=r(p,1)[0];if(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=h&&s!==h&&c>0){if(s instanceof l.BlockEmbed||h instanceof l.BlockEmbed)return void this.optimize();if(s instanceof u.default){var m=s.newlineIndex(s.length(),!0);if(m>-1&&(s=s.split(m+1))===h)return void this.optimize()}else if(h instanceof u.default){var f=h.newlineIndex(0);f>-1&&h.split(f+1)}var g=h.children.head instanceof d.default?null:h.children.head;s.moveChildren(h,g),s.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var s=a.default.create(n,r);this.appendChild(s)}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(e),e=r}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(m,e)}},{key:"lines",value:function(){return function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,function(t,n,r){m(t)?i.push(t):t instanceof a.default.Container&&(i=i.concat(e(t,n,o))),o-=r}),i}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=s.default.sources.USER;"string"===typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,e),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,e)}}}]),t}(a.default.Scroll);f.blotName="scroll",f.className="ql-editor",f.tagName="DIV",f.defaultChild="block",f.allowedChildren=[c.default,l.BlockEmbed,p.default],t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=f(n(21)),s=f(n(11)),l=f(n(3)),c=f(n(2)),d=f(n(20)),u=f(n(0)),p=f(n(5)),h=f(n(10)),m=f(n(9));function f(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=(0,h.default)("quill:keyboard"),x=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",y=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])}),r.addBinding({key:t.keys.ENTER,shiftKey:null},C),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},j),r.addBinding({key:t.keys.DELETE},{collapsed:!0},w)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},j),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},w)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},_),r.addBinding({key:t.keys.DELETE},{collapsed:!1},_),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},j),r.listen(),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"match",value:function(e,t){return t=k(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!t[n]!==e[n]&&null!==t[n]})&&t.key===(e.which||e.keyCode)}}]),o(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=k(e);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"===typeof t&&(t={handler:t}),"function"===typeof n&&(n={handler:n}),r=(0,l.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(e.bindings[o]||[]).filter(function(e){return t.match(n,e)});if(0!==a.length){var l=e.quill.getSelection();if(null!=l&&e.quill.hasFocus()){var c=e.quill.getLine(l.index),d=i(c,2),p=d[0],h=d[1],m=e.quill.getLeaf(l.index),f=i(m,2),g=f[0],v=f[1],x=0===l.length?[g,v]:e.quill.getLeaf(l.index+l.length),y=i(x,2),b=y[0],j=y[1],w=g instanceof u.default.Text?g.value().slice(0,v):"",_=b instanceof u.default.Text?b.value().slice(j):"",C={collapsed:0===l.length,empty:0===l.length&&p.length()<=1,format:e.quill.getFormat(l),offset:h,prefix:w,suffix:_};a.some(function(t){if(null!=t.collapsed&&t.collapsed!==C.collapsed)return!1;if(null!=t.empty&&t.empty!==C.empty)return!1;if(null!=t.offset&&t.offset!==C.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==C.format[e]}))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=C.format[e]:!1===t.format[e]?null==C.format[e]:(0,s.default)(t.format[e],C.format[e])}))return!1;return!(null!=t.prefix&&!t.prefix.test(C.prefix))&&!(null!=t.suffix&&!t.suffix.test(C.suffix))&&!0!==t.handler.call(e,l,C)})&&n.preventDefault()}}}})}}]),t}(m.default);function b(e,t){var n,r=e===y.keys.LEFT?"prefix":"suffix";return g(n={key:e,shiftKey:t,altKey:null},r,/^$/),g(n,"handler",function(n){var r=n.index;e===y.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof u.default.Embed)||(e===y.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index-1,p.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index+n.length+1,p.default.sources.USER),!1)}),n}function j(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=i(n,1)[0],o={};if(0===t.offset){var a=this.quill.getLine(e.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var l=r.formats(),c=this.quill.getFormat(e.index-1,1);o=d.default.attributes.diff(l,c)||{}}}var u=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-u,u,p.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index-u,u,o,p.default.sources.USER),this.quill.focus()}}function w(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},o=0,a=this.quill.getLine(e.index),s=i(a,1)[0];if(t.offset>=s.length()-1){var l=this.quill.getLine(e.index+1),c=i(l,1)[0];if(c){var u=s.formats(),h=this.quill.getFormat(e.index,1);r=d.default.attributes.diff(u,h)||{},o=c.length()}}this.quill.deleteText(e.index,n,p.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+o-1,n,r,p.default.sources.USER)}}function _(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=d.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,p.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,p.default.sources.USER),this.quill.setSelection(e.index,p.default.sources.SILENT),this.quill.focus()}function C(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce(function(e,n){return u.default.query(n,u.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,"\n",r,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],p.default.sources.USER))})}function S(e){return{key:y.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=u.default.query("code-block"),r=t.index,o=t.length,a=this.quill.scroll.descendant(n,r),s=i(a,2),l=s[0],c=s[1];if(null!=l){var d=this.quill.getIndex(l),h=l.newlineIndex(c,!0)+1,m=l.newlineIndex(d+c+o),f=l.domNode.textContent.slice(h,m).split("\n");c=0,f.forEach(function(t,i){e?(l.insertAt(h+c,n.TAB),c+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(h+c,n.TAB.length),c-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),c+=t.length+1}),this.quill.update(p.default.sources.USER),this.quill.setSelection(r,o,p.default.sources.SILENT)}}}}function A(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],p.default.sources.USER)}}}function k(e){if("string"===typeof e||"number"===typeof e)return k({key:e});if("object"===("undefined"===typeof e?"undefined":r(e))&&(e=(0,a.default)(e,!1)),"string"===typeof e.key)if(null!=y.keys[e.key.toUpperCase()])e.key=y.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[x]=e.shortKey,delete e.shortKey),e}y.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},y.DEFAULTS={bindings:{bold:A("bold"),italic:A("italic"),underline:A("underline"),indent:{key:y.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",p.default.sources.USER)}},outdent:{key:y.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",p.default.sources.USER)}},"outdent backspace":{key:y.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",p.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,p.default.sources.USER)}},"indent code-block":S(!0),"outdent code-block":S(!1),"remove tab":{key:y.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,p.default.sources.USER)}},tab:{key:y.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new c.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,p.default.sources.SILENT)}},"list empty enter":{key:y.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,p.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,p.default.sources.USER)}},"checklist enter":{key:y.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(0,l.default)({},r.formats(),{list:"checked"}),s=(new c.default).retain(e.index).insert("\n",a).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:y.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=i(n,2),o=r[0],a=r[1],s=(new c.default).retain(e.index).insert("\n",t.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,p.default.sources.USER),this.quill.setSelection(e.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=this.quill.getLine(e.index),o=i(r,2),a=o[0],s=o[1];if(s>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",p.default.sources.USER),this.quill.history.cutoff();var d=(new c.default).retain(e.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(d,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,p.default.sources.SILENT)}},"code exit":{key:y.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],a=(new c.default).retain(e.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,p.default.sources.USER)}},"embed left":b(y.keys.LEFT,!1),"embed left shift":b(y.keys.LEFT,!0),"embed right":b(y.keys.RIGHT,!1),"embed right shift":b(y.keys.RIGHT,!0)}},t.default=y,t.SHORTKEY=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=l(n(0)),s=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"value",value:function(){}}]),o(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var r=this,o=0;null!=r&&r.statics.scope!==a.default.Scope.BLOCK_BLOT;)o+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=t.CONTENTS.length,r.optimize(),r.formatAt(o,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),i=void 0,o=void 0,l=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var c=[e,n.start.offset,n.end.offset];i=c[0],o=c[1],l=c[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var d=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof s.default?(i=this.next.domNode,this.next.insertAt(0,d),this.textNode.data=t.CONTENTS):(this.textNode.data=d,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var u=[o,l].map(function(e){return Math.max(0,Math.min(i.data.length,e-1))}),p=r(u,2);return o=p[0],l=p[1],{startNode:i,startOffset:o,endNode:i,endOffset:l}}}}},{key:"update",value:function(e,t){var n=this;if(e.some(function(e){return"characterData"===e.type&&e.target===n.textNode})){var r=this.restore();r&&(t.range=r)}}},{key:"value",value:function(){return""}}]),t}(a.default.Embed);c.blotName="cursor",c.className="ql-cursor",c.tagName="span",c.CONTENTS="\ufeff",t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(0)),i=n(4),o=a(i);function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Container);s.allowedChildren=[o.default,i.BlockEmbed,s],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(e){return("00"+parseInt(e).toString(16)).slice(-2)}).join("")):n}}]),t}(s.default.Attributor.Style),c=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),d=new l("color","color",{scope:s.default.Scope.INLINE});t.ColorAttributor=l,t.ColorClass=c,t.ColorStyle=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(6),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return l(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);function l(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}s.blotName="link",s.tagName="A",s.SANITIZED_URL="about:blank",s.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=s,t.sanitize=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=s(n(23)),a=s(n(107));function s(e){return e&&e.__esModule?e:{default:e}}var l=0;function c(e,t){e.setAttribute(t,!("true"===e.getAttribute(t)))}var d=function(){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.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(e){switch(e.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),e.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return i(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),c(this.label,"aria-expanded"),c(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",function(){t.selectItem(n,!0)}),n.addEventListener("keydown",function(e){switch(e.keyCode){case o.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case o.default.keys.ESCAPE:t.escape(),e.preventDefault()}}),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=a.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach(function(n){var r=e.buildItem(n);t.appendChild(r),!0===n.selected&&e.selectItem(r)}),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout(function(){return e.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"===typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"===typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(0)),i=v(n(5)),o=n(4),a=v(o),s=v(n(16)),l=v(n(25)),c=v(n(24)),d=v(n(35)),u=v(n(6)),p=v(n(22)),h=v(n(7)),m=v(n(55)),f=v(n(42)),g=v(n(23));function v(e){return e&&e.__esModule?e:{default:e}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":d.default,"blots/inline":u.default,"blots/scroll":p.default,"blots/text":h.default,"modules/clipboard":m.default,"modules/history":f.default,"modules/keyboard":g.default}),r.default.register(a.default,s.default,c.default,u.default,p.default,h.default),t.default=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"===typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"===typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"===typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"===typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),s=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);t.concat(n).concat(s).forEach(function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)})},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach(function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=e.attributes[n].value(e.domNode),t},{})},e}();t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function i(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){i(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(i(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function i(e){var t=e.split("-"),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map(function(e){return e.split(":")[0].trim()})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[i(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[i(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[i(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){null==e.modules[t]&&e.addModule(t)})}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();i.DEFAULTS={modules:{}},i.themes={default:i},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=s(n(0)),a=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}var l="\ufeff",c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(e){n.contentNode.appendChild(e)}),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,r=e.data.split(l).join("");if(e===this.leftGuard)if(this.prev instanceof a.default){var i=this.prev.length();this.prev.insertAt(i,r),t={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=l,t}},{key:"update",value:function(e,t){var n=this;e.forEach(function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}})}}]),t}(o.default.Embed);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new o.default.Attributor.Attribute("align","align",a),l=new o.default.Attributor.Class("align","ql-align",a),c=new o.default.Attributor.Style("align","text-align",a);t.AlignAttribute=s,t.AlignClass=l,t.AlignStyle=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a=n(26),s=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),l=new a.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});t.BackgroundClass=s,t.BackgroundStyle=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},s=new o.default.Attributor.Attribute("direction","dir",a),l=new o.default.Attributor.Class("direction","ql-direction",a),c=new o.default.Attributor.Style("direction","direction",a);t.DirectionAttribute=s,t.DirectionClass=l,t.DirectionStyle=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},l={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},c=new s.default.Attributor.Class("font","ql-font",l),d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(s.default.Attributor.Style),u=new d("font","font-family",l);t.FontStyle=u,t.FontClass=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r},a=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),s=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=a,t.SizeStyle=s},function(e,t,n){"use strict";e.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(0)),o=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(o.default.events.EDITOR_CHANGE,function(e,t,n,i){e!==o.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==o.default.sources.USER?r.transform(t):r.record(t,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],o.default.sources.USER),this.ignoreChange=!1;var r=l(n[e]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9)).default);function l(e){var t=e.reduce(function(e,t){return e+=t.delete||0},0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"===typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=i.default.query(e,i.default.Scope.BLOCK)}))}(e)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=s,t.getLastChangeIndex=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=m(n(3)),a=m(n(2)),s=m(n(8)),l=m(n(23)),c=m(n(34)),d=m(n(59)),u=m(n(60)),p=m(n(28)),h=m(n(61));function m(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function v(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var x=[!1,"center","right","justify"],y=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],b=[!1,"serif","monospace"],j=["1","2","3",!1],w=["small",!1,"large","huge"],_=function(e){function t(e,n){f(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach(function(e){e.container.contains(n.target)||e.close()})}),r}return v(t,e),r(t,[{key:"addModule",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"===typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}})})}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&S(e,x),new u.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&S(e,y,"background"===n?"#ffffff":"#000000"),new d.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?S(e,b):e.classList.contains("ql-header")?S(e,j):e.classList.contains("ql-size")&&S(e,w)),new p.default(e)}),this.quill.on(s.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(e){e.update()})})}}]),t}(c.default);_.DEFAULTS=(0,o.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents((new a.default).retain(r.index).delete(r.length).insert({image:n.target.result}),s.default.sources.USER),e.quill.setSelection(r.index+1,s.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var C=function(e){function t(e,n){f(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(t,e),r(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(t){l.default.match(t,"enter")?(e.save(),t.preventDefault()):l.default.match(t,"escape")&&(e.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var t=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,s.default.sources.USER)),this.quill.root.scrollTop=t;break;case"video":e=function(e){var t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e}(e);case"formula":if(!e)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,s.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",s.default.sources.USER),this.quill.setSelection(r+2,s.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(h.default);function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)})}t.BaseTooltip=C,t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(e<i||t&&e===i&&(null==n.next||0!==n.next.length()))return[n,e];e-=i}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,i=this.find(e),o=i[0],a=e-i[1],s=this.iterator(o);(r=s())&&a<e+t;){var l=r.length();e>a?n(r,e-a,Math.min(t,a+l-e)):n(r,0,Math.min(l,e+t-a)),a+=l}},e.prototype.map=function(e){return this.reduce(function(t,n){return t.push(e(n)),t},[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),o=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver(function(e){n.update(e)}),n.observer.observe(n.domNode,a),n.attach(),n}return r(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var a=[].slice.call(this.observer.takeRecords());a.length>0;)t.push(a.pop());for(var s=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[o.DATA_KEY].mutations&&(e.domNode[o.DATA_KEY].mutations=[]),t&&s(e.parent))},l=function(e){null!=e.domNode[o.DATA_KEY]&&null!=e.domNode[o.DATA_KEY].mutations&&(e instanceof i.default&&e.children.forEach(l),e.optimize(n))},c=t,d=0;c.length>0;d+=1){if(d>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(e){var t=o.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(s(o.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=o.find(e,!1);s(t,!1),t instanceof i.default&&t.children.forEach(function(e){s(e,!1)})})):"attributes"===e.type&&s(t.prev)),s(t))}),this.children.forEach(l),a=(c=[].slice.call(this.observer.takeRecords())).slice();a.length>0;)t.push(a.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map(function(e){var t=o.find(e.target,!0);return null==t?null:null==t.domNode[o.DATA_KEY].mutations?(t.domNode[o.DATA_KEY].mutations=[e],t):(t.domNode[o.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==r&&null!=e.domNode[o.DATA_KEY]&&e.update(e.domNode[o.DATA_KEY].mutations||[],n)}),null!=this.domNode[o.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[o.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=o.Scope.BLOCK_BLOT,t.tagName="DIV",t}(i.default);t.default=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach(function(e){e instanceof i.default||(e=e.wrap(t.blotName,!0)),o.attributes.copy(e)}),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){null!=this.formats()[r]||o.query(r,o.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=o.Scope.INLINE_BLOT,t.tagName="SPAN",t}(i.default);t.default=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(18),o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(n){var r=o.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=o.query(n,o.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=o.query(r,o.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=o.query(n,o.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),a=o.create(n,r);i.parent.insertBefore(a,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=o.Scope.BLOCK_BLOT,t.tagName="P",t}(i.default);t.default=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),o=n(1),a=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return r(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=o.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some(function(e){return"characterData"===e.type&&e.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=o.Scope.INLINE_BLOT,t}(i.default);t.default=a},function(e,t,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)===!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!==typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!==typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(t=n[o],e.call(i,t,o,n))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(e,t){var n=-1;function r(e,t,l){if(e==t)return e?[[0,e]]:[];(l<0||e.length<l)&&(l=null);var d=o(e,t),u=e.substring(0,d);d=a(e=e.substring(d),t=t.substring(d));var p=e.substring(e.length-d),h=function(e,t){var s;if(!e)return[[1,t]];if(!t)return[[n,e]];var l=e.length>t.length?e:t,c=e.length>t.length?t:e,d=l.indexOf(c);if(-1!=d)return s=[[1,l.substring(0,d)],[0,c],[1,l.substring(d+c.length)]],e.length>t.length&&(s[0][0]=s[2][0]=n),s;if(1==c.length)return[[n,e],[1,t]];var u=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;function i(e,t,n){for(var r,i,s,l,c=e.substring(n,n+Math.floor(e.length/4)),d=-1,u="";-1!=(d=t.indexOf(c,d+1));){var p=o(e.substring(n),t.substring(d)),h=a(e.substring(0,n),t.substring(0,d));u.length<h+p&&(u=t.substring(d-h,d)+t.substring(d,d+p),r=e.substring(0,n-h),i=e.substring(n+p),s=t.substring(0,d-h),l=t.substring(d+p))}return 2*u.length>=e.length?[r,i,s,l,u]:null}var s,l,c,d,u,p=i(n,r,Math.ceil(n.length/4)),h=i(n,r,Math.ceil(n.length/2));if(!p&&!h)return null;s=h?p&&p[4].length>h[4].length?p:h:p,e.length>t.length?(l=s[0],c=s[1],d=s[2],u=s[3]):(d=s[0],u=s[1],l=s[2],c=s[3]);var m=s[4];return[l,c,d,u,m]}(e,t);if(u){var p=u[0],h=u[1],m=u[2],f=u[3],g=u[4],v=r(p,m),x=r(h,f);return v.concat([[0,g]],x)}return function(e,t){for(var r=e.length,o=t.length,a=Math.ceil((r+o)/2),s=a,l=2*a,c=new Array(l),d=new Array(l),u=0;u<l;u++)c[u]=-1,d[u]=-1;c[s+1]=0,d[s+1]=0;for(var p=r-o,h=p%2!=0,m=0,f=0,g=0,v=0,x=0;x<a;x++){for(var y=-x+m;y<=x-f;y+=2){for(var b=s+y,j=(A=y==-x||y!=x&&c[b-1]<c[b+1]?c[b+1]:c[b-1]+1)-y;A<r&&j<o&&e.charAt(A)==t.charAt(j);)A++,j++;if(c[b]=A,A>r)f+=2;else if(j>o)m+=2;else if(h&&(C=s+p-y)>=0&&C<l&&-1!=d[C]&&A>=(_=r-d[C]))return i(e,t,A,j)}for(var w=-x+g;w<=x-v;w+=2){for(var _,C=s+w,S=(_=w==-x||w!=x&&d[C-1]<d[C+1]?d[C+1]:d[C-1]+1)-w;_<r&&S<o&&e.charAt(r-_-1)==t.charAt(o-S-1);)_++,S++;if(d[C]=_,_>r)v+=2;else if(S>o)g+=2;else if(!h){var A;if((b=s+p-w)>=0&&b<l&&-1!=c[b])if(j=s+(A=c[b])-b,A>=(_=r-_))return i(e,t,A,j)}}}return[[n,e],[1,t]]}(e,t)}(e=e.substring(0,e.length-d),t=t.substring(0,t.length-d));return u&&h.unshift([0,u]),p&&h.push([0,p]),s(h),null!=l&&(h=function(e,t){var r=function(e,t){if(0===t)return[0,e];for(var r=0,i=0;i<e.length;i++){var o=e[i];if(o[0]===n||0===o[0]){var a=r+o[1].length;if(t===a)return[i+1,e];if(t<a){e=e.slice();var s=t-r,l=[o[0],o[1].slice(0,s)],c=[o[0],o[1].slice(s)];return e.splice(i,1,l,c),[i+1,e]}r=a}}throw new Error("cursor_pos is out of bounds!")}(e,t),i=r[1],o=r[0],a=i[o],s=i[o+1];if(null==a)return e;if(0!==a[0])return e;if(null!=s&&a[1]+s[1]===s[1]+a[1])return i.splice(o,2,s,a),c(i,o,2);if(null!=s&&0===s[1].indexOf(a[1])){i.splice(o,2,[s[0],a[1]],[0,a[1]]);var l=s[1].slice(a[1].length);return l.length>0&&i.splice(o+2,0,[s[0],l]),c(i,o,3)}return e}(h,l)),h=function(e){for(var t=!1,r=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},i=function(e){return e.charCodeAt(e.length-1)>=55296&&e.charCodeAt(e.length-1)<=56319},o=2;o<e.length;o+=1)0===e[o-2][0]&&i(e[o-2][1])&&e[o-1][0]===n&&r(e[o-1][1])&&1===e[o][0]&&r(e[o][1])&&(t=!0,e[o-1][1]=e[o-2][1].slice(-1)+e[o-1][1],e[o][1]=e[o-2][1].slice(-1)+e[o][1],e[o-2][1]=e[o-2][1].slice(0,-1));if(!t)return e;var a=[];for(o=0;o<e.length;o+=1)e[o][1].length>0&&a.push(e[o]);return a}(h)}function i(e,t,n,i){var o=e.substring(0,n),a=t.substring(0,i),s=e.substring(n),l=t.substring(i),c=r(o,a),d=r(s,l);return c.concat(d)}function o(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function a(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function s(e){e.push([0,""]);for(var t,r=0,i=0,l=0,c="",d="";r<e.length;)switch(e[r][0]){case 1:l++,d+=e[r][1],r++;break;case n:i++,c+=e[r][1],r++;break;case 0:i+l>1?(0!==i&&0!==l&&(0!==(t=o(d,c))&&(r-i-l>0&&0==e[r-i-l-1][0]?e[r-i-l-1][1]+=d.substring(0,t):(e.splice(0,0,[0,d.substring(0,t)]),r++),d=d.substring(t),c=c.substring(t)),0!==(t=a(d,c))&&(e[r][1]=d.substring(d.length-t)+e[r][1],d=d.substring(0,d.length-t),c=c.substring(0,c.length-t))),0===i?e.splice(r-l,i+l,[1,d]):0===l?e.splice(r-i,i+l,[n,c]):e.splice(r-i-l,i+l,[n,c],[1,d]),r=r-i-l+(i?1:0)+(l?1:0)+1):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,l=0,i=0,c="",d=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(r=1;r<e.length-1;)0==e[r-1][0]&&0==e[r+1][0]&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)==e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),u=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),u=!0)),r++;u&&s(e)}var l=r;function c(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var i=e[r],o=e[r+1];i[0]===o[1]&&e.splice(r,2,[i[0],i[1]+o[1]])}return e}l.INSERT=1,l.DELETE=n,l.EQUAL=0,e.exports=l},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"===typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:i).supported=r,t.unsupported=i},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)n.call(e,t)&&i.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e,t){var n=r?r+e:e,i=this._events[n];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,a=i.length,s=new Array(a);o<a;o++)s[o]=i[o].fn;return s},a.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,d=this._events[s],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,n),!0;case 4:return d.fn.call(d.context,t,n,i),!0;case 5:return d.fn.call(d.context,t,n,i,o),!0;case 6:return d.fn.call(d.context,t,n,i,o,a),!0}for(c=1,l=new Array(u-1);c<u;c++)l[c-1]=arguments[c];d.fn.apply(d.context,l)}else{var p,h=d.length;for(c=0;c<h;c++)switch(d[c].once&&this.removeListener(e,d[c].fn,void 0,!0),u){case 1:d[c].fn.call(d[c].context);break;case 2:d[c].fn.call(d[c].context,t);break;case 3:d[c].fn.call(d[c].context,t,n);break;case 4:d[c].fn.call(d[c].context,t,n,i);break;default:if(!l)for(p=1,l=new Array(u-1);p<u;p++)l[p-1]=arguments[p];d[c].fn.apply(d[c].context,l)}}return!0},a.prototype.on=function(e,t,n){var i=new o(t,n||this),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.once=function(e,t,n){var i=new o(t,n||this,!0),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return 0===--this._eventsCount?this._events=new i:delete this._events[a],this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||(0===--this._eventsCount?this._events=new i:delete this._events[a]);else{for(var l=0,c=[],d=s.length;l<d;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:0===--this._eventsCount?this._events=new i:delete this._events[a]}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&(0===--this._eventsCount?this._events=new i:delete this._events[t])):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=r,a.EventEmitter=a,"undefined"!==typeof e&&(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=y(n(3)),s=y(n(2)),l=y(n(0)),c=y(n(5)),d=y(n(10)),u=y(n(9)),p=n(36),h=n(37),m=y(n(13)),f=n(26),g=n(38),v=n(39),x=n(40);function y(e){return e&&e.__esModule?e:{default:e}}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=(0,d.default)("quill:clipboard"),w="__ql-matcher",_=[[Node.TEXT_NODE,I],[Node.TEXT_NODE,N],["br",function(e,t){return O(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,D],[Node.ELEMENT_NODE,function(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===M(e).fontStyle&&(n.italic=!0),r.fontWeight&&(M(e).fontWeight.startsWith("bold")||parseInt(M(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=k(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new s.default).insert("\t").concat(t)),t}],["li",function(e,t){var n=l.default.query(e);if(null==n||"list-item"!==n.blotName||!O(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(l.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose((new s.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){return new s.default}]],C=[p.AlignAttribute,g.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),S=[p.AlignStyle,h.BackgroundStyle,f.ColorStyle,g.DirectionStyle,v.FontStyle,x.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),A=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],_.concat(r.options.matchers).forEach(function(e){var t=i(e,2),o=t[0],a=t[1];(n.matchVisual||a!==L)&&r.addMatcher(o,a)}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"===typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[m.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,b({},m.default.blotName,t[m.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),a=o[0],l=o[1],c=E(this.container,a,l);return O(c,"\n")&&null==c.ops[c.ops.length-1].attributes&&(c=c.compose((new s.default).retain(c.length()-1).delete(1))),j.log("convert",this.container.innerHTML,c),this.container.innerHTML="",c}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"===typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,c.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new s.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout(function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,c.default.sources.USER),t.quill.setSelection(r.length()-n.length,c.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(r){var o=i(r,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:t.push(s);break;default:[].forEach.call(e.container.querySelectorAll(a),function(e){e[w]=e[w]||[],e[w].push(s)})}}),[t,n]}}]),t}(u.default);function k(e,t,n){return"object"===("undefined"===typeof t?"undefined":r(t))?Object.keys(t).reduce(function(e,n){return k(e,n,t[n])},e):e.reduce(function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,a.default)({},b({},t,n),r.attributes))},new s.default)}function M(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function O(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var i=e.ops[r];if("string"!==typeof i.insert)break;n=i.insert+n}return n.slice(-1*t.length)===t}function T(e){if(0===e.childNodes.length)return!1;var t=M(e);return["block","list-item"].indexOf(t.display)>-1}function E(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce(function(t,n){return n(e,t)},new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(r,i){var o=E(i,t,n);return i.nodeType===e.ELEMENT_NODE&&(o=t.reduce(function(e,t){return t(i,e)},o),o=(i[w]||[]).reduce(function(e,t){return t(i,e)},o)),r.concat(o)},new s.default):new s.default}function P(e,t,n){return k(n,e,!0)}function D(e,t){var n=l.default.Attributor.Attribute.keys(e),r=l.default.Attributor.Class.keys(e),i=l.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach(function(t){var n=l.default.query(t,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(null==(n=C[t])||n.attrName!==t&&n.keyName!==t||(o[n.attrName]=n.value(e)||void 0),null==(n=S[t])||n.attrName!==t&&n.keyName!==t||(n=S[t],o[n.attrName]=n.value(e)||void 0))}),Object.keys(o).length>0&&(t=k(t,o)),t}function R(e,t){var n=l.default.query(e);if(null==n)return t;if(n.prototype instanceof l.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=(new s.default).insert(r,n.formats(e)))}else"function"===typeof n.formats&&(t=k(t,n.blotName,n.formats(e)));return t}function N(e,t){return O(t,"\n")||(T(e)||t.length()>0&&e.nextSibling&&T(e.nextSibling))&&t.insert("\n"),t}function L(e,t){if(T(e)&&null!=e.nextElementSibling&&!O(t,"\n\n")){var n=e.offsetHeight+parseFloat(M(e).marginTop)+parseFloat(M(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function I(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!M(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&T(e.parentNode)||null!=e.previousSibling&&T(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&T(e.parentNode)||null!=e.nextSibling&&T(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}A.DEFAULTS={matchers:[],matchVisual:!0},t.default=A,t.matchAttributor=D,t.matchBlot=R,t.matchNewline=N,t.matchSpacing=L,t.matchText=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(6),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);s.blotName="bold",s.tagName=["STRONG","B"],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=d(n(2)),a=d(n(0)),s=d(n(5)),l=d(n(10)),c=d(n(9));function d(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var p=(0,l.default)("quill:toolbar"),h=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i,o=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(o.options.container)){var a=document.createElement("div");f(a,o.options.container),e.container.parentNode.insertBefore(a,e.container),o.container=a}else"string"===typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach(function(e){o.addHandler(e,o.options.handlers[e])}),[].forEach.call(o.container.querySelectorAll("button, select"),function(e){o.attach(e)}),o.quill.on(s.default.events.EDITOR_CHANGE,function(e,t){e===s.default.events.SELECTION_CHANGE&&o.update(t)}),o.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){var e=o.quill.selection.getRange(),t=r(e,1)[0];o.update(t)}),o):(i=p.error("Container required for toolbar",o.options),u(o,i))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void p.warn("ignoring attaching to disabled format",n,e);if(null==a.default.query(n))return void p.warn("ignoring attaching to nonexistent format",n,e)}var i="SELECT"===e.tagName?"change":"click";e.addEventListener(i,function(i){var l=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var c=e.options[e.selectedIndex];l=!c.hasAttribute("selected")&&(c.value||!1)}else l=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),i.preventDefault();t.quill.focus();var d=t.quill.selection.getRange(),u=r(d,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,l);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(l=prompt("Enter "+n)))return;t.quill.updateContents((new o.default).retain(u.index).delete(u.length).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},n,l)),s.default.sources.USER)}else t.quill.format(n,l,s.default.sources.USER);t.update(u)}),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(n){var i=r(n,2),o=i[0],a=i[1];if("SELECT"===a.tagName){var s=void 0;if(null==e)s=null;else if(null==t[o])s=a.querySelector("option[selected]");else if(!Array.isArray(t[o])){var l=t[o];"string"===typeof l&&(l=l.replace(/\"/g,'\\"')),s=a.querySelector('option[value="'+l+'"]')}null==s?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(null==e)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var c=t[o]===a.getAttribute("value")||null!=t[o]&&t[o].toString()===a.getAttribute("value")||null==t[o]&&!a.getAttribute("value");a.classList.toggle("ql-active",c)}else a.classList.toggle("ql-active",null!=t[o])})}}]),t}(c.default);function m(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function f(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(function(e){if("string"===typeof e)m(n,e);else{var t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){var r=document.createElement("select");r.classList.add("ql-"+t),n.forEach(function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),r.appendChild(t)}),e.appendChild(r)}(n,t,r):m(n,t,r)}}),e.appendChild(n)})}h.DEFAULTS={},h.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(t){null!=a.default.query(t,a.default.Scope.INLINE)&&e.quill.format(t,!1)})}else this.quill.removeFormat(t,s.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",s.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",e,s.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var i="+1"===e?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,s.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,s.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",e,s.default.sources.USER)}}},t.default=h,t.addControls=f},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(28),s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(e){e.classList.add("ql-primary")}),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"buildItem",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(28),s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),function(e){e.innerHTML=n[e.getAttribute("data-value")||""]}),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"}),this.hide()}return r(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=t+o+"px"),i.bottom>r.bottom){var a=i.bottom-i.top,s=e.bottom-e.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=h(n(3)),s=h(n(8)),l=n(43),c=h(l),d=h(n(27)),u=n(15),p=h(n(41));function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function g(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],x=function(e){function t(e,n){m(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return g(t,e),o(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),p.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),p.default),this.tooltip=new y(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,n){e.handlers.link.call(e,!n.format.link)})}}]),t}(c.default);x.DEFAULTS=(0,a.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var y=function(e){function t(e,n){m(this,t);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return g(t,e),o(t,[{key:"listen",value:function(){var e=this;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,s.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(s.default.events.SELECTION_CHANGE,function(t,n,i){if(null!=t){if(0===t.length&&i===s.default.sources.USER){var o=e.quill.scroll.descendant(d.default,t.index),a=r(o,2),l=a[0],c=a[1];if(null!=l){e.linkRange=new u.Range(t.index-c,l.length());var p=d.default.formats(l.domNode);return e.preview.textContent=p,e.preview.setAttribute("href",p),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(l.BaseTooltip);y.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=N(n(29)),i=n(36),o=n(38),a=n(64),s=N(n(65)),l=N(n(66)),c=n(67),d=N(c),u=n(37),p=n(26),h=n(39),m=n(40),f=N(n(56)),g=N(n(68)),v=N(n(27)),x=N(n(69)),y=N(n(70)),b=N(n(71)),j=N(n(72)),w=N(n(73)),_=n(13),C=N(_),S=N(n(74)),A=N(n(75)),k=N(n(57)),M=N(n(41)),O=N(n(28)),T=N(n(59)),E=N(n(60)),P=N(n(61)),D=N(n(108)),R=N(n(62));function N(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":u.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":m.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":u.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":m.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":u.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":h.FontClass,"formats/size":m.SizeClass,"formats/blockquote":s.default,"formats/code-block":C.default,"formats/header":l.default,"formats/list":d.default,"formats/bold":f.default,"formats/code":_.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":x.default,"formats/strike":y.default,"formats/underline":b.default,"formats/image":j.default,"formats/video":w.default,"formats/list/item":c.ListItem,"modules/formula":S.default,"modules/syntax":A.default,"modules/toolbar":k.default,"themes/bubble":D.default,"themes/snow":R.default,"ui/icons":M.default,"ui/picker":O.default,"ui/icon-picker":E.default,"ui/color-picker":T.default,"ui/tooltip":P.default},!0),t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(s.default.Attributor.Class),c=new l("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(4),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);o.blotName="blockquote",o.tagName="blockquote",t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(4),a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(((r=o)&&r.__esModule?r:{default:r}).default);a.blotName="header",a.tagName=["H1","H2","H3","H4","H5","H6"],t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=l(n(0)),a=l(n(4)),s=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),r(t,[{key:"format",value:function(e,n){e!==h.blotName||n?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:i(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(a.default);p.blotName="list-item",p.tagName="LI";var h=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),i=o.default.find(t.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return e.addEventListener("touchstart",r),e.addEventListener("mousedown",r),n}return u(t,e),r(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",r=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"checked"!==e&&"unchecked"!==e||r.setAttribute("data-checked","checked"===e),r}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof p)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(e,o)}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(s.default);h.blotName="list",h.scope=o.default.Scope.BLOCK_BLOT,h.tagName=["OL","UL"],h.defaultChild="list-item",h.allowedChildren=[p],t.ListItem=p,t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(56),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);o.blotName="italic",o.tagName=["EM","I"],t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(6),s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);s.blotName="script",s.tagName=["SUB","SUP"],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(6),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);o.blotName="strike",o.tagName="S",t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(6),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=i)&&r.__esModule?r:{default:r}).default);o.blotName="underline",o.tagName="U",t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),s=(r=a)&&r.__esModule?r:{default:r},l=n(27),c=["alt","height","width"],d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"===typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return c.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s.default.Embed);d.blotName="image",d.tagName="IMG",t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(4),s=n(27),l=(r=s)&&r.__esModule?r:{default:r},c=["height","width"],d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){c.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return c.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.BlockEmbed);d.blotName="video",d.className="ql-video",d.tagName="IFRAME",t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=l(n(35)),a=l(n(5)),s=l(n(9));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),r(t,null,[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"===typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(o.default);p.blotName="formula",p.className="ql-formula",p.tagName="SPAN";var h=function(e){function t(){c(this,t);var e=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return u(t,e),r(t,null,[{key:"register",value:function(){a.default.register(p,!0)}}]),t}(s.default);t.FormulaBlot=p,t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=l(n(0)),a=l(n(5)),s=l(n(9));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function t(){return c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),r(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(l(n(13)).default);p.className="ql-syntax";var h=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),m=function(e){function t(e,n){c(this,t);var r=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!==typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(i),i=setTimeout(function(){r.highlight(),i=null},r.options.interval)}),r.highlight(),r}return u(t,e),r(t,null,[{key:"register",value:function(){a.default.register(h,!0),a.default.register(p,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(p).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}(s.default);m.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=p,t.CodeToken=h,t.default=m},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),a=u(n(8)),s=n(43),l=u(s),c=n(15),d=u(n(41));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(e){function t(e,n){p(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=f);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return m(t,e),i(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),d.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),d.default)}}]),t}(l.default);g.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){p(this,t);var r=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(a.default.events.EDITOR_CHANGE,function(e,t,n,i){if(e===a.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var s=o[o.length-1],l=r.quill.getIndex(s),d=Math.min(s.length()-1,t.index+t.length-l),u=r.quill.getBounds(new c.Range(l,d));r.position(u)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return m(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){e.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),t}(s.BaseTooltip);v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),t.BubbleTooltip=v,t.default=g},function(e,t,n){e.exports=n(63)}]).default},e.exports=t()},74802:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},75494:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(56603),a=n(65173),s=n(65043),l=n(20067),c=n(44288),d=(0,c.getAceInstance)(),u=function(e){function t(t){var n=e.call(this,t)||this;return c.editorEvents.forEach(function(e){n[e]=n[e].bind(n)}),n.debounce=c.debounce,n}return r(t,e),t.prototype.isInShadow=function(e){for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1},t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.className,r=t.onBeforeLoad,i=t.onValidate,o=t.mode,a=t.focus,s=t.theme,l=t.fontSize,u=t.value,p=t.defaultValue,h=t.showGutter,m=t.wrapEnabled,f=t.showPrintMargin,g=t.scrollMargin,v=void 0===g?[0,0,0,0]:g,x=t.keyboardHandler,y=t.onLoad,b=t.commands,j=t.annotations,w=t.markers,_=t.placeholder;this.editor=d.edit(this.refEditor),r&&r(d);for(var C=Object.keys(this.props.editorProps),S=0;S<C.length;S++)this.editor[C[S]]=this.props.editorProps[C[S]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(v[0],v[1],v[2],v[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode("string"===typeof o?"ace/mode/".concat(o):o),s&&""!==s&&this.editor.setTheme("ace/theme/".concat(s)),this.editor.setFontSize("number"===typeof l?"".concat(l,"px"):l),this.editor.getSession().setValue(p||(u||"")),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(h),this.editor.getSession().setUseWrapMode(m),this.editor.setShowPrintMargin(f),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),_&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),i&&this.editor.getSession().on("changeAnnotation",function(){var t=e.editor.getSession().getAnnotations();e.props.onValidate(t)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(j||[]),w&&w.length>0&&this.handleMarkers(w);var A=this.editor.$options;c.editorOptions.forEach(function(t){A.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(b)&&b.forEach(function(t){"string"===typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)}),x&&this.editor.setKeyboardHandler("ace/keyboard/"+x),n&&(this.refEditor.className+=" "+n),y&&y(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,r=0;r<c.editorOptions.length;r++){var i=c.editorOptions[r];n[i]!==t[i]&&this.editor.setOption(i,n[i])}if(n.className!==t.className){var o=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach(function(e){var t=o.indexOf(e);o.splice(t,1)}),this.refEditor.className=" "+n.className+" "+o.join(" ")}var a=this.editor&&null!=n.value&&this.editor.getValue()!==n.value;if(a){this.silent=!0;var s=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(s),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode("string"===typeof n.mode?"ace/mode/".concat(n.mode):n.mode),n.theme!==t.theme&&this.editor.setTheme("ace/theme/"+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize("number"===typeof n.fontSize?"".concat(n.fontSize,"px"):n.fontSize),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),l(n.setOptions,t.setOptions)||this.handleOptions(n),!a&&l(n.annotations,t.annotations)||this.editor.getSession().setAnnotations(n.annotations||[]),!l(n.markers,t.markers)&&Array.isArray(n.markers)&&this.handleMarkers(n.markers),l(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),e.height===this.props.height&&e.width===this.props.width||this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(e){void 0===e&&(e=[0,0,0,0]),this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(e){if(this.props.onChange&&!this.silent){var t=this.editor.getValue();this.props.onChange(t,e)}},t.prototype.onSelectionChange=function(e){if(this.props.onSelectionChange){var t=this.editor.getSelection();this.props.onSelectionChange(t,e)}},t.prototype.onCursorChange=function(e){if(this.props.onCursorChange){var t=this.editor.getSelection();this.props.onCursorChange(t,e)}},t.prototype.onInput=function(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(e){this.props.onFocus&&this.props.onFocus(e,this.editor)},t.prototype.onBlur=function(e){this.props.onBlur&&this.props.onBlur(e,this.editor)},t.prototype.onCopy=function(e){var t=e.text;this.props.onCopy&&this.props.onCopy(t)},t.prototype.onPaste=function(e){var t=e.text;this.props.onPaste&&this.props.onPaste(t)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(e){for(var t=Object.keys(e.setOptions),n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])},t.prototype.handleMarkers=function(e){var t=this,n=this.editor.getSession().getMarkers(!0);for(var r in n)n.hasOwnProperty(r)&&this.editor.getSession().removeMarker(n[r].id);for(var r in n=this.editor.getSession().getMarkers(!1))n.hasOwnProperty(r)&&"ace_active-line"!==n[r].clazz&&"ace_selected-word"!==n[r].clazz&&this.editor.getSession().removeMarker(n[r].id);e.forEach(function(e){var n=e.startRow,r=e.startCol,i=e.endRow,a=e.endCol,s=e.className,l=e.type,c=e.inFront,d=void 0!==c&&c,u=new o.Range(n,r,i,a);t.editor.getSession().addMarker(u,s,l,d)})},t.prototype.updatePlaceholder=function(){var e=this.editor,t=this.props.placeholder,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?((r=e.renderer.placeholderNode=document.createElement("div")).textContent=t||"",r.className="ace_comment ace_placeholder",r.style.padding="0 9px",r.style.position="absolute",r.style.zIndex="3",e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)},t.prototype.updateRef=function(e){this.refEditor=e},t.prototype.render=function(){var e=this.props,t=e.name,n=e.width,r=e.height,o=e.style,a=i({width:n,height:r},o);return s.createElement("div",{ref:this.updateRef,id:t,style:a})},t.propTypes={mode:a.oneOfType([a.string,a.object]),focus:a.bool,theme:a.string,name:a.string,className:a.string,height:a.string,width:a.string,fontSize:a.oneOfType([a.number,a.string]),showGutter:a.bool,onChange:a.func,onCopy:a.func,onPaste:a.func,onFocus:a.func,onInput:a.func,onBlur:a.func,onScroll:a.func,value:a.string,defaultValue:a.string,onLoad:a.func,onSelectionChange:a.func,onCursorChange:a.func,onBeforeLoad:a.func,onValidate:a.func,minLines:a.number,maxLines:a.number,readOnly:a.bool,highlightActiveLine:a.bool,tabSize:a.number,showPrintMargin:a.bool,cursorStart:a.number,debounceChangePeriod:a.number,editorProps:a.object,setOptions:a.object,style:a.object,scrollMargin:a.array,annotations:a.array,markers:a.array,keyboardHandler:a.string,wrapEnabled:a.bool,enableSnippets:a.bool,enableBasicAutocompletion:a.oneOfType([a.bool,a.array]),enableLiveAutocompletion:a.oneOfType([a.bool,a.array]),navigateToFileEnd:a.bool,commands:a.array,placeholder:a.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(s.Component);t.default=u},75713:e=>{e.exports=function(){}},75816:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},75824:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create")},75866:(e,t,n)=>{var r=n(88468);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},76164:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove")},76272:(e,t,n)=>{var r=n(6571),i=n(22761);e.exports=function(e){return i(e)&&r(e)}},76372:(e,t,n)=>{var r=n(88468);e.exports=function(e,t){for(var n=e.length;n--&&r(t,e[n],0)>-1;);return n}},76378:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5zm-1.06 13.54L7.4 12l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"GppGood")},76516:(e,t,n)=>{var r=n(6571);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},76745:(e,t,n)=>{var r=n(79742),i=n(50061),o=n(33279);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},76788:(e,t,n)=>{var r=n(97160),i=n(85204),o=n(64816);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},77067:(e,t,n)=>{"use strict";e.exports=n(34612)},77116:(e,t,n)=>{var r=n(9812),i=n(22777),o=n(54052),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},78420:(e,t,n)=>{var r=n(71775),i=n(93211),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},79160:(e,t,n)=>{var r=n(16913),i=n(22761);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==r(e)}},79167:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile")},79386:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},79686:e=>{e.exports=function(e){return null==e}},79717:(e,t,n)=>{"use strict";var r=n(65043),i=n(29461);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=i.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,d=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var u=s(null);if(null===u.current){var p={hasValue:!1,value:null};u.current=p}else p=u.current;u=c(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(a=e,t):(a=e,s=n)}var a,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]);var h=a(e,u[0],u[1]);return l(function(){p.hasValue=!0,p.value=h},[h]),d(h),h}},79742:(e,t,n)=>{var r=n(19841);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(void 0===l?s===s&&!r(s):n(s,l)))var l=s,c=a}return c}},79889:(e,t,n)=>{var r=n(93950),i=n(46686);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},80219:(e,t,n)=>{"use strict";var r=n(2086),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,d=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(m){var i=h(n);i&&i!==m&&e(t,i,r)}var a=d(n);u&&(a=a.concat(u(n)));for(var s=l(t),f=l(n),g=0;g<a.length;++g){var v=a[g];if(!o[v]&&(!r||!r[v])&&(!f||!f[v])&&(!s||!s[v])){var x=p(n,v);try{c(t,v,x)}catch(y){}}}}return t}},80438:(e,t,n)=>{var r=n(12622);e.exports=function(e){return r(this,e).get(e)}},80726:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},80755:(e,t,n)=>{var r=n(48895),i=n(77116);e.exports=function e(t,n,o,a,s){var l=-1,c=t.length;for(o||(o=i),s||(s=[]);++l<c;){var d=t[l];n>0&&o(d)?n>1?e(d,n-1,o,a,s):r(s,d):a||(s[s.length]=d)}return s}},80950:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(83468).A},81722:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>r,SF:()=>i,sk:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},82284:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},82702:(e,t,n)=>{"use strict";var r=n(86267);function i(e,t,n,r,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(e){a[e]={value:e}}),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,n,a,s,l){var c=Object.create(o);return r.toFlatObject(e,c,function(e){return e!==Error.prototype}),i.call(c,e.message,t,n,a,s),c.name=e.name,l&&Object.assign(c,l),c},e.exports=i},82730:(e,t,n)=>{"use strict";var r=n(65043),i=n(77067);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),u=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},m={};function f(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new f(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new f(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new f(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new f(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new f(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new f(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!u.call(m,e)||!u.call(h,e)&&(p.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,x);g[t]=new f(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v,x);g[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v,x);g[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)});var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,j=Symbol.for("react.element"),w=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),k=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var R=Symbol.iterator;function N(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=R&&e[R]||e["@@iterator"])?e:null}var L,I=Object.assign;function F(e){if(void 0===L)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var $=!1;function B(e,t){if(!e||$)return"";$=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var i=c.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{$=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function z(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function H(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case _:return"Fragment";case w:return"Portal";case S:return"Profiler";case C:return"StrictMode";case O:return"Suspense";case T:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case k:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case M:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case E:return null!==(t=e.displayName||null)?t:H(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return H(e(t))}catch(n){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function U(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=U(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=U(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return I({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function Q(e,t){X(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+V(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return I({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:V(n)}}function oe(e,t){var n=V(t.value),r=V(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,de,ue=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return de(e,t)})}:de);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function fe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=fe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(he).forEach(function(e){me.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var ve=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xe(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function ye(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function je(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,_e=null,Ce=null;function Se(e){if(e=yi(e)){if("function"!==typeof we)throw Error(o(280));var t=e.stateNode;t&&(t=ji(t),we(e.stateNode,e.type,t))}}function Ae(e){_e?Ce?Ce.push(e):Ce=[e]:_e=e}function ke(){if(_e){var e=_e,t=Ce;if(Ce=_e=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Me(e,t){return e(t)}function Oe(){}var Te=!1;function Ee(e,t,n){if(Te)return e(t,n);Te=!0;try{return Me(e,t,n)}finally{Te=!1,(null!==_e||null!==Ce)&&(Oe(),ke())}}function Pe(e,t){var n=e.stateNode;if(null===n)return null;var r=ji(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var De=!1;if(d)try{var Re={};Object.defineProperty(Re,"passive",{get:function(){De=!0}}),window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch(de){De=!1}function Ne(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Le=!1,Ie=null,Fe=!1,$e=null,Be={onError:function(e){Le=!0,Ie=e}};function ze(e,t,n,r,i,o,a,s,l){Le=!1,Ie=null,Ne.apply(Be,arguments)}function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function We(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ve(e){if(He(e)!==e)throw Error(o(188))}function Ue(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Ve(i),e;if(a===r)return Ve(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Ge=i.unstable_scheduleCallback,Ye=i.unstable_cancelCallback,Ze=i.unstable_shouldYield,Ke=i.unstable_requestPaint,Xe=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,dt=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=ut(s):0!==(o&=a)&&(r=ut(o))}else 0!==(a=n&~i)?r=ut(a):0!==o&&(r=ut(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ft(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function xt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var yt=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var jt,wt,_t,Ct,St,At=!1,kt=[],Mt=null,Ot=null,Tt=null,Et=new Map,Pt=new Map,Dt=[],Rt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Nt(e,t){switch(e){case"focusin":case"focusout":Mt=null;break;case"dragenter":case"dragleave":Ot=null;break;case"mouseover":case"mouseout":Tt=null;break;case"pointerover":case"pointerout":Et.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.delete(t.pointerId)}}function Lt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=yi(t))&&wt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function It(e){var t=xi(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=We(n)))return e.blockedOn=t,void St(e.priority,function(){_t(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=yi(n))&&wt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function $t(e,t,n){Ft(e)&&n.delete(t)}function Bt(){At=!1,null!==Mt&&Ft(Mt)&&(Mt=null),null!==Ot&&Ft(Ot)&&(Ot=null),null!==Tt&&Ft(Tt)&&(Tt=null),Et.forEach($t),Pt.forEach($t)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,At||(At=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bt)))}function Ht(e){function t(t){return zt(t,e)}if(0<kt.length){zt(kt[0],e);for(var n=1;n<kt.length;n++){var r=kt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Mt&&zt(Mt,e),null!==Ot&&zt(Ot,e),null!==Tt&&zt(Tt,e),Et.forEach(t),Pt.forEach(t),n=0;n<Dt.length;n++)(r=Dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)It(n),null===n.blockedOn&&Dt.shift()}var Wt=b.ReactCurrentBatchConfig,Vt=!0;function Ut(e,t,n,r){var i=yt,o=Wt.transition;Wt.transition=null;try{yt=1,Gt(e,t,n,r)}finally{yt=i,Wt.transition=o}}function qt(e,t,n,r){var i=yt,o=Wt.transition;Wt.transition=null;try{yt=4,Gt(e,t,n,r)}finally{yt=i,Wt.transition=o}}function Gt(e,t,n,r){if(Vt){var i=Zt(e,t,n,r);if(null===i)Vr(e,t,r,Yt,n),Nt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Mt=Lt(Mt,e,t,n,r,i),!0;case"dragenter":return Ot=Lt(Ot,e,t,n,r,i),!0;case"mouseover":return Tt=Lt(Tt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Et.set(o,Lt(Et.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Pt.set(o,Lt(Pt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Nt(e,r),4&t&&-1<Rt.indexOf(e)){for(;null!==i;){var o=yi(i);if(null!==o&&jt(o),null===(o=Zt(e,t,n,r))&&Vr(e,t,r,Yt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Vr(e,t,r,null,n)}}var Yt=null;function Zt(e,t,n,r){if(Yt=null,null!==(e=xi(e=je(r))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=We(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Xt=null,Qt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return I(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=on(cn),un=I({},cn,{view:0,detail:0}),pn=on(un),hn=I({},un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),mn=on(hn),fn=on(I({},hn,{dataTransfer:0})),gn=on(I({},un,{relatedTarget:0})),vn=on(I({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=I({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yn=on(xn),bn=on(I({},cn,{data:0})),jn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function Sn(){return Cn}var An=I({},un,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?wn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),kn=on(An),Mn=on(I({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),On=on(I({},un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),Tn=on(I({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),En=I({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pn=on(En),Dn=[9,13,27,32],Rn=d&&"CompositionEvent"in window,Nn=null;d&&"documentMode"in document&&(Nn=document.documentMode);var Ln=d&&"TextEvent"in window&&!Nn,In=d&&(!Rn||Nn&&8<Nn&&11>=Nn),Fn=String.fromCharCode(32),$n=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Un(e,t,n,r){Ae(r),0<(t=qr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Gn=null;function Yn(e){Fr(e,0)}function Zn(e){if(G(bi(e)))return e}function Kn(e,t){if("change"===e)return t}var Xn=!1;if(d){var Qn;if(d){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"===typeof er.oninput}Qn=Jn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Gn=qn=null)}function nr(e){if("value"===e.propertyName&&Zn(Gn)){var t=[];Un(t,Gn,e,je(e)),Ee(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Gn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zn(Gn)}function or(e,t){if("click"===e)return Zn(t)}function ar(e,t){if("input"===e||"change"===e)return Zn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!u.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dr(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function ur(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ur(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ur(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=dr(n,o);var a=dr(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fr=d&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,xr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==gr||gr!==Y(r)||("selectionStart"in(r=gr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},xr&&lr(xr,r)||(xr=r,0<(r=qr(vr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:jr("Animation","AnimationEnd"),animationiteration:jr("Animation","AnimationIteration"),animationstart:jr("Animation","AnimationStart"),transitionend:jr("Transition","TransitionEnd")},_r={},Cr={};function Sr(e){if(_r[e])return _r[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return _r[e]=n[t];return e}d&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var Ar=Sr("animationend"),kr=Sr("animationiteration"),Mr=Sr("animationstart"),Or=Sr("transitionend"),Tr=new Map,Er="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pr(e,t){Tr.set(e,t),l(t,[e])}for(var Dr=0;Dr<Er.length;Dr++){var Rr=Er[Dr];Pr(Rr.toLowerCase(),"on"+(Rr[0].toUpperCase()+Rr.slice(1)))}Pr(Ar,"onAnimationEnd"),Pr(kr,"onAnimationIteration"),Pr(Mr,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(Or,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Nr));function Ir(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,c){if(ze.apply(this,arguments),Le){if(!Le)throw Error(o(198));var d=Ie;Le=!1,Ie=null,Fe||(Fe=!0,$e=d)}}(r,t,void 0,e),e.currentTarget=null}function Fr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Ir(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Ir(i,s,c),o=l}}}if(Fe)throw e=$e,Fe=!1,$e=null,e}function $r(e,t){var n=t[fi];void 0===n&&(n=t[fi]=new Set);var r=e+"__bubble";n.has(r)||(Wr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Wr(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function Hr(e){if(!e[zr]){e[zr]=!0,a.forEach(function(t){"selectionchange"!==t&&(Lr.has(t)||Br(t,!1,e),Br(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Br("selectionchange",!1,t))}}function Wr(e,t,n,r){switch(Kt(t)){case 1:var i=Ut;break;case 4:i=qt;break;default:i=Gt}n=i.bind(null,t,n,e),i=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=xi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Ee(function(){var r=o,i=je(n),a=[];e:{var s=Tr.get(e);if(void 0!==s){var l=dn,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=kn;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=fn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=On;break;case Ar:case kr:case Mr:l=vn;break;case Or:l=Tn;break;case"scroll":l=pn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=yn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Mn}var d=0!==(4&t),u=!d&&"scroll"===e,p=d?null!==s?s+"Capture":null:s;d=[];for(var h,m=r;null!==m;){var f=(h=m).stateNode;if(5===h.tag&&null!==f&&(h=f,null!==p&&(null!=(f=Pe(m,p))&&d.push(Ur(m,f,h)))),u)break;m=m.return}0<d.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:d}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===be||!(c=n.relatedTarget||n.fromElement)||!xi(c)&&!c[mi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?xi(c):null)&&(c!==(u=He(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(d=mn,f="onMouseLeave",p="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=Mn,f="onPointerLeave",p="onPointerEnter",m="pointer"),u=null==l?s:bi(l),h=null==c?s:bi(c),(s=new d(f,m+"leave",l,n,i)).target=u,s.relatedTarget=h,f=null,xi(i)===r&&((d=new d(p,m+"enter",c,n,i)).target=h,d.relatedTarget=u,f=d),u=f,l&&c)e:{for(p=c,m=0,h=d=l;h;h=Gr(h))m++;for(h=0,f=p;f;f=Gr(f))h++;for(;0<m-h;)d=Gr(d),m--;for(;0<h-m;)p=Gr(p),h--;for(;m--;){if(d===p||null!==p&&d===p.alternate)break e;d=Gr(d),p=Gr(p)}d=null}else d=null;null!==l&&Yr(a,s,l,d,!1),null!==c&&null!==u&&Yr(a,u,c,d,!0)}if("select"===(l=(s=r?bi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Kn;else if(Vn(s))if(Xn)g=ar;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(e,r))?Un(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?bi(r):window,e){case"focusin":(Vn(v)||"true"===v.contentEditable)&&(gr=v,vr=r,xr=null);break;case"focusout":xr=vr=gr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,br(a,n,i);break;case"selectionchange":if(fr)break;case"keydown":case"keyup":br(a,n,i)}var x;if(Rn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Hn?Bn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(In&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Hn&&(x=en()):(Qt="value"in(Xt=i)?Xt.value:Xt.textContent,Hn=!0)),0<(v=qr(r,y)).length&&(y=new bn(y,e,null,n,i),a.push({event:y,listeners:v}),x?y.data=x:null!==(x=zn(n))&&(y.data=x))),(x=Ln?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:($n=!0,Fn);case"textInput":return(e=t.data)===Fn&&$n?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!Rn&&Bn(e,t)?(e=en(),Jt=Qt=Xt=null,Hn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return In&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=qr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=x))}Fr(a,t)})}function Ur(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Pe(e,n))&&r.unshift(Ur(e,o,i)),null!=(o=Pe(e,t))&&r.push(Ur(e,o,i))),e=e.return}return r}function Gr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Pe(n,o))&&a.unshift(Ur(n,l,s)):i||null!=(l=Pe(n,o))&&a.push(Ur(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Zr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function Xr(e){return("string"===typeof e?e:""+e).replace(Zr,"\n").replace(Kr,"")}function Qr(e,t,n){if(t=Xr(t),Xr(e)!==t&&n)throw Error(o(425))}function Jr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,oi="function"===typeof Promise?Promise:void 0,ai="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof oi?function(e){return oi.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout(function(){throw e})}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ht(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ht(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function di(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ui=Math.random().toString(36).slice(2),pi="__reactFiber$"+ui,hi="__reactProps$"+ui,mi="__reactContainer$"+ui,fi="__reactEvents$"+ui,gi="__reactListeners$"+ui,vi="__reactHandles$"+ui;function xi(e){var t=e[pi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mi]||n[pi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=di(e);null!==e;){if(n=e[pi])return n;e=di(e)}return t}n=(e=n).parentNode}return null}function yi(e){return!(e=e[pi]||e[mi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ji(e){return e[hi]||null}var wi=[],_i=-1;function Ci(e){return{current:e}}function Si(e){0>_i||(e.current=wi[_i],wi[_i]=null,_i--)}function Ai(e,t){_i++,wi[_i]=e.current,e.current=t}var ki={},Mi=Ci(ki),Oi=Ci(!1),Ti=ki;function Ei(e,t){var n=e.type.contextTypes;if(!n)return ki;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Pi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Di(){Si(Oi),Si(Mi)}function Ri(e,t,n){if(Mi.current!==ki)throw Error(o(168));Ai(Mi,t),Ai(Oi,n)}function Ni(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,W(e)||"Unknown",i));return I({},n,r)}function Li(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ki,Ti=Mi.current,Ai(Mi,e),Ai(Oi,Oi.current),!0}function Ii(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ni(e,t,Ti),r.__reactInternalMemoizedMergedChildContext=e,Si(Oi),Si(Mi),Ai(Mi,e)):Si(Oi),Ai(Oi,n)}var Fi=null,$i=!1,Bi=!1;function zi(e){null===Fi?Fi=[e]:Fi.push(e)}function Hi(){if(!Bi&&null!==Fi){Bi=!0;var e=0,t=yt;try{var n=Fi;for(yt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Fi=null,$i=!1}catch(i){throw null!==Fi&&(Fi=Fi.slice(e+1)),Ge(Je,Hi),i}finally{yt=t,Bi=!1}}return null}var Wi=[],Vi=0,Ui=null,qi=0,Gi=[],Yi=0,Zi=null,Ki=1,Xi="";function Qi(e,t){Wi[Vi++]=qi,Wi[Vi++]=Ui,Ui=e,qi=t}function Ji(e,t,n){Gi[Yi++]=Ki,Gi[Yi++]=Xi,Gi[Yi++]=Zi,Zi=e;var r=Ki;e=Xi;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Ki=1<<32-at(t)+i|n<<i|r,Xi=o+e}else Ki=1<<o|n<<i|r,Xi=e}function eo(e){null!==e.return&&(Qi(e,1),Ji(e,1,0))}function to(e){for(;e===Ui;)Ui=Wi[--Vi],Wi[Vi]=null,qi=Wi[--Vi],Wi[Vi]=null;for(;e===Zi;)Zi=Gi[--Yi],Gi[Yi]=null,Xi=Gi[--Yi],Gi[Yi]=null,Ki=Gi[--Yi],Gi[Yi]=null}var no=null,ro=null,io=!1,oo=null;function ao(e,t){var n=Ec(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Zi?{id:Ki,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ec(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function co(e){if(io){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ci(n.nextSibling);var r=no;t&&so(e,t)?ao(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function po(e){if(e!==no)return!1;if(!io)return uo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw ho(),Error(o(418));for(;t;)ao(e,t),t=ci(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ci(e.stateNode.nextSibling):null;return!0}function ho(){for(var e=ro;e;)e=ci(e.nextSibling)}function mo(){ro=no=null,io=!1}function fo(e){null===oo?oo=[e]:oo.push(e)}var go=b.ReactCurrentBatchConfig;function vo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function xo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yo(e){return(0,e._init)(e._payload)}function bo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Dc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ic(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===_?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===P&&yo(o)===t.type)?((r=i(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=Rc(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function d(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=Nc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function p(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Ic(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case j:return(n=Rc(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case w:return(t=Fc(t,e.mode,n)).return=e,t;case P:return p(e,(0,t._init)(t._payload),n)}if(te(t)||N(t))return(t=Nc(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case j:return n.key===i?c(e,t,n,r):null;case w:return n.key===i?d(e,t,n,r):null;case P:return h(e,t,(i=n._init)(n._payload),r)}if(te(n)||N(n))return null!==i?null:u(e,t,n,r,null);xo(e,n)}return null}function m(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case j:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case w:return d(t,e=e.get(null===r.key?n:r.key)||null,r,i);case P:return m(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||N(r))return u(t,e=e.get(n)||null,r,i,null);xo(t,r)}return null}function f(i,o,s,l){for(var c=null,d=null,u=o,f=o=0,g=null;null!==u&&f<s.length;f++){u.index>f?(g=u,u=null):g=u.sibling;var v=h(i,u,s[f],l);if(null===v){null===u&&(u=g);break}e&&u&&null===v.alternate&&t(i,u),o=a(v,o,f),null===d?c=v:d.sibling=v,d=v,u=g}if(f===s.length)return n(i,u),io&&Qi(i,f),c;if(null===u){for(;f<s.length;f++)null!==(u=p(i,s[f],l))&&(o=a(u,o,f),null===d?c=u:d.sibling=u,d=u);return io&&Qi(i,f),c}for(u=r(i,u);f<s.length;f++)null!==(g=m(u,i,f,s[f],l))&&(e&&null!==g.alternate&&u.delete(null===g.key?f:g.key),o=a(g,o,f),null===d?c=g:d.sibling=g,d=g);return e&&u.forEach(function(e){return t(i,e)}),io&&Qi(i,f),c}function g(i,s,l,c){var d=N(l);if("function"!==typeof d)throw Error(o(150));if(null==(l=d.call(l)))throw Error(o(151));for(var u=d=null,f=s,g=s=0,v=null,x=l.next();null!==f&&!x.done;g++,x=l.next()){f.index>g?(v=f,f=null):v=f.sibling;var y=h(i,f,x.value,c);if(null===y){null===f&&(f=v);break}e&&f&&null===y.alternate&&t(i,f),s=a(y,s,g),null===u?d=y:u.sibling=y,u=y,f=v}if(x.done)return n(i,f),io&&Qi(i,g),d;if(null===f){for(;!x.done;g++,x=l.next())null!==(x=p(i,x.value,c))&&(s=a(x,s,g),null===u?d=x:u.sibling=x,u=x);return io&&Qi(i,g),d}for(f=r(i,f);!x.done;g++,x=l.next())null!==(x=m(f,i,g,x.value,c))&&(e&&null!==x.alternate&&f.delete(null===x.key?g:x.key),s=a(x,s,g),null===u?d=x:u.sibling=x,u=x);return e&&f.forEach(function(e){return t(i,e)}),io&&Qi(i,g),d}return function e(r,o,a,l){if("object"===typeof a&&null!==a&&a.type===_&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case j:e:{for(var c=a.key,d=o;null!==d;){if(d.key===c){if((c=a.type)===_){if(7===d.tag){n(r,d.sibling),(o=i(d,a.props.children)).return=r,r=o;break e}}else if(d.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===P&&yo(c)===d.type){n(r,d.sibling),(o=i(d,a.props)).ref=vo(r,d,a),o.return=r,r=o;break e}n(r,d);break}t(r,d),d=d.sibling}a.type===_?((o=Nc(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=Rc(a.type,a.key,a.props,null,r.mode,l)).ref=vo(r,o,a),l.return=r,r=l)}return s(r);case w:e:{for(d=a.key;null!==o;){if(o.key===d){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Fc(a,r.mode,l)).return=r,r=o}return s(r);case P:return e(r,o,(d=a._init)(a._payload),l)}if(te(a))return f(r,o,a,l);if(N(a))return g(r,o,a,l);xo(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=Ic(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var jo=bo(!0),wo=bo(!1),_o=Ci(null),Co=null,So=null,Ao=null;function ko(){Ao=So=Co=null}function Mo(e){var t=_o.current;Si(_o),e._currentValue=t}function Oo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function To(e,t){Co=e,Ao=So=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ys=!0),e.firstContext=null)}function Eo(e){var t=e._currentValue;if(Ao!==e)if(e={context:e,memoizedValue:t,next:null},null===So){if(null===Co)throw Error(o(308));So=e,Co.dependencies={lanes:0,firstContext:e}}else So=So.next=e;return t}var Po=null;function Do(e){null===Po?Po=[e]:Po.push(e)}function Ro(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Do(t)):(n.next=i.next,i.next=n),t.interleaved=n,No(e,r)}function No(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Lo=!1;function Io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $o(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Ml)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,No(e,n)}return null===(i=r.interleaved)?(t.next=t,Do(r)):(t.next=i.next,i.next=t),r.interleaved=t,No(e,n)}function zo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xt(e,n)}}function Ho(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wo(e,t,n,r){var i=e.updateQueue;Lo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var d=e.alternate;null!==d&&((s=(d=d.updateQueue).lastBaseUpdate)!==a&&(null===s?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(null!==o){var u=i.baseState;for(a=0,d=c=l=null,s=o;;){var p=s.lane,h=s.eventTime;if((r&p)===p){null!==d&&(d=d.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,f=s;switch(p=t,h=n,f.tag){case 1:if("function"===typeof(m=f.payload)){u=m.call(h,u,p);break e}u=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null===(p="function"===typeof(m=f.payload)?m.call(h,u,p):m)||void 0===p)break e;u=I({},u,p);break e;case 2:Lo=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=i.effects)?i.effects=[s]:p.push(s))}else h={eventTime:h,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(c=d=h,l=u):d=d.next=h,a|=p;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}if(null===d&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Ll|=a,e.lanes=a,e.memoizedState=u}}function Vo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(o(191,i));i.call(r)}}}var Uo={},qo=Ci(Uo),Go=Ci(Uo),Yo=Ci(Uo);function Zo(e){if(e===Uo)throw Error(o(174));return e}function Ko(e,t){switch(Ai(Yo,t),Ai(Go,e),Ai(qo,Uo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si(qo),Ai(qo,t)}function Xo(){Si(qo),Si(Go),Si(Yo)}function Qo(e){Zo(Yo.current);var t=Zo(qo.current),n=le(t,e.type);t!==n&&(Ai(Go,e),Ai(qo,n))}function Jo(e){Go.current===e&&(Si(qo),Si(Go))}var ea=Ci(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ra(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var ia=b.ReactCurrentDispatcher,oa=b.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,da=!1,ua=!1,pa=0,ha=0;function ma(){throw Error(o(321))}function fa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ga(e,t,n,r,i,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ia.current=null===e||null===e.memoizedState?Ja:es,e=n(r,i),ua){a=0;do{if(ua=!1,pa=0,25<=a)throw Error(o(301));a+=1,ca=la=null,t.updateQueue=null,ia.current=ts,e=n(r,i)}while(ua)}if(ia.current=Qa,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,da=!1,t)throw Error(o(300));return e}function va(){var e=0!==pa;return pa=0,e}function xa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function ya(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(o(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function ba(e,t){return"function"===typeof t?t(e):t}function ja(e){var t=ya(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=la,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,c=null,d=a;do{var u=d.lane;if((aa&u)===u)null!==c&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var p={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};null===c?(l=c=p,s=r):c=c.next=p,sa.lanes|=u,Ll|=u}d=d.next}while(null!==d&&d!==a);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(ys=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,sa.lanes|=a,Ll|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wa(e){var t=ya(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);sr(a,t.memoizedState)||(ys=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function _a(){}function Ca(e,t){var n=sa,r=ya(),i=t(),a=!sr(r.memoizedState,i);if(a&&(r.memoizedState=i,ys=!0),r=r.queue,La(ka.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,Ea(9,Aa.bind(null,n,r,i,t),void 0,null),null===Ol)throw Error(o(349));0!==(30&aa)||Sa(n,t,i)}return i}function Sa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Aa(e,t,n,r){t.value=n,t.getSnapshot=r,Ma(t)&&Oa(e)}function ka(e,t,n){return n(function(){Ma(t)&&Oa(e)})}function Ma(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Oa(e){var t=No(e,1);null!==t&&nc(t,e,1,-1)}function Ta(e){var t=xa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,sa,e),[t.memoizedState,e]}function Ea(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Pa(){return ya().memoizedState}function Da(e,t,n,r){var i=xa();sa.flags|=e,i.memoizedState=Ea(1|t,n,void 0,void 0===r?null:r)}function Ra(e,t,n,r){var i=ya();r=void 0===r?null:r;var o=void 0;if(null!==la){var a=la.memoizedState;if(o=a.destroy,null!==r&&fa(r,a.deps))return void(i.memoizedState=Ea(t,n,o,r))}sa.flags|=e,i.memoizedState=Ea(1|t,n,o,r)}function Na(e,t){return Da(8390656,8,e,t)}function La(e,t){return Ra(2048,8,e,t)}function Ia(e,t){return Ra(4,2,e,t)}function Fa(e,t){return Ra(4,4,e,t)}function $a(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ba(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ra(4,4,$a.bind(null,t,e),n)}function za(){}function Ha(e,t){var n=ya();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&fa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Wa(e,t){var n=ya();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&fa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Va(e,t,n){return 0===(21&aa)?(e.baseState&&(e.baseState=!1,ys=!0),e.memoizedState=n):(sr(n,t)||(n=ft(),sa.lanes|=n,Ll|=n,e.baseState=!0),t)}function Ua(e,t){var n=yt;yt=0!==n&&4>n?n:4,e(!0);var r=oa.transition;oa.transition={};try{e(!1),t()}finally{yt=n,oa.transition=r}}function qa(){return ya().memoizedState}function Ga(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Za(e))Ka(t,n);else if(null!==(n=Ro(e,t,n,r))){nc(n,e,r,ec()),Xa(n,t,r)}}function Ya(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Za(e))Ka(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(i.next=i,Do(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Ro(e,t,i,r))&&(nc(n,e,r,i=ec()),Xa(n,t,r))}}function Za(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ka(e,t){ua=da=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xa(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xt(e,n)}}var Qa={readContext:Eo,useCallback:ma,useContext:ma,useEffect:ma,useImperativeHandle:ma,useInsertionEffect:ma,useLayoutEffect:ma,useMemo:ma,useReducer:ma,useRef:ma,useState:ma,useDebugValue:ma,useDeferredValue:ma,useTransition:ma,useMutableSource:ma,useSyncExternalStore:ma,useId:ma,unstable_isNewReconciler:!1},Ja={readContext:Eo,useCallback:function(e,t){return xa().memoizedState=[e,void 0===t?null:t],e},useContext:Eo,useEffect:Na,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Da(4194308,4,$a.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Da(4194308,4,e,t)},useInsertionEffect:function(e,t){return Da(4,2,e,t)},useMemo:function(e,t){var n=xa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ga.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},xa().memoizedState=e},useState:Ta,useDebugValue:za,useDeferredValue:function(e){return xa().memoizedState=e},useTransition:function(){var e=Ta(!1),t=e[0];return e=Ua.bind(null,e[1]),xa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,i=xa();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Ol)throw Error(o(349));0!==(30&aa)||Sa(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Na(ka.bind(null,r,a,e),[e]),r.flags|=2048,Ea(9,Aa.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=xa(),t=Ol.identifierPrefix;if(io){var n=Xi;t=":"+t+"R"+(n=(Ki&~(1<<32-at(Ki)-1)).toString(32)+n),0<(n=pa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ha++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Eo,useCallback:Ha,useContext:Eo,useEffect:La,useImperativeHandle:Ba,useInsertionEffect:Ia,useLayoutEffect:Fa,useMemo:Wa,useReducer:ja,useRef:Pa,useState:function(){return ja(ba)},useDebugValue:za,useDeferredValue:function(e){return Va(ya(),la.memoizedState,e)},useTransition:function(){return[ja(ba)[0],ya().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:qa,unstable_isNewReconciler:!1},ts={readContext:Eo,useCallback:Ha,useContext:Eo,useEffect:La,useImperativeHandle:Ba,useInsertionEffect:Ia,useLayoutEffect:Fa,useMemo:Wa,useReducer:wa,useRef:Pa,useState:function(){return wa(ba)},useDebugValue:za,useDeferredValue:function(e){var t=ya();return null===la?t.memoizedState=e:Va(t,la.memoizedState,e)},useTransition:function(){return[wa(ba)[0],ya().memoizedState]},useMutableSource:_a,useSyncExternalStore:Ca,useId:qa,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=I({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:I({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=$o(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=$o(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(nc(t,e,i,r),zo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=$o(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Bo(e,i,r))&&(nc(t,e,r,n),zo(t,e,r))}};function os(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function as(e,t,n){var r=!1,i=ki,o=t.contextType;return"object"===typeof o&&null!==o?o=Eo(o):(i=Pi(t)?Ti:Mi.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ei(e,i):ki),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Io(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Eo(o):(o=Pi(t)?Ti:Mi.current,i.context=Ei(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Wo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function us(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ps="function"===typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=$o(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,Ul=r),us(0,t)},n}function ms(e,t,n){(n=$o(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){us(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){us(0,t),"function"!==typeof r&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function fs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ps;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Sc.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=$o(-1,1)).tag=2,Bo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var xs=b.ReactCurrentOwner,ys=!1;function bs(e,t,n,r){t.child=null===e?wo(t,null,n,r):jo(t,e.child,n,r)}function js(e,t,n,r,i){n=n.render;var o=t.ref;return To(t,i),r=ga(e,t,n,r,o,i),n=va(),null===e||ys?(io&&n&&eo(t),t.flags|=1,bs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function ws(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Pc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Rc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,_s(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Vs(e,t,i)}return t.flags|=1,(e=Dc(o,r)).ref=t.ref,e.return=t,t.child=e}function _s(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(ys=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Vs(e,t,i);0!==(131072&e.flags)&&(ys=!0)}}return As(e,t,n,r,i)}function Cs(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ai(Dl,Pl),Pl|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ai(Dl,Pl),Pl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ai(Dl,Pl),Pl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ai(Dl,Pl),Pl|=r;return bs(e,t,i,n),t.child}function Ss(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function As(e,t,n,r,i){var o=Pi(n)?Ti:Mi.current;return o=Ei(t,o),To(t,i),n=ga(e,t,n,r,o,i),r=va(),null===e||ys?(io&&r&&eo(t),t.flags|=1,bs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function ks(e,t,n,r,i){if(Pi(n)){var o=!0;Li(t)}else o=!1;if(To(t,i),null===t.stateNode)Ws(e,t),as(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=Eo(c):c=Ei(t,c=Pi(n)?Ti:Mi.current);var d=n.getDerivedStateFromProps,u="function"===typeof d||"function"===typeof a.getSnapshotBeforeUpdate;u||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,a,r,c),Lo=!1;var p=t.memoizedState;a.state=p,Wo(t,r,a,i),l=t.memoizedState,s!==r||p!==l||Oi.current||Lo?("function"===typeof d&&(rs(t,n,d,r),l=t.memoizedState),(s=Lo||os(t,n,s,r,p,l,c))?(u||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Fo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),a.props=c,u=t.pendingProps,p=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Eo(l):l=Ei(t,l=Pi(n)?Ti:Mi.current);var h=n.getDerivedStateFromProps;(d="function"===typeof h||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==u||p!==l)&&ss(t,a,r,l),Lo=!1,p=t.memoizedState,a.state=p,Wo(t,r,a,i);var m=t.memoizedState;s!==u||p!==m||Oi.current||Lo?("function"===typeof h&&(rs(t,n,h,r),m=t.memoizedState),(c=Lo||os(t,n,c,r,p,m,l)||!1)?(d||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,m,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,m,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ms(e,t,n,r,o,i)}function Ms(e,t,n,r,i,o){Ss(e,t);var a=0!==(128&t.flags);if(!r&&!a)return i&&Ii(t,n,!1),Vs(e,t,o);r=t.stateNode,xs.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=jo(t,e.child,null,o),t.child=jo(t,null,s,o)):bs(e,t,s,o),t.memoizedState=r.state,i&&Ii(t,n,!0),t.child}function Os(e){var t=e.stateNode;t.pendingContext?Ri(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ri(0,t.context,!1),Ko(e,t.containerInfo)}function Ts(e,t,n,r,i){return mo(),fo(i),t.flags|=256,bs(e,t,n,r),t.child}var Es,Ps,Ds,Rs,Ns={dehydrated:null,treeContext:null,retryLane:0};function Ls(e){return{baseLanes:e,cachePool:null,transitions:null}}function Is(e,t,n){var r,i=t.pendingProps,a=ea.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ai(ea,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Lc(l,i,0,null),e=Nc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ls(n),t.memoizedState=Ns,e):Fs(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,$s(e,t,s,r=ds(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Lc({mode:"visible",children:r.children},i,0,null),(a=Nc(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&jo(t,e.child,null,s),t.child.memoizedState=Ls(s),t.memoizedState=Ns,a);if(0===(1&t.mode))return $s(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,$s(e,t,s,r=ds(a=Error(o(419)),r,void 0))}if(l=0!==(s&e.childLanes),ys||l){if(null!==(r=Ol)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,No(e,i),nc(r,e,i,-1))}return fc(),$s(e,t,s,r=ds(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=kc.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Gi[Yi++]=Ki,Gi[Yi++]=Xi,Gi[Yi++]=Zi,Ki=e.id,Xi=e.overflow,Zi=t),t=Fs(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Dc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Dc(r,s):(s=Nc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Ls(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ns,i}return e=(s=e.child).sibling,i=Dc(s,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Fs(e,t){return(t=Lc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function $s(e,t,n,r){return null!==r&&fo(r),jo(t,e.child,null,n),(e=Fs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Oo(e.return,t,n)}function zs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Hs(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(bs(e,t,r.children,n),0!==(2&(r=ea.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ai(ea,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ta(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zs(t,!0,n,null,o);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ws(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ll|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Dc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Dc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Us(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qs(t),null;case 1:case 17:return Pi(t.type)&&Di(),qs(t),null;case 3:return r=t.stateNode,Xo(),Si(Oi),Si(Mi),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(po(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(ac(oo),oo=null))),Ps(e,t),qs(t),null;case 5:Jo(t);var i=Zo(Yo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ds(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return qs(t),null}if(e=Zo(qo.current),po(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[pi]=t,r[hi]=a,e=0!==(1&t.mode),n){case"dialog":$r("cancel",r),$r("close",r);break;case"iframe":case"object":case"embed":$r("load",r);break;case"video":case"audio":for(i=0;i<Nr.length;i++)$r(Nr[i],r);break;case"source":$r("error",r);break;case"img":case"image":case"link":$r("error",r),$r("load",r);break;case"details":$r("toggle",r);break;case"input":K(r,a),$r("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},$r("invalid",r);break;case"textarea":ie(r,a),$r("invalid",r)}for(var l in xe(n,a),i=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"===typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&$r("scroll",r)}switch(n){case"input":q(r),J(r,a,!0);break;case"textarea":q(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Jr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[pi]=t,e[hi]=r,Es(e,t,!1,!1),t.stateNode=e;e:{switch(l=ye(n,r),n){case"dialog":$r("cancel",e),$r("close",e),i=r;break;case"iframe":case"object":case"embed":$r("load",e),i=r;break;case"video":case"audio":for(i=0;i<Nr.length;i++)$r(Nr[i],e);i=r;break;case"source":$r("error",e),i=r;break;case"img":case"image":case"link":$r("error",e),$r("load",e),i=r;break;case"details":$r("toggle",e),i=r;break;case"input":K(e,r),i=Z(e,r),$r("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=I({},r,{value:void 0}),$r("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),$r("invalid",e)}for(a in xe(n,i),c=i)if(c.hasOwnProperty(a)){var d=c[a];"style"===a?ge(e,d):"dangerouslySetInnerHTML"===a?null!=(d=d?d.__html:void 0)&&ue(e,d):"children"===a?"string"===typeof d?("textarea"!==n||""!==d)&&pe(e,d):"number"===typeof d&&pe(e,""+d):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=d&&"onScroll"===a&&$r("scroll",e):null!=d&&y(e,a,d,l))}switch(n){case"input":q(e),J(e,r,!1);break;case"textarea":q(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+V(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return qs(t),null;case 6:if(e&&null!=t.stateNode)Rs(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));if(n=Zo(Yo.current),Zo(qo.current),po(t)){if(r=t.stateNode,n=t.memoizedProps,r[pi]=t,(a=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Qr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[pi]=t,t.stateNode=r}return qs(t),null;case 13:if(Si(ea),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&0!==(1&t.mode)&&0===(128&t.flags))ho(),mo(),t.flags|=98560,a=!1;else if(a=po(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[pi]=t}else mo(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;qs(t),a=!1}else null!==oo&&(ac(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ea.current)?0===Rl&&(Rl=3):fc())),null!==t.updateQueue&&(t.flags|=4),qs(t),null);case 4:return Xo(),Ps(e,t),null===e&&Hr(t.stateNode.containerInfo),qs(t),null;case 10:return Mo(t.type._context),qs(t),null;case 19:if(Si(ea),null===(a=t.memoizedState))return qs(t),null;if(r=0!==(128&t.flags),null===(l=a.rendering))if(r)Us(a,!1);else{if(0!==Rl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Us(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ai(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Xe()>Hl&&(t.flags|=128,r=!0,Us(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Us(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!io)return qs(t),null}else 2*Xe()-a.renderingStartTime>Hl&&1073741824!==n&&(t.flags|=128,r=!0,Us(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Xe(),t.sibling=null,n=ea.current,Ai(ea,r?1&n|2:1&n),t):(qs(t),null);case 22:case 23:return uc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Pl)&&(qs(t),6&t.subtreeFlags&&(t.flags|=8192)):qs(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ys(e,t){switch(to(t),t.tag){case 1:return Pi(t.type)&&Di(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Xo(),Si(Oi),Si(Mi),ra(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Jo(t),null;case 13:if(Si(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));mo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Si(ea),null;case 4:return Xo(),null;case 10:return Mo(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}Es=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ps=function(){},Ds=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Zo(qo.current);var o,a=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),a=[];break;case"select":i=I({},i,{value:void 0}),r=I({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Jr)}for(d in xe(n,r),n=null,i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&null!=i[d])if("style"===d){var l=i[d];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(s.hasOwnProperty(d)?a||(a=[]):(a=a||[]).push(d,null));for(d in r){var c=r[d];if(l=null!=i?i[d]:void 0,r.hasOwnProperty(d)&&c!==l&&(null!=c||null!=l))if("style"===d)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(d,c)):"children"===d?"string"!==typeof c&&"number"!==typeof c||(a=a||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(s.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&$r("scroll",e),a||l===c||(a=[])):(a=a||[]).push(d,c))}n&&(a=a||[]).push("style",n);var d=a;(t.updateQueue=d)&&(t.flags|=4)}},Rs=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zs=!1,Ks=!1,Xs="function"===typeof WeakSet?WeakSet:Set,Qs=null;function Js(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Cc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){Cc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[pi],delete t[hi],delete t[fi],delete t[gi],delete t[vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var dl=null,ul=!1;function pl(e,t,n){for(n=n.child;null!==n;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Ks||Js(n,t);case 6:var r=dl,i=ul;dl=null,pl(e,t,n),ul=i,null!==(dl=r)&&(ul?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(ul?(e=dl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ht(e)):li(dl,n.stateNode));break;case 4:r=dl,i=ul,dl=n.stateNode.containerInfo,ul=!0,pl(e,t,n),dl=r,ul=i;break;case 0:case 11:case 14:case 15:if(!Ks&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!==(2&o)||0!==(4&o))&&el(n,t,a),i=i.next}while(i!==r)}pl(e,t,n);break;case 1:if(!Ks&&(Js(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Cc(n,t,s)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ks=(r=Ks)||null!==n.memoizedState,pl(e,t,n),Ks=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xs),t.forEach(function(t){var r=Mc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function fl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,ul=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===dl)throw Error(o(160));hl(a,s,i),dl=null,ul=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(d){Cc(i,t,d)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),vl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(g){Cc(e,e.return,g)}try{nl(5,e,e.return)}catch(g){Cc(e,e.return,g)}}break;case 1:fl(t,e),vl(e),512&r&&null!==n&&Js(n,n.return);break;case 5:if(fl(t,e),vl(e),512&r&&null!==n&&Js(n,n.return),32&e.flags){var i=e.stateNode;try{pe(i,"")}catch(g){Cc(e,e.return,g)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&X(i,a),ye(l,s);var d=ye(l,a);for(s=0;s<c.length;s+=2){var u=c[s],p=c[s+1];"style"===u?ge(i,p):"dangerouslySetInnerHTML"===u?ue(i,p):"children"===u?pe(i,p):y(i,u,p,d)}switch(l){case"input":Q(i,a);break;case"textarea":oe(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var m=a.value;null!=m?ne(i,!!a.multiple,m,!1):h!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[hi]=a}catch(g){Cc(e,e.return,g)}}break;case 6:if(fl(t,e),vl(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){Cc(e,e.return,g)}}break;case 3:if(fl(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(g){Cc(e,e.return,g)}break;case 4:default:fl(t,e),vl(e);break;case 13:fl(t,e),vl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(zl=Xe())),4&r&&ml(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Ks=(d=Ks)||u,fl(t,e),Ks=d):fl(t,e),vl(e),8192&r){if(d=null!==e.memoizedState,(e.stateNode.isHidden=d)&&!u&&0!==(1&e.mode))for(Qs=e,u=e.child;null!==u;){for(p=Qs=u;null!==Qs;){switch(m=(h=Qs).child,h.tag){case 0:case 11:case 14:case 15:nl(4,h,h.return);break;case 1:Js(h,h.return);var f=h.stateNode;if("function"===typeof f.componentWillUnmount){r=h,n=h.return;try{t=r,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(g){Cc(r,n,g)}}break;case 5:Js(h,h.return);break;case 22:if(null!==h.memoizedState){jl(p);continue}}null!==m?(m.return=h,Qs=m):jl(p)}u=u.sibling}e:for(u=null,p=e;;){if(5===p.tag){if(null===u){u=p;try{i=p.stateNode,d?"function"===typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=p.stateNode,s=void 0!==(c=p.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=fe("display",s))}catch(g){Cc(e,e.return,g)}}}else if(6===p.tag){if(null===u)try{p.stateNode.nodeValue=d?"":p.memoizedProps}catch(g){Cc(e,e.return,g)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===e)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;null===p.sibling;){if(null===p.return||p.return===e)break e;u===p&&(u=null),p=p.return}u===p&&(u=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:fl(t,e),vl(e),4&r&&ml(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(pe(i,""),r.flags&=-33),cl(e,sl(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(o(161))}}catch(s){Cc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function xl(e,t,n){Qs=e,yl(e,t,n)}function yl(e,t,n){for(var r=0!==(1&e.mode);null!==Qs;){var i=Qs,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Zs;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Ks;s=Zs;var c=Ks;if(Zs=a,(Ks=l)&&!c)for(Qs=i;null!==Qs;)l=(a=Qs).child,22===a.tag&&null!==a.memoizedState?wl(i):null!==l?(l.return=a,Qs=l):wl(i);for(;null!==o;)Qs=o,yl(o,t,n),o=o.sibling;Qs=i,Zs=s,Ks=c}bl(e)}else 0!==(8772&i.subtreeFlags)&&null!==o?(o.return=i,Qs=o):bl(e)}}function bl(e){for(;null!==Qs;){var t=Qs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ks||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ks)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Vo(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Vo(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var d=t.alternate;if(null!==d){var u=d.memoizedState;if(null!==u){var p=u.dehydrated;null!==p&&Ht(p)}}}break;default:throw Error(o(163))}Ks||512&t.flags&&il(t)}catch(h){Cc(t,t.return,h)}}if(t===e){Qs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qs=n;break}Qs=t.return}}function jl(e){for(;null!==Qs;){var t=Qs;if(t===e){Qs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qs=n;break}Qs=t.return}}function wl(e){for(;null!==Qs;){var t=Qs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){Cc(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){Cc(t,i,l)}}var o=t.return;try{il(t)}catch(l){Cc(t,o,l)}break;case 5:var a=t.return;try{il(t)}catch(l){Cc(t,a,l)}}}catch(l){Cc(t,t.return,l)}if(t===e){Qs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Qs=s;break}Qs=t.return}}var _l,Cl=Math.ceil,Sl=b.ReactCurrentDispatcher,Al=b.ReactCurrentOwner,kl=b.ReactCurrentBatchConfig,Ml=0,Ol=null,Tl=null,El=0,Pl=0,Dl=Ci(0),Rl=0,Nl=null,Ll=0,Il=0,Fl=0,$l=null,Bl=null,zl=0,Hl=1/0,Wl=null,Vl=!1,Ul=null,ql=null,Gl=!1,Yl=null,Zl=0,Kl=0,Xl=null,Ql=-1,Jl=0;function ec(){return 0!==(6&Ml)?Xe():-1!==Ql?Ql:Ql=Xe()}function tc(e){return 0===(1&e.mode)?1:0!==(2&Ml)&&0!==El?El&-El:null!==go.transition?(0===Jl&&(Jl=ft()),Jl):0!==(e=yt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function nc(e,t,n,r){if(50<Kl)throw Kl=0,Xl=null,Error(o(185));vt(e,n,r),0!==(2&Ml)&&e===Ol||(e===Ol&&(0===(2&Ml)&&(Il|=n),4===Rl&&sc(e,El)),rc(e,r),1===n&&0===Ml&&0===(1&t.mode)&&(Hl=Xe()+500,$i&&Hi()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=ht(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=pt(e,e===Ol?El:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){$i=!0,zi(e)}(lc.bind(null,e)):zi(lc.bind(null,e)),ai(function(){0===(6&Ml)&&Hi()}),n=null;else{switch(bt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Oc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Ql=-1,Jl=0,0!==(6&Ml))throw Error(o(327));var n=e.callbackNode;if(wc()&&e.callbackNode!==n)return null;var r=pt(e,e===Ol?El:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=Ml;Ml|=2;var a=mc();for(Ol===e&&El===t||(Wl=null,Hl=Xe()+500,pc(e,t));;)try{xc();break}catch(l){hc(e,l)}ko(),Sl.current=a,Ml=i,null!==Tl?t=0:(Ol=null,El=0,t=Rl)}if(0!==t){if(2===t&&(0!==(i=mt(e))&&(r=i,t=oc(e,i))),1===t)throw n=Nl,pc(e,0),sc(e,r),rc(e,Xe()),n;if(6===t)sc(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!sr(o(),i))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=gc(e,r))&&(0!==(a=mt(e))&&(r=a,t=oc(e,a))),1===t))throw n=Nl,pc(e,0),sc(e,r),rc(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:jc(e,Bl,Wl);break;case 3:if(sc(e,r),(130023424&r)===r&&10<(t=zl+500-Xe())){if(0!==pt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(jc.bind(null,e,Bl,Wl),t);break}jc(e,Bl,Wl);break;case 4:if(sc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Xe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cl(r/1960))-r)){e.timeoutHandle=ri(jc.bind(null,e,Bl,Wl),r);break}jc(e,Bl,Wl);break;default:throw Error(o(329))}}}return rc(e,Xe()),e.callbackNode===n?ic.bind(null,e):null}function oc(e,t){var n=$l;return e.current.memoizedState.isDehydrated&&(pc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=Bl,Bl=n,null!==t&&ac(t)),e}function ac(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function sc(e,t){for(t&=~Fl,t&=~Il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!==(6&Ml))throw Error(o(327));wc();var t=pt(e,0);if(0===(1&t))return rc(e,Xe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=mt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=Nl,pc(e,0),sc(e,t),rc(e,Xe()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,jc(e,Bl,Wl),rc(e,Xe()),null}function cc(e,t){var n=Ml;Ml|=1;try{return e(t)}finally{0===(Ml=n)&&(Hl=Xe()+500,$i&&Hi())}}function dc(e){null!==Yl&&0===Yl.tag&&0===(6&Ml)&&wc();var t=Ml;Ml|=1;var n=kl.transition,r=yt;try{if(kl.transition=null,yt=1,e)return e()}finally{yt=r,kl.transition=n,0===(6&(Ml=t))&&Hi()}}function uc(){Pl=Dl.current,Si(Dl)}function pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Tl)for(n=Tl.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Di();break;case 3:Xo(),Si(Oi),Si(Mi),ra();break;case 5:Jo(r);break;case 4:Xo();break;case 13:case 19:Si(ea);break;case 10:Mo(r.type._context);break;case 22:case 23:uc()}n=n.return}if(Ol=e,Tl=e=Dc(e.current,null),El=Pl=t,Rl=0,Nl=null,Fl=Il=Ll=0,Bl=$l=null,null!==Po){for(t=0;t<Po.length;t++)if(null!==(r=(n=Po[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Po=null}return e}function hc(e,t){for(;;){var n=Tl;try{if(ko(),ia.current=Qa,da){for(var r=sa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}da=!1}if(aa=0,ca=la=sa=null,ua=!1,pa=0,Al.current=null,null===n||null===n.return){Rl=1,Nl=t,Tl=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=El,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var d=c,u=l,p=u.tag;if(0===(1&u.mode)&&(0===p||11===p||15===p)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=gs(s);if(null!==m){m.flags&=-257,vs(m,s,l,0,t),1&m.mode&&fs(a,d,t),c=d;var f=(t=m).updateQueue;if(null===f){var g=new Set;g.add(c),t.updateQueue=g}else f.add(c);break e}if(0===(1&t)){fs(a,d,t),fc();break e}c=Error(o(426))}else if(io&&1&l.mode){var v=gs(s);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),fo(cs(c,l));break e}}a=c=cs(c,l),4!==Rl&&(Rl=2),null===$l?$l=[a]:$l.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Ho(a,hs(0,c,t));break e;case 1:l=c;var x=a.type,y=a.stateNode;if(0===(128&a.flags)&&("function"===typeof x.getDerivedStateFromError||null!==y&&"function"===typeof y.componentDidCatch&&(null===ql||!ql.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Ho(a,ms(a,l,t));break e}}a=a.return}while(null!==a)}bc(n)}catch(b){t=b,Tl===n&&null!==n&&(Tl=n=n.return);continue}break}}function mc(){var e=Sl.current;return Sl.current=Qa,null===e?Qa:e}function fc(){0!==Rl&&3!==Rl&&2!==Rl||(Rl=4),null===Ol||0===(268435455&Ll)&&0===(268435455&Il)||sc(Ol,El)}function gc(e,t){var n=Ml;Ml|=2;var r=mc();for(Ol===e&&El===t||(Wl=null,pc(e,t));;)try{vc();break}catch(i){hc(e,i)}if(ko(),Ml=n,Sl.current=r,null!==Tl)throw Error(o(261));return Ol=null,El=0,Rl}function vc(){for(;null!==Tl;)yc(Tl)}function xc(){for(;null!==Tl&&!Ze();)yc(Tl)}function yc(e){var t=_l(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,null===t?bc(e):Tl=t,Al.current=null}function bc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Gs(n,t,Pl)))return void(Tl=n)}else{if(null!==(n=Ys(n,t)))return n.flags&=32767,void(Tl=n);if(null===e)return Rl=6,void(Tl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Tl=t);Tl=t=e}while(null!==t);0===Rl&&(Rl=5)}function jc(e,t,n){var r=yt,i=kl.transition;try{kl.transition=null,yt=1,function(e,t,n,r){do{wc()}while(null!==Yl);if(0!==(6&Ml))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===Ol&&(Tl=Ol=null,El=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Gl||(Gl=!0,Oc(tt,function(){return wc(),null})),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=kl.transition,kl.transition=null;var s=yt;yt=1;var l=Ml;Ml|=4,Al.current=null,function(e,t){if(ei=Vt,hr(e=pr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(j){n=null;break e}var s=0,l=-1,c=-1,d=0,u=0,p=e,h=null;t:for(;;){for(var m;p!==n||0!==i&&3!==p.nodeType||(l=s+i),p!==a||0!==r&&3!==p.nodeType||(c=s+r),3===p.nodeType&&(s+=p.nodeValue.length),null!==(m=p.firstChild);)h=p,p=m;for(;;){if(p===e)break t;if(h===n&&++d===i&&(l=s),h===a&&++u===r&&(c=s),null!==(m=p.nextSibling))break;h=(p=h).parentNode}p=m}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Vt=!1,Qs=t;null!==Qs;)if(e=(t=Qs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Qs=e;else for(;null!==Qs;){t=Qs;try{var f=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==f){var g=f.memoizedProps,v=f.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),v);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(o(163))}}catch(j){Cc(t,t.return,j)}if(null!==(e=t.sibling)){e.return=t.return,Qs=e;break}Qs=t.return}f=tl,tl=!1}(e,n),gl(n,e),mr(ti),Vt=!!ei,ti=ei=null,e.current=n,xl(n,e,i),Ke(),Ml=l,yt=s,kl.transition=a}else e.current=n;if(Gl&&(Gl=!1,Yl=e,Zl=i),a=e.pendingLanes,0===a&&(ql=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,Xe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Vl)throw Vl=!1,e=Ul,Ul=null,e;0!==(1&Zl)&&0!==e.tag&&wc(),a=e.pendingLanes,0!==(1&a)?e===Xl?Kl++:(Kl=0,Xl=e):Kl=0,Hi()}(e,t,n,r)}finally{kl.transition=i,yt=r}return null}function wc(){if(null!==Yl){var e=bt(Zl),t=kl.transition,n=yt;try{if(kl.transition=null,yt=16>e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,Zl=0,0!==(6&Ml))throw Error(o(331));var i=Ml;for(Ml|=4,Qs=e.current;null!==Qs;){var a=Qs,s=a.child;if(0!==(16&Qs.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var d=l[c];for(Qs=d;null!==Qs;){var u=Qs;switch(u.tag){case 0:case 11:case 15:nl(8,u,a)}var p=u.child;if(null!==p)p.return=u,Qs=p;else for(;null!==Qs;){var h=(u=Qs).sibling,m=u.return;if(ol(u),u===d){Qs=null;break}if(null!==h){h.return=m,Qs=h;break}Qs=m}}}var f=a.alternate;if(null!==f){var g=f.child;if(null!==g){f.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Qs=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Qs=s;else e:for(;null!==Qs;){if(0!==(2048&(a=Qs).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var x=a.sibling;if(null!==x){x.return=a.return,Qs=x;break e}Qs=a.return}}var y=e.current;for(Qs=y;null!==Qs;){var b=(s=Qs).child;if(0!==(2064&s.subtreeFlags)&&null!==b)b.return=s,Qs=b;else e:for(s=y;null!==Qs;){if(0!==(2048&(l=Qs).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(w){Cc(l,l.return,w)}if(l===s){Qs=null;break e}var j=l.sibling;if(null!==j){j.return=l.return,Qs=j;break e}Qs=l.return}}if(Ml=i,Hi(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(w){}r=!0}return r}finally{yt=n,kl.transition=t}}return!1}function _c(e,t,n){e=Bo(e,t=hs(0,t=cs(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),rc(e,t))}function Cc(e,t,n){if(3===e.tag)_c(e,e,n);else for(;null!==t;){if(3===t.tag){_c(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===ql||!ql.has(r))){t=Bo(t,e=ms(t,e=cs(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),rc(t,e));break}}t=t.return}}function Sc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Ol===e&&(El&n)===n&&(4===Rl||3===Rl&&(130023424&El)===El&&500>Xe()-zl?pc(e,0):Fl|=n),rc(e,t)}function Ac(e,t){0===t&&(0===(1&e.mode)?t=1:(t=dt,0===(130023424&(dt<<=1))&&(dt=4194304)));var n=ec();null!==(e=No(e,t))&&(vt(e,t,n),rc(e,n))}function kc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ac(e,n)}function Mc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Ac(e,n)}function Oc(e,t){return Ge(e,t)}function Tc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ec(e,t,n,r){return new Tc(e,t,n,r)}function Pc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dc(e,t){var n=e.alternate;return null===n?((n=Ec(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Rc(e,t,n,r,i,a){var s=2;if(r=e,"function"===typeof e)Pc(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case _:return Nc(n.children,i,a,t);case C:s=8,i|=8;break;case S:return(e=Ec(12,n,t,2|i)).elementType=S,e.lanes=a,e;case O:return(e=Ec(13,n,t,i)).elementType=O,e.lanes=a,e;case T:return(e=Ec(19,n,t,i)).elementType=T,e.lanes=a,e;case D:return Lc(n,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case A:s=10;break e;case k:s=9;break e;case M:s=11;break e;case E:s=14;break e;case P:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Ec(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Nc(e,t,n,r){return(e=Ec(7,e,r,t)).lanes=n,e}function Lc(e,t,n,r){return(e=Ec(22,e,r,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Ic(e,t,n){return(e=Ec(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Ec(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $c(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bc(e,t,n,r,i,o,a,s,l){return e=new $c(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ec(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Io(o),e}function zc(e){if(!e)return ki;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Pi(n))return Ni(e,n,t)}return t}function Hc(e,t,n,r,i,o,a,s,l){return(e=Bc(n,r,!0,e,0,o,0,s,l)).context=zc(null),n=e.current,(o=$o(r=ec(),i=tc(n))).callback=void 0!==t&&null!==t?t:null,Bo(n,o,i),e.current.lanes=i,vt(e,i,r),rc(e,r),e}function Wc(e,t,n,r){var i=t.current,o=ec(),a=tc(i);return n=zc(n),null===t.context?t.context=n:t.pendingContext=n,(t=$o(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Bo(i,t,a))&&(nc(e,i,a,o),zo(e,i,a)),a}function Vc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Uc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qc(e,t){Uc(e,t),(e=e.alternate)&&Uc(e,t)}_l=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Oi.current)ys=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ys=!1,function(e,t,n){switch(t.tag){case 3:Os(t),mo();break;case 5:Qo(t);break;case 1:Pi(t.type)&&Li(t);break;case 4:Ko(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ai(_o,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ai(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Is(e,t,n):(Ai(ea,1&ea.current),null!==(e=Vs(e,t,n))?e.sibling:null);Ai(ea,1&ea.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Hs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ai(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,Cs(e,t,n)}return Vs(e,t,n)}(e,t,n);ys=0!==(131072&e.flags)}else ys=!1,io&&0!==(1048576&t.flags)&&Ji(t,qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ws(e,t),e=t.pendingProps;var i=Ei(t,Mi.current);To(t,n),i=ga(null,t,r,e,i,n);var a=va();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pi(r)?(a=!0,Li(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Io(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=Ms(null,t,r,!0,a,n)):(t.tag=0,io&&a&&eo(t),bs(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ws(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Pc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===M)return 11;if(e===E)return 14}return 2}(r),e=ns(r,e),i){case 0:t=As(null,t,r,e,n);break e;case 1:t=ks(null,t,r,e,n);break e;case 11:t=js(null,t,r,e,n);break e;case 14:t=ws(null,t,r,ns(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,As(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,ks(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(Os(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,Fo(e,t),Wo(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ts(e,t,r,n,i=cs(Error(o(423)),t));break e}if(r!==i){t=Ts(e,t,r,n,i=cs(Error(o(424)),t));break e}for(ro=ci(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=wo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(mo(),r===i){t=Vs(e,t,n);break e}bs(e,t,r,n)}t=t.child}return t;case 5:return Qo(t),null===e&&co(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==a&&ni(r,a)&&(t.flags|=32),Ss(e,t),bs(e,t,s,n),t.child;case 6:return null===e&&co(t),null;case 13:return Is(e,t,n);case 4:return Ko(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=jo(t,null,r,n):bs(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,js(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 7:return bs(e,t,t.pendingProps,n),t.child;case 8:case 12:return bs(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Ai(_o,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===i.children&&!Oi.current){t=Vs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=$o(-1,n&-n)).tag=2;var d=a.updateQueue;if(null!==d){var u=(d=d.shared).pending;null===u?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),Oo(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Oo(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}bs(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,To(t,n),r=r(i=Eo(i)),t.flags|=1,bs(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),ws(e,t,r,i=ns(r.type,i),n);case 15:return _s(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ns(r,i),Ws(e,t),t.tag=1,Pi(r)?(e=!0,Li(t)):e=!1,To(t,n),as(t,r,i),ls(t,r,i,n),Ms(null,t,r,!0,e,n);case 19:return Hs(e,t,n);case 22:return Cs(e,t,n)}throw Error(o(156,t.tag))};var Gc="function"===typeof reportError?reportError:function(e){console.error(e)};function Yc(e){this._internalRoot=e}function Zc(e){this._internalRoot=e}function Kc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function Jc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"===typeof i){var s=i;i=function(){var e=Vc(a);s.call(e)}}Wc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"===typeof r){var o=r;r=function(){var e=Vc(a);o.call(e)}}var a=Hc(t,r,e,0,null,!1,0,"",Qc);return e._reactRootContainer=a,e[mi]=a.current,Hr(8===e.nodeType?e.parentNode:e),dc(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var s=r;r=function(){var e=Vc(l);s.call(e)}}var l=Bc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[mi]=l.current,Hr(8===e.nodeType?e.parentNode:e),dc(function(){Wc(t,l,n,r)}),l}(n,t,e,i,r);return Vc(a)}Zc.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Wc(e,t,null,null)},Zc.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc(function(){Wc(null,e,null,null)}),t[mi]=null}},Zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&It(e)}},jt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ut(t.pendingLanes);0!==n&&(xt(t,1|n),rc(t,Xe()),0===(6&Ml)&&(Hl=Xe()+500,Hi()))}break;case 13:dc(function(){var t=No(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}}),qc(e,1)}},wt=function(e){if(13===e.tag){var t=No(e,134217728);if(null!==t)nc(t,e,134217728,ec());qc(e,134217728)}},_t=function(e){if(13===e.tag){var t=tc(e),n=No(e,t);if(null!==n)nc(n,e,t,ec());qc(e,t)}},Ct=function(){return yt},St=function(e,t){var n=yt;try{return yt=e,t()}finally{yt=n}},we=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ji(r);if(!i)throw Error(o(90));G(r),Q(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Me=cc,Oe=dc;var ed={usingClientEntryPoint:!1,Events:[yi,bi,ji,Ae,ke,cc]},td={findFiberByHostInstance:xi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nd={bundleType:td.bundleType,version:td.version,rendererPackageName:td.rendererPackageName,rendererConfig:td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ue(e))?null:e.stateNode},findFiberByHostInstance:td.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{it=rd.inject(nd),ot=rd}catch(de){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ed,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kc(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Kc(e))throw Error(o(299));var n=!1,r="",i=Gc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Bc(e,1,!1,null,0,n,0,r,i),e[mi]=t.current,Hr(8===e.nodeType?e.parentNode:e),new Yc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ue(t))?null:e.stateNode},t.flushSync=function(e){return dc(e)},t.hydrate=function(e,t,n){if(!Xc(t))throw Error(o(200));return Jc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Kc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=Gc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Hc(t,null,e,1,null!=n?n:null,i,0,a,s),e[mi]=t.current,Hr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Zc(t)},t.render=function(e,t,n){if(!Xc(t))throw Error(o(200));return Jc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(o(40));return!!e._reactRootContainer&&(dc(function(){Jc(null,null,e,!1,function(){e._reactRootContainer=null,e[mi]=null})}),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Jc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},83290:(e,t,n)=>{"use strict";n.d(t,{AH:()=>d,i7:()=>u,mL:()=>c});var r=n(69369),i=n(65043),o=n(81722),a=n(69436),s=n(66598),l=(n(93803),n(80219),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return i.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=r.E,a[1]=(0,r.c)(e,t);for(var s=2;s<o;s++)a[s]=n[s];return i.createElement.apply(null,a)});!function(e){var t;t||(t=e.JSX||(e.JSX={}))}(l||(l={}));var c=(0,r.w)(function(e,t){var n=e.styles,l=(0,s.J)([n],void 0,i.useContext(r.T)),c=i.useRef();return(0,a.i)(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),c.current=[n,r],function(){n.flush()}},[t]),(0,a.i)(function(){var e=c.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,o.sk)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}},[t,l.name]),null});function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.J)(t)}function u(){var e=d.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},83382:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>o});var r=n(90191);const i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function o(e){const t="".concat(e).match(i);return t&&t[1]||""}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||o(e)||t}function s(e,t,n){const r=a(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return a(e,"Component");if("object"===typeof e)switch(e.$$typeof){case r.vM:return s(e,e.render,"ForwardRef");case r.lD:return s(e,e.type,"memo");default:return}}}},83468:(e,t,n)=>{"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout(()=>{e.apply(this,i)},n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{A:()=>r})},83713:(e,t,n)=>{var r=n(36140),i=n(61143),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},83950:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,i=t;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},84391:(e,t,n)=>{"use strict";var r=n(97950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},84440:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(65043);const i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect},84445:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key")},84545:(e,t,n)=>{var r=n(97160);e.exports=function(){this.__data__=new r,this.size=0}},85204:(e,t,n)=>{var r=n(87937)(n(56552),"Map");e.exports=r},85473:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},85990:(e,t,n)=>{var r=n(13028)(Object.getPrototypeOf,Object);e.exports=r},86178:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,n;function r(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function d(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function h(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return Yn(e,t,n,r,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=f()),e._pf}function v(e){var t=null,r=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=g(e),r=n.call(t.parsedDateParts,function(e){return null!=e}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function x(e){var t=m(NaN);return null!=e?h(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var y=r.momentProperties=[],b=!1;function j(e,t){var n,r,i,o=y.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)c(i=t[r=y[n]])||(e[r]=i);return e}function w(e){j(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,r.updateOffset(this),b=!1)}function _(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function C(e){!1===r.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function S(e,t){var n=!0;return h(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,o,a,l=[],c=arguments.length;for(o=0;o<c;o++){if(i="","object"===typeof arguments[o]){for(a in i+="\n["+o+"] ",arguments[0])s(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];l.push(i)}C(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var A,k={};function M(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),k[e]||(C(t),k[e]=!0)}function O(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function T(e){var t,n;for(n in e)s(e,n)&&(O(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function E(e,t){var n,r=h({},e);for(n in t)s(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&a(e[n])&&(r[n]=h({},r[n]));return r}function P(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,A=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var D={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function R(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return O(r)?r.call(t,n):r}function N(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},$={};function B(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&($[e]=i),t&&($[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function H(e){var t,n,r=e.match(L);for(t=0,n=r.length;t<n;t++)$[r[t]]?r[t]=$[r[t]]:r[t]=z(r[t]);return function(t){var i,o="";for(i=0;i<n;i++)o+=O(r[i])?r[i].call(t,e):r[i];return o}}function W(e,t){return e.isValid()?(t=V(t,e.localeData()),F[t]=F[t]||H(t),F[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(I.lastIndex=0;n>=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var U={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function q(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(L).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}var G="Invalid date";function Y(){return this._invalidDate}var Z="%d",K=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Q={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(e,t,n,r){var i=this._relativeTime[n];return O(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,r={};for(n in e)s(e,n)&&(t=ne(n))&&(r[t]=e[n]);return r}var ie={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function oe(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:ie[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}var ae,se=/\d/,le=/\d\d/,ce=/\d{3}/,de=/\d{4}/,ue=/[+-]?\d{6}/,pe=/\d\d?/,he=/\d\d\d\d?/,me=/\d\d\d\d\d\d?/,fe=/\d{1,3}/,ge=/\d{1,4}/,ve=/[+-]?\d{1,6}/,xe=/\d+/,ye=/[+-]?\d+/,be=/Z|[+-]\d\d:?\d\d/gi,je=/Z|[+-]\d\d(?::?\d\d)?/gi,we=/[+-]?\d+(\.\d{1,3})?/,_e=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ce=/^[1-9]\d?/,Se=/^([1-9]\d|\d)/;function Ae(e,t,n){ae[e]=O(t)?t:function(e,r){return e&&n?n:t}}function ke(e,t){return s(ae,e)?ae[e](t._strict,t._locale):new RegExp(Me(e))}function Me(e){return Oe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function Oe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Te(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ee(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Te(t)),n}ae={};var Pe={};function De(e,t){var n,r,i=t;for("string"===typeof e&&(e=[e]),d(t)&&(i=function(e,n){n[t]=Ee(e)}),r=e.length,n=0;n<r;n++)Pe[e[n]]=i}function Re(e,t){De(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function Ne(e,t,n){null!=t&&s(Pe,e)&&Pe[e](t,n._a,n,e)}function Le(e){return e%4===0&&e%100!==0||e%400===0}var Ie=0,Fe=1,$e=2,Be=3,ze=4,He=5,We=6,Ve=7,Ue=8;function qe(e){return Le(e)?366:365}B("Y",0,0,function(){var e=this.year();return e<=9999?N(e,4):"+"+e}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),Ae("Y",ye),Ae("YY",pe,le),Ae("YYYY",ge,de),Ae("YYYYY",ve,ue),Ae("YYYYYY",ve,ue),De(["YYYYY","YYYYYY"],Ie),De("YYYY",function(e,t){t[Ie]=2===e.length?r.parseTwoDigitYear(e):Ee(e)}),De("YY",function(e,t){t[Ie]=r.parseTwoDigitYear(e)}),De("Y",function(e,t){t[Ie]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return Ee(e)+(Ee(e)>68?1900:2e3)};var Ge,Ye=Ke("FullYear",!0);function Ze(){return Le(this.year())}function Ke(e,t){return function(n){return null!=n?(Qe(this,e,n),r.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Qe(e,t,n){var r,i,o,a,s;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,a=e.month(),s=29!==(s=e.date())||1!==a||Le(o)?s:28,i?r.setUTCFullYear(o,a,s):r.setFullYear(o,a,s)}}function Je(e){return O(this[e=ne(e)])?this[e]():this}function et(e,t){if("object"===typeof e){var n,r=oe(e=re(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(O(this[e=ne(e)]))return this[e](t);return this}function tt(e,t){return(e%t+t)%t}function nt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=tt(t,12);return e+=(t-n)/12,1===n?Le(e)?29:28:31-n%7%2}Ge=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),B("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Ae("M",pe,Ce),Ae("MM",pe,le),Ae("MMM",function(e,t){return t.monthsShortRegex(e)}),Ae("MMMM",function(e,t){return t.monthsRegex(e)}),De(["M","MM"],function(e,t){t[Fe]=Ee(e)-1}),De(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[Fe]=i:g(n).invalidMonth=e});var rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),it="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ot=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,at=_e,st=_e;function lt(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ot).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone}function ct(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ot.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function dt(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ge.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ge.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ge.call(this._shortMonthsParse,a))||-1!==(i=Ge.call(this._longMonthsParse,a))?i:null:-1!==(i=Ge.call(this._longMonthsParse,a))||-1!==(i=Ge.call(this._shortMonthsParse,a))?i:null}function ut(e,t,n){var r,i,o;if(this._monthsParseExact)return dt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function pt(e,t){if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=Ee(t);else if(!d(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,nt(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function ht(e){return null!=e?(pt(this,e),r.updateOffset(this,!0),this):Xe(this,"Month")}function mt(){return nt(this.year(),this.month())}function ft(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=at),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=st),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function vt(){function e(e,t){return t.length-e.length}var t,n,r,i,o=[],a=[],s=[];for(t=0;t<12;t++)n=m([2e3,t]),r=Oe(this.monthsShort(n,"")),i=Oe(this.months(n,"")),o.push(r),a.push(i),s.push(i),s.push(r);o.sort(e),a.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function xt(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function yt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,n){var r=7+t-n;return-(7+yt(e,0,r).getUTCDay()-t)%7+r-1}function jt(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+bt(e,r,i);return s<=0?a=qe(o=e-1)+s:s>qe(e)?(o=e+1,a=s-qe(e)):(o=e,a=s),{year:o,dayOfYear:a}}function wt(e,t,n){var r,i,o=bt(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+_t(i=e.year()-1,t,n):a>_t(e.year(),t,n)?(r=a-_t(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function _t(e,t,n){var r=bt(e,t,n),i=bt(e+1,t,n);return(qe(e)-r+i)/7}function Ct(e){return wt(e,this._week.dow,this._week.doy).week}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),Ae("w",pe,Ce),Ae("ww",pe,le),Ae("W",pe,Ce),Ae("WW",pe,le),Re(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Ee(e)});var St={dow:0,doy:6};function At(){return this._week.dow}function kt(){return this._week.doy}function Mt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ot(e){var t=wt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Tt(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Et(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pt(e,t){return e.slice(t,7).concat(e.slice(0,t))}B("d",0,"do","day"),B("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),B("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),B("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),Ae("d",pe),Ae("e",pe),Ae("E",pe),Ae("dd",function(e,t){return t.weekdaysMinRegex(e)}),Ae("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Ae("dddd",function(e,t){return t.weekdaysRegex(e)}),Re(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),Re(["d","e","E"],function(e,t,n,r){t[r]=Ee(e)});var Dt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Lt=_e,It=_e,Ft=_e;function $t(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Pt(n,this._week.dow):e?n[e.day()]:n}function Bt(e){return!0===e?Pt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function zt(e){return!0===e?Pt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ht(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ge.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ge.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ge.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ge.call(this._weekdaysParse,a))||-1!==(i=Ge.call(this._shortWeekdaysParse,a))||-1!==(i=Ge.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ge.call(this._shortWeekdaysParse,a))||-1!==(i=Ge.call(this._weekdaysParse,a))||-1!==(i=Ge.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ge.call(this._minWeekdaysParse,a))||-1!==(i=Ge.call(this._weekdaysParse,a))||-1!==(i=Ge.call(this._shortWeekdaysParse,a))?i:null}function Wt(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Ht.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=Xe(this,"Day");return null!=e?(e=Tt(e,this.localeData()),this.add(e-t,"d")):t}function Ut(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function qt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Et(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Gt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Lt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=It),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Zt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ft),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=Oe(this.weekdaysMin(n,"")),i=Oe(this.weekdaysShort(n,"")),o=Oe(this.weekdays(n,"")),a.push(r),s.push(i),l.push(o),c.push(r),c.push(i),c.push(o);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Qt(){return this.hours()||24}function Jt(e,t){B(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Xt),B("k",["kk",2],0,Qt),B("hmm",0,0,function(){return""+Xt.apply(this)+N(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Xt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),Jt("a",!0),Jt("A",!1),Ae("a",en),Ae("A",en),Ae("H",pe,Se),Ae("h",pe,Ce),Ae("k",pe,Ce),Ae("HH",pe,le),Ae("hh",pe,le),Ae("kk",pe,le),Ae("hmm",he),Ae("hmmss",me),Ae("Hmm",he),Ae("Hmmss",me),De(["H","HH"],Be),De(["k","kk"],function(e,t,n){var r=Ee(e);t[Be]=24===r?0:r}),De(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),De(["h","hh"],function(e,t,n){t[Be]=Ee(e),g(n).bigHour=!0}),De("hmm",function(e,t,n){var r=e.length-2;t[Be]=Ee(e.substr(0,r)),t[ze]=Ee(e.substr(r)),g(n).bigHour=!0}),De("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Be]=Ee(e.substr(0,r)),t[ze]=Ee(e.substr(r,2)),t[He]=Ee(e.substr(i)),g(n).bigHour=!0}),De("Hmm",function(e,t,n){var r=e.length-2;t[Be]=Ee(e.substr(0,r)),t[ze]=Ee(e.substr(r))}),De("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Be]=Ee(e.substr(0,r)),t[ze]=Ee(e.substr(r,2)),t[He]=Ee(e.substr(i))});var nn=/[ap]\.?m?\.?/i,rn=Ke("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:D,longDateFormat:U,invalidDate:G,ordinal:Z,dayOfMonthOrdinalParse:K,relativeTime:Q,months:rt,monthsShort:it,week:St,weekdays:Dt,weekdaysMin:Nt,weekdaysShort:Rt,meridiemParse:nn},ln={},cn={};function dn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function un(e){return e?e.toLowerCase().replace("_","-"):e}function pn(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=un(e[o]).split("-")).length,n=(n=un(e[o+1]))?n.split("-"):null;t>0;){if(r=mn(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dn(i,n)>=t-1)break;t--}o++}return an}function hn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function mn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&hn(t))try{n=an._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),fn(n)}catch(r){ln[t]=null}return ln[t]}function fn(e,t){var n;return e&&((n=c(t)?xn(e):gn(e,t))?an=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=mn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new P(E(r,t)),cn[e]&&cn[e].forEach(function(e){gn(e.name,e.config)}),fn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,i=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(E(ln[e]._config,t)):(null!=(r=mn(e))&&(i=r._config),t=E(i,t),null==r&&(t.abbr=e),(n=new P(t)).parentLocale=ln[e],ln[e]=n),fn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===fn()&&fn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function xn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!o(e)){if(t=mn(e))return t;e=[e]}return pn(e)}function yn(){return A(ln)}function bn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Fe]<0||n[Fe]>11?Fe:n[$e]<1||n[$e]>nt(n[Ie],n[Fe])?$e:n[Be]<0||n[Be]>24||24===n[Be]&&(0!==n[ze]||0!==n[He]||0!==n[We])?Be:n[ze]<0||n[ze]>59?ze:n[He]<0||n[He]>59?He:n[We]<0||n[We]>999?We:-1,g(e)._overflowDayOfYear&&(t<Ie||t>$e)&&(t=$e),g(e)._overflowWeeks&&-1===t&&(t=Ve),g(e)._overflowWeekday&&-1===t&&(t=Ue),g(e).overflow=t),e}var jn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_n=/Z|[+-]\d\d(?::?\d\d)?/,Cn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Sn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],An=/^\/?Date\((-?\d+)/i,kn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Mn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function On(e){var t,n,r,i,o,a,s=e._i,l=jn.exec(s)||wn.exec(s),c=Cn.length,d=Sn.length;if(l){for(g(e).iso=!0,t=0,n=c;t<n;t++)if(Cn[t][1].exec(l[1])){i=Cn[t][0],r=!1!==Cn[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=d;t<n;t++)if(Sn[t][1].exec(l[3])){o=(l[2]||" ")+Sn[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!_n.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),zn(e)}else e._isValid=!1}function Tn(e,t,n,r,i,o){var a=[En(e),it.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function En(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Pn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Dn(e,t,n){return!e||Rt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Rn(e,t,n){if(e)return Mn[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Nn(e){var t,n=kn.exec(Pn(e._i));if(n){if(t=Tn(n[4],n[3],n[2],n[5],n[6],n[7]),!Dn(n[1],t,e))return;e._a=t,e._tzm=Rn(n[8],n[9],n[10]),e._d=yt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Ln(e){var t=An.exec(e._i);null===t?(On(e),!1===e._isValid&&(delete e._isValid,Nn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function In(e,t,n){return null!=e?e:null!=t?t:n}function Fn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function $n(e){var t,n,r,i,o,a=[];if(!e._d){for(r=Fn(e),e._w&&null==e._a[$e]&&null==e._a[Fe]&&Bn(e),null!=e._dayOfYear&&(o=In(e._a[Ie],r[Ie]),(e._dayOfYear>qe(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=yt(o,0,e._dayOfYear),e._a[Fe]=n.getUTCMonth(),e._a[$e]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Be]&&0===e._a[ze]&&0===e._a[He]&&0===e._a[We]&&(e._nextDay=!0,e._a[Be]=0),e._d=(e._useUTC?yt:xt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Be]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Bn(e){var t,n,r,i,o,a,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,n=In(t.GG,e._a[Ie],wt(Zn(),1,4).year),r=In(t.W,1),((i=In(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,c=wt(Zn(),o,a),n=In(t.gg,e._a[Ie],c.year),r=In(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>_t(n,o,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=jt(n,r,i,o,a),e._a[Ie]=s.year,e._dayOfYear=s.dayOfYear)}function zn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,i,o,a,s,l,c=""+e._i,d=c.length,u=0;for(l=(i=V(e._f,e._locale).match(L)||[]).length,t=0;t<l;t++)o=i[t],(n=(c.match(ke(o,e))||[])[0])&&((a=c.substr(0,c.indexOf(n))).length>0&&g(e).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),u+=n.length),$[o]?(n?g(e).empty=!1:g(e).unusedTokens.push(o),Ne(o,n,e)):e._strict&&!n&&g(e).unusedTokens.push(o);g(e).charsLeftOver=d-u,c.length>0&&g(e).unusedInput.push(c),e._a[Be]<=12&&!0===g(e).bigHour&&e._a[Be]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Be]=Hn(e._locale,e._a[Be],e._meridiem),null!==(s=g(e).era)&&(e._a[Ie]=e._locale.erasConvertYear(s,e._a[Ie])),$n(e),bn(e)}else Nn(e);else On(e)}function Hn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Wn(e){var t,n,r,i,o,a,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)o=0,a=!1,t=j({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],zn(t),v(t)&&(a=!0),o+=g(t).charsLeftOver,o+=10*g(t).unusedTokens.length,g(t).score=o,s?o<r&&(r=o,n=t):(null==r||o<r||a)&&(r=o,n=t,a&&(s=!0));h(e,n||t)}function Vn(e){if(!e._d){var t=re(e._i),n=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),$n(e)}}function Un(e){var t=new w(bn(qn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function qn(e){var t=e._i,n=e._f;return e._locale=e._locale||xn(e._l),null===t||void 0===n&&""===t?x({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),_(t)?new w(bn(t)):(u(t)?e._d=t:o(n)?Wn(e):n?zn(e):Gn(e),v(e)||(e._d=null),e))}function Gn(e){var t=e._i;c(t)?e._d=new Date(r.now()):u(t)?e._d=new Date(t.valueOf()):"string"===typeof t?Ln(e):o(t)?(e._a=p(t.slice(0),function(e){return parseInt(e,10)}),$n(e)):a(t)?Vn(e):d(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Yn(e,t,n,r,i){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Un(s)}function Zn(e,t,n,r){return Yn(e,t,n,r,!1)}r.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Kn=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:x()}),Xn=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Zn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:x()});function Qn(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Zn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function Jn(){return Qn("isBefore",[].slice.call(arguments,0))}function er(){return Qn("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,i=nr.length;for(t in e)if(s(e,t)&&(-1===Ge.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==Ee(e[nr[n]])&&(r=!0)}return!0}function ir(){return this._isValid}function or(){return Mr(NaN)}function ar(e){var t=re(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=xn(),this._bubble()}function sr(e){return e instanceof ar}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cr(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&Ee(e[r])!==Ee(t[r]))&&a++;return a+o}function dr(e,t){B(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+N(~~(e/60),2)+t+N(~~e%60,2)})}dr("Z",":"),dr("ZZ",""),Ae("Z",je),Ae("ZZ",je),De(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=pr(je,e)});var ur=/([\+\-]|\d\d)/gi;function pr(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(ur)||["-",0,0])[1]+Ee(n[2]))?0:"+"===n[0]?r:-r}function hr(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(_(e)||u(e)?e.valueOf():Zn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Zn(e).local()}function mr(e){return-Math.round(e._d.getTimezoneOffset())}function fr(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(null===(e=pr(je,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=mr(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Dr(this,Mr(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:mr(this)}function gr(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vr(e){return this.utcOffset(0,e)}function xr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mr(this),"m")),this}function yr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=pr(be,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function br(e){return!!this.isValid()&&(e=e?Zn(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function jr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return j(t,this),(t=qn(t))._a?(e=t._isUTC?m(t._a):Zn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function _r(){return!!this.isValid()&&!this._isUTC}function Cr(){return!!this.isValid()&&this._isUTC}function Sr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Ar=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,kr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Mr(e,t){var n,r,i,o=e,a=null;return sr(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Ar.exec(e))?(n="-"===a[1]?-1:1,o={y:0,d:Ee(a[$e])*n,h:Ee(a[Be])*n,m:Ee(a[ze])*n,s:Ee(a[He])*n,ms:Ee(lr(1e3*a[We]))*n}):(a=kr.exec(e))?(n="-"===a[1]?-1:1,o={y:Or(a[2],n),M:Or(a[3],n),w:Or(a[4],n),d:Or(a[5],n),h:Or(a[6],n),m:Or(a[7],n),s:Or(a[8],n)}):null==o?o={}:"object"===typeof o&&("from"in o||"to"in o)&&(i=Er(Zn(o.from),Zn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new ar(o),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Or(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Tr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Er(e,t){var n;return e.isValid()&&t.isValid()?(t=hr(t,e),e.isBefore(t)?n=Tr(e,t):((n=Tr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Pr(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(M(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Dr(this,Mr(n,r),e),this}}function Dr(e,t,n,i){var o=t._milliseconds,a=lr(t._days),s=lr(t._months);e.isValid()&&(i=null==i||i,s&&pt(e,Xe(e,"Month")+s*n),a&&Qe(e,"Date",Xe(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),i&&r.updateOffset(e,a||s))}Mr.fn=ar.prototype,Mr.invalid=or;var Rr=Pr(1,"add"),Nr=Pr(-1,"subtract");function Lr(e){return"string"===typeof e||e instanceof String}function Ir(e){return _(e)||u(e)||Lr(e)||d(e)||$r(e)||Fr(e)||null===e||void 0===e}function Fr(e){var t,n,r=a(e)&&!l(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=o.length;for(t=0;t<c;t+=1)n=o[t],i=i||s(e,n);return r&&i}function $r(e){var t=o(e),n=!1;return t&&(n=0===e.filter(function(t){return!d(t)&&Lr(e)}).length),t&&n}function Br(e){var t,n,r=a(e)&&!l(e),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)n=o[t],i=i||s(e,n);return r&&i}function zr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Hr(e,t){1===arguments.length&&(arguments[0]?Ir(arguments[0])?(e=arguments[0],t=void 0):Br(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Zn(),i=hr(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(O(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Zn(n)))}function Wr(){return new w(this)}function Vr(e,t){var n=_(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Ur(e,t){var n=_(e)?e:Zn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function qr(e,t,n,r){var i=_(e)?e:Zn(e),o=_(t)?t:Zn(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))}function Gr(e,t){var n,r=_(e)?e:Zn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Yr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Zr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Kr(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=hr(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=ne(t)){case"year":o=Xr(this,r)/12;break;case"month":o=Xr(this,r);break;case"quarter":o=Xr(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:Te(o)}function Xr(e,t){if(e.date()<t.date())return-Xr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Qr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Jr(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?W(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(e+t+n+r)}function ti(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(_(e)&&e.isValid()||Zn(e).isValid())?Mr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ri(e){return this.from(Zn(),e)}function ii(e,t){return this.isValid()&&(_(e)&&e.isValid()||Zn(e).isValid())?Mr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Zn(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=xn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function li(){return this._locale}var ci=1e3,di=60*ci,ui=60*di,pi=3506328*ui;function hi(e,t){return(e%t+t)%t}function mi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-pi:new Date(e,t,n).valueOf()}function fi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-pi:Date.UTC(e,t,n)}function gi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fi:mi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hi(t+(this._isUTC?0:this.utcOffset()*di),ui);break;case"minute":t=this._d.valueOf(),t-=hi(t,di);break;case"second":t=this._d.valueOf(),t-=hi(t,ci)}return this._d.setTime(t),r.updateOffset(this,!0),this}function vi(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fi:mi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ui-hi(t+(this._isUTC?0:this.utcOffset()*di),ui)-1;break;case"minute":t=this._d.valueOf(),t+=di-hi(t,di)-1;break;case"second":t=this._d.valueOf(),t+=ci-hi(t,ci)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function xi(){return this._d.valueOf()-6e4*(this._offset||0)}function yi(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function ji(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wi(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function _i(){return this.isValid()?this.toISOString():null}function Ci(){return v(this)}function Si(){return h({},g(this))}function Ai(){return g(this).overflow}function ki(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Mi(e,t){var n,i,o,a=this._eras||xn("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"===typeof a[n].since&&(o=r(a[n].since).startOf("day"),a[n].since=o.valueOf()),typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":o=r(a[n].until).startOf("day").valueOf(),a[n].until=o.valueOf()}return a}function Oi(e,t,n){var r,i,o,a,s,l=this.eras();for(e=e.toUpperCase(),r=0,i=l.length;r<i;++r)if(o=l[r].name.toUpperCase(),a=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[r];break;case"NNNN":if(o===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([o,a,s].indexOf(e)>=0)return l[r]}function Ti(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Ei(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Pi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Di(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Ri(){var e,t,n,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-r(o[e].since).year())*n+o[e].offset;return this.year()}function Ni(e){return s(this,"_erasNameRegex")||Hi.call(this),e?this._erasNameRegex:this._erasRegex}function Li(e){return s(this,"_erasAbbrRegex")||Hi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Ii(e){return s(this,"_erasNarrowRegex")||Hi.call(this),e?this._erasNarrowRegex:this._erasRegex}function Fi(e,t){return t.erasAbbrRegex(e)}function $i(e,t){return t.erasNameRegex(e)}function Bi(e,t){return t.erasNarrowRegex(e)}function zi(e,t){return t._eraYearOrdinalRegex||xe}function Hi(){var e,t,n,r,i,o=[],a=[],s=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)n=Oe(c[e].name),r=Oe(c[e].abbr),i=Oe(c[e].narrow),a.push(n),o.push(r),s.push(i),l.push(n),l.push(r),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function Wi(e,t){B(0,[e,e.length],0,t)}function Vi(e){return Ki.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Ui(e){return Ki.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function qi(){return _t(this.year(),1,4)}function Gi(){return _t(this.isoWeekYear(),1,4)}function Yi(){var e=this.localeData()._week;return _t(this.year(),e.dow,e.doy)}function Zi(){var e=this.localeData()._week;return _t(this.weekYear(),e.dow,e.doy)}function Ki(e,t,n,r,i){var o;return null==e?wt(this,r,i).year:(t>(o=_t(e,r,i))&&(t=o),Xi.call(this,e,t,n,r,i))}function Xi(e,t,n,r,i){var o=jt(e,t,n,r,i),a=yt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Qi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),Ae("N",Fi),Ae("NN",Fi),Ae("NNN",Fi),Ae("NNNN",$i),Ae("NNNNN",Bi),De(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e}),Ae("y",xe),Ae("yy",xe),Ae("yyy",xe),Ae("yyyy",xe),Ae("yo",zi),De(["y","yy","yyy","yyyy"],Ie),De(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ie]=n._locale.eraYearOrdinalParse(e,i):t[Ie]=parseInt(e,10)}),B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Wi("gggg","weekYear"),Wi("ggggg","weekYear"),Wi("GGGG","isoWeekYear"),Wi("GGGGG","isoWeekYear"),Ae("G",ye),Ae("g",ye),Ae("GG",pe,le),Ae("gg",pe,le),Ae("GGGG",ge,de),Ae("gggg",ge,de),Ae("GGGGG",ve,ue),Ae("ggggg",ve,ue),Re(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Ee(e)}),Re(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),B("Q",0,"Qo","quarter"),Ae("Q",se),De("Q",function(e,t){t[Fe]=3*(Ee(e)-1)}),B("D",["DD",2],"Do","date"),Ae("D",pe,Ce),Ae("DD",pe,le),Ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),De(["D","DD"],$e),De("Do",function(e,t){t[$e]=Ee(e.match(pe)[0])});var Ji=Ke("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}B("DDD",["DDDD",3],"DDDo","dayOfYear"),Ae("DDD",fe),Ae("DDDD",ce),De(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Ee(e)}),B("m",["mm",2],0,"minute"),Ae("m",pe,Se),Ae("mm",pe,le),De(["m","mm"],ze);var to=Ke("Minutes",!1);B("s",["ss",2],0,"second"),Ae("s",pe,Se),Ae("ss",pe,le),De(["s","ss"],He);var no,ro,io=Ke("Seconds",!1);for(B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Ae("S",fe,se),Ae("SS",fe,le),Ae("SSS",fe,ce),no="SSSS";no.length<=9;no+="S")Ae(no,xe);function oo(e,t){t[We]=Ee(1e3*("0."+e))}for(no="S";no.length<=9;no+="S")De(no,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}ro=Ke("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var lo=w.prototype;function co(e){return Zn(1e3*e)}function uo(){return Zn.apply(null,arguments).parseZone()}function po(e){return e}lo.add=Rr,lo.calendar=Hr,lo.clone=Wr,lo.diff=Kr,lo.endOf=vi,lo.format=ti,lo.from=ni,lo.fromNow=ri,lo.to=ii,lo.toNow=oi,lo.get=Je,lo.invalidAt=Ai,lo.isAfter=Vr,lo.isBefore=Ur,lo.isBetween=qr,lo.isSame=Gr,lo.isSameOrAfter=Yr,lo.isSameOrBefore=Zr,lo.isValid=Ci,lo.lang=si,lo.locale=ai,lo.localeData=li,lo.max=Xn,lo.min=Kn,lo.parsingFlags=Si,lo.set=et,lo.startOf=gi,lo.subtract=Nr,lo.toArray=ji,lo.toObject=wi,lo.toDate=bi,lo.toISOString=Jr,lo.inspect=ei,"undefined"!==typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=_i,lo.toString=Qr,lo.unix=yi,lo.valueOf=xi,lo.creationData=ki,lo.eraName=Ei,lo.eraNarrow=Pi,lo.eraAbbr=Di,lo.eraYear=Ri,lo.year=Ye,lo.isLeapYear=Ze,lo.weekYear=Vi,lo.isoWeekYear=Ui,lo.quarter=lo.quarters=Qi,lo.month=ht,lo.daysInMonth=mt,lo.week=lo.weeks=Mt,lo.isoWeek=lo.isoWeeks=Ot,lo.weeksInYear=Yi,lo.weeksInWeekYear=Zi,lo.isoWeeksInYear=qi,lo.isoWeeksInISOWeekYear=Gi,lo.date=Ji,lo.day=lo.days=Vt,lo.weekday=Ut,lo.isoWeekday=qt,lo.dayOfYear=eo,lo.hour=lo.hours=rn,lo.minute=lo.minutes=to,lo.second=lo.seconds=io,lo.millisecond=lo.milliseconds=ro,lo.utcOffset=fr,lo.utc=vr,lo.local=xr,lo.parseZone=yr,lo.hasAlignedHourOffset=br,lo.isDST=jr,lo.isLocal=_r,lo.isUtcOffset=Cr,lo.isUtc=Sr,lo.isUTC=Sr,lo.zoneAbbr=ao,lo.zoneName=so,lo.dates=S("dates accessor is deprecated. Use date instead.",Ji),lo.months=S("months accessor is deprecated. Use month instead",ht),lo.years=S("years accessor is deprecated. Use year instead",Ye),lo.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),lo.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wr);var ho=P.prototype;function mo(e,t,n,r){var i=xn(),o=m().set(r,t);return i[n](o,e)}function fo(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return mo(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=mo(e,r,n,"month");return i}function go(e,t,n,r){"boolean"===typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i,o=xn(),a=e?o._week.dow:0,s=[];if(null!=n)return mo(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=mo(t,(i+a)%7,r,"day");return s}function vo(e,t){return fo(e,t,"months")}function xo(e,t){return fo(e,t,"monthsShort")}function yo(e,t,n){return go(e,t,n,"weekdays")}function bo(e,t,n){return go(e,t,n,"weekdaysShort")}function jo(e,t,n){return go(e,t,n,"weekdaysMin")}ho.calendar=R,ho.longDateFormat=q,ho.invalidDate=Y,ho.ordinal=X,ho.preparse=po,ho.postformat=po,ho.relativeTime=J,ho.pastFuture=ee,ho.set=T,ho.eras=Mi,ho.erasParse=Oi,ho.erasConvertYear=Ti,ho.erasAbbrRegex=Li,ho.erasNameRegex=Ni,ho.erasNarrowRegex=Ii,ho.months=lt,ho.monthsShort=ct,ho.monthsParse=ut,ho.monthsRegex=gt,ho.monthsShortRegex=ft,ho.week=Ct,ho.firstDayOfYear=kt,ho.firstDayOfWeek=At,ho.weekdays=$t,ho.weekdaysMin=zt,ho.weekdaysShort=Bt,ho.weekdaysParse=Wt,ho.weekdaysRegex=Gt,ho.weekdaysShortRegex=Yt,ho.weekdaysMinRegex=Zt,ho.isPM=tn,ho.meridiem=on,fn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Ee(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=S("moment.lang is deprecated. Use moment.locale instead.",fn),r.langData=S("moment.langData is deprecated. Use moment.localeData instead.",xn);var wo=Math.abs;function _o(){var e=this._data;return this._milliseconds=wo(this._milliseconds),this._days=wo(this._days),this._months=wo(this._months),e.milliseconds=wo(e.milliseconds),e.seconds=wo(e.seconds),e.minutes=wo(e.minutes),e.hours=wo(e.hours),e.months=wo(e.months),e.years=wo(e.years),this}function Co(e,t,n,r){var i=Mr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function So(e,t){return Co(this,e,t,1)}function Ao(e,t){return Co(this,e,t,-1)}function ko(e){return e<0?Math.floor(e):Math.ceil(e)}function Mo(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*ko(To(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=Te(o/1e3),l.seconds=e%60,t=Te(e/60),l.minutes=t%60,n=Te(t/60),l.hours=n%24,a+=Te(n/24),s+=i=Te(Oo(a)),a-=ko(To(i)),r=Te(s/12),s%=12,l.days=a,l.months=s,l.years=r,this}function Oo(e){return 4800*e/146097}function To(e){return 146097*e/4800}function Eo(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Oo(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(To(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Po(e){return function(){return this.as(e)}}var Do=Po("ms"),Ro=Po("s"),No=Po("m"),Lo=Po("h"),Io=Po("d"),Fo=Po("w"),$o=Po("M"),Bo=Po("Q"),zo=Po("y"),Ho=Do;function Wo(){return Mr(this)}function Vo(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Uo(e){return function(){return this.isValid()?this._data[e]:NaN}}var qo=Uo("milliseconds"),Go=Uo("seconds"),Yo=Uo("minutes"),Zo=Uo("hours"),Ko=Uo("days"),Xo=Uo("months"),Qo=Uo("years");function Jo(){return Te(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function na(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ra(e,t,n,r){var i=Mr(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),c=ea(i.as("M")),d=ea(i.as("w")),u=ea(i.as("y")),p=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||a<=1&&["m"]||a<n.m&&["mm",a]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(p=p||d<=1&&["w"]||d<n.w&&["ww",d]),(p=p||c<=1&&["M"]||c<n.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=t,p[3]=+e>0,p[4]=r,na.apply(null,p)}function ia(e){return void 0===e?ea:"function"===typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=ta;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),r=ra(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,l=sa(this._milliseconds)/1e3,c=sa(this._days),d=sa(this._months),u=this.asSeconds();return u?(e=Te(l/60),t=Te(e/60),l%=60,e%=60,n=Te(d/12),d%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=u<0?"-":"",o=la(this._months)!==la(u)?"-":"",a=la(this._days)!==la(u)?"-":"",s=la(this._milliseconds)!==la(u)?"-":"",i+"P"+(n?o+n+"Y":"")+(d?o+d+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var da=ar.prototype;return da.isValid=ir,da.abs=_o,da.add=So,da.subtract=Ao,da.as=Eo,da.asMilliseconds=Do,da.asSeconds=Ro,da.asMinutes=No,da.asHours=Lo,da.asDays=Io,da.asWeeks=Fo,da.asMonths=$o,da.asQuarters=Bo,da.asYears=zo,da.valueOf=Ho,da._bubble=Mo,da.clone=Wo,da.get=Vo,da.milliseconds=qo,da.seconds=Go,da.minutes=Yo,da.hours=Zo,da.days=Ko,da.weeks=Jo,da.months=Xo,da.years=Qo,da.humanize=aa,da.toISOString=ca,da.toString=ca,da.toJSON=ca,da.locale=ai,da.localeData=li,da.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),da.lang=si,B("X",0,0,"unix"),B("x",0,0,"valueOf"),Ae("x",ye),Ae("X",we),De("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),De("x",function(e,t,n){n._d=new Date(Ee(e))}),r.version="2.30.1",i(Zn),r.fn=lo,r.min=Jn,r.max=er,r.now=tr,r.utc=m,r.unix=co,r.months=vo,r.isDate=u,r.locale=fn,r.invalid=x,r.duration=Mr,r.isMoment=_,r.weekdays=yo,r.parseZone=uo,r.localeData=xn,r.isDuration=sr,r.monthsShort=xo,r.weekdaysMin=jo,r.defineLocale=gn,r.updateLocale=vn,r.locales=yn,r.weekdaysShort=bo,r.normalizeUnits=ne,r.relativeTimeRounding=ia,r.relativeTimeThreshold=oa,r.calendarFormat=zr,r.prototype=lo,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()},86179:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},86267:(e,t,n)=>{"use strict";var r,i=n(26973),o=Object.prototype.toString,a=(r=Object.create(null),function(e){var t=o.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function l(e){return Array.isArray(e)}function c(e){return"undefined"===typeof e}var d=s("ArrayBuffer");function u(e){return null!==e&&"object"===typeof e}function p(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=s("Date"),m=s("File"),f=s("Blob"),g=s("FileList");function v(e){return"[object Function]"===o.call(e)}var x=s("URLSearchParams");function y(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),l(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var b,j=(b="undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return b&&e instanceof b});e.exports={isArray:l,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"===typeof FormData&&e instanceof FormData||o.call(e)===t||v(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer)},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:u,isPlainObject:p,isUndefined:c,isDate:h,isFile:m,isBlob:f,isFunction:v,isStream:function(e){return u(e)&&v(e.pipe)},isURLSearchParams:x,isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:y,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):l(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)y(arguments[r],n);return t},extend:function(e,t,n){return y(t,function(t,r){e[r]=n&&"function"===typeof t?i(t,n):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,i,o,a={};t=t||{};do{for(i=(r=Object.getOwnPropertyNames(e)).length;i-- >0;)a[o=r[i]]||(t[o]=e[o],a[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:j,isFileList:g}},86532:(e,t,n)=>{var r=n(5538),i=n(26989);e.exports=function(e,t,n,o){var a=n.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var d=(c=n[a])[0],u=e[d],p=c[1];if(l&&c[2]){if(void 0===u&&!(d in e))return!1}else{var h=new r;if(o)var m=o(u,p,d,e,t,h);if(!(void 0===m?i(p,u,3,o,h):m))return!1}}return!0}},86578:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},86735:(e,t,n)=>{"use strict";var r=n(86267);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))}))}),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},87424:(e,t,n)=>{var r=n(80755),i=n(12536),o=n(55647),a=n(60929),s=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])});e.exports=s},87563:e=>{e.exports=function(){this.__data__=[],this.size=0}},87676:(e,t,n)=>{var r=n(19648),i=n(35967),o=n(41069),a=n(61540);e.exports=function(e,t,n){return e=o(e),void 0===(t=n?void 0:t)?i(e)?a(e):r(e):e.match(t)||[]}},87767:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},87884:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"DeleteForever")},87918:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(67598)},87937:(e,t,n)=>{var r=n(36954),i=n(14657);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},88259:(e,t,n)=>{var r=n(15797);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},88468:(e,t,n)=>{var r=n(75816),i=n(40644),o=n(94020);e.exports=function(e,t,n){return t===t?o(e,t,n):r(e,i,n)}},88938:(e,t,n)=>{"use strict";var r=n(86267),i=n(86735),o=n(6664),a=n(64395),s=n(56438),l=n(17638),c=n(42478),d=c.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach(function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))});var o,l=[];if(this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)}),!i){var u=[a,void 0];for(Array.prototype.unshift.apply(u,r),u=u.concat(l),o=Promise.resolve(t);u.length;)o=o.then(u.shift(),u.shift());return o}for(var p=t;r.length;){var h=r.shift(),m=r.shift();try{p=h(p)}catch(f){m(f);break}}try{o=a(p)}catch(f){return Promise.reject(f)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},u.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}}),r.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}u.prototype[e]=t(),u.prototype[e+"Form"]=t(!0)}),e.exports=u},89335:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},89379:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(64467);function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}},89496:function(e,t){var n,r,i;r=[],void 0===(i="function"===typeof(n=function(){function e(e){var t=getComputedStyle(e,null).getPropertyValue("overflow");return t.indexOf("scroll")>-1||t.indexOf("auto")>-1}function t(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var n=t.parentNode;n.parentNode;){if(e(n))return n;n=n.parentNode}return document.scrollingElement||document.documentElement}}return t})?n.apply(t,r):n)||(e.exports=i)},89611:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu")},89703:(e,t,n)=>{"use strict";function r(e,t){const n=this;if(n.vars&&"function"===typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},89751:(e,t,n)=>{"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>d,vf:()=>l,zu:()=>i});var r=n(19172);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(i[e],"px)")};function a(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||o;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"===typeof t){const e=r.breakpoints||o;return Object.keys(t).reduce((r,o)=>{if(-1!==Object.keys(e.values||i).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r},{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function l(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function c(e){const t=s(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];const a=[t,...i].reduce((e,t)=>(0,r.A)(e,t),{});return l(Object.keys(t),a)}function d(e){let{values:t,breakpoints:n,base:r}=e;const i=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}(t,n),o=Object.keys(i);if(0===o.length)return t;let a;return o.reduce((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e),{})}},90191:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case d:case u:case m:return e;default:switch(e=e&&e.$$typeof){case l:case c:case h:case p:case s:return e;default:return t}}case r:return t}}}t.vM=c,t.lD=p},90198:(e,t,n)=>{e=n.nmd(e),ace.define("ace/theme/solarized_dark-css",["require","exports","module"],function(e,t,n){n.exports=".ace-solarized-dark .ace_gutter {\n  background: #01313f;\n  color: #d0edf7\n}\n\n.ace-solarized-dark .ace_print-margin {\n  width: 1px;\n  background: #33555E\n}\n\n.ace-solarized-dark {\n  background-color: #002B36;\n  color: #839496\n}\n\n.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,\n.ace-solarized-dark .ace_storage {\n  color: #839496\n}\n\n.ace-solarized-dark .ace_cursor,\n.ace-solarized-dark .ace_string.ace_regexp {\n  color: #D30102\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_active-line,\n.ace-solarized-dark .ace_marker-layer .ace_selection {\n  background: rgba(255, 255, 255, 0.1)\n}\n\n.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {\n  box-shadow: 0 0 3px 0px #002B36;\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_step {\n  background: rgb(102, 82, 0)\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_bracket {\n  margin: -1px 0 0 -1px;\n  border: 1px solid rgba(147, 161, 161, 0.50)\n}\n\n.ace-solarized-dark .ace_gutter-active-line {\n  background-color: #0d3440\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_selected-word {\n  border: 1px solid #073642\n}\n\n.ace-solarized-dark .ace_invisible {\n  color: rgba(147, 161, 161, 0.50)\n}\n\n.ace-solarized-dark .ace_keyword,\n.ace-solarized-dark .ace_meta,\n.ace-solarized-dark .ace_support.ace_class,\n.ace-solarized-dark .ace_support.ace_type {\n  color: #859900\n}\n\n.ace-solarized-dark .ace_constant.ace_character,\n.ace-solarized-dark .ace_constant.ace_other {\n  color: #CB4B16\n}\n\n.ace-solarized-dark .ace_constant.ace_language {\n  color: #B58900\n}\n\n.ace-solarized-dark .ace_constant.ace_numeric {\n  color: #D33682\n}\n\n.ace-solarized-dark .ace_fold {\n  background-color: #268BD2;\n  border-color: #93A1A1\n}\n\n.ace-solarized-dark .ace_entity.ace_name.ace_function,\n.ace-solarized-dark .ace_entity.ace_name.ace_tag,\n.ace-solarized-dark .ace_support.ace_function,\n.ace-solarized-dark .ace_variable,\n.ace-solarized-dark .ace_variable.ace_language {\n  color: #268BD2\n}\n\n.ace-solarized-dark .ace_string {\n  color: #2AA198\n}\n\n.ace-solarized-dark .ace_comment {\n  font-style: italic;\n  color: #657B83\n}\n\n.ace-solarized-dark .ace_indent-guide {\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-solarized-dark .ace_indent-guide-active {\n  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"}),ace.define("ace/theme/solarized_dark",["require","exports","module","ace/theme/solarized_dark-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-solarized-dark",t.cssText=e("./solarized_dark-css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.require(["ace/theme/solarized_dark"],function(t){e&&(e.exports=t)})},90620:(e,t,n)=>{var r=n(16913),i=n(54052),o=n(22761);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},91310:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},91733:(e,t,n)=>{var r=n(71775),i=n(94664),o=n(9096);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},91980:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},92043:(e,t,n)=>{var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,m=p||h||Function("return this")();var f=Array.prototype,g=Function.prototype,v=Object.prototype,x=m["__core-js_shared__"],y=function(){var e=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=g.toString,j=v.hasOwnProperty,w=v.toString,_=RegExp("^"+b.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=m.Symbol,S=f.splice,A=I(m,"Map"),k=I(Object,"create"),M=C?C.prototype:void 0,O=M?M.toString:void 0;function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function E(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function D(e,t){for(var n=e.length;n--;)if(z(e[n][0],t))return n;return-1}function R(e,t){var n;t=function(e,t){if(H(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||V(e))return!0;return s.test(e)||!a.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:H(n=t)?n:F(n);for(var r=0,i=t.length;null!=e&&r<i;)e=e[$(t[r++])];return r&&r==i?e:void 0}function N(e){if(!W(e)||(t=e,y&&y in t))return!1;var t,n=function(e){var t=W(e)?w.call(e):"";return t==i||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?_:u;return n.test(function(e){if(null!=e){try{return b.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function L(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function I(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return N(n)?n:void 0}T.prototype.clear=function(){this.__data__=k?k(null):{}},T.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},T.prototype.get=function(e){var t=this.__data__;if(k){var n=t[e];return n===r?void 0:n}return j.call(t,e)?t[e]:void 0},T.prototype.has=function(e){var t=this.__data__;return k?void 0!==t[e]:j.call(t,e)},T.prototype.set=function(e,t){return this.__data__[e]=k&&void 0===t?r:t,this},E.prototype.clear=function(){this.__data__=[]},E.prototype.delete=function(e){var t=this.__data__,n=D(t,e);return!(n<0)&&(n==t.length-1?t.pop():S.call(t,n,1),!0)},E.prototype.get=function(e){var t=this.__data__,n=D(t,e);return n<0?void 0:t[n][1]},E.prototype.has=function(e){return D(this.__data__,e)>-1},E.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},P.prototype.clear=function(){this.__data__={hash:new T,map:new(A||E),string:new T}},P.prototype.delete=function(e){return L(this,e).delete(e)},P.prototype.get=function(e){return L(this,e).get(e)},P.prototype.has=function(e){return L(this,e).has(e)},P.prototype.set=function(e,t){return L(this,e).set(e,t),this};var F=B(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return O?O.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,function(e,t,r,i){n.push(r?i.replace(d,"$1"):t||e)}),n});function $(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(B.Cache||P),n}function z(e,t){return e===t||e!==e&&t!==t}B.Cache=P;var H=Array.isArray;function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:R(e,t);return void 0===r?n:r}},92374:(e,t,n)=>{"use strict";t.A=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(65043)),i=n(13174);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}t.A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(i.ThemeContext);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},92532:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(72372);function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i={};return t.forEach(t=>{i[t]=(0,r.Ay)(e,t,n)}),i}},92577:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},92823:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=a(n(65043)),l=a(n(97950)),c=a(n(19853)),d=a(n(74175)),u=function(e){function t(t){var n=e.call(this,t)||this;n.dirtyProps=["modules","formats","bounds","theme","children"],n.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],n.state={generation:0},n.selection=null,n.onEditorChange=function(e,t,r,i){var o,a,s,l;"text-change"===e?null===(a=(o=n).onEditorChangeText)||void 0===a||a.call(o,n.editor.root.innerHTML,t,i,n.unprivilegedEditor):"selection-change"===e&&(null===(l=(s=n).onEditorChangeSelection)||void 0===l||l.call(s,t,i,n.unprivilegedEditor))};var r=n.isControlled()?t.value:t.defaultValue;return n.value=null!==r&&void 0!==r?r:"",n}return r(t,e),t.prototype.validateProps=function(e){var t;if(s.default.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(s.default.Children.count(e.children)&&"textarea"===(null===(t=s.default.Children.only(e.children))||void 0===t?void 0:t.type))throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.");if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},t.prototype.shouldComponentUpdate=function(e,t){var n,r=this;if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){var i=this.getEditorContents(),a=null!==(n=e.value)&&void 0!==n?n:"";this.isEqualValue(a,i)||this.setEditorContents(this.editor,a)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),o(this.cleanProps,this.dirtyProps).some(function(t){return!c.default(e[t],r.props[t])})},t.prototype.shouldComponentRegenerate=function(e){var t=this;return this.dirtyProps.some(function(n){return!c.default(e[n],t.props[n])})},t.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},t.prototype.componentWillUnmount=function(){this.destroyEditor()},t.prototype.componentDidUpdate=function(e,t){var n=this;if(this.editor&&this.shouldComponentRegenerate(e)){var r=this.editor.getContents(),i=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:i},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){var o=this.regenerationSnapshot,a=(r=o.delta,o.selection);delete this.regenerationSnapshot,this.instantiateEditor();var s=this.editor;s.setContents(r),p(function(){return n.setEditorSelection(s,a)})}},t.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},t.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},t.prototype.isControlled=function(){return"value"in this.props},t.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},t.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},t.prototype.createEditor=function(e,t){var n=new d.default(e,t);return null!=t.tabIndex&&this.setEditorTabIndex(n,t.tabIndex),this.hookEditor(n),n},t.prototype.hookEditor=function(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)},t.prototype.unhookEditor=function(e){e.off("editor-change",this.onEditorChange)},t.prototype.getEditorContents=function(){return this.value},t.prototype.getEditorSelection=function(){return this.selection},t.prototype.isDelta=function(e){return e&&e.ops},t.prototype.isEqualValue=function(e,t){return this.isDelta(e)&&this.isDelta(t)?c.default(e.ops,t.ops):c.default(e,t)},t.prototype.setEditorContents=function(e,t){var n=this;this.value=t;var r=this.getEditorSelection();"string"===typeof t?e.setContents(e.clipboard.convert(t)):e.setContents(t),p(function(){return n.setEditorSelection(e,r)})},t.prototype.setEditorSelection=function(e,t){if(this.selection=t,t){var n=e.getLength();t.index=Math.max(0,Math.min(t.index,n-1)),t.length=Math.max(0,Math.min(t.length,n-1-t.index)),e.setSelection(t)}},t.prototype.setEditorTabIndex=function(e,t){var n,r;(null===(r=null===(n=e)||void 0===n?void 0:n.scroll)||void 0===r?void 0:r.domNode)&&(e.scroll.domNode.tabIndex=t)},t.prototype.setEditorReadOnly=function(e,t){t?e.disable():e.enable()},t.prototype.makeUnprivilegedEditor=function(e){var t=e;return{getHTML:function(){return t.root.innerHTML},getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}},t.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var e=l.default.findDOMNode(this.editingArea);if(!e)throw new Error("Cannot find element for editing area");if(3===e.nodeType)throw new Error("Editing area cannot be a text node");return e},t.prototype.renderEditingArea=function(){var e=this,t=this.props,n=t.children,r=t.preserveWhitespace,o={key:this.state.generation,ref:function(t){e.editingArea=t}};return s.default.Children.count(n)?s.default.cloneElement(s.default.Children.only(n),o):r?s.default.createElement("pre",i({},o)):s.default.createElement("div",i({},o))},t.prototype.render=function(){var e;return s.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(e=this.props.className,null!==e&&void 0!==e?e:""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(e,t,n,r){var i,o;if(this.editor){var a=this.isDelta(this.value)?r.getContents():r.getHTML();a!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=a,null===(o=(i=this.props).onChange)||void 0===o||o.call(i,e,t,n,r))}},t.prototype.onEditorChangeSelection=function(e,t,n){var r,i,o,a,s,l;if(this.editor){var d=this.getEditorSelection(),u=!d&&e,p=d&&!e;c.default(e,d)||(this.selection=e,null===(i=(r=this.props).onChangeSelection)||void 0===i||i.call(r,e,t,n),u?null===(a=(o=this.props).onFocus)||void 0===a||a.call(o,e,t,n):p&&(null===(l=(s=this.props).onBlur)||void 0===l||l.call(s,d,t,n)))}},t.prototype.focus=function(){this.editor&&this.editor.focus()},t.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},t.displayName="React Quill",t.Quill=d.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(s.default.Component);function p(e){Promise.resolve().then(e)}e.exports=u},93086:(e,t,n)=>{var r=n(72037)({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"});e.exports=r},93141:function(e,t,n){var r,i;"undefined"!=typeof self&&self,e.exports=(r=n(65043),i=n(97950),function(){"use strict";var e={328:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PrintContextConsumer=t.PrintContext=void 0;var r=n(496),i=Object.prototype.hasOwnProperty.call(r,"createContext");t.PrintContext=i?r.createContext({}):null,t.PrintContextConsumer=t.PrintContext?t.PrintContext.Consumer:function(){return null}},428:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ReactToPrint=void 0;var r=n(316),i=n(496),o=n(190),a=n(328),s=n(940),l=function(e){function t(){var t=e.apply(this,r.__spreadArray([],r.__read(arguments),!1))||this;return t.startPrint=function(e){var n=t.props,r=n.onAfterPrint,i=n.onPrintError,o=n.print,a=n.documentTitle;setTimeout(function(){var n,s;if(e.contentWindow)if(e.contentWindow.focus(),o)o(e).then(function(){return null==r?void 0:r()}).then(function(){return t.handleRemoveIframe()}).catch(function(e){i?i("print",e):t.logMessages(["An error was thrown by the specified `print` function"])});else{if(e.contentWindow.print){var l=null!==(s=null===(n=e.contentDocument)||void 0===n?void 0:n.title)&&void 0!==s?s:"",c=e.ownerDocument.title;a&&(e.ownerDocument.title=a,e.contentDocument&&(e.contentDocument.title=a)),e.contentWindow.print(),a&&(e.ownerDocument.title=c,e.contentDocument&&(e.contentDocument.title=l))}else t.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);null==r||r(),t.handleRemoveIframe()}else t.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])},500)},t.triggerPrint=function(e){var n=t.props,r=n.onBeforePrint,i=n.onPrintError;if(r){var o=r();o&&"function"==typeof o.then?o.then(function(){t.startPrint(e)}).catch(function(e){i&&i("onBeforePrint",e)}):t.startPrint(e)}else t.startPrint(e)},t.handlePrint=function(e){var n=t.props,i=n.bodyClass,a=n.content,s=n.copyStyles,l=n.fonts,c=n.pageStyle,d=n.nonce,u="function"==typeof e?e():null;if(u&&"function"==typeof a&&t.logMessages(['"react-to-print" received a `content` prop and a content param passed the callback return by `useReactToPrint. The `content` prop will be ignored.'],"warning"),u||"function"!=typeof a||(u=a()),void 0!==u)if(null!==u){var p=document.createElement("iframe");p.width="".concat(document.documentElement.clientWidth,"px"),p.height="".concat(document.documentElement.clientHeight,"px"),p.style.position="absolute",p.style.top="-".concat(document.documentElement.clientHeight+100,"px"),p.style.left="-".concat(document.documentElement.clientWidth+100,"px"),p.id="printWindow",p.srcdoc="<!DOCTYPE html>";var h=(0,o.findDOMNode)(u);if(h){var m=h.cloneNode(!0),f=m instanceof Text,g=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),v=f?[]:m.querySelectorAll("img"),x=f?[]:m.querySelectorAll("video"),y=l?l.length:0;t.numResourcesToLoad=g.length+v.length+x.length+y,t.resourcesLoaded=[],t.resourcesErrored=[];var b=function(e,n){t.resourcesLoaded.includes(e)?t.logMessages(["Tried to mark a resource that has already been handled",e],"debug"):(n?(t.logMessages(r.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],r.__read(n),!1)),t.resourcesErrored.push(e)):t.resourcesLoaded.push(e),t.resourcesLoaded.length+t.resourcesErrored.length===t.numResourcesToLoad&&t.triggerPrint(p))};p.onload=function(){var e,n,o,a;p.onload=null;var u=p.contentDocument||(null===(n=p.contentWindow)||void 0===n?void 0:n.document);if(u){u.body.appendChild(m),l&&((null===(o=p.contentDocument)||void 0===o?void 0:o.fonts)&&(null===(a=p.contentWindow)||void 0===a?void 0:a.FontFace)?l.forEach(function(e){var t=new FontFace(e.family,e.source,{weight:e.weight,style:e.style});p.contentDocument.fonts.add(t),t.loaded.then(function(){b(t)}).catch(function(e){b(t,["Failed loading the font:",t,"Load error:",e])})}):(l.forEach(function(e){return b(e)}),t.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var g="function"==typeof c?c():c;if("string"!=typeof g)t.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof g,'". Styles from `pageStyle` will not be applied.')]);else{var y=u.createElement("style");d&&(y.setAttribute("nonce",d),u.head.setAttribute("nonce",d)),y.appendChild(u.createTextNode(g)),u.head.appendChild(y)}if(i&&(e=u.body.classList).add.apply(e,r.__spreadArray([],r.__read(i.split(" ")),!1)),!f){for(var j=f?[]:h.querySelectorAll("canvas"),w=u.querySelectorAll("canvas"),_=0;_<j.length;++_){var C=j[_],S=w[_].getContext("2d");S&&S.drawImage(C,0,0)}var A=function(e){var t=v[e],n=t.getAttribute("src");if(n){var r=new Image;r.onload=function(){return b(t)},r.onerror=function(e,n,r,i,o){return b(t,["Error loading <img>",t,"Error",o])},r.src=n}else b(t,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',t])};for(_=0;_<v.length;_++)A(_);var k=function(e){var t=x[e];t.preload="auto";var n=t.getAttribute("poster");if(n){var r=new Image;r.onload=function(){return b(t)},r.onerror=function(e,r,i,o,a){return b(t,["Error loading video poster",n,"for video",t,"Error:",a])},r.src=n}else t.readyState>=2?b(t):(t.onloadeddata=function(){return b(t)},t.onerror=function(e,n,r,i,o){return b(t,["Error loading video",t,"Error",o])},t.onstalled=function(){return b(t,["Loading video stalled, skipping",t])})};for(_=0;_<x.length;_++)k(_);var M="input",O=h.querySelectorAll(M),T=u.querySelectorAll(M);for(_=0;_<O.length;_++)T[_].value=O[_].value;var E="input[type=checkbox],input[type=radio]",P=h.querySelectorAll(E),D=u.querySelectorAll(E);for(_=0;_<P.length;_++)D[_].checked=P[_].checked;var R="select",N=h.querySelectorAll(R),L=u.querySelectorAll(R);for(_=0;_<N.length;_++)L[_].value=N[_].value}if(s)for(var I=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']"),F=function(e,n){var r=I[e];if("style"===r.tagName.toLowerCase()){var i=u.createElement(r.tagName),o=r.sheet;if(o){var a="";try{for(var s=o.cssRules.length,l=0;l<s;++l)"string"==typeof o.cssRules[l].cssText&&(a+="".concat(o.cssRules[l].cssText,"\r\n"))}catch(e){t.logMessages(["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",r],"warning")}i.setAttribute("id","react-to-print-".concat(e)),d&&i.setAttribute("nonce",d),i.appendChild(u.createTextNode(a)),u.head.appendChild(i)}}else if(r.getAttribute("href"))if(r.hasAttribute("disabled"))t.logMessages(["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",r],"warning"),b(r);else{for(var c=u.createElement(r.tagName),p=(l=0,r.attributes.length);l<p;++l){var h=r.attributes[l];h&&c.setAttribute(h.nodeName,h.nodeValue||"")}c.onload=function(){return b(c)},c.onerror=function(e,t,n,r,i){return b(c,["Failed to load",c,"Error:",i])},d&&c.setAttribute("nonce",d),u.head.appendChild(c)}else t.logMessages(["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",r],"warning"),b(r)},$=(_=0,I.length);_<$;++_)F(_)}0!==t.numResourcesToLoad&&s||t.triggerPrint(p)},t.handleRemoveIframe(!0),document.body.appendChild(p)}else t.logMessages(['"react-to-print" could not locate the DOM node corresponding with the `content` prop'])}else t.logMessages(['There is nothing to print because the "content" prop returned "null". Please ensure "content" is renderable before allowing "react-to-print" to be called.']);else t.logMessages(["To print a functional component ensure it is wrapped with `React.forwardRef`, and ensure the forwarded ref is used. See the README for an example: https://github.com/gregnb/react-to-print#examples"])},t.handleRemoveIframe=function(e){var n=t.props.removeAfterPrint;if(e||n){var r=document.getElementById("printWindow");r&&document.body.removeChild(r)}},t.logMessages=function(e,n){void 0===n&&(n="error"),t.props.suppressErrors||("error"===n?console.error(e):"warning"===n?console.warn(e):"debug"===n&&console.debug(e))},t}return r.__extends(t,e),t.prototype.handleClick=function(e,t){var n=this,r=this.props,i=r.onBeforeGetContent,o=r.onPrintError;if(i){var a=i();a&&"function"==typeof a.then?a.then(function(){return n.handlePrint(t)}).catch(function(e){o&&o("onBeforeGetContent",e)}):this.handlePrint(t)}else this.handlePrint(t)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.trigger;if(n)return i.cloneElement(n(),{onClick:this.handleClick.bind(this)});if(!a.PrintContext)return this.logMessages(['"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"']),null;var r={handlePrint:this.handleClick.bind(this)};return i.createElement(a.PrintContext.Provider,{value:r},t)},t.defaultProps=s.defaultProps,t}(i.Component);t.ReactToPrint=l},940:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=void 0,t.defaultProps={copyStyles:!0,pageStyle:"\n        @page {\n            /* Remove browser default header (title) and footer (url) */\n            margin: 0;\n        }\n        @media print {\n            body {\n                /* Tell browsers to print background colors */\n                -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n                color-adjust: exact; /* Firefox */\n            }\n        }\n    ",removeAfterPrint:!1,suppressErrors:!1}},892:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useReactToPrint=void 0;var r=n(316),i=n(496),o=n(428),a=n(940),s=n(860),l=Object.prototype.hasOwnProperty.call(i,"useMemo")&&Object.prototype.hasOwnProperty.call(i,"useCallback");t.useReactToPrint=function(e){if(!l)return e.suppressErrors||console.error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"'),function(){throw new Error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"')};var t=i.useMemo(function(){return new o.ReactToPrint(r.__assign(r.__assign({},a.defaultProps),e))},[e]);return i.useCallback(function(e,n){return(0,s.wrapCallbackWithArgs)(t,t.handleClick,n)(e)},[t])}},860:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapCallbackWithArgs=void 0;var r=n(316);t.wrapCallbackWithArgs=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return t.apply(e,r.__spreadArray(r.__spreadArray([],r.__read(i),!1),r.__read(n),!1))}}},496:function(e){e.exports=r},190:function(e){e.exports=i},316:function(e,t,n){n.r(t),n.d(t,{__addDisposableResource:function(){return R},__assign:function(){return o},__asyncDelegator:function(){return S},__asyncGenerator:function(){return C},__asyncValues:function(){return A},__await:function(){return _},__awaiter:function(){return m},__classPrivateFieldGet:function(){return E},__classPrivateFieldIn:function(){return D},__classPrivateFieldSet:function(){return P},__createBinding:function(){return g},__decorate:function(){return s},__disposeResources:function(){return L},__esDecorate:function(){return c},__exportStar:function(){return v},__extends:function(){return i},__generator:function(){return f},__importDefault:function(){return T},__importStar:function(){return O},__makeTemplateObject:function(){return k},__metadata:function(){return h},__param:function(){return l},__propKey:function(){return u},__read:function(){return y},__rest:function(){return a},__runInitializers:function(){return d},__setFunctionName:function(){return p},__spread:function(){return b},__spreadArray:function(){return w},__spreadArrays:function(){return j},__values:function(){return x}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p=!1,h=n.length-1;h>=0;h--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,n[h])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(u.get=s),(s=a(g.set))&&(u.set=s),(s=a(g.init))&&i.unshift(s)}else(s=a(g))&&("field"===l?i.unshift(s):u[c]=s)}d&&Object.defineProperty(d,r.name,u),p=!0}function d(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function u(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function x(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function j(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function w(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function C(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{(n=i[e](t)).value instanceof _?Promise.resolve(n.value.v).then(l,c):d(o[0][2],n)}catch(e){d(o[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function d(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function S(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:_(e[r](t)),done:!1}:i?i(t):t}:i}}function A(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=x(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var M=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&g(t,e,n);return M(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function E(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function P(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function D(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function R(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function L(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(e){return t(e),n()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}t.default={__extends:i,__assign:o,__rest:a,__decorate:s,__param:l,__metadata:h,__awaiter:m,__generator:f,__createBinding:g,__exportStar:v,__values:x,__read:y,__spread:b,__spreadArrays:j,__spreadArray:w,__await:_,__asyncGenerator:C,__asyncDelegator:S,__asyncValues:A,__makeTemplateObject:k,__importStar:O,__importDefault:T,__classPrivateFieldGet:E,__classPrivateFieldSet:P,__classPrivateFieldIn:D,__addDisposableResource:R,__disposeResources:L}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.useReactToPrint=e.ReactToPrint=e.PrintContextConsumer=void 0;var t=n(328);Object.defineProperty(e,"PrintContextConsumer",{enumerable:!0,get:function(){return t.PrintContextConsumer}});var r=n(428);Object.defineProperty(e,"ReactToPrint",{enumerable:!0,get:function(){return r.ReactToPrint}});var i=n(892);Object.defineProperty(e,"useReactToPrint",{enumerable:!0,get:function(){return i.useReactToPrint}});var a=n(428);e.default=a.ReactToPrint}(),o}())},93211:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},93229:(e,t,n)=>{"use strict";var r=n(82702);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},93319:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(31782).A},93403:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},93795:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},93803:(e,t,n)=>{"use strict";n.d(t,{A:()=>ie});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),i=Math.abs,o=String.fromCharCode,a=Object.assign;function s(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function d(e,t){return 0|e.charCodeAt(t)}function u(e,t,n){return e.slice(t,n)}function p(e){return e.length}function h(e){return e.length}function m(e,t){return t.push(e),e}var f=1,g=1,v=0,x=0,y=0,b="";function j(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:f,column:g,length:a,return:""}}function w(e,t){return a(j("",null,null,"",null,null,0),e,{length:-e.length},t)}function _(){return y=x>0?d(b,--x):0,g--,10===y&&(g=1,f--),y}function C(){return y=x<v?d(b,x++):0,g++,10===y&&(g=1,f++),y}function S(){return d(b,x)}function A(){return x}function k(e,t){return u(b,e,t)}function M(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function O(e){return f=g=1,v=p(b=e),x=0,[]}function T(e){return b="",e}function E(e){return s(k(x-1,R(91===e?e+2:40===e?e+1:e)))}function P(e){for(;(y=S())&&y<33;)C();return M(e)>2||M(y)>3?"":" "}function D(e,t){for(;--t&&C()&&!(y<48||y>102||y>57&&y<65||y>70&&y<97););return k(e,A()+(t<6&&32==S()&&32==C()))}function R(e){for(;C();)switch(y){case e:return x;case 34:case 39:34!==e&&39!==e&&R(y);break;case 40:41===e&&R(e);break;case 92:C()}return x}function N(e,t){for(;C()&&e+y!==57&&(e+y!==84||47!==S()););return"/*"+k(t,x-1)+"*"+o(47===e?e:C())}function L(e){for(;!M(S());)C();return k(e,x)}var I="-ms-",F="-moz-",$="-webkit-",B="comm",z="rule",H="decl",W="@keyframes";function V(e,t){for(var n="",r=h(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function U(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case H:return e.return=e.return||e.value;case B:return"";case W:return e.return=e.value+"{"+V(e.children,r)+"}";case z:e.value=e.props.join(",")}return p(n=V(e.children,r))?e.return=e.value+"{"+n+"}":""}function q(e){return T(G("",null,null,null,[""],e=O(e),0,[0],e))}function G(e,t,n,r,i,a,s,u,h){for(var f=0,g=0,v=s,x=0,y=0,b=0,j=1,w=1,k=1,M=0,O="",T=i,R=a,I=r,F=O;w;)switch(b=M,M=C()){case 40:if(108!=b&&58==d(F,v-1)){-1!=c(F+=l(E(M),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:F+=E(M);break;case 9:case 10:case 13:case 32:F+=P(b);break;case 92:F+=D(A()-1,7);continue;case 47:switch(S()){case 42:case 47:m(Z(N(C(),A()),t,n),h);break;default:F+="/"}break;case 123*j:u[f++]=p(F)*k;case 125*j:case 59:case 0:switch(M){case 0:case 125:w=0;case 59+g:-1==k&&(F=l(F,/\f/g,"")),y>0&&p(F)-v&&m(y>32?K(F+";",r,n,v-1):K(l(F," ","")+";",r,n,v-2),h);break;case 59:F+=";";default:if(m(I=Y(F,t,n,f,g,i,u,O,T=[],R=[],v),a),123===M)if(0===g)G(F,t,I,I,T,a,v,u,R);else switch(99===x&&110===d(F,3)?100:x){case 100:case 108:case 109:case 115:G(e,I,I,r&&m(Y(e,I,I,0,0,i,u,O,i,T=[],v),R),i,R,v,u,r?T:R);break;default:G(F,I,I,I,[""],R,0,u,R)}}f=g=y=0,j=k=1,O=F="",v=s;break;case 58:v=1+p(F),y=b;default:if(j<1)if(123==M)--j;else if(125==M&&0==j++&&125==_())continue;switch(F+=o(M),M*j){case 38:k=g>0?1:(F+="\f",-1);break;case 44:u[f++]=(p(F)-1)*k,k=1;break;case 64:45===S()&&(F+=E(C())),x=S(),g=v=p(O=F+=L(A())),M++;break;case 45:45===b&&2==p(F)&&(j=0)}}return a}function Y(e,t,n,r,o,a,c,d,p,m,f){for(var g=o-1,v=0===o?a:[""],x=h(v),y=0,b=0,w=0;y<r;++y)for(var _=0,C=u(e,g+1,g=i(b=c[y])),S=e;_<x;++_)(S=s(b>0?v[_]+" "+C:l(C,/&\f/g,v[_])))&&(p[w++]=S);return j(e,t,n,0===o?z:d,p,m,f)}function Z(e,t,n){return j(e,t,n,B,o(y),u(e,2,-2),0)}function K(e,t,n,r){return j(e,t,n,H,u(e,0,r),u(e,r+1,-1),r)}var X=function(e,t,n){for(var r=0,i=0;r=i,i=S(),38===r&&12===i&&(t[n]=1),!M(i);)C();return k(e,x)},Q=function(e,t){return T(function(e,t){var n=-1,r=44;do{switch(M(r)){case 0:38===r&&12===S()&&(t[n]=1),e[n]+=X(x-1,t,n);break;case 2:e[n]+=E(r);break;case 4:if(44===r){e[++n]=58===S()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=C());return e}(O(e),t))},J=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(n))&&!r){J.set(e,!0);for(var i=[],o=Q(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ne(e,t){switch(function(e,t){return 45^d(e,0)?(((t<<2^d(e,0))<<2^d(e,1))<<2^d(e,2))<<2^d(e,3):0}(e,t)){case 5103:return $+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $+e+F+e+I+e+e;case 6828:case 4268:return $+e+I+e+e;case 6165:return $+e+I+"flex-"+e+e;case 5187:return $+e+l(e,/(\w+).+(:[^]+)/,$+"box-$1$2"+I+"flex-$1$2")+e;case 5443:return $+e+I+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return $+e+I+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return $+e+I+l(e,"shrink","negative")+e;case 5292:return $+e+I+l(e,"basis","preferred-size")+e;case 6060:return $+"box-"+l(e,"-grow","")+$+e+I+l(e,"grow","positive")+e;case 4554:return $+l(e,/([^-])(transform)/g,"$1"+$+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,$+"$1"),/(image-set)/,$+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,$+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,$+"box-pack:$3"+I+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,$+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(p(e)-1-t>6)switch(d(e,t+1)){case 109:if(45!==d(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+$+"$2-$3$1"+F+(108==d(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==d(e,t+1))break;case 6444:switch(d(e,p(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+$)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$+(45===d(e,14)?"inline-":"")+"box$3$1"+$+"$2$3$1"+I+"$2box$3")+e}break;case 5936:switch(d(e,t+11)){case 114:return $+e+I+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $+e+I+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $+e+I+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $+e+I+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case H:e.return=ne(e.value,e.length);break;case W:return V([w(e,{value:l(e.value,"@","@"+$)})],r);case z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return V([w(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return V([w(e,{props:[l(t,/:(plac\w+)/,":"+$+"input-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),w(e,{props:[l(t,/:(plac\w+)/,I+"input-$1")]})],r)}return""})}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var i,o,a=e.stylisPlugins||re,s={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)});var c,d,u=[U,(d=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=function(e){var t=h(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([ee,te].concat(a,u));o=function(e,t,n,r){c=n,V(q(e?e+"{"+t.styles+"}":t.styles),p),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new r({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return m.sheet.hydrate(l),m}},93950:(e,t,n)=>{var r=n(46686),i=n(4757),o=n(40801),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,d,u,p,h,m=0,f=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function x(t){var n=l,r=c;return l=c=void 0,m=t,u=e.apply(r,n)}function y(e){var n=e-h;return void 0===h||n>=t||n<0||g&&e-m>=d}function b(){var e=i();if(y(e))return j(e);p=setTimeout(b,function(e){var n=t-(e-h);return g?s(n,d-(e-m)):n}(e))}function j(e){return p=void 0,v&&l?x(e):(l=c=void 0,u)}function w(){var e=i(),n=y(e);if(l=arguments,c=this,h=e,n){if(void 0===p)return function(e){return m=e,p=setTimeout(b,t),f?x(e):u}(h);if(g)return clearTimeout(p),p=setTimeout(b,t),x(h)}return void 0===p&&(p=setTimeout(b,t)),u}return t=o(t)||0,r(n)&&(f=!!n.leading,d=(g="maxWait"in n)?a(o(n.maxWait)||0,t):d,v="trailing"in n?!!n.trailing:v),w.cancel=function(){void 0!==p&&clearTimeout(p),m=0,l=h=c=p=void 0},w.flush=function(){return void 0===p?u:j(i())},w}},94020:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},94258:(e,t,n)=>{var r=n(55906)();e.exports=r},94329:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save")},94634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},94664:(e,t,n)=>{var r=n(94258),i=n(28673);e.exports=function(e,t){return e&&r(e,t,i)}},94992:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2"}),"Circle")},95082:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,x=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function j(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case u:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case f:case l:return e;default:return t}}case i:return t}}}function w(e){return j(e)===u}t.AsyncMode=d,t.ConcurrentMode=u,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=g,t.Memo=f,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return w(e)||j(e)===d},t.isConcurrentMode=w,t.isContextConsumer=function(e){return j(e)===c},t.isContextProvider=function(e){return j(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return j(e)===p},t.isFragment=function(e){return j(e)===o},t.isLazy=function(e){return j(e)===g},t.isMemo=function(e){return j(e)===f},t.isPortal=function(e){return j(e)===i},t.isProfiler=function(e){return j(e)===s},t.isStrictMode=function(e){return j(e)===a},t.isSuspense=function(e){return j(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===u||e===s||e===a||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===x||e.$$typeof===y||e.$$typeof===b||e.$$typeof===v)},t.typeOf=j},95382:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check")},95419:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map(function(e){return r(e,n)})}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function a(e,t){try{return t in e}catch(n){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&o(e).forEach(function(t){i[t]=r(e[t],n)}),o(t).forEach(function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&n.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"===typeof n?n:l}(o,n)(e[o],t[o],n):i[o]=r(t[o],n))}),i}function l(e,n,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=r;var a=Array.isArray(n);return a===Array.isArray(e)?a?o.arrayMerge(e,n,o):s(e,n,o):r(n,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})};var c=l;e.exports=c},95540:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit")},95575:(e,t,n)=>{var r=n(87937)(Object,"create");e.exports=r},95849:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(63462).A},96361:(e,t,n)=>{var r=n(16913),i=n(22761);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==r(e)}},96604:(e,t,n)=>{var r=n(3331)();e.exports=r},96614:(e,t,n)=>{var r=n(78420),i=n(71775);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],d=o?o(n[c],e[c],c,n,e):void 0;void 0===d&&(d=e[c]),a?i(n,c,d):r(n,c,d)}return n}},96996:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},97132:(e,t,n)=>{var r=n(5538),i=n(80726),o=n(78420),a=n(51104),s=n(55119),l=n(44353),c=n(91980),d=n(98124),u=n(29075),p=n(59395),h=n(68592),m=n(26924),f=n(38268),g=n(18630),v=n(20310),x=n(54052),y=n(44543),b=n(57887),j=n(46686),w=n(45921),_=n(28673),C=n(30474),S="[object Arguments]",A="[object Function]",k="[object Object]",M={};M[S]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[k]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[A]=M["[object WeakMap]"]=!1,e.exports=function e(t,n,O,T,E,P){var D,R=1&n,N=2&n,L=4&n;if(O&&(D=E?O(t,T,E,P):O(t)),void 0!==D)return D;if(!j(t))return t;var I=x(t);if(I){if(D=f(t),!R)return c(t,D)}else{var F=m(t),$=F==A||"[object GeneratorFunction]"==F;if(y(t))return l(t,R);if(F==k||F==S||$&&!E){if(D=N||$?{}:v(t),!R)return N?u(t,s(D,t)):d(t,a(D,t))}else{if(!M[F])return E?t:{};D=g(t,F,R)}}P||(P=new r);var B=P.get(t);if(B)return B;P.set(t,D),w(t)?t.forEach(function(r){D.add(e(r,n,O,r,t,P))}):b(t)&&t.forEach(function(r,i){D.set(i,e(r,n,O,i,t,P))});var z=I?void 0:(L?N?h:p:N?C:_)(t);return i(z||t,function(r,i){z&&(r=t[i=r]),o(D,i,e(r,n,O,i,t,P))}),D}},97160:(e,t,n)=>{var r=n(87563),i=n(29935),o=n(24190),a=n(51946),s=n(61714);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},97498:e=>{e.exports=function(e,t){return e>t}},97685:(e,t,n)=>{var r=n(87937)(n(56552),"DataView");e.exports=r},97950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(82730)},98082:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert")},98124:(e,t,n)=>{var r=n(96614),i=n(69621);e.exports=function(e,t){return r(e,i(e),t)}},98206:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});n(65043);var r=n(13654);n(70579);function i(e){return(0,r.b)(e)}},98210:function(e,t,n){var r;!function(){"use strict";var i,o=1e9,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},s=!0,l="[DecimalError] ",c=l+"Invalid argument: ",d=l+"Exponent out of range: ",u=Math.floor,p=Math.pow,h=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,m=1e7,f=9007199254740991,g=u(1286742750677284.5),v={};function x(e,t){var n,r,i,o,a,l,c,d,u=e.constructor,p=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),s?M(t,p):t;if(c=e.d,d=t.d,a=e.e,i=t.e,c=c.slice(),o=a-i){for(o<0?(r=c,o=-o,l=d.length):(r=d,i=a,l=c.length),o>(l=(a=Math.ceil(p/7))>l?a+1:l+1)&&(o=l,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for((l=c.length)-(o=d.length)<0&&(o=l,r=d,d=c,c=r),n=0;o;)n=(c[--o]=c[o]+d[o]+n)/m|0,c[o]%=m;for(n&&(c.unshift(n),++i),l=c.length;0==c[--l];)c.pop();return t.d=c,t.e=i,s?M(t,p):t}function y(e,t,n){if(e!==~~e||e<t||e>n)throw Error(c+e)}function b(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=S(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=S(n))}else if(0===a)return"0";for(;a%10===0;)a/=10;return o+a}v.absoluteValue=v.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},v.comparedTo=v.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(t=0,n=(r=o.d.length)<(i=e.d.length)?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},v.decimalPlaces=v.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},v.dividedBy=v.div=function(e){return j(this,new this.constructor(e))},v.dividedToIntegerBy=v.idiv=function(e){var t=this.constructor;return M(j(this,new t(e),0,1),t.precision)},v.equals=v.eq=function(e){return!this.cmp(e)},v.exponent=function(){return _(this)},v.greaterThan=v.gt=function(e){return this.cmp(e)>0},v.greaterThanOrEqualTo=v.gte=function(e){return this.cmp(e)>=0},v.isInteger=v.isint=function(){return this.e>this.d.length-2},v.isNegative=v.isneg=function(){return this.s<0},v.isPositive=v.ispos=function(){return this.s>0},v.isZero=function(){return 0===this.s},v.lessThan=v.lt=function(e){return this.cmp(e)<0},v.lessThanOrEqualTo=v.lte=function(e){return this.cmp(e)<1},v.logarithm=v.log=function(e){var t,n=this,r=n.constructor,o=r.precision,a=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(i))throw Error(l+"NaN");if(n.s<1)throw Error(l+(n.s?"NaN":"-Infinity"));return n.eq(i)?new r(0):(s=!1,t=j(A(n,a),A(e,a),a),s=!0,M(t,o))},v.minus=v.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):x(t,(e.s=-e.s,e))},v.modulo=v.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(!(e=new r(e)).s)throw Error(l+"NaN");return n.s?(s=!1,t=j(n,e,0,1).times(e),s=!0,n.minus(t)):M(new r(n),i)},v.naturalExponential=v.exp=function(){return w(this)},v.naturalLogarithm=v.ln=function(){return A(this)},v.negated=v.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},v.plus=v.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?x(t,e):O(t,(e.s=-e.s,e))},v.precision=v.sd=function(e){var t,n,r,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(c+e);if(t=_(i)+1,n=7*(r=i.d.length-1)+1,r=i.d[r]){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},v.squareRoot=v.sqrt=function(){var e,t,n,r,i,o,a,c=this,d=c.constructor;if(c.s<1){if(!c.s)return new d(0);throw Error(l+"NaN")}for(e=_(c),s=!1,0==(i=Math.sqrt(+c))||i==1/0?(((t=b(c.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=u((e+1)/2)-(e<0||e%2),r=new d(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new d(i.toString()),i=a=(n=d.precision)+3;;)if(r=(o=r).plus(j(c,o,a+2)).times(.5),b(o.d).slice(0,a)===(t=b(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(M(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if("9999"!=t)break;a+=4}return s=!0,M(r,n)},v.times=v.mul=function(e){var t,n,r,i,o,a,l,c,d,u=this,p=u.constructor,h=u.d,f=(e=new p(e)).d;if(!u.s||!e.s)return new p(0);for(e.s*=u.s,n=u.e+e.e,(c=h.length)<(d=f.length)&&(o=h,h=f,f=o,a=c,c=d,d=a),o=[],r=a=c+d;r--;)o.push(0);for(r=d;--r>=0;){for(t=0,i=c+r;i>r;)l=o[i]+f[r]*h[i-r-1]+t,o[i--]=l%m|0,t=l/m|0;o[i]=(o[i]+t)%m|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,s?M(e,p.precision):e},v.toDecimalPlaces=v.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(y(e,0,o),void 0===t?t=r.rounding:y(t,0,8),M(n,e+_(n)+1,t))},v.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=T(r,!0):(y(e,0,o),void 0===t?t=i.rounding:y(t,0,8),n=T(r=M(new i(r),e+1,t),!0,e+1)),n},v.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?T(i):(y(e,0,o),void 0===t?t=a.rounding:y(t,0,8),n=T((r=M(new a(i),e+_(i)+1,t)).abs(),!1,e+_(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},v.toInteger=v.toint=function(){var e=this,t=e.constructor;return M(new t(e),_(e)+1,t.rounding)},v.toNumber=function(){return+this},v.toPower=v.pow=function(e){var t,n,r,o,a,c,d=this,p=d.constructor,h=+(e=new p(e));if(!e.s)return new p(i);if(!(d=new p(d)).s){if(e.s<1)throw Error(l+"Infinity");return d}if(d.eq(i))return d;if(r=p.precision,e.eq(i))return M(d,r);if(c=(t=e.e)>=(n=e.d.length-1),a=d.s,c){if((n=h<0?-h:h)<=f){for(o=new p(i),t=Math.ceil(r/7+4),s=!1;n%2&&E((o=o.times(d)).d,t),0!==(n=u(n/2));)E((d=d.times(d)).d,t);return s=!0,e.s<0?new p(i).div(o):M(o,r)}}else if(a<0)throw Error(l+"NaN");return a=a<0&&1&e.d[Math.max(t,n)]?-1:1,d.s=1,s=!1,o=e.times(A(d,r+12)),s=!0,(o=w(o)).s=a,o},v.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?r=T(i,(n=_(i))<=a.toExpNeg||n>=a.toExpPos):(y(e,1,o),void 0===t?t=a.rounding:y(t,0,8),r=T(i=M(new a(i),e,t),e<=(n=_(i))||n<=a.toExpNeg,e)),r},v.toSignificantDigits=v.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(y(e,1,o),void 0===t?t=n.rounding:y(t,0,8)),M(new n(this),e,t)},v.toString=v.valueOf=v.val=v.toJSON=function(){var e=this,t=_(e),n=e.constructor;return T(e,t<=n.toExpNeg||t>=n.toExpPos)};var j=function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%m|0,r=n/m|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*m+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a){var s,c,d,u,p,h,f,g,v,x,y,b,j,w,C,S,A,k,O=r.constructor,T=r.s==i.s?1:-1,E=r.d,P=i.d;if(!r.s)return new O(r);if(!i.s)throw Error(l+"Division by zero");for(c=r.e-i.e,A=P.length,C=E.length,g=(f=new O(T)).d=[],d=0;P[d]==(E[d]||0);)++d;if(P[d]>(E[d]||0)&&--c,(b=null==o?o=O.precision:a?o+(_(r)-_(i))+1:o)<0)return new O(0);if(b=b/7+2|0,d=0,1==A)for(u=0,P=P[0],b++;(d<C||u)&&b--;d++)j=u*m+(E[d]||0),g[d]=j/P|0,u=j%P|0;else{for((u=m/(P[0]+1)|0)>1&&(P=e(P,u),E=e(E,u),A=P.length,C=E.length),w=A,x=(v=E.slice(0,A)).length;x<A;)v[x++]=0;(k=P.slice()).unshift(0),S=P[0],P[1]>=m/2&&++S;do{u=0,(s=t(P,v,A,x))<0?(y=v[0],A!=x&&(y=y*m+(v[1]||0)),(u=y/S|0)>1?(u>=m&&(u=m-1),1==(s=t(p=e(P,u),v,h=p.length,x=v.length))&&(u--,n(p,A<h?k:P,h))):(0==u&&(s=u=1),p=P.slice()),(h=p.length)<x&&p.unshift(0),n(v,p,x),-1==s&&(s=t(P,v,A,x=v.length))<1&&(u++,n(v,A<x?k:P,x)),x=v.length):0===s&&(u++,v=[0]),g[d++]=u,s&&v[0]?v[x++]=E[w]||0:(v=[E[w]],x=1)}while((w++<C||void 0!==v[0])&&b--)}return g[0]||g.shift(),f.e=c,M(f,a?o+_(f)+1:o)}}();function w(e,t){var n,r,o,a,l,c=0,u=0,h=e.constructor,m=h.precision;if(_(e)>16)throw Error(d+_(e));if(!e.s)return new h(i);for(null==t?(s=!1,l=m):l=t,a=new h(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(l+=Math.log(p(2,u))/Math.LN10*2+5|0,n=r=o=new h(i),h.precision=l;;){if(r=M(r.times(e),l),n=n.times(++c),b((a=o.plus(j(r,n,l))).d).slice(0,l)===b(o.d).slice(0,l)){for(;u--;)o=M(o.times(o),l);return h.precision=m,null==t?(s=!0,M(o,m)):o}o=a}}function _(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw s=!0,n&&(e.precision=n),Error(l+"LN10 precision limit exceeded");return M(new e(e.LN10),t)}function S(e){for(var t="";e--;)t+="0";return t}function A(e,t){var n,r,o,a,c,d,u,p,h,m=1,f=e,g=f.d,v=f.constructor,x=v.precision;if(f.s<1)throw Error(l+(f.s?"NaN":"-Infinity"));if(f.eq(i))return new v(0);if(null==t?(s=!1,p=x):p=t,f.eq(10))return null==t&&(s=!0),C(v,p);if(p+=10,v.precision=p,r=(n=b(g)).charAt(0),a=_(f),!(Math.abs(a)<15e14))return u=C(v,p+2,x).times(a+""),f=A(new v(r+"."+n.slice(1)),p-10).plus(u),v.precision=x,null==t?(s=!0,M(f,x)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=b((f=f.times(e)).d)).charAt(0),m++;for(a=_(f),r>1?(f=new v("0."+n),a++):f=new v(r+"."+n.slice(1)),d=c=f=j(f.minus(i),f.plus(i),p),h=M(f.times(f),p),o=3;;){if(c=M(c.times(h),p),b((u=d.plus(j(c,new v(o),p))).d).slice(0,p)===b(d.d).slice(0,p))return d=d.times(2),0!==a&&(d=d.plus(C(v,p+2,x).times(a+""))),d=j(d,new v(m),p),v.precision=x,null==t?(s=!0,M(d,x)):d;d=u,o+=2}}function k(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(r,i)){if(i-=r,n=n-r-1,e.e=u(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),s&&(e.e>g||e.e<-g))throw Error(d+n)}else e.s=0,e.e=0,e.d=[0];return e}function M(e,t,n){var r,i,o,a,l,c,h,f,v=e.d;for(a=1,o=v[0];o>=10;o/=10)a++;if((r=t-a)<0)r+=7,i=t,h=v[f=0];else{if((f=Math.ceil((r+1)/7))>=(o=v.length))return e;for(h=o=v[f],a=1;o>=10;o/=10)a++;i=(r%=7)-7+a}if(void 0!==n&&(l=h/(o=p(10,a-i-1))%10|0,c=t<0||void 0!==v[f+1]||h%o,c=n<4?(l||c)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||c||6==n&&(r>0?i>0?h/p(10,a-i):0:v[f-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return c?(o=_(e),v.length=1,t=t-o-1,v[0]=p(10,(7-t%7)%7),e.e=u(-t/7)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(0==r?(v.length=f,o=1,f--):(v.length=f+1,o=p(10,7-r),v[f]=i>0?(h/p(10,a-i)%p(10,i)|0)*o:0),c)for(;;){if(0==f){(v[0]+=o)==m&&(v[0]=1,++e.e);break}if(v[f]+=o,v[f]!=m)break;v[f--]=0,o=1}for(r=v.length;0===v[--r];)v.pop();if(s&&(e.e>g||e.e<-g))throw Error(d+_(e));return e}function O(e,t){var n,r,i,o,a,l,c,d,u,p,h=e.constructor,f=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),s?M(t,f):t;if(c=e.d,p=t.d,r=t.e,d=e.e,c=c.slice(),a=d-r){for((u=a<0)?(n=c,a=-a,l=p.length):(n=p,r=d,l=c.length),a>(i=Math.max(Math.ceil(f/7),l)+2)&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for((u=(i=c.length)<(l=p.length))&&(l=i),i=0;i<l;i++)if(c[i]!=p[i]){u=c[i]<p[i];break}a=0}for(u&&(n=c,c=p,p=n,t.s=-t.s),l=c.length,i=p.length-l;i>0;--i)c[l++]=0;for(i=p.length;i>a;){if(c[--i]<p[i]){for(o=i;o&&0===c[--o];)c[o]=m-1;--c[o],c[i]+=m}c[i]-=p[i]}for(;0===c[--l];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(t.d=c,t.e=r,s?M(t,f):t):new h(0)}function T(e,t,n){var r,i=_(e),o=b(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+S(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+S(-i-1)+o,n&&(r=n-a)>0&&(o+=S(r))):i>=a?(o+=S(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+S(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=S(r))),e.s<0?"-"+o:o}function E(e,t){if(e.length>t)return e.length=t,!0}function P(e){if(!e||"object"!==typeof e)throw Error(l+"Object expected");var t,n,r,i=["precision",1,o,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(r=e[n=i[t]])){if(!(u(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(c+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(c+n+": "+r);this[n]=new this(r)}return this}a=function e(t){var n,r,i;function o(e){var t=this;if(!(t instanceof o))return new o(e);if(t.constructor=o,e instanceof o)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"===typeof e){if(0*e!==0)throw Error(c+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):k(t,e.toString())}if("string"!==typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!h.test(e))throw Error(c+e);k(t,e)}if(o.prototype=v,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=P,void 0===t&&(t={}),t)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(a),a.default=a.Decimal=a,i=new a(1),void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},98348:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info")},98443:(e,t,n)=>{"use strict";e.exports=n(79717)},98587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},98610:(e,t,n)=>{"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,{A:()=>r})},98724:(e,t,n)=>{var r=n(27615),i=n(25051),o=n(72154),a=n(48734),s=n(22662);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},98738:(e,t,n)=>{"use strict";var r=n(86267);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},98990:(e,t,n)=>{var r=n(69995)(n(32520));e.exports=r},99057:(e,t,n)=>{var r=n(35324),i=n(22777),o=n(54052),a=n(69194),s=n(56173),l=n(70914);e.exports=function(e,t,n){for(var c=-1,d=(t=r(t,e)).length,u=!1;++c<d;){var p=l(t[c]);if(!(u=null!=e&&n(e,p)))break;e=e[p]}return u||++c!=d?u:!!(d=null==e?0:e.length)&&s(d)&&a(p,d)&&(o(e)||i(e))}},99140:(e,t,n)=>{var r=n(37303);e.exports=function(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}},99303:(e,t,n)=>{"use strict";n.d(t,{E:()=>a,A:()=>s});var r=n(65043);const i={};const o=[];class a{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new a}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function s(){const e=function(e,t){const n=r.useRef(i);return n.current===i&&(n.current=e(t)),n}(a.create).current;var t;return t=e.disposeEffect,r.useEffect(t,o),e}},99421:e=>{e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},99466:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M9.5 6.5v3h-3v-3zM11 5H5v6h6zm-1.5 9.5v3h-3v-3zM11 13H5v6h6zm6.5-6.5v3h-3v-3zM19 5h-6v6h6zm-6 8h1.5v1.5H13zm1.5 1.5H16V16h-1.5zM16 13h1.5v1.5H16zm-3 3h1.5v1.5H13zm1.5 1.5H16V19h-1.5zM16 16h1.5v1.5H16zm1.5-1.5H19V16h-1.5zm0 3H19V19h-1.5zM22 7h-2V4h-3V2h5zm0 15v-5h-2v3h-3v2zM2 22h5v-2H4v-3H2zM2 2v5h2V4h3V2z"}),"QrCodeScanner")},99604:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined")},99641:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var i=r(n(40039)),o=n(70579);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zM6 20V4h7v5h5v11z"}),"InsertDriveFileOutlined")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.amdD=function(){throw new Error("define cannot be used indirect")},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&i&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,n.d(o,a),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>"static/js/"+e+".6dd53eaf.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="rpm-frontend:";n.l=(r,i,o,a)=>{if(e[r])e[r].push(i);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==r||u.getAttribute("data-webpack")==t+o){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+o),s.src=r),e[r]=[i];var p=(t,n)=>{s.onerror=s.onload=null,clearTimeout(h);var i=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach(e=>e(n)),t)return t(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((n,r)=>i=e[t]=[n,r]);r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}},"chunk-"+t,t)}};var t=(t,r)=>{var i,o,a=r[0],s=r[1],l=r[2],c=0;if(a.some(t=>0!==e[t])){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)l(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkrpm_frontend=self.webpackChunkrpm_frontend||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e={};n.r(e),n.d(e,{exclude:()=>Ja,extract:()=>Ga,parse:()=>Ya,parseUrl:()=>Ka,pick:()=>Qa,stringify:()=>Za,stringifyUrl:()=>Xa});var t={};n.r(t),n.d(t,{scaleBand:()=>Y3,scaleDiverging:()=>See,scaleDivergingLog:()=>Aee,scaleDivergingPow:()=>Mee,scaleDivergingSqrt:()=>Oee,scaleDivergingSymlog:()=>kee,scaleIdentity:()=>y9,scaleImplicit:()=>q3,scaleLinear:()=>x9,scaleLog:()=>M9,scaleOrdinal:()=>G3,scalePoint:()=>K3,scalePow:()=>I9,scaleQuantile:()=>Z9,scaleQuantize:()=>K9,scaleRadial:()=>B9,scaleSequential:()=>xee,scaleSequentialLog:()=>yee,scaleSequentialPow:()=>jee,scaleSequentialQuantile:()=>_ee,scaleSequentialSqrt:()=>wee,scaleSequentialSymlog:()=>bee,scaleSqrt:()=>F9,scaleSymlog:()=>P9,scaleThreshold:()=>X9,scaleTime:()=>mee,scaleUtc:()=>fee,tickFormat:()=>g9});var r={};n.r(r),n.d(r,{amber:()=>xde,blue:()=>yde,blueGrey:()=>bde,brown:()=>jde,cyan:()=>wde,deepOrange:()=>vde,deepPurple:()=>_de,green:()=>Cde,grey:()=>Sde,indigo:()=>gde,lightBlue:()=>Ade,lightGreen:()=>kde,lime:()=>Mde,orange:()=>Ode,pink:()=>Tde,purple:()=>Ede,red:()=>Pde,teal:()=>Dde,yellow:()=>Rde});var i=n(89379),o=n(82284);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=n(20816);function l(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,(0,s.A)(r.key),r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function p(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&&u(e,t)}function h(e,t){if(t&&("object"==(0,o.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var f=n(64467);function g(e){if(Array.isArray(e))return e}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function j(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 w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},C=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return c(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||_,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"===typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,w(w({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),S=new C,A=function(){function e(){a(this,e),this.observers={}}return c(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)}),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter(function(e){return e!==t}):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,n)});this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(n))})}}]),e}();function k(){var e,t,n=new Promise(function(n,r){e=n,t=r});return n.resolve=e,n.reject=t,n}function M(e){return null==e?"":""+e}function O(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"===typeof e}for(var o="string"!==typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function T(e,t,n){var r=O(e,t,Object);r.obj[r.k]=n}function E(e,t){var n=O(e,t),r=n.obj,i=n.k;if(r)return r[i]}function P(e,t,n){var r=E(e,n);return void 0!==r?r:E(t,n)}function D(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"===typeof e[r]||e[r]instanceof String||"string"===typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):D(e[r],t[r],n):e[r]=t[r]);return e}function R(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function L(e){return"string"===typeof e?e.replace(/[&<>"'\/]/g,function(e){return N[e]}):e}var I="undefined"!==typeof window&&window.navigator&&"undefined"===typeof window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,F=[" ",",","?","!",";"];function $(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 B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function z(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(ba){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i)return;if("string"===typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var a=2,s=r.slice(o,o+a).join(n),l=i[s];void 0===l&&r.length>o+a;)a++,l=i[s=r.slice(o,o+a).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(s)){if("string"===typeof l)return l;if(s&&"string"===typeof l[s])return l[s]}var c=r.slice(o+a).join(n);return c?H(l,c,n):void 0}i=i[r[o]]}return i}}var W=function(e){p(n,e);var t=z(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,n),r=t.call(this),I&&A.call(d(r)),r.data=e||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return c(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!==typeof n&&(a=a.concat(n)),n&&"string"===typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=E(this.data,a);return s||!o||"string"!==typeof n?s:H(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),T(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!==typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=E(this.data,a)||{};r?D(s,n,i):s=B(B({},s),n),T(this.data,a,s),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?B(B({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(A),V={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach(function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))}),t}};function U(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 q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function G(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(ba){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var Y={},Z=function(e){p(n,e);var t=G(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,n),r=t.call(this),I&&A.call(d(r)),function(e,t,n){e.forEach(function(e){t[e]&&(n[e]=t[e])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,d(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=S.create("translator"),r}return c(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(void 0===e||null===e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,n){t=t||"",n=n||"";var r=F.filter(function(e){return t.indexOf(e)<0&&n.indexOf(e)<0});if(0===r.length)return!0;var i=new RegExp("(".concat(r.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}(e,n,r);if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:i};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(r)}return"string"===typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==(0,o.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),void 0===e||null===e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,l=this.extractFromKey(e[e.length-1],t),c=l.key,d=l.namespaces,u=d[d.length-1],p=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(h){var m=t.nsSeparator||this.options.nsSeparator;return a?(f.res="".concat(u).concat(m).concat(c),f):"".concat(u).concat(m).concat(c)}return a?(f.res=c,f):c}var f=this.resolve(e,t),g=f&&f.res,v=f&&f.usedKey||c,x=f&&f.exactUsedKey||c,y=Object.prototype.toString.apply(g),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject;if(j&&g&&("string"!==typeof g&&"boolean"!==typeof g&&"number"!==typeof g)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&("string"!==typeof b||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,q(q({},t),{},{ns:d})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return a?(f.res=w,f):w}if(s){var _="[object Array]"===y,C=_?[]:{},S=_?x:v;for(var A in g)if(Object.prototype.hasOwnProperty.call(g,A)){var k="".concat(S).concat(s).concat(A);C[A]=this.translate(k,q(q({},t),{joinArrays:!1,ns:d})),C[A]===k&&(C[A]=g[A])}g=C}}else if(j&&"string"===typeof b&&"[object Array]"===y)(g=g.join(b))&&(g=this.extendTranslation(g,e,t,r));else{var M=!1,O=!1,T=void 0!==t.count&&"string"!==typeof t.count,E=n.hasDefaultValue(t),P=T?this.pluralResolver.getSuffix(p,t.count,t):"",D=t["defaultValue".concat(P)]||t.defaultValue;!this.isValidLookup(g)&&E&&(M=!0,g=D),this.isValidLookup(g)||(O=!0,g=c);var R=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:g,N=E&&D!==g&&this.options.updateMissing;if(O||M||N){if(this.logger.log(N?"updateKey":"missingKey",p,u,c,N?D:g),s){var L=this.resolve(c,q(q({},t),{},{keySeparator:!1}));L&&L.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var I=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var $=0;$<F.length;$++)I.push(F[$]);else"all"===this.options.saveMissingTo?I=this.languageUtils.toResolveHierarchy(t.lng||this.language):I.push(t.lng||this.language);var B=function(e,n,r){var o=E&&r!==g?r:R;i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,n,o,N,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,n,o,N,t),i.emit("missingKey",e,u,n,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?I.forEach(function(e){i.pluralResolver.getSuffixes(e,t).forEach(function(n){B([e],c+n,t["defaultValue".concat(n)]||D)})}):B(I,c,D))}g=this.extendTranslation(g,e,t,f,r),O&&g===c&&this.options.appendNamespaceToMissingKey&&(g="".concat(u,":").concat(c)),(O||M)&&this.options.parseMissingKeyHandler&&(g="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(c):c,M?g:void 0):this.options.parseMissingKeyHandler(g))}return a?(f.res=g,f):g}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,q(q({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(q(q({},n),{interpolation:q(q({},this.options.interpolation),n.interpolation)}));var a,s="string"===typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);a=l&&l.length}var c=n.replace&&"string"!==typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=q(q({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var d=e.match(this.interpolator.nestingRegexp);a<(d&&d.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))},n)),n.interpolation&&this.interpolator.reset()}var u=n.postProcess||this.options.postProcess,p="string"===typeof u?[u]:u;return void 0!==e&&null!==e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=V.handle(p,e,t,this.options&&this.options.postProcessPassResolved?q({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),c=l.key;n=c;var d=l.namespaces;a.options.fallbackNS&&(d=d.concat(a.options.fallbackNS));var u=void 0!==s.count&&"string"!==typeof s.count,p=u&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"===typeof s.context||"number"===typeof s.context)&&""!==s.context,m=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);d.forEach(function(e){a.isValidLookup(t)||(o=e,!Y["".concat(m[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(Y["".concat(m[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(m.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(function(n){if(!a.isValidLookup(t)){i=n;var o,l=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(l,c,n,e,s);else{var d;u&&(d=a.pluralResolver.getSuffix(n,s.count,s));var m="".concat(a.options.pluralSeparator,"zero");if(u&&(l.push(c+d),p&&l.push(c+m)),h){var f="".concat(c).concat(a.options.contextSeparator).concat(s.context);l.push(f),u&&(l.push(f+d),p&&l.push(f+m))}}for(;o=l.pop();)a.isValidLookup(t)||(r=o,t=a.getResource(n,e,o,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}]),n}(A);function K(e){return e.charAt(0).toUpperCase()+e.slice(1)}var X=function(){function e(t){a(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=S.create("languageUtils")}return c(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"===typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=K(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=K(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find(function(e){if(0===e.indexOf(r))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"===typeof e&&(e=e(t)),"string"===typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"===typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"===typeof e&&o(this.formatLanguageCode(e)),r.forEach(function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))}),i}}]),e}(),Q=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],J={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},ee=["v1","v2","v3"],te={zero:0,one:1,two:2,few:3,many:4,other:5};var ne=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=n,this.logger=S.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!==typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){var e={};return Q.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:J[t.fc]}})}),e}()}return c(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(n){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(function(e,t){return te[e]-te[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):r.numbers.map(function(r){return t.getSuffix(e,r,n)}):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"===typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!ee.includes(this.options.compatibilityJSON)}}]),e}();function re(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 ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var oe=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=S.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return c(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:L,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?R(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?R(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?R(t.nestingPrefix):t.nestingPrefixEscaped||R("$t("),this.nestingSuffix=t.nestingSuffix?R(t.nestingSuffix):t.nestingSuffixEscaped||R(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var d=function(e){if(e.indexOf(s.formatSeparator)<0){var i=P(t,l,e);return s.alwaysFormat?s.format(i,void 0,n,ie(ie(ie({},r),t),{},{interpolationkey:e})):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),c=o.join(s.formatSeparator).trim();return s.format(P(t,l,a),c,n,ie(ie(ie({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var u=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach(function(t){for(a=0;i=t.regex.exec(e);){var n=i[1].trim();if(void 0===(o=d(n)))if("function"===typeof u){var l=u(e,i,r);o="string"===typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else{if(p){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"===typeof o||s.useRawValueToEscape||(o=M(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),p?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=ie({},o);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var o=(i=this.interpolate(i,a)).match(/'/g),s=i.match(/"/g);(o&&o.length%2===0&&!s||s.length%2!==0)&&(i=i.replace(/'/g,'"'));try{a=JSON.parse(i),t&&(a=ie(ie({},t),a))}catch(ba){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),ba),"".concat(e).concat(n).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var d=n[1].split(this.formatSeparator).map(function(e){return e.trim()});n[1]=d.shift(),l=d,c=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!==typeof r)return r;"string"!==typeof r&&(r=M(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce(function(e,t){return i.format(e,t,o.lng,ie(ie({},o),{},{interpolationkey:n[1].trim()}))},r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function ae(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 se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function le(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if("currency"===t&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if("relativetime"===t&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{i.split(";").forEach(function(e){if(e){var t=function(e){return g(e)||v(e)||y(e)||b()}(e.split(":")),r=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}})}}return{formatName:t,formatOptions:n}}function ce(e){var t={};return function(n,r,i){var o=r+JSON.stringify(i),a=t[o];return a||(a=e(r,i),t[o]=a),a(n)}}var de=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=S.create("formatter"),this.options=t,this.formats={number:ce(function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}}),currency:ce(function(e,t){var n=new Intl.NumberFormat(e,se(se({},t),{},{style:"currency"}));return function(e){return n.format(e)}}),datetime:ce(function(e,t){var n=new Intl.DateTimeFormat(e,se({},t));return function(e){return n.format(e)}}),relativetime:ce(function(e,t){var n=new Intl.RelativeTimeFormat(e,se({},t));return function(e){return n.format(e,t.range||"day")}}),list:ce(function(e,t){var n=new Intl.ListFormat(e,se({},t));return function(e){return n.format(e)}})},this.init(t)}return c(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=ce(t)}},{key:"format",value:function(e,t,n,r){var i=this,o=t.split(this.formatSeparator).reduce(function(e,t){var o=le(t),a=o.formatName,s=o.formatOptions;if(i.formats[a]){var l=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},d=c.locale||c.lng||r.locale||r.lng||n;l=i.formats[a](e,d,se(se(se({},s),r),c))}catch(u){i.logger.warn(u)}return l}return i.logger.warn("there was no format function for ".concat(a)),e},e);return o}}]),e}();function ue(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 pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function he(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(ba){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var me=function(e){p(n,e);var t=he(n);function n(e,r,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,n),o=t.call(this),I&&A.call(d(o)),o.backend=e,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=S.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return c(n,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o={},a={},s={},l={};return e.forEach(function(e){var r=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?void 0===a[s]&&(a[s]=!0):(i.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===l[t]&&(l[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(n){!function(e,t,n,r){var i=O(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}(n.loaded,[i],o),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:a}):(this.readingCalls++,this.backend[n](e,t,function(s,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}s&&l&&i<r.maxRetries?setTimeout(function(){r.read.call(r,e,t,n,i+1,2*o,a)},o):a(s,l)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"===typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"===typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,r,a)})}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):void 0!==n&&null!==n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,pe(pe({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),n}(A);function fe(e){return"string"===typeof e.ns&&(e.ns=[e.ns]),"string"===typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"===typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ge(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 ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}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(ba){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function ye(){}var be=function(e){p(n,e);var t=xe(n);function n(){var e,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(a(this,n),e=t.call(this),I&&A.call(d(e)),e.options=fe(i),e.services={},e.logger=S,e.modules={external:[]},r=d(e),Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(function(e){"function"===typeof r[e]&&(r[e]=r[e].bind(r))}),o&&!e.isInitialized&&!i.isClone){if(!e.options.initImmediate)return e.init(i,o),h(e,d(e));setTimeout(function(){e.init(i,o)},0)}return e}return c(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"===typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"===typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,o.A)(e[1])&&(t=e[1]),"string"===typeof e[1]&&(t.defaultValue=e[1]),"string"===typeof e[2]&&(t.tDescription=e[2]),"object"===(0,o.A)(e[2])||"object"===(0,o.A)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function i(e){return e?"function"===typeof e?new e:e:null}if(this.options=ve(ve(ve({},r),this.options),fe(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ve(ve({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var a;this.modules.logger?S.init(i(this.modules.logger),this.options):S.init(null,this.options),this.modules.formatter?a=this.modules.formatter:"undefined"!==typeof Intl&&(a=de);var s=new X(this.options);this.store=new W(this.options.resources,this.options);var l=this.services;l.logger=S,l.resourceStore=this.store,l.languageUtils=s,l.pluralResolver=new ne(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!a||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(l.formatter=i(a),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new oe(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new me(i(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))}),this.modules.languageDetector&&(l.languageDetector=i(this.modules.languageDetector),l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=i(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Z(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,n||(n=ye),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var d=k(),u=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye,r="string"===typeof e?e:this.language;if("function"===typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var i=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){i.indexOf(e)<0&&i.push(e)})};if(r)o(r);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return o(e)});this.options.preload&&this.options.preload.forEach(function(e){return o(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=k();return e||(e=this.languages),t||(t=this.options.ns),n||(n=ye),this.services.backendConnector.reload(e,t,function(e){r.resolve(),n(e)}),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&V.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=k();this.emit("languageChanging",e);var i=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(o){e||o||!n.services.languageDetector||(o=[]);var a="string"===typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);a&&(n.language||i(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,function(e){!function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),t&&t(e,function(){return n.t.apply(n,arguments)})}(e,a)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var a;if("object"!==(0,o.A)(i)){for(var s=arguments.length,l=new Array(s>2?s-2:0),c=2;c<s;c++)l[c-2]=arguments[c];a=r.options.overloadTranslationOptionHandler([t,i].concat(l))}else a=ve({},i);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||n||e.keyPrefix;var d=r.options.keySeparator||".",u=a.keyPrefix?"".concat(a.keyPrefix).concat(d).concat(t):t;return r.t(u,a)};return"string"===typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(r,e)||i&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=k();return this.options.ns?("string"===typeof e&&(e=[e]),e.forEach(function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)}),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=k();"string"===typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter(function(e){return r.indexOf(e)<0});return i.length?(this.options.preload=r.concat(i),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye,i=ve(ve(ve({},this.options),t),{isClone:!0}),o=new n(i);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));return["store","services","language"].forEach(function(t){o[t]=e[t]}),o.services=ve({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Z(o.services,o.options),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))}),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(A);(0,f.A)(be,"createInstance",function(){return new be(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)});var je=be.createInstance();je.createInstance=be.createInstance;je.createInstance,je.init,je.loadResources,je.reloadResources,je.use,je.changeLanguage,je.getFixedT;var we=je.t;je.exists,je.setDefaultNamespace,je.hasLoadedNamespace,je.loadNamespaces,je.loadLanguages;const _e=je;var Ce=[],Se=Ce.forEach,Ae=Ce.slice;var ke=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Me=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=function(e,t,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(t),o="".concat(e,"=").concat(i);if(r.maxAge>0){var a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(r.domain){if(!ke.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(r.domain)}if(r.path){if(!ke.test(r.path))throw new TypeError("option path is invalid");o+="; Path=".concat(r.path)}if(r.expires){if("function"!==typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch("string"===typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}(e,encodeURIComponent(t),i)},Oe=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},Te={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!==typeof document){var n=Oe(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!==typeof document&&Me(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},Ee={name:"querystring",lookup:function(e){var t;if("undefined"!==typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(o>0)r[i].substring(0,o)===e.lookupQuerystring&&(t=r[i].substring(o+1))}}return t}},Pe=null,De=function(){if(null!==Pe)return Pe;try{Pe="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(ba){Pe=!1}return Pe},Re={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&De()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&De()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Ne=null,Le=function(){if(null!==Ne)return Ne;try{Ne="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(ba){Ne=!1}return Ne},Ie={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&Le()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&Le()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Fe={name:"navigator",lookup:function(e){var t=[];if("undefined"!==typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},$e={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!==typeof document?document.documentElement:null);return n&&"function"===typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},Be={name:"path",lookup:function(e){var t;if("undefined"!==typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"===typeof e.lookupFromPathIndex){if("string"!==typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},ze={name:"subdomain",lookup:function(e){var t="number"===typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!==typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};var He=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return c(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Se.call(Ae.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Te),this.addDetector(Ee),this.addDetector(Re),this.addDetector(Ie),this.addDetector(Fe),this.addDetector($e),this.addDetector(Be),this.addDetector(ze)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach(function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"===typeof r&&(r=[r]),r&&(n=n.concat(r))}}),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)}))}}]),e}();He.type="languageDetector";var We=n(65043),Ve=n.t(We,2),Ue=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,qe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xa9","&#169;":"\xa9","&reg;":"\xae","&#174;":"\xae","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},Ge=function(e){return qe[e]};function Ye(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 Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ke,Xe={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(Ue,Ge)}},Qe=(0,We.createContext)();var Je=function(){function e(){a(this,e),this.usedNamespaces={}}return c(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach(function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function et(){return Ke}var tt={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Xe=Ze(Ze({},Xe),e)}(e.options.react),function(e){Ke=e}(e)}};const nt=JSON.parse('{"rpm_noWhiteSpaceAllowed":"Space not allowed","rpm_stringError":"Please enter a correct value","rpm_required":"{{field}} is a required field.","rpm_minLength":"Minimum {{length}} characters are required.","rpm_maxLength":"Maximum length must be equal to or less than {{length}} characters.","rpm_minLengthNumber":"Minimum {{length}} number are required.","rpm_maxLengthNumber":"Maximum length must be equal to or less than {{length}} number.","rpm_specialCharacter":"Special characters are not allowed","rpm_TypeError":"{{field}} must be a number","ERR_500":"Operation cannot be performed.","ERR_DUPLICATE":"Duplicate value","ERR_FAILED":"Failed","ERR_DEFAULT":"Error","errorUnAuthorized":"Request is unauthorized!","errorResourceNotFound":"Resource not found!","errorTimeout":"Request timed out.","errorConflict":"Record already exists.","errorUnauthorized":"Unauthorized","errorAuthBruteForce":"Your account has been locked temporarily due to excessive failed login attempts.","errorAuthPasswordWxpired":"Your password has expired and must be reset before you can log in. An email has been sent to your email address containing further instructions.","errorAuthGeneral":"Invalid Username or Password. Please try again or contact the administrator.","errorAccessDenied":"Access/Action is restricted for the current user","rpm_PasswordTestLowerCaseErr":"At least 1 lowercase letter is required.","rpm_PasswordTestUpperCaseErr":"At least 1 uppercase letter is required.","rpm_PasswordTestDigitErr":"At least 1 digit is required.","rpm_PasswordTestSpecialErr":"At least 1 special character is required.","rpm_PasswordConfirmNotMatchErr":"Password does not match.","rpm_ValidPhone":"Please Provide a valid {{field}}.","rpm_ValidZipCode":"Please provide a valid Pincode.","rpm_emailValid":"Please provide valid email address.","errorSpace":"Empty space is not allowed","rpm_minMaxDateErr":"Date must be between 1900 and 2004","rpm_invailidDateErr":"Please enter a valid date","rpm_err_matching_passwords":"Password already in use","rpm_UserCreateFailed":"User account creation failed.","rpm_err_user_exists":"User already exists.","rpm_err_group_not_found":"Group not found.","rpm_UsernameValidation":"Invalid username. Please use lowercase/uppercase letters, digits, underscore(_) and dot(.)","rpm_err_empty_path":"Program group empty","rpm_PasswordFailure":"Password updation failed","rpm_err_password_too_weak":"Password strength is too weak","rpm_err_empty_value":"Password field cannot be empty","rpm_PasswordResetFailed":"Password reset failed","rpm_ProfileUpdationFailed":"Profile updation failed","rpm_PolicyCreateFailed":"Something went wrong while creating a new policy.","rpm_PolicyAttachFailed":"Policy attachment to the role failed.","rpm_PolicyUpdateFailed":"Policy updation on the role is failed.","rpm_resource_access_denied":"Access denied","rpm_err_invalid_creds":"Bad Credentials","rpm_ProgramRemoveFailed":"Program removal failed","rpm_err_bad_escalation":"Bad Escalation","rpm_minMaxTimeErr":"End-time should be greater then start-time","rpm_SameTimeErr":"The duration between the start time & end time of a mandate should be greater than 10 minutes and less than 180 minutes","rpm_err_bad_password":"Bad password","rpm_err_bad_group_update":"You cannot remove the program if want to remove please assign another program then remove","rpm_err_role_exists":"Role name already exist at this level or program","rpm_durationLength":"Duration must be greater then 0 and less then 100","rpm_overlapping_time_range":"Overlapping mandates\' timings","rpm_bad_time_range":"End time should be greater than start time.","rpm_batchSize":"Batch size must be greater than 1 and less than {{length}}","rpm_AlreadyAttachCourse":"Course already attached to the patient.","rpm_err_max_value":"Maximum length error","rpm_validEmail":"Please enter a valid email address","rpm_err_access_denied":"Access Denied","rpm_program_not_found":"Program not found","rpm_ProgramUpdateFailed":"Program action failed","rpm_NotFound":"Page Not Found!","rpm_invalidDateErr":"Please enter a valid time.(eg: 00:00 - 23:59)","rpm_ScheduleCreatedFailed":"Course creation failed.","rpm_err_schedule_already_assigned":"The attached course can not be edited. Kindly delete the existing course and attach a new one.","rpm_DiseaseCreatedFailed":"Record addition failed.","rpm_DiseaseUpdateFailed":"Record updation failed.","rpm_DiseaseDeleteFailed":"Record deletion failed.","rpm_err_not_found":"Error not found.","rpm_FileDeleteFailed":"File deletion failed.","rpm_OtherHealthIssuesUpdateFailed":"Social History updation failed.","rpm_ScheduleUpdateFailed":"Schedule Updation failed.","rpm_DownloadFileFailed":"File downloading unsuccessful.","rpm_ImageSize":"Please upload image having size less then 5MB.","rpm_SameFileName":"Please upload a file with a different name","rpm_MinNumber":"Minimum {{length}} numbers are required.","rpm_MaxNumber":"Maximum length must be equal to or less than {{length}}.","rpm_FetchRolesFailed":"Roles could not be fetched.","rpm_FetchUsersFailed":"Users could not be fetched.","rpm_NoteCreatedFailed":"Note creation failed.","rpm_NoteUpdateFailed":"Note updation failed.","rpm_NoteDeleteFailed":"Note deletion failed.","rpm_PrescriptionCreatedFailed":"Consultation creation failed.","rpm_PrescriptionUpdateFailed":"Consultation updation failed.","rpm_PrescriptionDeleteFailed":"Consultation deletion failed.","rpm_durationErr":"Please enter a valid number.","rpm_durationErrYear":"Year should be equal or less then {{length}}","rpm_durationErrMonth":"Month should be equal or less then {{length}}","rpm_durationErrDay":"Days should be equal or less then {{length}}","rpm_minYear":"Selected year must be greater than {{length}}","rpm_equalYear":"Year cannot be same","rpm_invalidYear":"Please enter a valid year","rpm_err_incorrect_medical_history_duration":"Duration should be less then your age","rpm_ActivityName":"Activity name","rpm_ActivityType":"Activity type","validWholeNumber":"Enter a valid whole number only","rpm_err_only_one_future_course_can_be_assigned":"More than one course can not be assigned to the patient for a future date.","rpm_err_medicine_start_date_cannot_be_after_end_date":"Start date must be less than end date.","rpm_err_template_name_already_exist":"Template name already exists.","rpm_timingError":"Kindly set reminders for the remaining dosages as well.","rpm_sameTimingError":"Please use different times","rpm_bothFields":"Both fields are required","rpm_TemplateCreatedFailed":"Template creation failed","rpm_TemplateDeleteFailed":"Template deletion failed","rpm_PatientTransferFailed":"Patient already exist in this program.","rpm_err_mobile_number_already_exist":"Mobile number already exists.","rpm_err_rule_already_exist":"Rule already exists.","rpm_RuleCreatedFailed":"Rule creation failed","rpm_PatientAlreadyExisted":"Patient already exists in this program.","rpm_AgeError":"Age required above 17 and below 100","rpm_patient_not_created":"Patient could not be created","rpm_QrDownloadedFailed":"QR download failed","rpm_providerAssignFailed":"Provider update failed","rpm_GoalCreatedFailed":"Goal creation failed","rpm_ExerciseCreatedFailed":"Exercise creation failed","rpm_err_workout_already_exists":"Workout already exists"}'),rt=JSON.parse('{"ERR_500":"Operation cannot be performed.","ERR_DUPLICATE":"Duplicate value","ERR_FAILED":"Failed","ERR_DEFAULT":"Error","errorUnAuthorized":"Request is unauthorized!","errorResourceNotFound":"Resource not found!","errorTimeout":"Request timeout.","errorConflict":"Record already exists.","errorUnauthorized":"Unauthorized","errorAuthBruteForce":"Your account has been locked temporarily due to excessive failed login attempts.","errorAuthPasswordWxpired":"Your password has expired and must be reset before you can log in. An email has been sent to your email address containing further instructions.","errorAuthGeneral":"Invalid Username or Password. Please try again or contact the administrator.","errorAccessDenied":"Access/Action is restricted for the current user","rpm_AlertResolvedTitle":"Alert Follow-Up","rpm_AlertResolvedBody":"Are you sure you want to resolve this alert?","rpm_AlertResolvedSub":"Resolved item will be removed from the active alerts\' list.","rpm_DeleteTitle":"Delete Record","rpm_DeleteCourse":"Delete Course","rpm_DeleteCourseBodyText":"Are you sure you want to delete this course?","rpm_DeleteBodyText":"Are you sure you want to delete this record?","rpm_DeleteSubText":"Do you really want to delete this record?","rpm_DeleteReadingText":"Are you sure you want to delete this reading?","rpm_DeleteAlertText":"Are you sure you want to delete this alert?","rpm_PatientCreatedSuccessfully":"Patient created successfully!","rpm_PatientRequestedSuccessfully":"Request successfully sent to patient.","rpm_PatientCreatedFailed":"Patient account creation failed!","rpm_RuleCreatedSuccessfully":"Rule created successfully!","rpm_RuleCreatedFailed":"Rule creation failed!","rpm_ResolveAlertSuccess":"Alert resolved successfully!","rpm_DeleteRuleSuccess":"Rule deleted successfully!","rpm_DeletePatientSuccess":"Patient deleted successfully!","rpm_SystemRootRoleDescription":"The root account has root privileges. This means it can read and write  any files on the system, perform operations as any us","rpm_UnassignBodyText":"Are you sure you want to unassign the client level?","rpm_DeleteRoleSuccess":"Role deleted successfully!","rpm_UpdatePasswordSuccessfully":"Password updated successfully!","rpm_UpdateSuccessUserProfile":"Profile updated successfully!","rpm_PatientUpdateSuccessfully":"Patient record updated successfully!","rpm_DeletePatientBodyText":"Confirm","rpm_DeletePatientSubText":"Are you sure you want to delete this record? This process cannot be undone.","rpm_FirstNameHelp":"Enter the first name of the patient","rpm_LastNameHelp":"Enter the last name of the patient","rpm_AgeHelp":"Enter the age of the patient","rpm_MobileHelp":"Enter the 10 digit registered mobile number of the patient. Patient will login into the application through this number.","rpm_DOBHelp":"Enter the date of birth of the patient","rpm_EmailHelp":"Enter the valid email ID of the patient","rpm_DeviceHelp":"Select the device that needs to be assigned to the patient.","rpm_ObserverHelp":"Enter the name of the Doctor who is observing this patient.","rpm_GenderHelp":"Select the gender of the patient from the list.","rpm_FacilityHelp":"Select the type of the facility from the list.","rpm_MaritalStatusHelp":"Select marital status of the patient from the list ","rpm_ParentHelp":"Enter the name of the guardian or parent","rpm_BloodGroupHelp":"Select the blood group of the patient","rpm_HeightHelp":"Enter the height in ft. ","rpm_HeightFeetHelp":"Select the height in ft.","rpm_HeightInchesHelp":"Select the height in inches","rpm_WeightHelp":"Enter the weight in kgs","rpm_CountryHelp":"Enter the country name of the patient","rpm_StateHelp":"Enter the state/province name of the patient","rpm_CityHelp":"Enter the city name of the patient","rpm_ZipCodeHelp":"Enter the pincode/zipcode upto 6 digits","rpm_Address1Help":"Enter the street address, P.O. Box, and company name of the patient. ","rpm_Address2Help":"Enter the apartment, suite, unit, building, floor, etc., of the patient. ","rpm_VitalTypeHelp":"Select vital type for the rule.","rpm_ProcessingModeHelp":"Select the processing mode for the rule.","rpm_DescriptionHelp":"Provide your comment(s) to resolve this alert.","rpm_ShortDescriptionHelp":"Provide a brief description of the rule. ","rpm_BatchDataSizeHelp":"The batch size can lie within the range of 2-20","rpm_FirstNameDrHelp":"Enter your first name","rpm_LastNameDrHelp":"Enter your last name","rpm_MobileDrHelp":"Enter your mobile number","rpm_DOBDrHelp":"Select your date of birth","rpm_EmailDrHelp":"Enter your Email id","rpm_GenderDrHelp":"Select your gender","rpm_SpecialityHelp":"Select your speciality","rpm_ExperienceHelp":"Enter your experience","rpm_ConsultingLanguageHelp":"Enter your preferred language","rpm_RegistrationHelp":"Enter your registeration number","rpm_ProfessionalBioHelp":"Enter your professional bio","rpm_HighestQualificationsHelp":"Enter your highest qualification","rpm_AddressLine1Help":"Enter your address","rpm_AddressLine2Help":"Enter your address","rpm_CountryDrHelp":"Enter the name of your country/region","rpm_StateDrHelp":"Enter the name of your state/province","rpm_CityDrHelp":"Enter the name of your city","rpm_PostalCodeZipHelp":"Enter your postal code","rpm_CurrentPasswordHelp":"Enter your current password.","rpm_NewPasswordHelp":"Enter a new password.","rpm_ConfirmPasswordHelp":"Re-enter the new password.","rpm_ProgramCreatedSuccessfully":"Program Created Successfully!","rpm_ProgramUpdatedSuccessfully":"Program Updated Successfully!","rpm_AttachDeviceSuccess":"Device attached successfully!","rpm_DeAttachDeviceSuccess":"Device removed successfully!","rpm_AssignDeviceRuleText":"You can assign only one device to a patient. Kindly remove the current device from the patient to enable this option.","rpm_PleaseSelectDevice":"Please select a device.","rpm_PleaseSelectCourse":"Please select the course.","rpm_RoleCreatedSuccessfully":"Role created successfully!","rpm_AttachRoleSuccess":"Role attached successfully!","rpm_RemoveRoleSuccess":"Role removed  successfully!","rpm_UserCreatedSuccessfully":"User created successfully!","rpm_DeleteUserSuccess":"User deleted successfully!","rpm_ProgramRemoveSuccess":"Program removed successfully!","rpm_ProgramAttachSuccess":"Program attached successfully!","rpm_UpdateRoleSuccess":"Permissions updated successfully!","rpm_RoleUpdatedSuccessfully":"Role updated successfully!","rpm_RuleNameHelp":"Provide an appropriate name for the rule.","rpm_RuleDescriptionHelp":"Provide a brief description for the rule","rpm_VitalOperatorHelp":"Select an appropriate operator for the rule","rpm_VitalValueHelp":"Select a value for the rule.","rpm_ConditionBetweenVitalsHelp":"Select the condition for the rule","rpm_ScheduleCreatedSuccessfully":"Course created successfully!","rpm_DeleteScheduleSuccess":"Course deleted successfully!","rpm_MandateCreatedSuccessfully":"Mandate created successfully!","rpm_ScheduleUpdatedSuccessfully":"Course updated successfully!","rpm_DeleteMandateSuccess":"Mandate deleted successfully!","rpm_AttachScheduleSuccess":"Course attached successfully!","rpm_DeAttachScheduleSuccess":"Course removed successfully!","rpm_ScheduleTitleHelp":"Provide a suitable title for the course","rpm_VitalNameHelp":"Select the vital to be added in the course","rpm_DurationHelp":"Enter the duration of the course.","rpm_MaxStrikeHelp":"Select the limit of strikes, crossing which the patient becomes non-compliant ","rpm_NotificationTitleHelp":"Provide a suitable title for non-compliance.","rpm_NotificationDescriptionHelp":"Provide a brief description for the non-compliance.","rpm_MandateStartTimeHelp":"Enter the time from which you want to start the mandate","rpm_MandateEndTimeHelp":"Enter the time at which you want to end the mandate","rpm_ReadingReminderTitle":"Provide a suitable title to be sent as reminder.","rpm_ReadingReminderEveryMinHelp":"Select the duration of interval for shooting the reminder ","rpm_ReadingReminderRepetitionHelp":"Select the number of times you want to shoot the reminder ","rpm_ReadingReminderMsgHelp":"Provide a suitable description for the reminder","rpm_MissedReadingTitleHelp":"Provide a suitable title to be sent as reminder.","rpm_MissedReadingMsgHelp":"Provide a suitable description for the reminder","rpm_ActionDescriptionListUsers":"This permission allows the user to view the list of users.","rpm_ActionDescriptionReadUser":"This permission allows the user to view details of a user.","rpm_ActionDescriptionCreateUser":"This permission allows the user to create a new user.","rpm_ActionDescriptionUpdateUser":"This permission allows the user to update/edit details of a user.","rpm_ActionDescriptionDeleteUser":"This permission allows the user to delete a user.","rpm_ActionDescriptionManageUserPolicies":"This permission allows the user to manage user policies.","rpm_ActionDescriptionListRoles":"This permission allows the user to view the list of roles added.","rpm_ActionDescriptionReadRole":"This permission allows the user to access the details of the role added.","rpm_ActionDescriptionCreateRole":"This permission allows the user to add a new role.","rpm_ActionDescriptionUpdateRole":"This permission allows the user to edit/update an existing role.","rpm_ActionDescriptionDeleteRole":"This permission allows the user to delete an existing role.","rpm_ActionDescriptionManageRolePolicies":"This permission allows the user to manage role policies.","rpm_ActionDescriptionListGroups":"This permission allows the user to view the list of programs on user details screen.","rpm_ActionDescriptionReadGroup":"This permission allows the user to view the list of groups.","rpm_ActionDescriptionCreateGroup":"This permission allows the user to create a new group.","rpm_ActionDescriptionDeleteGroup":"This permission allows the user to delete an existing group.","rpm_ActionDescriptionUpdateGroup":"This permission allows the user to update an existing group.","rpm_ActionDescriptionListPolicies":"This permission allows the user to view the list of policies.","rpm_ActionDescriptionReadPolicy":"This permission allows the user to read the policies.","rpm_ActionDescriptionCreatePolicy":"This permission allows the user to create new policies.","rpm_ActionDescriptionUpdatePolicy":"This permission allows the user to update a policy.","rpm_ActionDescriptionDeletePolicy":"This permission allows the user to delete a policy.","rpm_ActionDescriptionListTemplates":"This permission allows the user to view the list of templates.","rpm_ActionDescriptionReadTemplate":"This permission allows the user to read templates.","rpm_ActionDescriptionCreateTemplate":"This permission allows the user to create new templates.","rpm_ActionDescriptionUpdateTemplate":"This permission allows the user to update a template.","rpm_ActionDescriptionDeleteTemplate":"This permission allows the user to delete a template.","rpm_ActionDescriptionUpdateConsoleElements":"This permission allows the user to update the console elements.","rpm_ActionDescriptionReadMFASettings":"This permission allows the user to read the MFA settings.","rpm_ActionDescriptionUpdateMFASettings":"This permission allows the user to update the MFA settings.","rpm_ActionDescriptionReadPasswordPolicy":"This permission allows the user to read the password policy.","rpm_ActionDescriptionUpdatePasswordPolicy":"This permission allows the user to update the password policy.","rpm_ActionDescriptionListPrograms":"This permission allows the user to view list of programs.","rpm_ActionDescriptionReadProgram":"This permission allows the user to access the program details and its patients.","rpm_ActionDescriptionCreateProgram":"This permission allows the user to add a new program.","rpm_ActionDescriptionUpdateProgram":"This permission allows the user to update a program.","rpm_ActionDescriptionListAllPatients":"This permission allows the user to view the global list of patients.","rpm_ActionDescriptionListPatients":"This permission allows the user to view the list of patients.","rpm_ActionDescriptionReadPatient":"This permission allows the user to view the dashboard of a patient.","rpm_ActionDescriptionCreatePatient":"This permission allows the user to add a patient in a program.","rpm_ActionDescriptionUpdatePatientProfile":"This permission allows the user to edit personal details of a patient.","rpm_ActionDescriptionUpdatePatientConfiguration":"This permission allows the user to read personal details of a patient.","rpm_ActionDescriptionDeletePatients":"This permission allows the user to delete a patient.","rpm_ActionDescriptionListPatientRules":"This permission allows the user to view the list of patient rules.","rpm_ActionDescriptionReadPatientRule":"This permission allows the user to read patient rules.","rpm_ActionDescriptionCreatePatientRule":"This permission allows the user to create patient rules.","rpm_ActionDescriptionDeletePatientRule":"This permission allows the user to delete patient rules.","rpm_ActionDescriptionDismissAlerts":"This permission allows the user to post followup on an active alert.","rpm_ActionDescriptionListRule":"This permission allows the user to view the list of rules attached to patients.","rpm_ActionDescriptionReadRule":"This permission allows the user to view the rule added.","rpm_ActionDescriptionCreateRule":"This permission allows the user to add a new rule to the patient.","rpm_ActionDescriptionDeleteRule":"This permission allows the user to delete a rule.","rpm_ActionDescriptionListCourses":"This permission allows the user to see the list of courses.","rpm_ActionDescriptionReadCourse":"This permission allows the user to read/view courses.","rpm_ActionDescriptionCreateCourse":"This permission allows the user to create a course.","rpm_ActionDescriptionUpdateCourse":"This permission allows the user to update a course.","rpm_ActionDescriptionDeleteCourse":"This permission allows the user to delete a course.","rpm_ActionDescriptionListMedicalHistory":"This permission allows the user to view the list of medical history.","rpm_ActionDescriptionReadMedicalHistory":"This permission allows the user to read the medical history.","rpm_ActionDescriptionCreateMedicalHistory":"This permission allows the user to create the medical history.","rpm_ActionDescriptionUpdateListMedicalHistory":"This permission allows the user to update the medical history.","rpm_ActionDescriptionDeleteMedicalHistory":"This permission allows the user to delete the medical history.","rpm_ActionDescriptionReadMedicalQuestion":"This permission allows the user to read a medical question.","rpm_ActionDescriptionUpdateMedicalQuestion":"This permission allows the user to update a medical question.","rpm_ActionDescriptionListPractitionerNote":"This permission allows the user to view the list of practitioner\'s notes.","rpm_ActionDescriptionCreatePractitionerNote":"This permission allows the user to create practitioner\'s notes.","rpm_ActionDescriptionUpdatePractitionerNote":"This permission allows the user to update practitioner\'s notes.","rpm_ActionDescriptionDeletePractitionerNote":"This permission allows the user to delete practitioner\'s notes.","rpm_ActionDescriptionListNote":"This permission allows the user to view the list of notes.","rpm_ActionDescriptionCreateNote":"This permission allows the user to create notes.","rpm_ActionDescriptionUpdateNote":"This permission allows the user to update notes.","rpm_ActionDescriptionDeleteNote":"This permission allows the user to delete notes.","rpm_ActionDescriptionListTemplate":"This permission allows the user to view list of templates.","rpm_ActionDescriptionListConsultation":"This permission allows the user to view list of consultations.","rpm_RoleLevelTextHelp":"Select the level for which the role is to be made","rpm_ProgramHelp":"Select the program for which the role is to be made","rpm_RoleNameHelp":"Provide a suitable name for the role","rpm_RoleDescriptionHelp":"Provide a brief description for the role","rpm_AddUser_UserNameHelp":"Provide a suitable user name.","rpm_AddUser_FirstNameHelp":"Enter first name of the user.","rpm_AddUser_LastNameHelp":"Enter last name of the user.","rpm_AddUser_EmailHelp":"Enter the email address of the user.","rpm_AddUser_MobileHelp":"Enter the mobile number of the user.","rpm_AddUser_RegistrationHelp":"Enter the registration number of the user.","rpm_UserLevelTextHelp":"Select the level at which the user is to be created","rpm_UserLevelProgramHelp":"Select the program in which the user is to be created","rpm_SystemRoleHelp":"By assigning system role, you are providing root access to the user.","rpm_CustomRoleHelp":"Select the role you want to assign to the user","rpm_ProgramNameHelp":"Select a program to apply the filter","rpm_RoleHelp":"Select the role to be assigned to the user","rpm_ProgramCodeHelp":"Unique program code for self-registration","rpm_DisplayNameHelp":"Enter the name of the program","rpm_ProgramLocationHelp":"Enter the location of the program","rpm_DiseaseCreatedSuccessfully":"Disease added successfully!","rpm_DiseaseUpdateSuccessfully":"Disease updated successfully!","rpm_DiseaseDeleteSuccessfully":"Disease deleted successfully!","rpm_FileDeletedSuccessfully":"File deleted successfully!","rpm_OtherHealthIssuesUpdateSuccessfully":"Other health issues Updated successfully!","rpm_SocialHistoryUpdateSuccessfully":"Social History Updated successfully!","rpm_DownloadFileSuccessfully":"File downloaded successfully!","rpm_DurationValueHelp":"Enter the duration","rpm_DiseaseDurationHelp":"Select the period of duration","rpm_DiseaseRemarkHelp":"Enter your remarks.","rpm_RemarkPlaceHolder":"Enter your remarks here.","rpm_NotePlaceHolder":"Enter your notes here.","rpm_InDays":"in days","rpm_SearchTital":"Search by title","rpm_SearchCourseFilterBar":"Enter a title for the course","rpm_SearchProgramFilterBar":"Enter name of program","rpm_NumericDurationHelp":"Enter the duration of the course","rpm_DurationValuePlaceHolder":"Enter the duration","rpm_DiseaseRelationHelp":"Please select relationship","rpm_DeleteReadingSuccess":"Reading deleted successfully!","rpm_DeleteAlertSuccess":"Alert deleted successfully!","rpm_NoteCreatedSuccessfully":"Note created successfully!","rpm_NoteUpdateSuccessfully":"Note updated successfully!","rpm_NoteDeleteSuccessfully":"Note deleted successfully!","rpm_VitalTypeNoteHelp":"Select the vital type","rpm_FrequencyTypeNoteHelp":"Select the frequency to consume the medication","rpm_AttachCourse":"Attach Course","rpm_AttachCourseText":"The patient already has an active course. Assigning a new course will make the current one inactive. Do you wish to proceed?","rpm_ProgramCityHelp":"Enter the name of the city.","rpm_RepeatCourseHelp":"Select the frequency of the mandate","rpm_ActiveCourseNotDelete":"You cannot delete a course till it is active.","rpm_ProgramCountryHelp":"Select the country in which the program is situated","rpm_ProgramStateHelp":"Select the state in which the program is situated","rpm_PatientCountryHelp":"Select the country of the patient","rpm_PatientStateHelp":"Select the state of the patient","rpm_MedicationNameHelp":"Enter the name of the medicine","rpm_CommentsHelp":"Enter suitable comments for consumption of the medicine","rpm_commentsPlaceHolder":"Enter your comments here ","rpm_ActivityNameHelp":"Enter a name for the activity","rpm_ActivityTypeHelp":"Select the type of activity","rpm_SettingsSavedSuccessfully":"Settings saved successfully","rpm_QrDownloadedSuccessfully":"QR download successfully","rpm_notificationSettingMessage":"This notification has been disabled, please contact the administrator to enable it.","rpm_SearchName":"Search by name","rpm_MedicineNameHelp":"Enter the medicine name","rpm_MedicineFormHelp":"Select the medcine form","rpm_MedicineShapeIconHelp":"Select the medicine\'s shape","rpm_MedicineDaysHelp":"Enter number of days","rpm_PrescriptionCreatedSuccessfully":"Consultation created successfully!","rpm_PrescriptionUpdateSuccessfully":"Consultation updated successfully!","rpm_PrescriptionDeleteSuccessfully":"Consultation deleted successfully!","rpm_FrequencyHelp":"Select the medicine frequency.","rpm_FormHelp":"Select the medicine form.","rpm_CompositionHelp":"Select the medicine salt composition.","rpm_TemplateCreatedSuccessfully":"Template created successfully","rpm_TemplateUpdatedSuccessfully":"Template updated successfully","rpm_TemplateDeleteSuccessfully":"Template deleted successfully","rpm_PatientTransferedSuccessfully":"Patient transfered successfully","rpm_SearchPatientFilterBar":"Enter name of the patient","rpm_SearchUserNumber":"Enter the  mobile number of the user","rpm_SearchTemplateFilterBar":"Enter name of the template","rpm_TemplateDurationHelp":"Enter the duration","rpm_Username":"Username","rpm_SearchByUsername":"Enter the username","rpm_ActionTypeHelp":"Select the action type","rpm_EventCode":"Event Code","rpm_SearchByEventCode":"Enter the event code","rpm_ServiceCode":"Service","rpm_SearchByService":"Enter the name of service","rpm_AddressHelp":"Enter the address","rpm_Description":"Description","rpm_SearchByDescription":"Enter the log description here","rpm_DefaultRuleTitle":"Default Rule","rpm_DefautRuleBodyText":"Making this rule default will also make it active and will reset the existing default rule. Do you wish to continue?","rpm_SaveTitle":"Conflicting Reminders","rpm_SearchProgramNameSearchBar":"Enter the program name","rpm_FormikFieldError":"All required fields must be filled to continue.","rpm_confirmation":"Default Program","rpm_defaultProgramConfirm":"Do you want to make this as your default program for mobile? This action will change your current default program, which is \\"{{program}}\\". Want to continue?","rpm_downloadStart":"File download in progress","rpm_CountryCodeHelp":"Select the country code","rpm_FacilityProgramHelp":"Select the facility type of the program.","rpm_GoalCreatedSuccessfully":"Goal Created Successfully!","rpm_DeleteGoalSuccess":"Goal deleted successfully!","rpm_DeleteWorkoutSuccess":"Workout deleted successfully!","rpm_ExerciseUpdatedSuccessfully":"Exercise Updated Successfully"}'),it=JSON.parse('{"rpm_RPM":"All Programs","rpm_Back":"Back","rpm_Next":"Next","rpm_Copy":"Copy","rpm_Download":"Download","rpm_Save":"Save","rpm_Update":"Update","rpm_Undo":"Undo","rpm_Cancel":"Cancel","rpm_Submit":"Submit","rpm_SelectAll":"Select All","rpm_Value":"Value","rpm_Confirm":"Confirm","rpm_Delete":"Delete","rpm_Edit":"Edit","rpm_Add":"Add","rpm_BackToHome":"Back To Home","rpm_Message":"Message","rpm_Active":"Active","rpm_Home":"Home","rpm_Select":"Select","rpm_AlertMessage":"Follow Up Message","rpm_AccountId":"Account Id","rpm_Login":"Login","rpm_LoginWelcomeText":"Welcome! Please login to your account.","rpm_JohnDeo":"John Deo","rpm_Name":"Name","rpm_Time":"Time","rpm_Systolic":"Systolic","rpm_Diastolic":"Diastolic","rpm_Status":"Status","rpm_O2Level":"O2Level","rpm_Search":"Search","rpm_Reset":"Reset","rpm_Filter":"Filter","rpm_ViewConsultation":"View Consultation","rpm_CreateConsultation":"Create Consultation","rpm_MoreOption":"More Option","rpm_edit":"Edit","rpm_Yes":"Yes","rpm_No":"No","rpm_Activity":"Activity","rpm_AllPatients":"All Patients","rpm_Patient":"Patient","rpm_Patients":"Patients","rpm_PatientWelcome":"Welcome to the patient list explore the reports","rpm_AddPatient":"Add Patient","rpm_ViewAllPatient":"Click here for all Yourpal patients","rpm_AllUsersList":"All Users List","rpm_PatientID":"Patient ID","rpm_PatientName":"Patient Name","rpm_bp":"Blood Pressure","rpm_BP":"Blood Pressure","rpm_BPr":"Blood Pressure(Sys/Dia/Pulse)","rpm_Flags":"Flags","rpm_PulseRate":"Pulse Rate","rpm_Glucose":"Glucose","rpm_Date":"Date","rpm_Actions":"Actions","rpm_Pulse":"Pulse","rpm_Dia":"Dia","rpm_Sys":"Sys","rpm_MobileNumber":"Mobile Number","rpm_DateOfBirth":"Date Of Birth","rpm_RecordedOn":"Recorded On","rpm_Mobile":"Mobile","rpm_CountryCode":"Country Code","rpm_Registration":"Registration No.","rpm_ListView":"List View","rpm_GridView":"Grid View","rpm_TableCellSetting":"Table cell settings","rpm_AddNewPatient":"Add New Patient","rpm_TableSetting":"Table Column Settings","rpm_TableSettingInfo":"Select/unselect the checkbox to show/hide the columns in the table","rpm_medicalCharts":"Medical Chart","rpm_medicalHistory":"Medical History","rpm_patientCourses":"Patient Courses","rpm_patientRules":"Patient Rules","rpm_personalDetails":"Personal Details","rpm_devices":"Devices","rpm_TotalPatient":"Total Patients","rpm_CriticalPatient":"Critical Patient","rpm_AlertPatient":"Alert Patients","rpm_InactivePatient":"Inactive Patients","rpm_ActivePatient":"Active Patients","rpm_NonCompliancePatient":"Non Compliance Patient","rpm_NonCompliance":"Non Compliance","rpm_ComplianceSummary":"Compliance Summary","rpm_Vitals":"Vitals","rpm_Population":"Population","rpm_AgeGroup":"Age Group","rpm_Gender":"Gender","rpm_PersonalDisease":"Personal Disease","rpm_OtherHealthIssue":"Addiction","rpm_FamilyDisease":"Family Disease","rpm_Disease":"Disease","rpm_SubCategory":"Sub Category","rpm_TimePeriod":"Time Period","rpm_Rule":"Rule","rpm_Rules":"Rules","rpm_AddRule":"Add Rule","rpm_Operator":"Operator","rpm_Id":"Id","rpm_AppliedOn":"Applied On","rpm_VitalType":"Vital Type","rpm_ProcessingMode":"Processing Mode","rpm_BatchSize":"Batch Size","rpm_BatchDataSize":"Batch Size","rpm_DateCreated":"Date Created","rpm_DateModified":"Modified date","rpm_AddNewRule":"Add New Rule","rpm_ShortDescription":"Description","rpm_Programs":"All Programs","rpm_Location":"Location","rpm_ProgramLocation":"Program Location","rpm_ModifiedBy":"Modified by","rpm_AddProgram":"Add Program","rpm_FirstName":"First Name","rpm_LastName":"Last Name","rpm_Email":"Email","rpm_DOB":"DOB","rpm_Device":"Device","rpm_Observer":"Observer","rpm_Devices":"Devices","rpm_SerialNumber":"Serial Number","rpm_ModelNumber":"Model Number","rpm_LastActivity":"Last Activity","rpm_ViewRule":"View Rule","rpm_AssignDevice":"Assign Device","rpm_Dashboard":"Dashboard","rpm_PersonalDetail":"Personal Detail","rpm_PatientHistory":"Patient History","rpm_Title":"Title","rpm_Description":"Description","rpm_Readings":"Readings","rpm_activity":"Activity","rpm_Conditions":"Conditions","rpm_CreatedAt":"Created At","rpm_Vital":"Vital","rpm_MedicalHistory":"Medical History","rpm_AddDisease":"Add Disease","rpm_AddNewDisease":"Add New Disease","rpm_Category":"Category","rpm_primary_muscle":"Primary Muscle","rpm_Duration":"Duration","rpm_FollowUpDate":"Follow-Up Date","rpm_ConsultationId":"Id","rpm_ChangePassword":"Change Password","rpm_CurrentPassword":"Current Password","rpm_NewPassword":"New Password","rpm_ConfirmPassword":"Confirm Password","rpm_passwordStandards":"Password Must Contain","rpm_passwordInstruction1":"At least 8 characters in length.","rpm_passwordInstruction2":"Maximum 20 characters allowed.","rpm_passwordInstruction3":"At least one uppercase letter (A-Z).","rpm_passwordInstruction4":"At least one lowercase letter (a-z).","rpm_passwordInstruction5":"At least one digit (0-9).","rpm_passwordInstruction6":"At least one special character.","rpm_Profile":"Profile","rpm_EditProfile":"Edit Profile","rpm_GeneralInformation":"General Details","rpm_AddressInformation":"Address","rpm_Address":"Address","rpm_AddressLine1":"Address Line 1","rpm_AddressLine2":"Address Line 2","rpm_CountryRegion":"Country / Region","rpm_StateProvince":"State / Province","rpm_City":"City","rpm_PostalCodeZip":"Postal Code / Zip","rpm_Role":"Role","rpm_SelectRole":"Select Role","rpm_Roles":"Roles","rpm_RoleName":"Role Name","rpm_RoleDescription":"Role Description","rpm_AccessLevel":"Access Level","rpm_CreateRole":"Create Role","rpm_AddNewCustomRole":"Add New Custom Role","rpm_RoleLevelText":"Where do you want to create this role?","rpm_AddRole":"Add Role","rpm_EditRole":"Edit Role","rpm_SelectProgram":"Select Program","rpm_SelectRoleType":"Select Role Type","rpm_rootTypeRole":"Client","rpm_programTypeRole":"Program","rpm_Permissions":"Permissions","rpm_Details":"Details","rpm_RoleUserText":"Select the level of the user","rpm_Users":"Users","rpm_RoleLevel":"Role Level","rpm_UserLevel":"User Level","rpm_UserName":"User Name","rpm_FullName":"Full Name","rpm_Staff":"Staff","rpm_CreateUser":"Create User","rpm_CreateAnotherUser":"Create Another User","rpm_EmailAddress":"Email Address","rpm_SystemRole":"System Role","rpm_CustomRole":"Custom Role","rpm_PredefinedRole":"Predefined Role","rpm_SystemRoles":"System Roles","rpm_CustomRoles":"Custom Roles","rpm_PredefinedRoles":"Predefined Roles","rpm_rootTypeRoleSystem":"Root","rpm_EditUser":"Edit User","rpm_UserDetail":"User Detail","rpm_MyInformation":"My Information","rpm_AssignedRoles":"Assigned Roles","rpm_PasswordReset":"Password Reset","rpm_ProgramId":"Program Id","rpm_ProgramName":"Program Name","rpm_AssignedDate":"Assigned Date","rpm_UnassignClient":"Unassign Client","rpm_Assign":"Assign","rpm_AssignLevel":"Assign Level","rpm_SelectLevel":"Select Level","rpm_AssignRole":"Assign Role","rpm_UnassignRole":"Unassign Role","rpm_RemoveProgram":"Remove Program","rpm_Minimum":"Minimum","rpm_Maximum":"Maximum","rpm_Average":"Average","rpm_FollowUpComment":"Follow Up Comment","rpm_Followupcomment":"Follow-up comment","rpm_SearchByName":"Search by name","rpm_SearchHere":"Search here.....","rpm_ActiveAlerts":"Active Alerts","rpm_ResolvedAlerts":"Resolved Alerts","rpm_FollowUp":"Follow Up","rpm_PatientInfo":"Personal Details","rpm_MaritalStatus":"Marital Status","rpm_Country":"Country","rpm_Address1":"Address 1","rpm_Address2":"Address 2","rpm_Parent":"Parent","rpm_Height":"Height","rpm_Weight":"Weight","rpm_Age":"Age","rpm_Pin":"Pin","rpm_State":"State","rpm_BloodGroup":"Blood Group","rpm_ProfessionalDetail":"Professional Details","rpm_Speciality":"Speciality","rpm_Experience":"Experience","rpm_ConsultingLanguage":"Preferred Language","rpm_ProfessionalBio":"Professional Bio","rpm_HighestQualifications":"Highest Qualifications","rpm_AddNewProgram":"Add New Program","rpm_EditProgram":"Edit Program","rpm_ProgramCode":"Program Code","rpm_DisplayName":"Program Name","rpm_ChartView":"Chart View","rpm_TableView":"Table View","rpm_Trend":"Trend","rpm_AllStage":"All","rpm_StageDistribution":"Stage Distribution","rpm_NormalPressure":"Normal Blood Pressure","rpm_NormalBP":"Normal Blood Pressure","rpm_LowBloodPressure":"Low Blood Pressure","rpm_ElevatedBloodPressure":"Elevated Blood Pressure","rpm_HighBloodPressure":"High Blood Pressure Stage1","rpm_HighBloodPressureStage2":"High Blood Pressure Stage2","rpm_HypertensiveCrisis":"Hypertensive Crisis","rpm_CheckLowBP_Batch":"Low Blood Pressure","rpm_ElevatedBloodPressure_Batch":"Elevated Blood Pressure","rpm_Hypertension_Stage1_Batch":"Hypertension Stage 1","rpm_Hypertensive_Stage2_Batch":"Hypertensive Stage 2","rpm_Hypertensive_Crisis_Batch":"Hypertensive Crisis","rpm_Schedule":"Course","rpm_Schedules":"Courses","rpm_ScheduleTitle":"Course Title","rpm_AddNew":"Add New","rpm_AddNewSchedule":"Add New Course","rpm_CreateNewSchedule":"Create New Course","rpm_StartDate":"Start Date","rpm_EndDate":"End Date","rpm_CreateAMandate":"Create a mandate","rpm_CreateMandate":"Create Mandate","rpm_Mandate":"Mandate","rpm_ChooseVital":"Choose Vital","rpm_StartTime":"Start Time","rpm_EndTime":"End Time","rpm_MissedReadingNotification":"Missed Reading Notification","rpm_ReminderNotificationText":"Reading Reminder Notification","rpm_PREReminderNotificationText":"Pre Reminder Notification","rpm_SendPreReminder":"Send Pre-reminder","preReminder_helpText":"One pre-reminder notification will be sent to the patient.","rpm_Mins":"mins","rpm_MissedReading":"Missed Reading","rpm_ReadingReminder":"Reading Reminder","rpm_ReadingReminderTime":"Reminder Time","rpm_ReadingReminderMsg":"Reminder Message","rpm_ScheduleDetails":"Course Details","rpm_MandateDetails":"Mandate Details","rpm_NoOfMandate":"No. Of Mandate","rpm_MaxStrike":"Max Strike","rpm_EditSchedule":"Edit Course","rpm_SendBefore":"Send Before","rpm_NonComplianceSetting":"Non Compliance Settings","rpm_MandateSetting":"Mandate Settings","rpm_ScheduleName":"Course Name","rpm_Program":"Program","rpm_NonComplianceNotification":"Non Compliance Notification","rpm_MaxStrikes":"Max Strikes","rpm_CreateAnotherSchedule":"Create Another Course","rpm_RuleName":"Rule Name","rpm_BpLevel":"Blood Pressure Level","rpm_Condition":"Condition","rpm_DurationOfCourse":"Course Duration (in days)","rpm_VitalName":"Vital Name","rpm_SendInEveryMin":"Send in every mins","rpm_Repetition":"Repetition","rpm_Notification":"Notification","rpm_Mandates":"Mandates","rpm_AssignSchedule":"Assign Course","rpm_SearchSchedule":"Search Course","rpm_SearchProgram":"Search Program","rpm_SendInEvery":"Send in Every ","rpm_SystolicRange":"Systolic Range","rpm_DiastolicRange":"Diastolic Range","rpm_PulseRange":"Pulse Range","rpm_ActionTag_users":"Users","rpm_ActionTag_roles":"Roles","rpm_ActionTag_groups":"Groups","rpm_ActionTag_policies":"Policies","rpm_ActionTag_appearance":"Appearance","rpm_ActionTag_global-settings":"Global Settings","rpm_ActionTag_programs":"Programs","rpm_ActionTag_patients":"Patients","rpm_ActionTag_rules":"Rules","rpm_ActionTag_courses":"Courses","rpm_ActionTag_medical-history":"Medical History","rpm_ActionTag_notes":"Notes","rpm_ActionTag_prescription-templates":"Rx Templates","rpm_ActionTag_consultation-permission":"Consultations","rpm_ActionListUsers":"List Users","rpm_ActionReadUser":"Read User","rpm_ActionCreateUser":"Create User","rpm_ActionUpdateUser":"Update User","rpm_ActionDeleteUser":"Delete User","rpm_ActionManageUserPolicies":"Manage User\'s Policies","rpm_ActionListRoles":"List Roles","rpm_ActionReadRole":"Read Role","rpm_ActionCreateRole":"Create Role","rpm_ActionUpdateRole":"Update Role","rpm_ActionDeleteRole":"Delete Role","rpm_ActionManageRolePolicies":"Manage Role Policies","rpm_ActionListGroups":"List Groups","rpm_ActionReadGroup":"Read Group","rpm_ActionCreateGroup":"Create Group","rpm_ActionDeleteGroup":"Delete Group","rpm_ActionUpdateGroup":"Update Group","rpm_ActionListPolicies":"List Policies","rpm_ActionReadPolicy":"Read Policy","rpm_ActionCreatePolicy":"Create Policy","rpm_ActionUpdatePolicy":"Update Policy","rpm_ActionDeletePolicy":"Delete Policy","rpm_ActionListTemplates":"List Templates","rpm_ActionReadTemplate":"Read Template","rpm_ActionCreateTemplate":"Create Template","rpm_ActionUpdateTemplate":"Update Template","rpm_ActionDeleteTemplate":"Delete Template","rpm_ActionUpdateConsoleElements":"Update Console Elements","rpm_ActionReadMFASettings":"Read MFA Settings","rpm_ActionUpdateMFASettings":"Update MFA Settings","rpm_ActionReadPasswordPolicy":"Read Password Policy","rpm_ActionUpdatePasswordPolicy":"Update Password Policy","rpm_ActionListPrograms":"List Programs","rpm_ActionReadProgram":"Read Program","rpm_ActionCreateProgram":"Create Program","rpm_ActionUpdateProgram":"Update Program","rpm_ActionListAllPatients":"All Yourpal Patients","rpm_ActionListPatients":"List of Patients","rpm_ActionReadPatient":"Read Patient","rpm_ActionCreatePatient":"Create Patient","rpm_ActionUpdatePatientProfile":"Update Patient Profile","rpm_ActionUpdatePatientConfiguration":"Update Patient Configuration","rpm_ActionDeletePatients":"Delete Patients","rpm_ActionListPatientRules":"List Patient Rules","rpm_ActionReadPatientRule":"Read Patient Rule","rpm_ActionCreatePatientRule":"Create Patient Rule","rpm_ActionDeletePatientRule":"Delete Patient Rule","rpm_ActionDismissAlerts":"Dismiss Alerts","rpm_ActionListRule":"List Rules","rpm_ActionReadRule":"Read Rule","rpm_ActionCreateRule":"Create Rule","rpm_ActionDeleteRule":"Delete Rule","rpm_ActionListCourses":"List Courses","rpm_ActionReadCourse":"Read Course","rpm_ActionCreateCourse":"Create Course","rpm_ActionUpdateCourse":"Update/Edit Course","rpm_ActionDeleteCourse":"Delete Course","rpm_ActionListMedicalHistory":"List Medical History","rpm_ActionReadMedicalHistory":"Read Medical History","rpm_ActionCreateMedicalHistory":"Create Medical History","rpm_ActionUpdateListMedicalHistory":"Update Medical History","rpm_ActionDeleteMedicalHistory":"Delete Medical History","rpm_ActionReadMedicalQuestion":"Read Medical Question","rpm_ActionUpdateMedicalQuestion":"Update Medical Question","rpm_ActionListPractitionerNote":"List Practitioner Notes","rpm_ActionCreatePractitionerNote":"Create Practitioner Note","rpm_ActionUpdatePractitionerNote":"Update Practitioner Note","rpm_ActionDeletePractitionerNote":"Delete Practitioner Note","rpm_ActionListNote":"List Notes","rpm_ActionCreateNote":"Create Note","rpm_ActionUpdateNote":"Update Note","rpm_ActionDeleteNote":"Delete Note","rpm_ActionListConsultation":"List of Consultations","rpm_ActionListTemplate":"List Prescription Templates","rpm_Male":"Male","rpm_Female":"Female","rpm_Other":"Other","rpm_TotalReadings":"Total Readings","rpm_TotalAlerts":"Total Alerts","rpm_DiseaseName":"Disease Name","rpm_Remarks":"Remarks","rpm_Reports":"Reports","rpm_AddReports":"Add Reports","rpm_UploadReport":"Add reports here","rpm_Days":"Days","rpm_Months":"Months","rpm_Years":"Years","rpm_OtherHealthIssues":"Social History","rpm_AddReportsHere":"Add Reports Here","rpm_ChooseFile":"Choose File","rpm_FamilyMedicalHistory":"Family Medical History","rpm_Relationship":"Relationship","rpm_Father":"Father","rpm_Mother":"Mother","rpm_Sibling":"Sibling","rpm_Child_Son/Daughter":"Child (Son/Daughter)","rpm_GrandParent":"GrandParent","rpm_Note":"Note","rpm_Notes":"Notes","rpm_AddNote":"Add Note","rpm_AddNewNote":"Add New Note","rpm_AddNewPrescription":"Add New Prescription","rpm_snum":"S.No.","rpm_NoteResolvedAlerts":"Resolved Alerts","rpm_NotePrescription":"Prescription","rpm_AdminNote":"Admin Note","rpm_AdminNoteSearch":"Add your consultation advice in note more than 4000 characters","rpm_SummaryNote":"Summary Notes","rpm_at":"At","rpm_Created_By":"Created By","rpm_ConsultationNote":"Consultation Notes","rpm_UploadMore":"Upload More","rpm_ShowMore":"Show More","rpm_Less":"Less","rpm_NotificationsSetting":"Notification Settings","rpm_BMI":"BMI","rpm_Courses":"Courses","rpm_Prescribed":"Prescribed","rpm_LastReading":"Last Reading","rpm_Donut":"Donut","rpm_BloodPressure":"Blood Pressure","rpm_BloodGlucose":"Blood Glucose","rpm_glucose":"Blood Glucose","rpm_GlucoseFasting":"Glucose Fasting","rpm_GlucosePP":"Glucose PP","rpm_fasting":"Fasting","rpm_nonFasting":"Non Fasting","rpm_after_breakfast_2hr":"After Breakfast","rpm_before_lunch":"Before Lunch","rpm_after_lunch_2hr":"After Lunch","rpm_before_dinner":"Before Dinner","rpm_after_dinner_2hrs":"After Dinner","rpm_Event":"Event","rpm_NormalGlucose":"Normal Glucose Level","rpm_hypoglycemia":"Hypoglycemia","rpm_prediabetes":"Prediabetes","rpm_diabetes":"Diabetes","rpm_normal":"Normal","rpm_HypoglycemiaDescPP":"Hypoglycemia in non fasting state","rpm_PrediabetesDescPP":"Prediabetes in non fasting state","rpm_DiabetesDescPP":"Diabetes in non fasting state","rpm_DiabetesFastingDesc":"Diabetes in fasting state","rpm_PrediabetesFastingDesc":"Prediabetes in fasting state","rpm_HypoglycemiaFastingDesc":"Hypoglycemia in fasting state","rpm_NormalPPDesc":"Normal in non fasting state","rpm_NormalFastingDesc":"Normal in fasting state","rpm_FastingRule":"Fasting Rule","rpm_PPRule":"Non Fasting Rule","rpm_ApplyFilters":"Apply Filters","rpm_ClearFilters":"Clear Filters","rpm_Medication":"Medication","rpm_Frequency":"Frequency","rpm_Dosage":"Dosage","rpm_Comment":"Comment","rpm_Comments":"Comments","rpm_MedicationName":"Medication Name","rpm_EmptyNotesText":"You haven\u2019t added any note yet","rpm_AddNewMedication":"+ Add new medication","rpm_High blood pressure (Hypertensive Crisis)":"Hypertension Crisis","rpm_High blood pressure (Hypertension Stage 2)":"Hypertension Stage 2","rpm_High blood pressure (Hypertension Stage 1)":"Hypertension Stage 1","rpm_Elevated blood pressure":"Elevated blood pressure","rpm_Low blood pressure":"Low blood pressure","rpm_shapeColor":"Shape & Color","rpm_Shape":"Shape","rpm_Color":"Color","rpm_form":"Form","rpm_strength":"Strength","rpm_days":"Days","rpm_unit":"Unit","rpm_prescriptionID":"Prescription ID","rpm_view":"View","rpm_print":"Print","rpm_Hypertensive_CrisisDesc":"High blood pressure (Hypertensive Crisis)","rpm_Hypertensive_Stage2Desc":"High blood pressure (Hypertensive Stage 2)","rpm_Hypertension_Stage1Desc":"Hypertension Stage 1","rpm_ElevatedBloodPressureDesc":"Elevated blood pressure","rpm_CheckLowBPDesc":"Low blood pressure","rpm_CheckLowBP":"Low Blood Pressure","rpm_Hypertension_Stage1":"Hypertension Stage 1","rpm_Hypertensive_Stage2":"Hypertensive Stage 2","rpm_Hypertensive_Crisis":"Hypertensive Crisis","rpm_PrescriptionNotes":"Prescription Notes","rpm_AdminNotes":"Admin Notes","rpm_ConsultationNotes":"Consultation Notes","rpm_SummaryNotes":"Summary Notes","rpm_OtherNotes":"Other Notes","rpm_ResolvedNotes":"Resolved Notes","rpm_DoctorName":"Doctor\'s Name:","rpm_PrescriptionId":" Prescription Id:","rpm_NameOfPatient":" Name Of Patient:","rpm_Medicine":"Medicine","rpm_MedicineName":"Medicine name","rpm_Custom":"Custom","rpm_Present":"Present","rpm_Close":"Close","rpm_AgeGender":"Age/Gender","rpm_PatientId":"Patient Id","rpm_VitalStats":"Vital Stats","rpm_Relation":"Relation","rpm_ReadingAlerts":"Reading Alerts","rpm_RecentReadings":"Recent Readings","rpm_DoctorNotes":"Doctor Notes","rpm_COURSE":"COURSE","rpm_Print":"Print","rpm_sign":"sign","rpm_BgLevel":"Blood Glucose Level","rpm_AdditionalNotes":"Additional Notes","rpm_Attachment":"Attachments","rpm_Addprescription":"Add prescription","rpm_AddConsultation":"Add consultation","rpm_AgeYears_one":"{{count}} Year","rpm_AgeYears_other":"{{count}} Years","rpm_Signature":"Signature","rpm_Compliance":"Compliance","rpm_Compliant":"Compliant","rpm_NonCompliant":"Non-Compliant","rpm_DiabetesFasting":"Diabetes Fasting","rpm_PrediabetesFasting":"Prediabetes Fasting","rpm_HypoglycemiaFasting":"Hypoglycemia Fasting","rpm_DiabetesPP":"Diabetes PP","rpm_PrediabetesPP":"Prediabetes PP","rpm_HypoglycemiaPP":"Hypoglycemia PP","rpm_NormalFasting":"Normal Fasting","rpm_NormalPP":"Normal PP","rpm_diabetesfasting":"Diabetes","rpm_prediabetesfasting":"Prediabetes","rpm_hypoglycemiafasting":"Hypoglycemia","rpm_diabetespp":"Diabetes","rpm_prediabetespp":"Prediabetes","rpm_hypoglycemiapp":"Hypoglycemia","rpm_normalfasting":"Normal","rpm_normalpp":"Normal","rpm_normalBP":"Normal blood pressure","rpm_From":"From","rpm_To":"To","rpm_alreadyAttachedCourseEdit":"The course can not be edited as it is assigned to the patient","rpm_alreadyAttachedCourseDelete":"The course can not be deleted as it is assigned to the patient","rpm_Repeat":"Repeat","rpm_DateTime":"Date & Time","rpm_ProgramCity":"City","rpm_ProgramCountry":"Country","rpm_ProgramState":"State","rpm_NonCompliantPatients":"Non-Compliant Patients","rpm_CompliantPatients":"Compliant Patients","rpm_NotificationsDetails":"Notifications Details","rpm_PrintReport":"Print Report","rpm_PulseLevel":"Pulse Level","rpm_Tachycardia":"Tachycardia","rpm_Bradycardia":"Bradycardia","rpm_NormalPulse":"Normal Pulse","rpm_pulse":"Pulse","rpm_bp.pulse":"Pulse","rpm_bradycardia":"Bradycardia","rpm_tachycardia":"Tachycardia","rpm_TachycardiaDesc":"Tachycardia","rpm_BradycardiaDesc":"Bradycardia","rpm_Trends":"Trends","rpm_InstrumentReadings":"Instrument Readings","rpm_PrescribedMedications":"Prescribed Medications","rpm_AdvisedBy":"Advised By","rpm_MissedReadings":"Missed Readings","rpm_summarized":"Summarized","rpm_detailed":"Detailed","rpm_ActivityName":"Activity Name","rpm_ActivityType":"Activity Type","rpm_nonfasting":"Non-Fasting","rpm_preReminderTime":"Pre-Reminder Time","rpm_PreReminder":"Pre Reminder","rpm_Level":"Level","rpm_PulseRule":"Pulse Rule","rpm_Breakfast":"Breakfast","rpm_BloodPressureRule":"Blood Pressure Rule","rpm_EmailNotification":"Email Notification","rpm_NotificationSettings":" Notification Settings","rpm_SMSNotifications":"SMS Notifications","rpm_EmailNotifications":"Email Notifications","rpm_PushNotifications":"Push Notifications","rpm_OTPLogin":"OTP at the time of login","rpm_OTPLoginDescription":"The patient receives an OTP at the time of login.","rpm_EmailReadingReminderDescription":" The patient will receive reading reminders on their registered email ID.","rpm_MissedMandate":"Missed Mandate","rpm_EmailMissedMandateDescription":"The patient will receive an email for every mandate missed on their registered email ID.","rpm_NonCompliantUser":"Non-Compliant User","rpm_EmailNonCompliantUserDescription":"The patient will receive an email on their registered email id on becoming non-compliant.","rpm_PushReadingReminderDescription":"The patient will receive reading reminders through the in-app notifications.","rpm_PushMissedMandateDescription":"The patient will receive an in-app notification on every mandate missed.","rpm_PushNonCompliantUserDescription":" The patient will receive an in-app notification on becoming non-compliant on an assigned course.","rpm_ScheduleDescription":"The patient will receive in-app notifications on their registered mobile number on course assignment, before the assigned course ends, and on assigned course termination.","rpm_PrescriptionDescription":"The patient will receive in-app notification on their registered mobile number on every prescription issuance.","rpm_MedicalHistoryDescription":"The patient will receive in-app notification on their registered mobile number on every medical history record creation or updation.","rpm_ProfileDescription":" The patient will receive in-app notification on their registered mobile number on every profile updation.","rpm_RuleDescription":" The patient will receive in-app notification on their registered mobile number on every personalized rule creation.","rpm_WhatsappNotifications":"WhatsApp Notifications","rpm_WhatsappDescription":"The patient will receive welcome messages through WhatsApp on their registered mobile number.","rpm_NotesDescription":"The patient will receive in-app notification on their registered mobile number on every consultation note issuance.","rpm_Stages":"Stages","rpm_BpRange(Sys/Dia)":"Range (Sys/Dia)","rpm_Range":"Range","rpm_Notifications":"Notifications","rpm_NoCourseAttached":"No course attached","rpm_PatientsEnrolled":"Patients Enrolled","rpm_active":"Active","rpm_inactive":"Inactive","rpm_upcoming":"Upcoming","rpm_Alerts":"Alerts","rpm_Calendar":"Calendar","rpm_ALLPatients":"All Patients","rpm_ALLCourses":"All Courses","rpm_NON_COMPLIANT":"Non Compliant","rpm_ErrorInSlider":"Error in rule slider","rpm_Diabetes":"Diabetes","rpm_Pre-diabetes":"Pre-Diabetes","rpm_Hypoglycemia(Low)":"Hypoglycemia(Low)","rpm_Normal":"Normal","rpm_PrescriptionForReminder":"Prescription For Reminder","rpm_Shape&Color":"Shape & Color","rpm_Composition":"Salt Composition","rpm_Strength":"Strength","rpm_Form":"Form","setReminder":"Set Reminders","rpm_prescriptionDuration":"Prescription Duration","rpm_consultationDuration":"Consultation Duration","rpm_consultationID":"Consultation Id","rpm_RxTemplates":"Rx Templates","rpm_MedicineForm":"Medicine form","uploadImage":"Upload Image","rpm_prescription":"Prescriptions","rpm_consultation":"Consultations","rpm_SaveAsTemplate":"Save As Template","rpm_SaveTemplate":"Save Template","rpm_UseTemplate":"Use Template","rpm_TemplateName":"Template Name","rpm_savePrescription":"Save Prescription","rpm_other":"Other","rpm_Others":"Others","rpm_others":"Others","rpm_UpdatedOn":"Updated On","rpm_PrescriptionTemplates":"Prescription Templates","rpm_PrescriptionTemplate":"Prescription Template","rpm_TemplateId":"Template ID","rpm_Addtemplate":"Add Template","rpm_UploadRx":"Upload Rx","rpm_templateName":"Template Name","rpm_templateId":"Template Id","rpm_TemplateDetails":"Template Details","rpm_AddMedicine":"Add Medicine","rpm_TransferProgram":"Transfer Program","rpm_Transfer":"Transfer","rpm_AddNewTemplate":"Add new template","rpm_RxUploadError":"This is a required field","rpm_RxUploadFileError":"Only PDF and image files (JPEG, PNG, GIF, BMP) are allowed","tableSettingsTitle":"Table Column Settings","tableSettingsContent":"Table can be customized with the required columns as per your needs. Click on the gear icon and select the columns you want to display on the screen.","tourProgramTitleStep0":"List of Programs/Hospitals","tourProgramContentStep0":"This table shows a list of all the programs/hospitals you have access to. You can click on a program/hospital name to access its dashboard.","tourProgramTitleStep1":"Actions Column","tourProgramContentStep1":"You can view program-level dashboard, courses and rules by clicking on the relevant icons in this column.","tourProgramTitleStep2":"Add New Program","tourProgramContentStep2":"You can add a new program by clicking on this button.","tourProgramTitleStep3":"Search Programs","tourProgramContentStep3":"Click on search for a program using the program\'s name.","tourProgramTitleStep4":"My Profile","tourProgramContentStep4":"Click the profile icon to access your account, change your password, view the user manual, or log out.","tourProgramTitleStep5":"Select Program","tourProgramContentStep5":"Click on the search bar to search for a program by its name.","tourProgramTitleStep6":"Manage users","tourProgramContentStep6":"From here, you can access staff members, roles, and their permissions.","tourDashboardTitleStep0":"Program Matrices","tourDashboardContentStep0":"These matrices provide information like total number of patients registered under YourPal, total number of patients currently having active courses for each vital, total number of alerts generated per vital, number of patients that have taken readings as per doctor\'s prescribed mandates and are therefore compliant, etc.","tourDashboardTitleStep1":"All Patients List","tourDashboardContentStep1":"This is a list of patients enrolled in YourPal. You can either click on a patient\'s name or search by the patient\'s name for more details.","tourDashboardTitleStep2":"All Courses List","tourDashboardContentStep2":"This is a list of courses created for your hospital. You can either click on a course\'s name or search by the course\'s name for more details.","tourDashboardTitleStep3":"Program Medicine Database","tourDashboardContentStep3":"Download the program medicine database to view all saved medicines.","tourPatientsTitleStep0":"Filter Patients","tourPatientsContentStep0":"You can search for a patient using the patient\'s name.","tourPatientsTitleStep1":"Add New Patient","tourPatientsContentStep1":"You can add a new patient by clicking on this button.","tourPatientsTitleStep2":"Add Patient to the Program","tourPatientsContentStep2":"View the list of all YourPal patients. Click on a patient to add them to the program.","tourPatientsTitleStep3":"Actions Column","tourPatientsContentStep3":"You can view patient details, access all patient-level features, and delete a patient.","tourScheduleTitleStep0":"Filter Courses","tourScheduleContentStep0":"You can search a course using a course name, vital type and/or duration.","tourScheduleTitleStep2":"Add New Course","tourScheduleContentStep2":"You can create a new course by clicking on this button.","tourProgramRulesTitleStep0":"Add New Rule","tourProgramRulesContentStep0":"You can create a new rule by clicking on this button.","tourTemplateTitleStep0":"Filter Templates","tourTemplateContentStep0":"You can search templates using its name, vital type and/or duration.","tourTemplateTitleStep1":"Add New Template","tourTemplateContentStep1":"You can create a new template for prescriptions by clicking on this button.","tourMedicalHistoryTitleStep0":"Add New Disease","tourMedicalHistoryContentStep0":"You can add details of a disease for this section by clicking on this button.","tourMedicalHistoryTitleStep1":"Social History","tourMedicalHistoryContentStep1":"You can provide details regarding patient\'s social activities by clicking on this button.","tourMedicalHistoryTitleStep2":"Family Medical History","tourMedicalHistoryContentStep2":"You can visit patient\'s family medical history section by clicking on this button.","tourMedicalHistoryTitleStep3":"Actions","tourMedicalHistoryContentStep3":"From this column, you can edit, or delete medical history by clicking on the appropriate icons.","tourPatientCoursesTitleStep0":"Filter Patient Courses","tourPatientCoursesContentStep0":"You can filter courses assigned to this patient based on vital type from here.","tourPatientCoursesTitleStep1":"Assign Courses","tourPatientCoursesContentStep1":"You can assign a new course to this patient and set its start date from here.","tourPatientRulesTitleStep0":"Add Rule","tourPatientRulesContentStep0":"You can add a personalized rule for this patient from here.","tourPatientRulesTitleStep1":"Rules List","tourPatientRulesContentStep1":"This table lists all the personalized rules of a patient. You can click on a rule title to view its details.","tourPrescriptionTitleStep0":"Filter Consultation","tourPrescriptionContentStep0":"You can filter prescriptions for this patient using vital type and duration from here.","tourPrescriptionTitleStep1":"Add New Consultation","tourPrescriptionContentStep1":"You can create a new prescription for this patient by clicking on this button.","tourPrescriptionTitleStep2":"Actions","tourPrescriptionContentStep2":"From here, you can view, edit, print, or delete consultations by clicking on the appropriate icons in the column.","tourNotesTitleStep0":"Filter Notes","tourNotesContentStep0":"You can filter the available notes by vital type and duration from here.","tourNotesTitleStep1":"Notes Type","tourNotesContentStep1":"You can view different types of notes issued for this patient by clicking on the relevant button.","tourNotesTitleStep2":"Resolved alert","tourNotesContentStep2":"You can view the resolved alerts from here.","tourNotesTitleStep3":"Add new Notes","tourNotesContentStep3":"You can add different personalized notes from here.","tourPersonalTitleStep0":"Edit Patient Details","tourPersonalContentStep0":"You can edit the patient\'s details by clicking here.","tourPatientDashboardTitleStep0":"Patient\'s Header Data","tourPatientDashboardContentStep0":"Details like the patient\'s vital information, course name, the selected course\'s start and end dates, etc. will be displayed here.","tourPatientDashboardTitleStep1":"Resolved Alerts","tourPatientDashboardContentStep1":"You can see the alerts resolved for the patient by clicking here.","tourPatientDashboardTitleStep2":"Active Alerts","tourPatientDashboardContentStep2":"You can see the active alerts generated on the patient account by clicking here.","tourPatientDashboardTitleStep3":"Reports","tourPatientDashboardContentStep3":"You can download the summarized and detailed versions of the reports from here.","tourPatientDashboardTitleStep4":"Dashboard Filter","tourPatientDashboardContentStep4":"You can filter the dashboard data from here.","tourPatientDashboardTitleStep5":"Dashboard","tourPatientDashboardContentStep5":"You can see the graphical representation of patient\'s data here.","tourPatientDashboardTitleStep6":"Alert Summary","tourPatientDashboardContentStep6":"From here you can view summarized details, of active alerts and resolved alerts.","tourProfileTourTitleStep0":"Edit Your Profile","tourProfileTourContentStep0":"You can edit your profile by clicking here.","tourStaffTitleStep0":"Filter User","tourStaffContentStep0":"You can filter your user using this filter.","tourStaffTitleStep1":"Search User","tourStaffContentStep1":"You can search the user by his/her name.","tourStaffTitleStep2":"Create New User","tourStaffContentStep2":"You can create a new user by clicking here.","tourFollowupTitleStep0":"Filter Follow Up","tourFollowupContentStep0":"Search for a follow-up using a follow-up name, or duration.","tourFollowupTitleStep1":"Follow-up List","tourFollowupContentStep1":"View all follow-ups for this program in this list.","tourAdherenceReportTitleStep0":"Adherence filter","tourAdherenceReportContentStep0":"You can choose to view adherence by the desired vital type, or time duration.","tourAdherenceReportTitleStep1":"Vital graph","tourAdherenceReportContentStep1":"You can see the graphical representation of the patient\u2019s vital reading here.","tourAdherenceReportTitleStep2":"Legends","tourAdherenceReportContentStep2":"Color-coded legends represent vital stages & Medicine %. Click a box to display the graph for a specific reading & Course.","tourAdherenceReportTitleStep3":"Medicine %","tourAdherenceReportContentStep3":"Tracks daily medication adherence. You can see the graphical representation of the patient\u2019s medication percentage here.","tourProgramSettingsTitleStep0":"Program Settings","tourProgramSettingsContentStep0":"Customize general information, consultation options, and notification settings for your program.","tourProgramSettingsTitleStep1":"General Information","tourProgramSettingsContentStep1":"View or edit program information from here.","tourProgramSettingsTitleStep2":"Consultation Options","tourProgramSettingsContentStep2":"Add or edit the Consultation form for the Program.","tourProgramSettingsTitleStep3":"Notification","tourProgramSettingsContentStep3":"Enable the toggle to edit follow-up notifications sent to patients for their next follow-up.","tourRolesTitleStep0":"Filter Roles","tourRolesContentStep0":"You can filter roles from here.","tourRolesTitleStep1":"Search Roles","tourRolesContentStep1":"You can search roles by its name.","tourRolesTitleStep2":"Create New Role","tourRolesContentStep2":"You can create a new role by clicking here.","rpm_AuditLogs":"Audit Logs","rpm_Logs":"Logs","rpm_LogDetails":"Log Details","rpm_Descriptions":"Descriptions","rpm_EventCode":"Event Code","rpm_TriggeredBy":"Triggered By","rpm_TimeLog":"Time Log","rpm_Service":"Service","rpm_EventTime":"Event Time","rpm_UserPrincipal":"User Principal","rpm_Attributes":"Attributes","rpm_Error":"Error","rpm_Event_Information":"Event Information","rpm_Create":"Create","rpm_Read":"Read","rpm_Action":"Action","rpm_ServiceCode":"Service Code","rpm_ChildrenLogs":"Child Logs","rpm_DefaultRule":"Default Rule","rpm_Duration&Time":"Duration & Timings","rpm_IssuedFor":"Issued For","rpm_PrescriptionDate":"Prescription Date","rpm_age/gender":"Age/Gender","rpm_mob":"Mob.","rpm_event_id":"Event Code","rpm_service_code":"Service","rpm_start_date":"Start Date","rpm_end_date":"End Date","rpm_program":"Program","rpm_description":"Description","rpm_username":"Triggered By","rpm_consultationId":"Consultation Id","rpm_ChiefComplaints":"Chief Complaints","rpm_Diagnosis":"Diagnosis","rpm_testsRequired":"Test Required","rpm_advice":"Advice","rpm_testrequest":"Tests requested","rpm_followUpDate":"Follow-up date","rpm_complaints":"Compliants","rpm_Symptoms":"Symptoms","rpm_diagnosis":"Diagnosis","rpm_saveConsultation":"Save Consultation","rpm_dr.name":"Dr. Name","rpm_GeneralAdvice":"General Advice:","rpm_TestRequired":"Tests Required:","rpm_NextFollowUpDate":"Next Follow-Up Date","rpm_AddNewConsultation":"Add New Consultation","rpm_AddNewDiagnosis":"Add New Diagnosis","rpm_AddMore":"Add More","rpm_Save&Continue":"Save & Continue","rpm_Collapse":"Collapse","rpm_Expand":"Expand","rpm_ViewAll":"View all","rpm_ViewLess":"View less","rpm_ProgramSettings":"Program Settings","rpm_GeneralSettings":"General Information","rpm_Consultation":"Consultation","rpm_AdherenceReport":"Adherence Report","rpm_ConsultationTemplate":"Consultation Template","rpm_ViewReports":"View Report","rpm_UploadReports":"Upload Report","rpm_defaultProgram":"Make default for mobile app","rpm_continue":"Continue","downloadMedicineFile":"Download Medicine File","rpm_facility_type":"Facility Type","rpm_Hospital":"Hospital","hospital":"Hospital","rpm_Clinic":"Clinic","clinic":"Clinic","rpm_Fitness_Center":"Fitness Center","fitnessCenter":"Fitness Center","rpm_Wellness_Center":"Wellness Center","wellnessCenter":"Wellness Center","rpm_ShowProgramQr":"Program QR","rpm_Program_qr":"Program QR","rpm_Assign_Role":"Assign Role","rpm_UsersMobileNumber":"User\u2019s Mobile Number","rpm_PleaseProvideMoblieNumber":"Enter mobile number to find the user","rpm_AddToProgram":"Add to Program","rpm_Enter_Mobile_Number_to_Search":"Enter Mobile Number to Search","rpm_RoleType":"Role Type","rpm_Account_Menu":"Account Menu","rpm_To_Explore_This":"To explore this module further, kindly use the YourPal+ application for complete access.","rpm_Providers":"Providers","rpm_Unassign":"Unassign","rpm_Loading":"Loading...","rpm_providerAssignSuccess":"Provider updated successfully","rpm_viewPrograms":"View Programs","rpm_assignedPrograms":"Assigned Programs","rpm_AllUsers":"All Users","rpm_CreateGoal":"Create Goal","rpm_CreateExercise":"Create Exercise","rpm_EditExerciseGoal":"Edit Exercise","rpm_DefaultMetrics":" Default Metrics","rpm_CreateNewMetric":"Create New Metric","rpm_NewMetric":"New Metric","rpm_FieldType":"Field Type","rpm_SelectType":"Select type","rpm_SaveMetric":"Save Metric","rpm_MetricPriority":"Metric Priority","rpm_DragToReorder":"Drag to reorder","rpm_GoalName":"Goal Name","rpm_ExerciseName":"Exercise Name","rpm_Priority":"Priority","rpm_PrimaryMuscle":"Primary Muscle","rpm_SecondaryMuscle":"Secondary Muscle","rpm_Required":"Required","rpm_TraceableBy":"Traceable By","rpm_Provider":"Provider","rpm_Client":"Client","rpm_WellnessGoals":"Wellness Goals","rpm_ExerciseGoals":"Exercise Goals","rpm_GoalDetails":"Goal Details","rpm_Categories":"Categories","rpm_Metrics":"Metrics","rpm_Unit":"Unit","rpm_NoMetricsFound":"No Metrics Found","rpm_EditGoal":"Edit Goal","rpm_PreAssessment":"Pre Assessment","rpm_ProviderName":"Provider Name","rpm_ClientName":"Client Name","rpm_SearchProvider":"Search by Provider","rpm_providerAssignment":"Provider Assign successfully","rpm_providerUnassignSuccess":"Provider Unassign successfully","rpm_Assignments":"Assignments","rpm_AssignPatients":"Assign Patient","rpm_SelectPatient":"Select Patient","rpm_SelectProvider":"Select Provider","rpm_Equipment":"Equipment","rpm_ExerciseType":"Exercise Type","rpm_MovementPattern":"Movement Pattern","rpm_ExerciseLevel":"Exercise Level","rpm_Instructions":"Instructions","rpm_Tips":"Tips","rpm_CommonMistakes":"Common Mistakes","rpm_Calorie_burn_rate":"Calorie Burn Rate"}'),ot=JSON.parse('{"rpm_testMsg":"Liste de t\xe2ches avec texte et ic\xf4ne"}'),at=JSON.parse('{"Home":"Accueil","Todo":"TOUT","Login":"Connexion","SignUp":"S\'inscrire","TodoDesc":"Liste de t\xe2ches avec texte et ic\xf4ne"}'),st={en:{translation:(0,i.A)({},it),message:(0,i.A)({},rt),error:(0,i.A)({},nt)},fr:{translation:(0,i.A)({},at),message:(0,i.A)({},ot)}};_e.use(He).use(tt).init({resources:st,debug:!1,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});var lt=n(84391),ct=n(29461),dt=n(98443),ut=n(97950),pt=n.t(ut,2);let ht=function(e){e()};const mt=()=>ht,ft=Symbol.for("react-redux-context"),gt="undefined"!==typeof globalThis?globalThis:{};function vt(){var e;if(!We.createContext)return{};const t=null!=(e=gt[ft])?e:gt[ft]=new Map;let n=t.get(We.createContext);return n||(n=We.createContext(null),t.set(We.createContext,n)),n}const xt=vt();function yt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;return function(){return(0,We.useContext)(e)}}const bt=yt();let jt=()=>{throw new Error("uSES not initialized!")};const wt=(e,t)=>e===t;function _t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;const t=e===xt?bt:yt(e);return function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{equalityFn:r=wt,stabilityCheck:i,noopCheck:o}="function"===typeof n?{equalityFn:n}:n;const{store:a,subscription:s,getServerState:l,stabilityCheck:c,noopCheck:d}=t(),u=((0,We.useRef)(!0),(0,We.useCallback)({[e.name]:t=>e(t)}[e.name],[e,c,i])),p=jt(s.addNestedSub,a.getState,l||a.getState,u,r);return(0,We.useDebugValue)(p),p}}const Ct=_t();var St=n(80219),At=n.n(St);n(32706);const kt={notify(){},get:()=>[]};function Mt(e,t){let n,r=kt,i=0,o=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){i++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){const e=mt();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let e=t;for(;e;)e.callback(),e=e.next})},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}function l(){i--,n&&0===i&&(n(),n=void 0,r.clear(),r=kt)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return o},trySubscribe:function(){o||(o=!0,s())},tryUnsubscribe:function(){o&&(o=!1,l())},getListeners:()=>r};return c}const Ot=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement)?We.useLayoutEffect:We.useEffect;let Tt=null;const Et=function(e){let{store:t,context:n,children:r,serverState:i,stabilityCheck:o="once",noopCheck:a="once"}=e;const s=We.useMemo(()=>{const e=Mt(t);return{store:t,subscription:e,getServerState:i?()=>i:void 0,stabilityCheck:o,noopCheck:a}},[t,i,o,a]),l=We.useMemo(()=>t.getState(),[t]);Ot(()=>{const{subscription:e}=s;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[s,l]);const c=n||xt;return We.createElement(c.Provider,{value:s},r)};function Pt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;const t=e===xt?bt:yt(e);return function(){const{store:e}=t();return e}}const Dt=Pt();function Rt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;const t=e===xt?Dt:Pt(e);return function(){return t().dispatch}}const Nt=Rt();var Lt,It;Lt=dt.useSyncExternalStoreWithSelector,jt=Lt,(e=>{Tt=e})(ct.useSyncExternalStore),It=ut.unstable_batchedUpdates,ht=It;var Ft=n(58168),$t=n(98206),Bt=n(13174),zt=n(70869),Ht=n(18280),Wt=n(69369);const Vt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=We.useContext(Wt.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},Ut=(0,Ht.A)();const qt=function(){return Vt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ut)};var Gt=n(70579);function Yt(e){const t=(0,Bt.internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles="@layer global{".concat(t.styles,"}")),t):e}const Zt=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const i=qt(r),o=n&&i[n]||i;let a="function"===typeof t?t(o):t;return o.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Yt("function"===typeof e?e(o):e)):Yt(a)),(0,Gt.jsx)(zt.A,{styles:a})};var Kt=n(15170),Xt=n(13375);const Qt=function(e){return(0,Gt.jsx)(Zt,(0,Ft.A)({},e,{defaultTheme:Kt.A,themeId:Xt.A}))},Jt=(e,t)=>(0,Ft.A)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),en=e=>(0,Ft.A)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}});const tn=function(e){const t=(0,$t.b)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)(Qt,{styles:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(t=>{let[n,i]=t;var o;r[e.getColorSchemeSelector(n).replace(/\s*&/,"")]={colorScheme:null==(o=i.palette)?void 0:o.mode}});let i=(0,Ft.A)({html:Jt(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,Ft.A)({margin:0},en(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=null==(n=e.components)||null==(n=n.MuiCssBaseline)?void 0:n.styleOverrides;return o&&(i=[i,o]),i}(e,r)}),n]})};var nn=n(98587);const rn=We.createContext(null);function on(){return We.useContext(rn)}const an="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const sn=function(e){const{children:t,theme:n}=e,r=on(),i=We.useMemo(()=>{const e=null===r?n:function(e,t){if("function"===typeof t)return t(e);return(0,Ft.A)({},e,t)}(r,n);return null!=e&&(e[an]=null!==r),e},[n,r]);return(0,Gt.jsx)(rn.Provider,{value:i,children:t})},ln=["value"],cn=We.createContext();const dn=()=>{const e=We.useContext(cn);return null!=e&&e},un=function(e){let{value:t}=e,n=(0,nn.A)(e,ln);return(0,Gt.jsx)(cn.Provider,(0,Ft.A)({value:null==t||t},n))};var pn=n(13654),hn=n(84440),mn=n(5844);const fn={};function gn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return We.useMemo(()=>{const i=e&&t[e]||t;if("function"===typeof n){const o=n(i),a=e?(0,Ft.A)({},t,{[e]:o}):o;return r?()=>a:a}return e?(0,Ft.A)({},t,{[e]:n}):(0,Ft.A)({},t,n)},[e,t,n,r])}const vn=function(e){const{children:t,theme:n,themeId:r}=e,i=Vt(fn),o=on()||fn,a=gn(r,i,n),s=gn(r,o,n,!0),l="rtl"===a.direction,c=function(e){const t=Vt(),n=(0,mn.A)()||"",{modularCssLayers:r}=e;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return i=r&&null===t?"string"===typeof r?r.replace(/mui(?!\.)/g,i):"@layer ".concat(i,";"):"",(0,hn.A)(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(i){var r;if(t&&null!=(r=t.hasAttribute)&&r.call(t,"data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const o=document.createElement("style");o.setAttribute("data-mui-layer-order",n),o.textContent=i,e.prepend(o)}else{var o;null==(o=e.querySelector('style[data-mui-layer-order="'.concat(n,'"]')))||o.remove()}},[i,n]),i?(0,Gt.jsx)(Zt,{styles:i}):null}(a);return(0,Gt.jsx)(sn,{theme:s,children:(0,Gt.jsx)(Wt.T.Provider,{value:a,children:(0,Gt.jsx)(un,{value:l,children:(0,Gt.jsxs)(pn.A,{value:null==a?void 0:a.components,children:[c,t]})})})})},xn=["theme"];function yn(e){let{theme:t}=e,n=(0,nn.A)(e,xn);const r=t[Xt.A];let i=r||t;return"function"!==typeof t&&(r&&!r.vars?i=(0,Ft.A)({},r,{vars:null}):t&&!t.vars&&(i=(0,Ft.A)({},t,{vars:null}))),(0,Gt.jsx)(vn,(0,Ft.A)({},n,{themeId:r?Xt.A:void 0,theme:i}))}function bn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=bn(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const jn=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=bn(e))&&(r&&(r+=" "),r+=t);return r};function wn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}const _n=!1,Cn=We.createContext(null);var Sn=function(e){return e.scrollTop},An="unmounted",kn="exited",Mn="entering",On="entered",Tn="exiting",En=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=kn,r.appearStatus=Mn):i=On:i=t.unmountOnExit||t.mountOnEnter?An:kn,r.state={status:i},r.nextCallback=null,r}wn(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===An?{status:kn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Mn&&n!==On&&(t=Mn):n!==Mn&&n!==On||(t=Tn)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Mn){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:ut.findDOMNode(this);n&&Sn(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===kn&&this.setState({status:An})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[ut.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||_n?this.safeSetState({status:On},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:Mn},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:On},function(){t.props.onEntered(o,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ut.findDOMNode(this);t&&!_n?(this.props.onExit(r),this.safeSetState({status:Tn},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:kn},function(){e.props.onExited(r)})})})):this.safeSetState({status:kn},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ut.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===An)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,nn.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return We.createElement(Cn.Provider,{value:null},"function"===typeof n?n(e,r):We.cloneElement(We.Children.only(n),r))},t}(We.Component);function Pn(){}En.contextType=Cn,En.propTypes={},En.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Pn,onEntering:Pn,onEntered:Pn,onExit:Pn,onExiting:Pn,onExited:Pn},En.UNMOUNTED=An,En.EXITED=kn,En.ENTERING=Mn,En.ENTERED=On,En.EXITING=Tn;const Dn=En;function Rn(e){var t;return parseInt(We.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}var Nn=n(80950),Ln=n(95849);function In(){const e=qt(Kt.A);return e[Xt.A]||e}const Fn=e=>e.scrollTop;function $n(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"===typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"===typeof o?o[t.mode]:o,delay:a.transitionDelay}}var Bn=n(36078);const zn=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Hn(e,t,n){var r;const i=function(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=(0,Bn.A)(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=o.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"===typeof a){const e=a.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?"translateX(".concat(i?i.right+s-r.left:o.innerWidth+s-r.left,"px)"):"right"===e?"translateX(-".concat(i?r.right-i.left-s:r.left+r.width-s,"px)"):"up"===e?"translateY(".concat(i?i.bottom+l-r.top:o.innerHeight+l-r.top,"px)"):"translateY(-".concat(i?r.top-i.top+r.height-l:r.top+r.height-l,"px)")}(e,t,"function"===typeof(r=n)?r():r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const Wn=We.forwardRef(function(e,t){const n=In(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,container:l,direction:c="down",easing:d=r,in:u,onEnter:p,onEntered:h,onEntering:m,onExit:f,onExited:g,onExiting:v,style:x,timeout:y=i,TransitionComponent:b=Dn}=e,j=(0,nn.A)(e,zn),w=We.useRef(null),_=(0,Ln.A)(Rn(s),w,t),C=e=>t=>{e&&(void 0===t?e(w.current):e(w.current,t))},S=C((e,t)=>{Hn(c,e,l),Fn(e),p&&p(e,t)}),A=C((e,t)=>{const r=$n({timeout:y,style:x,easing:d},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",(0,Ft.A)({},r)),e.style.transition=n.transitions.create("transform",(0,Ft.A)({},r)),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)}),k=C(h),M=C(v),O=C(e=>{const t=$n({timeout:y,style:x,easing:d},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),Hn(c,e,l),f&&f(e)}),T=C(e=>{e.style.webkitTransition="",e.style.transition="",g&&g(e)}),E=We.useCallback(()=>{w.current&&Hn(c,w.current,l)},[c,l]);return We.useEffect(()=>{if(u||"down"===c||"right"===c)return;const e=(0,Nn.A)(()=>{w.current&&Hn(c,w.current,l)}),t=(0,Bn.A)(w.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[c,u,l]),We.useEffect(()=>{u||E()},[u,E]),(0,Gt.jsx)(b,(0,Ft.A)({nodeRef:w,onEnter:S,onEntered:k,onEntering:A,onExit:O,onExited:T,onExiting:M,addEndListener:e=>{o&&o(w.current,e)},appear:a,in:u,timeout:y},j,{children:(e,t)=>We.cloneElement(s,(0,Ft.A)({ref:_,style:(0,Ft.A)({visibility:"exited"!==e||u?void 0:"hidden"},x,s.props.style)},t))}))}),Vn=Wn;var Un=n(34535),qn=n(17868),Gn=n(11188);function Yn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,Gn.A)(e,t,n)}function Zn(e){if(e.type)return e;if("#"===e.charAt(0))return Zn(function(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", "),")"):""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,qn.A)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,qn.A)(10,r))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:r}}function Kn(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function Xn(e){let t="hsl"===(e=Zn(e)).type||"hsla"===e.type?Zn(function(e){e=Zn(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Kn({type:s,values:l})}(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Qn(e,t){return e=Zn(e),t=Yn(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,Kn(e)}function Jn(e,t){if(e=Zn(e),t=Yn(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Kn(e)}function er(e,t){if(e=Zn(e),t=Yn(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Kn(e)}function tr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return Xn(e)>.5?Jn(e,t):er(e,t)}var nr=n(69292),rr=n(99303),ir=n(98610),or=n(14318),ar=n(92532),sr=n(72372);function lr(e){return(0,sr.Ay)("MuiCollapse",e)}(0,ar.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const cr=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],dr=(0,Un.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,Ft.A)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})}),ur=(0,Un.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})}),pr=(0,Un.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(e=>{let{ownerState:t}=e;return(0,Ft.A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})}),hr=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCollapse"}),{addEndListener:r,children:i,className:o,collapsedSize:a="0px",component:s,easing:l,in:c,onEnter:d,onEntered:u,onEntering:p,onExit:h,onExited:m,onExiting:f,orientation:g="vertical",style:v,timeout:x=or.p0.standard,TransitionComponent:y=Dn}=n,b=(0,nn.A)(n,cr),j=(0,Ft.A)({},n,{orientation:g,collapsedSize:a}),w=(e=>{const{orientation:t,classes:n}=e,r={root:["root","".concat(t)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(t)],wrapperInner:["wrapperInner","".concat(t)]};return(0,ir.A)(r,lr,n)})(j),_=In(),C=(0,rr.A)(),S=We.useRef(null),A=We.useRef(),k="number"===typeof a?"".concat(a,"px"):a,M="horizontal"===g,O=M?"width":"height",T=We.useRef(null),E=(0,Ln.A)(t,T),P=e=>t=>{if(e){const n=T.current;void 0===t?e(n):e(n,t)}},D=()=>S.current?S.current[M?"clientWidth":"clientHeight"]:0,R=P((e,t)=>{S.current&&M&&(S.current.style.position="absolute"),e.style[O]=k,d&&d(e,t)}),N=P((e,t)=>{const n=D();S.current&&M&&(S.current.style.position="");const{duration:r,easing:i}=$n({style:v,timeout:x,easing:l},{mode:"enter"});if("auto"===x){const t=_.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(t,"ms"),A.current=t}else e.style.transitionDuration="string"===typeof r?r:"".concat(r,"ms");e.style[O]="".concat(n,"px"),e.style.transitionTimingFunction=i,p&&p(e,t)}),L=P((e,t)=>{e.style[O]="auto",u&&u(e,t)}),I=P(e=>{e.style[O]="".concat(D(),"px"),h&&h(e)}),F=P(m),$=P(e=>{const t=D(),{duration:n,easing:r}=$n({style:v,timeout:x,easing:l},{mode:"exit"});if("auto"===x){const n=_.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(n,"ms"),A.current=n}else e.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");e.style[O]=k,e.style.transitionTimingFunction=r,f&&f(e)});return(0,Gt.jsx)(y,(0,Ft.A)({in:c,onEnter:R,onEntered:L,onEntering:N,onExit:I,onExited:F,onExiting:$,addEndListener:e=>{"auto"===x&&C.start(A.current||0,e),r&&r(T.current,e)},nodeRef:T,timeout:"auto"===x?null:x},b,{children:(e,t)=>(0,Gt.jsx)(dr,(0,Ft.A)({as:s,className:(0,nr.A)(w.root,o,{entered:w.entered,exited:!c&&"0px"===k&&w.hidden}[e]),style:(0,Ft.A)({[M?"minWidth":"minHeight"]:k},v),ref:E},t,{ownerState:(0,Ft.A)({},j,{state:e}),children:(0,Gt.jsx)(ur,{ownerState:(0,Ft.A)({},j,{state:e}),className:w.wrapper,ref:S,children:(0,Gt.jsx)(pr,{ownerState:(0,Ft.A)({},j,{state:e}),className:w.wrapperInner,children:i})})}))}))});hr.muiSupportAuto=!0;const mr=hr;var fr=n(8122),gr=n(63462),vr=n(31782),xr=n(31668);function yr(e){return e.substring(2).toLowerCase()}function br(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,a=We.useRef(!1),s=We.useRef(null),l=We.useRef(!1),c=We.useRef(!1);We.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const d=(0,gr.A)(Rn(t),s),u=(0,vr.A)(e=>{const t=c.current;c.current=!1;const r=(0,xr.A)(s.current);if(!l.current||!s.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(a.current)return void(a.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(s.current)>-1:!r.documentElement.contains(e.target)||s.current.contains(e.target),o||!n&&t||i(e)}),p=e=>n=>{c.current=!0;const r=t.props[e];r&&r(n)},h={ref:d};return!1!==o&&(h[o]=p(o)),We.useEffect(()=>{if(!1!==o){const e=yr(o),t=(0,xr.A)(s.current),n=()=>{a.current=!0};return t.addEventListener(e,u),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,u),t.removeEventListener("touchmove",n)}}},[u,o]),!1!==r&&(h[r]=p(r)),We.useEffect(()=>{if(!1!==r){const e=yr(r),t=(0,xr.A)(s.current);return t.addEventListener(e,u),()=>{t.removeEventListener(e,u)}}},[u,r]),(0,Gt.jsx)(We.Fragment,{children:We.cloneElement(t,h)})}function jr(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 wr(){return wr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wr.apply(this,arguments)}function _r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Cr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Sr=We.createContext(),Ar={containerRoot:{},containerAnchorOriginTopCenter:{},containerAnchorOriginBottomCenter:{},containerAnchorOriginTopRight:{},containerAnchorOriginBottomRight:{},containerAnchorOriginTopLeft:{},containerAnchorOriginBottomLeft:{}},kr={default:20,dense:4},Mr={default:6,dense:2},Or={maxSnack:3,dense:!1,hideIconVariant:!1,variant:"default",autoHideDuration:5e3,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:Vn,transitionDuration:{enter:225,exit:195}},Tr=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Er=function(e){return Object.keys(e).filter(function(e){return!Ar[e]}).reduce(function(t,n){var r;return wr({},t,((r={})[n]=e[n],r))},{})},Pr={TIMEOUT:"timeout",CLICKAWAY:"clickaway",MAXSNACK:"maxsnack",INSTRUCTED:"instructed"},Dr=function(e){return"containerAnchorOrigin"+e},Rr=function(e){var t=e.vertical,n=e.horizontal;return"anchorOrigin"+Tr(t)+Tr(n)},Nr=function(e){return"variant"+Tr(e)},Lr=function(e){return!!e||0===e},Ir=function(e){return"number"===typeof e||null===e};function Fr(e,t,n){return void 0===e&&(e={}),void 0===t&&(t={}),void 0===n&&(n={}),wr({},n,{},t,{},e)}var $r={root:"SnackbarContent-root"},Br=(0,Un.Ay)("div")(function(e){var t,n,r=e.theme;return(n={})["&."+$r.root]=((t={display:"flex",flexWrap:"wrap",flexGrow:1})[r.breakpoints.up("sm")]={flexGrow:"initial",minWidth:288},t),n}),zr=(0,We.forwardRef)(function(e,t){var n=e.className,r=_r(e,["className"]);return We.createElement(Br,Object.assign({ref:t,className:jn($r.root,n)},r))}),Hr={right:"left",left:"right",bottom:"up",top:"down"},Wr=function(e){return"center"!==e.horizontal?Hr[e.horizontal]:Hr[e.vertical]},Vr=function(e){return We.createElement(fr.A,Object.assign({},e),We.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n        10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},Ur=function(e){return We.createElement(fr.A,Object.assign({},e),We.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},qr=function(e){return We.createElement(fr.A,Object.assign({},e),We.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n        6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n        13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},Gr=function(e){return We.createElement(fr.A,Object.assign({},e),We.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n        0 22,12A10,10 0 0,0 12,2Z"}))},Yr={fontSize:20,marginInlineEnd:8},Zr={default:void 0,success:We.createElement(Vr,{style:Yr}),warning:We.createElement(Ur,{style:Yr}),error:We.createElement(qr,{style:Yr}),info:We.createElement(Gr,{style:Yr})};function Kr(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=[].concat(i);t&&-1===a.indexOf(t)&&a.push(t),e.apply(this,a),n.apply(this,a)}},function(){})}var Xr="undefined"!==typeof window?We.useLayoutEffect:We.useEffect;function Qr(e){var t=(0,We.useRef)(e);return Xr(function(){t.current=e}),(0,We.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var Jr,ei=(0,We.forwardRef)(function(e,t){var n=e.children,r=e.autoHideDuration,i=e.ClickAwayListenerProps,o=e.disableWindowBlurListener,a=void 0!==o&&o,s=e.onClose,l=e.onMouseEnter,c=e.onMouseLeave,d=e.open,u=e.resumeHideDuration,p=_r(e,["children","autoHideDuration","ClickAwayListenerProps","disableWindowBlurListener","onClose","onMouseEnter","onMouseLeave","open","resumeHideDuration"]),h=(0,We.useRef)(),m=Qr(function(){s&&s.apply(void 0,arguments)}),f=Qr(function(e){s&&null!=e&&(clearTimeout(h.current),h.current=setTimeout(function(){m(null,Pr.TIMEOUT)},e))});(0,We.useEffect)(function(){return d&&f(r),function(){clearTimeout(h.current)}},[d,r,f]);var g=function(){clearTimeout(h.current)},v=(0,We.useCallback)(function(){null!=r&&f(null!=u?u:.5*r)},[r,u,f]);return(0,We.useEffect)(function(){if(!a&&d)return window.addEventListener("focus",v),window.addEventListener("blur",g),function(){window.removeEventListener("focus",v),window.removeEventListener("blur",g)}},[a,v,d]),(0,We.createElement)(br,wr({onClickAway:function(e){s&&s(e,Pr.CLICKAWAY)}},i),(0,We.createElement)("div",wr({onMouseEnter:function(e){l&&l(e),g()},onMouseLeave:function(e){c&&c(e),v()},ref:t},p),n))}),ti="SnackbarItem",ni={contentRoot:ti+"-contentRoot",lessPadding:ti+"-lessPadding",variantSuccess:ti+"-variantSuccess",variantError:ti+"-variantError",variantInfo:ti+"-variantInfo",variantWarning:ti+"-variantWarning",message:ti+"-message",action:ti+"-action",wrappedRoot:ti+"-wrappedRoot"},ri=(0,Un.Ay)(ei)(function(e){var t,n=e.theme,r=n.palette.mode||n.palette.type,i=tr(n.palette.background.default,"light"===r?.8:.98);return(t={})["&."+ni.wrappedRoot]={position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0},t["."+ni.contentRoot]=wr({},n.typography.body2,{backgroundColor:i,color:n.palette.getContrastText(i),alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"}),t["."+ni.lessPadding]={paddingLeft:20},t["."+ni.variantSuccess]={backgroundColor:"#43a047",color:"#fff"},t["."+ni.variantError]={backgroundColor:"#d32f2f",color:"#fff"},t["."+ni.variantInfo]={backgroundColor:"#2196f3",color:"#fff"},t["."+ni.variantWarning]={backgroundColor:"#ff9800",color:"#fff"},t["."+ni.message]={display:"flex",alignItems:"center",padding:"8px 0"},t["."+ni.action]={display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8},t}),ii=function(e){var t=e.classes,n=_r(e,["classes"]),r=(0,We.useRef)(),i=(0,We.useState)(!0),o=i[0],a=i[1];(0,We.useEffect)(function(){return function(){r.current&&clearTimeout(r.current)}},[]);var s=Kr([n.snack.onClose,n.onClose],n.snack.key),l=n.style,c=n.ariaAttributes,d=n.className,u=n.hideIconVariant,p=n.iconVariant,h=n.snack,m=n.action,f=n.content,g=n.TransitionComponent,v=n.TransitionProps,x=n.transitionDuration,y=_r(n,["style","dense","ariaAttributes","className","hideIconVariant","iconVariant","snack","action","content","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),b=h.key,j=h.open,w=h.className,_=h.variant,C=h.content,S=h.action,A=h.ariaAttributes,k=h.anchorOrigin,M=h.message,O=h.TransitionComponent,T=h.TransitionProps,E=h.transitionDuration,P=_r(h,["persist","key","open","entered","requestClose","className","variant","content","action","ariaAttributes","anchorOrigin","message","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),D=wr({},Zr,{},p)[_],R=wr({"aria-describedby":"notistack-snackbar"},Fr(A,c)),N=O||g||Or.TransitionComponent,L=Fr(E,x,Or.transitionDuration),I=wr({direction:Wr(k)},Fr(T,v)),F=S||m;"function"===typeof F&&(F=F(b));var $=C||f;"function"===typeof $&&($=$(b,h.message));var B=["onEnter","onEntering","onEntered","onExit","onExiting","onExited"].reduce(function(e,t){var r;return wr({},e,((r={})[t]=Kr([n.snack[t],n[t]],n.snack.key),r))},{});return We.createElement(mr,{unmountOnExit:!0,timeout:175,in:o,onExited:B.onExited},We.createElement(ri,Object.assign({},y,P,{open:j,className:jn(t.root,ni.wrappedRoot,t[Rr(k)]),onClose:s}),We.createElement(N,Object.assign({appear:!0,in:j,timeout:L},I,{onExit:B.onExit,onExiting:B.onExiting,onExited:function(){r.current=setTimeout(function(){a(!o)},125)},onEnter:B.onEnter,onEntering:B.onEntering,onEntered:Kr([B.onEntered,function(){n.snack.requestClose&&s(null,Pr.INSTRCUTED)}])}),$||We.createElement(zr,Object.assign({},R,{role:"alert",style:l,className:jn(ni.contentRoot,ni[Nr(_)],t[Nr(_)],d,w,!u&&D&&ni.lessPadding)}),We.createElement("div",{id:R["aria-describedby"],className:ni.message},u?null:D,M),F&&We.createElement("div",{className:ni.action},F)))))},oi="& > .MuiCollapse-container, & > .MuiCollapse-root",ai="& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper",si="SnackbarContainer",li={root:si+"-root",rootDense:si+"-rootDense",top:si+"-top",bottom:si+"-bottom",left:si+"-left",right:si+"-right",center:si+"-center"},ci=(0,Un.Ay)("div")(function(e){var t,n,r,i,o,a,s=e.theme;return(a={})["&."+li.root]=((t={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:s.zIndex.snackbar,height:"auto",width:"auto",transition:"top 300ms ease 0ms, right 300ms ease 0ms, bottom 300ms ease 0ms, left 300ms ease 0ms, margin 300ms ease 0ms, max-width 300ms ease 0ms",pointerEvents:"none"})[oi]={pointerEvents:"all"},t[ai]={padding:Mr.default+"px 0px",transition:"padding 300ms ease 0ms"},t.maxWidth="calc(100% - "+2*kr.default+"px)",t[s.breakpoints.down("sm")]={width:"100%",maxWidth:"calc(100% - 32px)"},t),a["&."+li.rootDense]=((n={})[ai]={padding:Mr.dense+"px 0px"},n),a["&."+li.top]={top:kr.default-Mr.default,flexDirection:"column"},a["&."+li.bottom]={bottom:kr.default-Mr.default,flexDirection:"column-reverse"},a["&."+li.left]=((r={left:kr.default})[s.breakpoints.up("sm")]={alignItems:"flex-start"},r[s.breakpoints.down("sm")]={left:"16px"},r),a["&."+li.right]=((i={right:kr.default})[s.breakpoints.up("sm")]={alignItems:"flex-end"},i[s.breakpoints.down("sm")]={right:"16px"},i),a["&."+li.center]=((o={left:"50%",transform:"translateX(-50%)"})[s.breakpoints.up("sm")]={alignItems:"center"},o),a}),di=function(e){var t=e.className,n=e.anchorOrigin,r=e.dense,i=_r(e,["className","anchorOrigin","dense"]),o=jn(li[n.vertical],li[n.horizontal],li.root,t,r&&li.rootDense);return We.createElement(ci,Object.assign({className:o},i))},ui=We.memo(di),pi=function(e){var t,n,r,i,o;function a(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){void 0===t&&(t={});var r=t,i=r.key,o=r.preventDuplicate,a=_r(r,["key","preventDuplicate"]),s=Lr(i),l=s?i:(new Date).getTime()+Math.random(),c=function(e,t,n){return function(r){return"autoHideDuration"===r?Ir(e.autoHideDuration)?e.autoHideDuration:Ir(t.autoHideDuration)?t.autoHideDuration:Or.autoHideDuration:e[r]||t[r]||n[r]}}(a,n.props,Or),d=wr({key:l},a,{message:e,open:!0,entered:!1,requestClose:!1,variant:c("variant"),anchorOrigin:c("anchorOrigin"),autoHideDuration:c("autoHideDuration")});return a.persist&&(d.autoHideDuration=void 0),n.setState(function(t){if(void 0===o&&n.props.preventDuplicate||o){var r=function(t){return s?t.key===i:t.message===e},a=t.queue.findIndex(r)>-1,l=t.snacks.findIndex(r)>-1;if(a||l)return t}return n.handleDisplaySnack(wr({},t,{queue:[].concat(t.queue,[d])}))}),l},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?wr({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?wr({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,Pr.MAXSNACK,e.key),n.props.onClose&&n.props.onClose(null,Pr.MAXSNACK,e.key),wr({},e,{open:!1})):wr({},e,{requestClose:!0}))});return wr({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!Lr(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.key===r?wr({},e,{entered:!0}):wr({},e)})}})},n.handleCloseSnack=function(e,t,r){if(n.props.onClose&&n.props.onClose(e,t,r),t!==Pr.CLICKAWAY){var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.key===r?e.entered?wr({},e,{open:!1}):wr({},e,{requestClose:!0}):wr({},e)}),queue:n.filter(function(e){return e.key!==r})}})}},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.key===e});Lr(e)&&t&&t.onClose&&t.onClose(null,Pr.INSTRUCTED,e),n.handleCloseSnack(null,Pr.INSTRUCTED,e)},n.handleExitedSnack=function(e,t,r){var i=t||r;if(!Lr(i))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var t=n.processQueue(wr({},e,{snacks:e.snacks.filter(function(e){return e.key!==i})}));return 0===t.queue.length?t:n.handleDismissOldest(t)})},n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(Cr(n)),closeSnackbar:n.closeSnackbar.bind(Cr(n))}},n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.iconVariant,i=n.dense,o=void 0===i?Or.dense:i,a=n.hideIconVariant,s=void 0===a?Or.hideIconVariant:a,l=n.domRoot,c=n.children,d=n.classes,u=void 0===d?{}:d,p=_r(n,["maxSnack","preventDuplicate","variant","anchorOrigin","iconVariant","dense","hideIconVariant","domRoot","children","classes"]),h=this.state.snacks.reduce(function(e,t){var n,r,i=(r=t.anchorOrigin,""+Tr(r.vertical)+Tr(r.horizontal)),o=e[i]||[];return wr({},e,((n={})[i]=[].concat(o,[t]),n))},{}),m=Object.keys(h).map(function(t){var n=h[t];return We.createElement(ui,{key:t,dense:o,anchorOrigin:n[0].anchorOrigin,className:jn(u.containerRoot,u[Dr(t)])},n.map(function(t){return We.createElement(ii,Object.assign({},p,{key:t.key,snack:t,dense:o,iconVariant:r,hideIconVariant:s,classes:Er(u),onClose:e.handleCloseSnack,onExited:Kr([e.handleExitedSnack,e.props.onExited]),onEntered:Kr([e.handleEnteredSnack,e.props.onEntered])}))}))});return We.createElement(Sr.Provider,{value:t},c,l?(0,ut.createPortal)(m,l):m)},r=a,(i=[{key:"maxSnack",get:function(){return this.props.maxSnack||Or.maxSnack}}])&&jr(r.prototype,i),o&&jr(r,o),a}(We.Component),hi=function(){return(0,We.useContext)(Sr)};function mi(){return mi=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},mi.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Jr||(Jr={}));const fi="popstate";function gi(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function vi(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(ba){}}}function xi(e,t){return{usr:e.state,key:e.key,idx:t}}function yi(e,t,n,r){return void 0===n&&(n=null),mi({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?ji(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function bi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function ji(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function wi(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Jr.Pop,l=null,c=d();function d(){return(a.state||{idx:null}).idx}function u(){s=Jr.Pop;let e=d(),t=null==e?null:e-c;c=e,l&&l({action:s,location:h.location,delta:t})}function p(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:bi(e);return n=n.replace(/ $/,"%20"),gi(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,a.replaceState(mi({},a.state,{idx:c}),""));let h={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(fi,u),l=e,()=>{i.removeEventListener(fi,u),l=null}},createHref:e=>t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=Jr.Push;let r=yi(h.location,e,t);n&&n(r,e),c=d()+1;let u=xi(r,c),p=h.createHref(r);try{a.pushState(u,"",p)}catch(m){if(m instanceof DOMException&&"DataCloneError"===m.name)throw m;i.location.assign(p)}o&&l&&l({action:s,location:h.location,delta:1})},replace:function(e,t){s=Jr.Replace;let r=yi(h.location,e,t);n&&n(r,e),c=d();let i=xi(r,c),u=h.createHref(r);a.replaceState(i,"",u),o&&l&&l({action:s,location:h.location,delta:0})},go:e=>a.go(e)};return h}var _i;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(_i||(_i={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function Ci(e,t,n){return void 0===n&&(n="/"),Si(e,t,n,!1)}function Si(e,t,n,r){let i=$i(("string"===typeof t?ji(t):t).pathname||"/",n);if(null==i)return null;let o=Ai(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let a=null;for(let s=0;null==a&&s<o.length;++s){let e=Fi(i);a=Li(o[s],e,r)}return a}function Ai(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(gi(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=Vi([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(gi(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Ai(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Ni(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of ki(e.path))i(e,t,r);else i(e,t)}),t}function ki(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=ki(r.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),i&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}const Mi=/^:[\w-]+$/,Oi=3,Ti=2,Ei=1,Pi=10,Di=-2,Ri=e=>"*"===e;function Ni(e,t){let n=e.split("/"),r=n.length;return n.some(Ri)&&(r+=Di),t&&(r+=Ti),n.filter(e=>!Ri(e)).reduce((e,t)=>e+(Mi.test(t)?Oi:""===t?Ei:Pi),r)}function Li(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===o?t:t.slice(o.length)||"/",d=Ii({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),u=e.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=Ii({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:Vi([o,d.pathname]),pathnameBase:Ui(Vi([o,d.pathnameBase])),route:u}),"/"!==d.pathnameBase&&(o=Vi([o,d.pathnameBase]))}return a}function Ii(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);vi("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1),l=r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:o,pathnameBase:a,pattern:e}}function Fi(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return vi(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function $i(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Bi(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function zi(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function Hi(e,t){let n=zi(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function Wi(e,t,n,r){let i;void 0===r&&(r=!1),"string"===typeof e?i=ji(e):(i=mi({},e),gi(!i.pathname||!i.pathname.includes("?"),Bi("?","pathname","search",i)),gi(!i.pathname||!i.pathname.includes("#"),Bi("#","pathname","hash",i)),gi(!i.search||!i.search.includes("#"),Bi("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?ji(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:qi(r),hash:Gi(i)}}(i,o),c=s&&"/"!==s&&s.endsWith("/"),d=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}const Vi=e=>e.join("/").replace(/\/\/+/g,"/"),Ui=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),qi=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Gi=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Yi(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const Zi=["post","put","patch","delete"],Ki=(new Set(Zi),["get",...Zi]);new Set(Ki),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Xi(){return Xi=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},Xi.apply(this,arguments)}const Qi=We.createContext(null);const Ji=We.createContext(null);const eo=We.createContext(null);const to=We.createContext(null);const no=We.createContext({outlet:null,matches:[],isDataRoute:!1});const ro=We.createContext(null);function io(){return null!=We.useContext(to)}function oo(){return io()||gi(!1),We.useContext(to).location}function ao(e){We.useContext(eo).static||We.useLayoutEffect(e)}function so(){let{isDataRoute:e}=We.useContext(no);return e?function(){let{router:e}=yo(vo.UseNavigateStable),t=jo(xo.UseNavigateStable),n=We.useRef(!1);return ao(()=>{n.current=!0}),We.useCallback(function(r,i){void 0===i&&(i={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,Xi({fromRouteId:t},i)))},[e,t])}():function(){io()||gi(!1);let e=We.useContext(Qi),{basename:t,future:n,navigator:r}=We.useContext(eo),{matches:i}=We.useContext(no),{pathname:o}=oo(),a=JSON.stringify(Hi(i,n.v7_relativeSplatPath)),s=We.useRef(!1);ao(()=>{s.current=!0});let l=We.useCallback(function(n,i){if(void 0===i&&(i={}),!s.current)return;if("number"===typeof n)return void r.go(n);let l=Wi(n,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Vi([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)},[t,r,a,o,e]);return l}()}function lo(){let{matches:e}=We.useContext(no),t=e[e.length-1];return t?t.params:{}}function co(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=We.useContext(eo),{matches:i}=We.useContext(no),{pathname:o}=oo(),a=JSON.stringify(Hi(i,r.v7_relativeSplatPath));return We.useMemo(()=>Wi(e,JSON.parse(a),o,"path"===n),[e,a,o,n])}function uo(e,t,n,r){io()||gi(!1);let{navigator:i}=We.useContext(eo),{matches:o}=We.useContext(no),a=o[o.length-1],s=a?a.params:{},l=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let c,d=oo();if(t){var u;let e="string"===typeof t?ji(t):t;"/"===l||(null==(u=e.pathname)?void 0:u.startsWith(l))||gi(!1),c=e}else c=d;let p=c.pathname||"/",h=p;if("/"!==l){let e=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=Ci(e,{pathname:h});let f=go(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:Vi([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Vi([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,n,r);return t&&f?We.createElement(to.Provider,{value:{location:Xi({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Jr.Pop}},f):f}function po(){let e=function(){var e;let t=We.useContext(ro),n=bo(xo.UseRouteError),r=jo(xo.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=Yi(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r};return We.createElement(We.Fragment,null,We.createElement("h2",null,"Unexpected Application Error!"),We.createElement("h3",{style:{fontStyle:"italic"}},t),n?We.createElement("pre",{style:i},n):null,null)}const ho=We.createElement(po,null);class mo extends We.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?We.createElement(no.Provider,{value:this.props.routeContext},We.createElement(ro.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fo(e){let{routeContext:t,match:n,children:r}=e,i=We.useContext(Qi);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),We.createElement(no.Provider,{value:t},r)}function go(e,t,n,r){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,s=null==(i=n)?void 0:i.errors;if(null!=s){let e=a.findIndex(e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id]));e>=0||gi(!1),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let e=a[d];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=d),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){l=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let o,d=!1,u=null,p=null;n&&(o=s&&r.route.id?s[r.route.id]:void 0,u=r.route.errorElement||ho,l&&(c<0&&0===i?(!function(e,t){t||wo[e]||(wo[e]=!0)}("route-fallback",!1),d=!0,p=null):c===i&&(d=!0,p=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=o?u:d?p:r.route.Component?We.createElement(r.route.Component,null):r.route.element?r.route.element:e,We.createElement(fo,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?We.createElement(mo,{location:n.location,revalidation:n.revalidation,component:u,error:o,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()},null)}var vo=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(vo||{}),xo=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(xo||{});function yo(e){let t=We.useContext(Qi);return t||gi(!1),t}function bo(e){let t=We.useContext(Ji);return t||gi(!1),t}function jo(e){let t=function(){let e=We.useContext(no);return e||gi(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||gi(!1),n.route.id}const wo={};function _o(e,t){null==e||e.v7_startTransition,void 0===(null==e?void 0:e.v7_relativeSplatPath)&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}Ve.startTransition;function Co(e){let{to:t,replace:n,state:r,relative:i}=e;io()||gi(!1);let{future:o,static:a}=We.useContext(eo),{matches:s}=We.useContext(no),{pathname:l}=oo(),c=so(),d=Wi(t,Hi(s,o.v7_relativeSplatPath),l,"path"===i),u=JSON.stringify(d);return We.useEffect(()=>c(JSON.parse(u),{replace:n,state:r,relative:i}),[c,u,i,n,r]),null}function So(e){gi(!1)}function Ao(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Jr.Pop,navigator:o,static:a=!1,future:s}=e;io()&&gi(!1);let l=t.replace(/^\/*/,"/"),c=We.useMemo(()=>({basename:l,navigator:o,static:a,future:Xi({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);"string"===typeof r&&(r=ji(r));let{pathname:d="/",search:u="",hash:p="",state:h=null,key:m="default"}=r,f=We.useMemo(()=>{let e=$i(d,l);return null==e?null:{location:{pathname:e,search:u,hash:p,state:h,key:m},navigationType:i}},[l,d,u,p,h,m,i]);return null==f?null:We.createElement(eo.Provider,{value:c},We.createElement(to.Provider,{children:n,value:f}))}function ko(e){let{children:t,location:n}=e;return uo(Mo(t),n)}new Promise(()=>{});We.Component;function Mo(e,t){void 0===t&&(t=[]);let n=[];return We.Children.forEach(e,(e,r)=>{if(!We.isValidElement(e))return;let i=[...t,r];if(e.type===We.Fragment)return void n.push.apply(n,Mo(e.props.children,i));e.type!==So&&gi(!1),e.props.index&&e.props.children&&gi(!1);let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Mo(e.props.children,i)),n.push(o)}),n}function Oo(){return Oo=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},Oo.apply(this,arguments)}function To(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Eo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(ba){}new Map;const Po=Ve.startTransition;pt.flushSync,Ve.useId;function Do(e){let{basename:t,children:n,future:r,window:i}=e,o=We.useRef();var a;null==o.current&&(o.current=(void 0===(a={window:i,v5Compat:!0})&&(a={}),wi(function(e,t){let{pathname:n,search:r,hash:i}=e.location;return yi("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"===typeof t?t:bi(t)},null,a)));let s=o.current,[l,c]=We.useState({action:s.action,location:s.location}),{v7_startTransition:d}=r||{},u=We.useCallback(e=>{d&&Po?Po(()=>c(e)):c(e)},[c,d]);return We.useLayoutEffect(()=>s.listen(u),[s,u]),We.useEffect(()=>_o(r),[r]),We.createElement(Ao,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}const Ro="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,No=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lo=We.forwardRef(function(e,t){let n,{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:d,viewTransition:u}=e,p=To(e,Eo),{basename:h}=We.useContext(eo),m=!1;if("string"===typeof c&&No.test(c)&&(n=c,Ro))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=$i(t.pathname,h);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:m=!0}catch(ba){}let f=function(e,t){let{relative:n}=void 0===t?{}:t;io()||gi(!1);let{basename:r,navigator:i}=We.useContext(eo),{hash:o,pathname:a,search:s}=co(e,{relative:n}),l=a;return"/"!==r&&(l="/"===a?r:Vi([r,a])),i.createHref({pathname:l,search:s,hash:o})}(c,{relative:i}),g=function(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=void 0===t?{}:t,l=so(),c=oo(),d=co(e,{relative:a});return We.useCallback(t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==r?r:bi(c)===bi(d);l(e,{replace:n,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[c,l,d,r,i,n,e,o,a,s])}(c,{replace:a,state:s,target:l,preventScrollReset:d,relative:i,viewTransition:u});return We.createElement("a",Oo({},p,{href:n||f,onClick:m||o?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:l}))});var Io,Fo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Io||(Io={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Fo||(Fo={}));const $o=function(){var e;return{setAssignmentCells:function(e){localStorage.setItem("assignmentCells",JSON.stringify(e))},getAssignmentCells:function(){return JSON.parse(localStorage.getItem("assignmentCells"))},getTourState:function(){return JSON.parse(localStorage.getItem("tourState"))||{}},setTourState:function(e){localStorage.setItem("tourState",JSON.stringify((0,i.A)((0,i.A)({},this.getTourState()),e)))},clearTourState:function(){localStorage.setItem("tourState",JSON.stringify({}))},getService:function(){return e||(e=this)},setToken:function(e){localStorage.setItem("auth_data",JSON.stringify(e))},getAccessToken:function(){return JSON.parse(localStorage.getItem("auth_data"))},setUrl:function(e){localStorage.setItem("url_data",JSON.stringify(e))},getUrl:function(){return JSON.parse(localStorage.getItem("url_data"))},clearToken:function(){localStorage.removeItem("auth_data")},setAdminToken:function(e){localStorage.setItem("admin_auth_data",JSON.stringify(e))},getAdminAccessToken:function(){return JSON.parse(localStorage.getItem("admin_auth_data"))},clearAdminToken:function(){localStorage.removeItem("admin_auth_data")},getHeadCellsPatient:function(){return JSON.parse(localStorage.getItem("headCellsPatient"))},setHeadCellsPatient:function(e){localStorage.setItem("headCellsPatient",JSON.stringify(e))},getHeadCellsPrescription:function(){return JSON.parse(localStorage.getItem("headCellsPrescription"))},setHeadCellsPrescription:function(e){localStorage.setItem("headCellsPrescription",JSON.stringify(e))},getHeadCellsTemplates:function(){return JSON.parse(localStorage.getItem("headCellsTemplates"))},setHeadCellsTemplates:function(e){localStorage.setItem("headCellsTemplates",JSON.stringify(e))},getTemplateDetailsHeadcells:function(){return JSON.parse(localStorage.getItem("tempDetailsHeadCells"))},setTemplateDetailsHeadcells:function(e){localStorage.setItem("tempDetailsHeadCells",JSON.stringify(e))},getScheduleHeadcells:function(){return JSON.parse(localStorage.getItem("scheduleHeadCells"))},setScheduleHeadcells:function(e){localStorage.setItem("scheduleHeadCells",JSON.stringify(e))},getProgramScheduleHeadcells:function(){return JSON.parse(localStorage.getItem("programScheduleHeadCells"))},setProgramScheduleHeadcells:function(e){localStorage.setItem("programScheduleHeadCells",JSON.stringify(e))},getAllProgramsCells:function(){return JSON.parse(localStorage.getItem("AllProgramsCells"))},setAllProgramsCells:function(e){localStorage.setItem("AllProgramsCells",JSON.stringify(e))},getLogsCell:function(){return JSON.parse(localStorage.getItem("LogsCell"))},setLogsCell:function(e){localStorage.setItem("LogsCell",JSON.stringify(e))},getUsersHeadCells:function(){return JSON.parse(localStorage.getItem("UsersHeadCells"))},setUsersHeadCells:function(e){localStorage.setItem("UsersHeadCells",JSON.stringify(e))},getProvidersHeadCells:function(){return JSON.parse(localStorage.getItem("UsersHeadCells"))},setProvidersHeadCells:function(e){localStorage.setItem("UsersHeadCells",JSON.stringify(e))},getProgramRulesHeadcells:function(){return JSON.parse(localStorage.getItem("programRulesHeadCells"))},setProgramRulesHeadcells:function(e){localStorage.setItem("programRulesHeadCells",JSON.stringify(e))},getRolesHeadcells:function(){return JSON.parse(localStorage.getItem("rolesHeadCells"))},setRolesHeadcells:function(e){localStorage.setItem("rolesHeadCells",JSON.stringify(e))},getAssignedProgramsHeadcells:function(){return JSON.parse(localStorage.getItem("assignedProgramsHeadCells"))},setAssignedProgramsHeadcells:function(e){localStorage.setItem("assignedProgramsHeadCells",JSON.stringify(e))},getAssignedRolesHeadcells:function(){return JSON.parse(localStorage.getItem("assignedRolesHeadCells"))},setAssignedRolesHeadcells:function(e){localStorage.setItem("assignedRolesHeadCells",JSON.stringify(e))},getMedicalHistoryHeadcells:function(){return JSON.parse(localStorage.getItem("medicalHistoryHeadCells"))},setMedicalHistoryHeadcells:function(e){localStorage.setItem("medicalHistoryHeadCells",JSON.stringify(e))},getResolvedAlertsHeadcells:function(){return JSON.parse(localStorage.getItem("resolvedAlertsHeadCells"))},setResolvedAlertsHeadcells:function(e){localStorage.setItem("resolvedAlertsHeadCells",JSON.stringify(e))},getPatientRulesHeadcells:function(){return JSON.parse(localStorage.getItem("patientRulesHeadCells"))},setPatientRulesHeadcells:function(e){localStorage.setItem("patientRulesHeadCells",JSON.stringify(e))},getTabPatient:function(){return JSON.parse(localStorage.getItem("patient_tab"))},setTabPatient:function(e){localStorage.setItem("patient_tab",JSON.stringify(e))},getPatientTableView:function(){return JSON.parse(localStorage.getItem("appUI"))},setPatientTableView:function(e){localStorage.setItem("appUI",JSON.stringify(e))},getPatientDefaultCourse:function(){return JSON.parse(localStorage.getItem("course"))},setPatientDefaultCourse:function(e){localStorage.setItem("course",JSON.stringify(e))},getPatientDefaultCourseGlucose:function(){return JSON.parse(localStorage.getItem("course_glucose"))},setPatientDefaultCourseGlucose:function(e){localStorage.setItem("course_glucose",JSON.stringify(e))},getFilterDate:function(){return JSON.parse(localStorage.getItem("filterDate"))},setFilterDate:function(e){localStorage.setItem("filterDate",JSON.stringify(e))},getFollowupCell:function(){return JSON.parse(localStorage.getItem("FollowupCells"))},setFollowupCell:function(e){localStorage.setItem("FollowupCells",JSON.stringify(e))}}}(),Bo="APP",zo="HEADER",Ho="PATIENT_TAB",Wo="LOADER",Vo="MESSAGE",Uo="LIST_GRID_VIEW",qo="DASHBOARD",Go="NOTIFICATIONS",Yo="PROGRAMS",Zo=e=>t=>{t({type:Vo,data:e})};function Ko(e,t){if(null==e)return{};var n,r,i=(0,nn.A)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Xo=n(40854),Qo=n.n(Xo),Jo=n(53536),ea=n(54320),ta=n.n(ea);const na=e=>t=>{t({type:Wo,data:e})};var ra=n(72450),ia=n(33097),oa=n.n(ia),aa=n(86178),sa=n.n(aa);const la={program:"/rpmcore/programs",schedules:"schedules"},ca={patients:"/rpmcore/patients",patient_course:"/rpmcore/patient-course",utility:"/rpmcore/utility",provider:"rpmcore/provider/assignment"},da={devices_list:"devices"},ua={medical:"medical-history",notes:"medical-history/patient-note",prescription:"medical-history/patient-prescription",template:"medical-history/template"},pa={by_patient:"reports/by-patient",by_course:"reports/by-schedule",consultation:"reports/doctor-report"},ha={refresh:"/authgateway/api/token",logout:"/authgateway/api/logout"},ma={INTROSPECT:"/agm/introspect/self",ROLES:"/agm/roles",USERS:"/agm/users",UPDATEPASSWORD:"/agm/self/update-password",GROUP:"/agm/groups",ACTIONS:"/actionsvc/actions",POLICY:"/agm/policies"},fa={logs:"/auditing/v2"},ga={WELLNESS_GOAL:"wellness-goal-manager/wellness-goal"},va={EXERCISE_GOAL:"wellness-goal-manager/workout-plan",ENUM:"wellness-goal-manager/api/enum",GYM_EQUIPMENTS:"wellness-goal-manager/api/gym-equipment"},xa="/templates",ya="/master-data-service/";function ba(e){this.message=e}ba.prototype=new Error,ba.prototype.name="InvalidCharacterError";var ja="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new ba("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,a="";r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function wa(e){this.message=e}wa.prototype=new Error,wa.prototype.name="InvalidTokenError";const _a=function(e,t){if("string"!=typeof e)throw new wa("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(ja(e).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}(t)}catch(e){return ja(t)}}(e.split(".")[n]))}catch(e){throw new wa("Invalid token specified: "+e.message)}};n(56434);var Ca=n(93950),Sa=n.n(Ca),Aa=n(62117),ka=n.n(Aa),Ma=(n(61460),n(69613)),Oa=n.n(Ma);n(39829);const Ta="%[a-f0-9]{2}",Ea=new RegExp("("+Ta+")|([^%]+?)","gi"),Pa=new RegExp("("+Ta+")+","gi");function Da(e,t){try{return[decodeURIComponent(e.join(""))]}catch(i){}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],Da(n),Da(r))}function Ra(e){try{return decodeURIComponent(e)}catch(t){let n=e.match(Ea)||[];for(let r=1;r<n.length;r++)n=(e=Da(n,r).join("")).match(Ea)||[];return e}}function Na(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch(t){return function(e){const t={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"};let n=Pa.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(i){const e=Ra(n[0]);e!==n[0]&&(t[n[0]]=e)}n=Pa.exec(e)}t["%C2"]="\ufffd";const r=Object.keys(t);for(const o of r)e=e.replace(new RegExp(o,"g"),t[o]);return e}(e)}}function La(e,t){if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}function Ia(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);null!==t&&void 0!==t&&t.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){t(r,e[r],e)&&Object.defineProperty(n,r,i)}}return n}const Fa=e=>null===e||void 0===e,$a=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())),Ba=Symbol("encodeFragmentIdentifier");function za(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function Ha(e,t){return t.encode?t.strict?$a(e):encodeURIComponent(e):e}function Wa(e,t){return t.decode?Na(e):e}function Va(e){return Array.isArray(e)?e.sort():"object"===typeof e?Va(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function Ua(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function qa(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function Ga(e){const t=(e=Ua(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function Ya(e,t){za((t=(0,i.A)({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"===typeof n&&n.includes(e.arrayFormatSeparator),o="string"===typeof n&&!i&&Wa(n,e).includes(e.arrayFormatSeparator);n=o?Wa(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map(t=>Wa(t,e)):null===n?n:Wa(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!i)return void(r[t]=n?Wa(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>Wa(t,e));void 0!==r[t]?r[t]=[...r[t],...o]:r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;const e=t.decode?i.replace(/\+/g," "):i;let[o,a]=La(e,"=");void 0===o&&(o=e),a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:Wa(a,t),n(Wa(o,t),a,r)}for(const[i,o]of Object.entries(r))if("object"===typeof o&&null!==o)for(const[e,n]of Object.entries(o))o[e]=qa(n,t);else r[i]=qa(o,t);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return e[t]=Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?Va(n):n,e},Object.create(null))}function Za(e,t){if(!e)return"";za((t=(0,i.A)({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&Fa(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[Ha(t,e),"[",i,"]"].join("")]:[...n,[Ha(t,e),"[",Ha(i,e),"]=",Ha(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[Ha(t,e),"[]"].join("")]:[...n,[Ha(t,e),"[]=",Ha(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[Ha(t,e),":list="].join("")]:[...n,[Ha(t,e),":list=",Ha(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[Ha(n,e),t,Ha(i,e)].join("")]:[[r,Ha(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,Ha(t,e)]:[...n,[Ha(t,e),"=",Ha(r,e)].join("")]}}(t),o={};for(const[i,s]of Object.entries(e))n(i)||(o[i]=s);const a=Object.keys(o);return!1!==t.sort&&a.sort(t.sort),a.map(n=>{const i=e[n];return void 0===i?"":null===i?Ha(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?Ha(n,t)+"[]":i.reduce(r(n),[]).join("&"):Ha(n,t)+"="+Ha(i,t)}).filter(e=>e.length>0).join("&")}function Ka(e,t){var n,r;t=(0,i.A)({decode:!0},t);let[o,a]=La(e,"#");return void 0===o&&(o=e),(0,i.A)({url:null!==(n=null===(r=o)||void 0===r||null===(r=r.split("?"))||void 0===r?void 0:r[0])&&void 0!==n?n:"",query:Ya(Ga(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:Wa(a,t)}:{})}function Xa(e,t){t=(0,i.A)({encode:!0,strict:!0,[Ba]:!0},t);const n=Ua(e.url).split("?")[0]||"",r=Ga(e.url);let o=Za((0,i.A)((0,i.A)({},Ya(r,{sort:!1})),e.query),t);o&&(o="?".concat(o));let a=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if(e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,a=t[Ba]?r.hash:"#".concat(e.fragmentIdentifier)}return"".concat(n).concat(o).concat(a)}function Qa(e,t,n){n=(0,i.A)({parseFragmentIdentifier:!0,[Ba]:!1},n);const{url:r,query:o,fragmentIdentifier:a}=Ka(e,n);return Xa({url:r,query:Ia(o,t),fragmentIdentifier:a},n)}function Ja(e,t,n){const r=Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n);return Qa(e,r,n)}const es=e,ts=(e,t)=>{if(e&&t){const n=sa()(e).startOf("day");return sa()(t).endOf("day").diff(n,"days")+parseInt(1)}return 0},ns=(e,t)=>{const n=sa()(e).startOf("day");return sa()(n).add(t,"days")-1},rs=function(e){return(e||"").trim()},is=function(e){if(as(e))return e;if("object"===typeof e&&!Array.isArray(e)){let t={};return Object.entries(e).map(e=>{if("string"===typeof e[1])t=(0,i.A)((0,i.A)({},t),{},{[e[0]]:e[1].trim()});else if("object"===typeof e[1]){let n=is(e[1]);t=(0,i.A)((0,i.A)({},t),{},{[e[0]]:n})}else t=(0,i.A)((0,i.A)({},t),{},{[e[0]]:e[1]})}),t}if("object"===typeof e&&Array.isArray(e)){let t=[];return e.map(e=>{if("string"===typeof e)t.push(e.trim());else if("object"===typeof e){let n=is(e);t.push(n)}else t.push(e)}),t}},os=function(e,t){let n={};return Object.keys(t).forEach(r=>{n[r]=cs(e[r])?t[r]:e[r]}),n},as=ta(),ss=Sa(),ls=oa(),cs=function(e){return null===e||void 0===e||""===e},ds=function(e,t){const n={};return Object.keys(e).forEach(r=>{n[r]=cs(t[r])?e[r]:t[r]}),n},us=function(e,t){return sa()(e).format(t)},ps=function(e,t,n){const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return t.setFullYear(t.getFullYear()-e),t}(e).getFullYear();return new Date(r,t,n)},hs=function(e){if(!e||0===e)return{years:"NA"};const t=sa()().valueOf(),n=sa()(e).valueOf();return{years:Math.round(Math.abs(sa().duration(n-t).asYears()))}},ms=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.charAt(0).toUpperCase()+e.slice(1)},fs=(e,t)=>{const n=e.split(":"),r=sa()().utc();return r.set({hour:n[0],minute:n[1],second:0,millisecond:0}),t?r.add(t,"seconds").local().format("HH:mm"):r.local().format("HH:mm")},gs=e=>{const t=e.split(":"),n=sa()().utc();return n.set({hour:t[0],minute:t[1],second:0,millisecond:0}),n.local()},vs=function(){return es.parse(location.search)},xs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=e.filter(e=>-1===t.indexOf(e)),r=t.filter(t=>-1===e.indexOf(t));return n.concat(r)},ys=e=>{switch(e){case"active":return"success";case"inactive":return"error";case"upcoming":return"warning";default:return"default"}},bs=(e,t,n,r)=>({[t]:function(){let t=[];for(let o=0;o<r;o++)t.push({[n]:e[n].map(e=>{const t=Object.keys(e).toString();return(0,i.A)((0,i.A)({},e),{},{[t]:[e[t][0].split("0").join(o),e[t][1]]})})});return t}()}),js=(e,t)=>{let n=[];for(let r=0;r<t;r++)n.push("Data[".concat(r,"].values.").concat(e)),r!==t-1&&n.push('" "');return n},ws=async e=>e&&e.lastModifiedDate?new Promise(t=>{const n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{const e=n.result.split(",")[1];t(e)}}):null,_s=async(e,t)=>{if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null},Cs=(e,t,n)=>({[t]:function(){let t=[];const r=Object.keys(e).toString();for(let o=0;o<n;o++)t.push((0,i.A)((0,i.A)({},e),{},{[r]:[e[r][0].split("0").join(o),e[r][1]]}));return t}()}),Ss=e=>{var t;const n=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.filter(e=>"systolic"===e.data_name||"diastolic"===e.data_name),r=null===n||void 0===n?void 0:n.map(e=>e.text),i=[...new Set(r)];return i.length>1?i[i.length-1]:i.join(" ")},As=e=>{var t;const n=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.filter(e=>"systolic"!==e.data_name&&"diastolic"!==e.data_name&&"pulse"!==e.data_name),r=null===n||void 0===n?void 0:n.map(e=>e.text),i=[...new Set(r)];return i.length>1?i[i.length-1]:i.join(" ")},ks=(e,t)=>e.reduce(function(e,n){return-1===e.indexOf(n[t])&&e.push(n[t]),e},[]),Ms=e=>{var t;const n=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.filter(e=>"pulse"===e.data_name),r=null===n||void 0===n?void 0:n.map(e=>e.text),i=[...new Set(r)];return i.length>1?i[i.length-1]:i.join(" ")},Os=(e,t)=>{if(as(e)||as(t))return null;const[n,r]=null===e||void 0===e?void 0:e.split(".");let i=2.54*[12*Number(n)+Number(r)],o=1e4*[t/(Number(i)*Number(i))];return""===t?"--":(o=Number.isFinite(o)?o:0,o.toFixed(2))},Ts=(e,t)=>sa().utc("2023-01-01T".concat(e,":00")).clone().utcOffset("+05:30").format(t),Es=e=>{const t=sa()().valueOf(),n=sa()(e).valueOf(),r=Math.round(Math.abs(sa().duration(n-t).asYears()));return r||"NA"},Ps=e=>{if(!e)return"";const[t,n]=e.split("@");return(t.length>2?t[0]+"*".repeat(t.length-2)+t[t.length-1]:t[0]+"*")+"@"+n},Ds=e=>e?e.length<=2?e[0]+"*":e[0]+"*".repeat(e.length-2)+e[e.length-1]:"",Rs=e=>t=>t({type:qo,payload:e}),Ns=function(e){var t;null!==(null===e||void 0===e?void 0:e.last_vital_frames)&&(null===e||void 0===e||null===(t=e.last_vital_frames)||void 0===t||t.forEach(e=>{e.ts=sa()(e.ts).format("DD MMM YYYY hh:mm A")}),e.birth_date=sa()(e.birth_date).format("DD/MM/YYYY"))},Ls=function(e){null===(null===e||void 0===e?void 0:e.ts)&&null===e.dismissed_at||(e.ts=sa()(e.ts).format("DD MMM YYYY hh:mm A"),e.dismissed_at=sa()(e.dismissed_at).format("DD MMM YYYY hh:mm A"))},Is=function(e){null!==(null===e||void 0===e?void 0:e.date)&&(e.date=sa()(e.date).format("DD MMM YYYY"))},Fs=function(e){null!==(null===e||void 0===e?void 0:e.last_activity)&&(e.last_activity=sa()(e.last_activity).format("DD MMM YYYY hh:mm A"))},$s=(e,t)=>async n=>{let r;var o;(n(na(!0)),t.email)?r=(0,i.A)({},t):r={birth_date:t.birth_date,device:t.device,first_name:t.first_name,last_name:t.last_name,mobile:t.mobile,observer:t.observer,profile:{gender:null===t||void 0===t||null===(o=t.profile)||void 0===o?void 0:o.gender}};try{const t="".concat(ca.patients,"/").concat(e);return await du(t,r)}finally{n(na(!1))}},Bs=e=>async t=>{t(na(!0));let n="";e.flag&&"ALL"!==e.flag&&(n="COMPLIANT"==e.flag?"&excludedFlag=NON_COMPLIANT":"&flag=".concat(e.flag));try{var r;const t="".concat(ca.patients,"/").concat(e.program_code,"?").concat(n,"&q=").concat(rs(null===e||void 0===e||null===(r=e.filterState)||void 0===r?void 0:r.patientName),"&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||"");return await cu(t,{})}catch(i){return i}finally{t(na(!1))}},zs=(e,t)=>async n=>{n(na(!0));try{var r,i;const n="".concat(ca.patients,"/").concat(e||"","/all-patientList?&q=").concat(rs(null===t||void 0===t||null===(r=t.newFilterState)||void 0===r?void 0:r.patientName),"&userMobile=").concat(rs(null===t||void 0===t||null===(i=t.newFilterState)||void 0===i?void 0:i.userMobile),"&page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"");return await cu(n,{})}catch(o){return o}finally{n(na(!1))}},Hs=e=>async()=>{try{return await cu("".concat(ca.provider,"?programUrn=").concat(null===e||void 0===e?void 0:e.programUrn),{})}catch(t){return t}},Ws=e=>async t=>{t(na(!0));try{const t="".concat(ca.provider);return await du(t,e)}catch(n){return n}finally{t(na(!1))}},Vs=e=>async t=>{t(na(!0));try{const t="".concat(la.program,"/").concat((null===e||void 0===e?void 0:e.programId)||"","/compliance/compliant-info?status=").concat((null===e||void 0===e?void 0:e.status)||"");return await cu(t,{})}catch(n){return n}finally{t(na(!1))}},Us=e=>async t=>{t(na(!0));try{const t="".concat(la.schedules,"/-/").concat(e.programCode,"/read-course-vital");return await du(t,{patient_id:e.patientIds})}finally{t(na(!1))}},qs=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/").concat(t),r=await cu(n,{});return oa()(r,"data.content",[]).forEach(e=>Ns(e)),r}catch(r){return r}finally{n(na(!1))}},Gs=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/data/last-frame?dataNames=").concat(t),r=await cu(n,{});return oa()(r,"data.content",[]).forEach(e=>Ns(e)),r}catch(r){return r}finally{n(na(!1))}},Ys=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patient_course,"/compliant-info?patientCourseId=").concat(n,"&patientId=").concat(e,"&courseId=").concat(t),i=await cu(r,{});return oa()(i,"data.content",[]).forEach(e=>Ns(e)),i}catch(i){return i}finally{r(na(!1))}},Zs=e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(e.patient_id,"/data?dataNames=").concat(e.desease,"&start=").concat(e.duration[0],"&end=").concat(e.duration[1]),n=await cu(t,{});return oa()(n,"data",[]).forEach(e=>Ls(e)),n}catch(n){return n}finally{t(na(!1))}},Ks=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/").concat(t,"/rules?page=").concat(n.current_page||"","&perPage=").concat(n.per_page||"","&sortBy=").concat(n.sort_by||"","&sortOrder=").concat(n.sort_order||""),i=await cu(r,{});return oa()(i,"data.content",[]).forEach(e=>Ns(e)),i}finally{r(na(!1))}},Xs=(e,t)=>async n=>{n(na(!0));try{let n="".concat(ca.patients,"/").concat(e,"/alerts?dataName=").concat(t.vitalType||"","&page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"","&minTs=").concat(t.minTs||"","&maxTs=").concat(t.maxTs||"");t.includeDismissed&&(n+="&includeDismissed=".concat(t.includeDismissed));const r=await cu(n,{});return oa()(r,"data.content",[]).forEach(e=>Ls(e)),r}catch(r){return r}finally{n(na(!1))}},Qs=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/alerts/dismiss?alertId=").concat(t),i=await uu(r,n);return oa()(i,"data.content",[]).forEach(e=>Ls(e)),i}catch(i){return i}finally{r(na(!1))}},Js=(e,t,n)=>async r=>{r(na(!0));const o=(0,i.A)((0,i.A)({},n),{},{data_batch_size:"BATCH"===(null===n||void 0===n?void 0:n.processing_mode)?null===n||void 0===n?void 0:n.data_batch_size:"",status:!0,default_rule:!0});try{const n="".concat(ca.patients,"/").concat(e,"/").concat(t,"/rules");return await du(n,o)}finally{r(na(!1))}},el=e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(null===e||void 0===e?void 0:e.programId,"/").concat(null===e||void 0===e?void 0:e.patientId,"/rules/").concat(null===e||void 0===e?void 0:e.ruleId,"?rule_status=").concat(null===e||void 0===e?void 0:e.status,"&default_rule=").concat(null===e||void 0===e?void 0:e.defaultRule);return await uu(t,{})}finally{t(na(!1))}},tl=e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(null===e||void 0===e?void 0:e.programId,"/").concat(null===e||void 0===e?void 0:e.patientId,"/rules?vital=").concat(null===e||void 0===e?void 0:e.data_type,"&ruleId=").concat(null===e||void 0===e?void 0:e.ruleId);return await pu(t,{})}finally{t(na(!1))}},nl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/").concat(t,"/rules/").concat(n);return await cu(r,{})}catch(i){return i}finally{r(na(!1))}},rl=(e,t)=>async n=>{n(na(!0));try{const n="".concat(da.devices_list,"?association=").concat(t,"&q=").concat(rs(e.q),"&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||"","&search=").concat(e.search||""),r=await cu(n,{});return oa()(r,"data.content",[]).forEach(e=>Fs(e)),r}catch(r){return r}finally{n(na(!1))}},il=(e,t)=>async n=>{n(na(!0));try{const n="".concat(da.devices_list,"/associated-to/").concat(t,"?q=").concat(rs(e.q),"&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||""),r=await cu(n,{});return oa()(r,"data.content",[]).forEach(e=>Fs(e)),r}catch(r){return r}finally{n(na(!1))}},ol=(e,t)=>async n=>{n(na(!0));try{const r="".concat(la.schedules,"/-/").concat(t.programId,"/patient/").concat(t.patientId,"?q=").concat(rs(e.q)||"","&vital=").concat(e.filter||"","&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||""),i=await cu(r,{}),{data:o}=i,a={vitals:{bp:{course:null===o||void 0===o?void 0:o.filter(e=>"bp"===e.schedule.vital_name)},glucose:{course:null===o||void 0===o?void 0:o.filter(e=>"glucose"===e.schedule.vital_name)}}};return n(Rs(a)),i}catch(r){return r}finally{n(na(!1))}},al=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(e||"","/").concat(t||"","?kind=").concat(n.kind,"&page=").concat(n.current_page||"","&perPage=").concat(n.per_page||"","&sortBy=").concat(n.sort_by||"","&sortOrder=").concat(n.sort_order||"");return await cu(r,{})}finally{r(na(!1))}},sl=(e,t,n)=>async r=>{r(na(!0));try{var i;let a=new FormData;a.append("disease_name",null===n||void 0===n?void 0:n.disease_name),a.append("start_date",null===n||void 0===n?void 0:n.start_date),a.append("end_date",null===n||void 0===n?void 0:n.end_date),a.append("remark",null===n||void 0===n?void 0:n.remark),a.append("duration_unit",null===n||void 0===n?void 0:n.duration_unit),a.append("custom_duration",null===n||void 0===n?void 0:n.custom_duration),a.append("kind",null===n||void 0===n?void 0:n.kind),a.append("relationship",null===n||void 0===n?void 0:n.relationship);const s="".concat(ua.medical,"/").concat(e,"/").concat(t),l=await du(s,a);var o;if(Object.keys(null===n||void 0===n?void 0:n.upload).length||(null===n||void 0===n||null===(i=n.upload)||void 0===i?void 0:i.length))await r(cl(e,t,null===l||void 0===l||null===(o=l.data)||void 0===o?void 0:o.id,n));return l}finally{r(na(!1))}},ll=(e,t,n)=>async r=>{r(na(!0));try{var i;let a=new FormData;a.append("disease_name",null===n||void 0===n?void 0:n.disease_name),a.append("start_date",null===n||void 0===n?void 0:n.start_date),a.append("end_date",null===n||void 0===n?void 0:n.end_date),a.append("remark",null===n||void 0===n?void 0:n.remark),a.append("duration_unit",null===n||void 0===n?void 0:n.duration_unit),a.append("custom_duration",null===n||void 0===n?void 0:n.custom_duration),a.append("kind",null===n||void 0===n?void 0:n.kind),a.append("relationship",null===n||void 0===n?void 0:n.relationship);const s="".concat(ua.medical,"/").concat(e,"/").concat(t,"/").concat(null===n||void 0===n?void 0:n.id),l=await uu(s,a);var o;if(Object.keys(null===n||void 0===n?void 0:n.upload).length||(null===n||void 0===n||null===(i=n.upload)||void 0===i?void 0:i.length))await r(cl(e,t,null===l||void 0===l||null===(o=l.data)||void 0===o?void 0:o.id,n));return l}finally{r(na(!1))}},cl=(e,t,n,r)=>async i=>{i(na(!0));try{var o;let i=new FormData;null===r||void 0===r||null===(o=r.upload.local)||void 0===o||o.files.forEach(e=>{let t="".concat(e.name);i.append("upload",e,t)});const a="".concat(ua.medical,"/").concat(e,"/").concat(t,"/").concat(n,"/attach-files");return await du(a,i)}catch(a){return a}finally{i(na(!1))}},dl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(e,"/").concat(t,"/").concat(n);return await pu(r,{})}finally{r(na(!1))}},ul=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ua.medical,"/").concat(e,"/").concat(t,"/medical-question");return await cu(n,{})}finally{n(na(!1))}},pl=(e,t,n,r)=>async i=>{i(na(!0));try{const i="".concat(ua.medical,"/").concat(e,"/").concat(t,"/").concat(n,"/delete/").concat(r);return await pu(i,{})}finally{i(na(!1))}},hl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(e,"/").concat(t,"/download/").concat(null===n||void 0===n?void 0:n.id),i=await cu(r,{"Content-Type":"multipart/form-data",responseType:"arraybuffer"}),o=new Blob([null===i||void 0===i?void 0:i.data],{type:"octet/stream"}),a=new File([o],null===n||void 0===n?void 0:n.file_name,{type:"octet/stream"});return(0,ra.saveAs)(a),null===i||void 0===i?void 0:i.data}finally{r(na(!1))}},ml=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/alerts/delete?alertId=").concat(t);return await pu(n,{})}catch(r){return r}finally{n(na(!1))}},fl=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/data/").concat(t);return await pu(n,{})}catch(r){return r}finally{n(na(!1))}},gl=e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(e.patient_id,"/data?dataNames=").concat(e.disease,"&start=").concat(e.duration[0],"&end=").concat(e.duration[1]),n=await cu(t,{});return oa()(n,"data",[]).forEach(e=>Ls(e)),n}catch(n){return n}},vl=(e,t,n,r,i)=>async o=>{o(na(!0));try{const o="".concat(ua.notes,"/").concat(e,"/").concat(t,"?page=").concat(r.current_page||"","&perPage=").concat(r.per_page||"","&sortBy=").concat(r.sort_by||"","&sortOrder=").concat(r.sort_order,"&type=").concat(n.type||"","&vital=").concat(i.vital||"","&start=").concat(i.start_date?sa()(i.start_date).startOf("day").valueOf():"","&end=").concat(i.end_date?sa()(i.end_date).endOf("day").valueOf():"");return await cu(o,{})}finally{o(na(!1))}},xl=(e,t,n)=>async r=>{r(na(!0));try{var i;let a=new FormData;n.note&&a.append("note",null===n||void 0===n?void 0:n.note),n.vital&&a.append("vital",null===n||void 0===n?void 0:n.vital),a.append("type",null===n||void 0===n?void 0:n.type);const s="".concat(ua.notes,"/").concat(e,"/").concat(t),l=await du(s,a);var o;if(Object.keys(null===n||void 0===n?void 0:n.upload).length||(null===n||void 0===n||null===(i=n.upload)||void 0===i?void 0:i.length))await r(yl(e,t,null===l||void 0===l||null===(o=l.data)||void 0===o?void 0:o.id,n));return l}finally{r(na(!1))}},yl=(e,t,n,r)=>async i=>{i(na(!0));try{var o;let i=new FormData;null===r||void 0===r||null===(o=r.upload.local)||void 0===o||o.files.forEach(e=>{let t="".concat(e.name);i.append("upload",e,t)});const a="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(n,"/attach-files?noteType=").concat(null===r||void 0===r?void 0:r.type);return await du(a,i)}catch(a){return a}finally{i(na(!1))}},bl=(e,t,n)=>async r=>{r(na(!0));try{var i;let a=new FormData;n.note&&a.append("note",null===n||void 0===n?void 0:n.note),n.vital&&a.append("vital",null===n||void 0===n?void 0:n.vital),n.type&&a.append("type",null===n||void 0===n?void 0:n.type);const s="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(null===n||void 0===n?void 0:n.id,"/").concat(null===n||void 0===n?void 0:n.type),l=await uu(s,a);var o;if(Object.keys(null===n||void 0===n?void 0:n.upload).length||(null===n||void 0===n||null===(i=n.upload)||void 0===i?void 0:i.length))await r(yl(e,t,null===l||void 0===l||null===(o=l.data)||void 0===o?void 0:o.id,n));return l}finally{r(na(!1))}},jl=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(n.noteId,"/").concat(n.type);return await pu(r,{})}finally{r(na(!1))}},wl=(e,t,n)=>async r=>{r(na(!0));try{var i,o;const r="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(n.noteId,"/").concat(n.type,"/download/").concat(null===(i=n.fileData)||void 0===i?void 0:i.id),a=await cu(r,{"Content-Type":"multipart/form-data",responseType:"arraybuffer"}),s=new Blob([null===a||void 0===a?void 0:a.data],{type:"octet/stream"}),l=new File([s],null===(o=n.fileData)||void 0===o?void 0:o.file_name,{type:"octet/stream"});return(0,ra.saveAs)(l),null===a||void 0===a?void 0:a.data}finally{r(na(!1))}},_l=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.notes,"/").concat(e,"/").concat(t,"/").concat(n.noteId,"/").concat(n.type,"/delete/").concat(n.fileId);return await pu(r,{})}finally{r(na(!1))}},Cl=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ua.notes,"/").concat(e,"/").concat(t,"/note-types");return await cu(n)}finally{n(na(!1))}},Sl=(e,t,n,r)=>async i=>{try{const i="".concat(ua.prescription,"/").concat(e,"/").concat(t,"?page=").concat(n.current_page||"","&perPage=").concat(n.per_page||"","&sortBy=").concat(n.sort_by||"","&sortOrder=").concat(n.sort_order,"&vital=").concat(r.vital||"","&start=").concat(r.start_date?sa()(r.start_date).startOf("day").valueOf():"","&end=").concat(r.end_date?sa()(r.end_date).endOf("day").valueOf():"");return await cu(i,{})}finally{i(na(!1))}},Al=e=>async t=>{t(na(!0));try{const t="".concat(ua.medical,"/program/consultation-info?program=").concat(e);return await cu(t,{})}finally{t(na(!1))}},kl=(e,t,n)=>async r=>{try{const r="".concat(ua.prescription,"/").concat(e,"/").concat(t,"/").concat(n);return await cu(r,{})}finally{r(na(!1))}},Ml=e=>async t=>{try{const t="".concat(ua.medical,"/medicine-info?page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&q=").concat(e.q||"");return await cu(t,{})}finally{t(na(!1))}},Ol=(e,t)=>async n=>{n(na(!0));const r=await Dl(null===t||void 0===t?void 0:t.values),o=(0,i.A)((0,i.A)({},r),{},{auto_generate_flag:null===t||void 0===t?void 0:t.flag});try{const t="".concat(ua.template,"/").concat(e);return await du(t,o)}finally{n(na(!1))}},Tl=(e,t)=>async n=>{try{const n="".concat(ua.template,"/").concat(e,"/").concat(t);return await cu(n,{})}finally{n(na(!1))}},El=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(null===e||void 0===e?void 0:e.code,"/").concat(null===n||void 0===n?void 0:n.id,"/transfer-patient?newProgram=").concat(t,"&tenantId=").concat(null===n||void 0===n?void 0:n.tenantId);return await cu(r,{})}finally{r(na(!1))}},Pl=e=>{switch(e){case"5":return"1";case"6":return"2";case"7":return"3";default:return null}},Dl=async e=>{var t;const n={},r=sa()(null===e||void 0===e?void 0:e.followUpTime,["h:mm A"]).utc().format("HH:mm");null===e||void 0===e||e.medicationList.forEach(e=>{e.timing.forEach(t=>{const r=sa()(t.start_time).format("HH:mm"),i="".concat(r,"_").concat(e.repetition_kind),o=null!==t&&void 0!==t&&t.start_time?sa()(t.start_time).utc().format("HH:mm"):null;n[i]||(n[i]={start_time:o,repetition_kind:e.repetition_kind,stop_after:t.interval,every:Pl(e.frequency),medicines:[]}),n[i].medicines.push(e.id)})});const o=Object.values(n);return{vital:e.vital,name:e.templateName,complaints:null===e||void 0===e?void 0:e.complaintDetails,advices:null===e||void 0===e?void 0:e.advices,diagnosis:null===e||void 0===e?void 0:e.diagnosisDetails,course:null===e||void 0===e?void 0:e.course,tests:null===e||void 0===e||null===(t=e.tests)||void 0===t?void 0:t.map(e=>e.name),follow_up:{days:null===e||void 0===e?void 0:e.followUpDays,date:null===e||void 0===e?void 0:e.followUpDate,send_reminder_flag:!0,follow_up_reminder_date:null!==e&&void 0!==e&&e.followUpReminderDate?null===e||void 0===e?void 0:e.followUpReminderDate:null,reminder_time:r},status:!0,program:null===e||void 0===e?void 0:e.program,auto_generate_flag:!0,medications:await Promise.all(null===e||void 0===e?void 0:e.medicationList.map(async e=>{var t;return(0,i.A)((0,i.A)({},e),{},{medicine:null===e||void 0===e||null===(t=e.medicine)||void 0===t?void 0:t.medicine,image:await ws(null===e||void 0===e?void 0:e.image),start_date:sa()(null===e||void 0===e?void 0:e.start_date).format("MM/DD/YYYY")!==sa()().format("MM/DD/YYYY")?sa()(e.start_date).startOf("day").valueOf():sa()(e.start_date).valueOf(),end_date:sa()(e.end_date).endOf("day").valueOf()})})),intervals:o}},Rl=()=>async e=>{e(na(!0));try{const e="".concat(la.program,"/default-program");return await cu(e,{})}finally{e(na(!1))}};function Nl(e){let{width:t,height:n}=e;return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:t||24,height:n||24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M20.6543 2.66406H3.3457C2.32798 2.66406 1.5 3.45262 1.5 4.42188V15.8281C1.5 16.7974 2.32798 17.5859 3.3457 17.5859H9.30499L8.85381 20.1641H8.0625C7.72273 20.1641 7.44727 20.4264 7.44727 20.75C7.44727 21.0736 7.72273 21.3359 8.0625 21.3359H15.9375C16.2773 21.3359 16.5527 21.0736 16.5527 20.75C16.5527 20.4264 16.2773 20.1641 15.9375 20.1641H15.1462L14.695 17.5859H20.6543C21.672 17.5859 22.5 16.7974 22.5 15.8281V4.42188C22.5 3.45262 21.672 2.66406 20.6543 2.66406ZM13.8987 20.1641H10.1013L10.5524 17.5859H13.4476L13.8987 20.1641ZM21.2695 15.8281C21.2695 16.1512 20.9935 16.4141 20.6543 16.4141C20.2153 16.4141 3.86057 16.4141 3.3457 16.4141C3.00646 16.4141 2.73047 16.1512 2.73047 15.8281V4.42188C2.73047 4.09879 3.00646 3.83594 3.3457 3.83594H11.3848V4.5C11.3848 4.82359 11.6602 5.08594 12 5.08594C12.3398 5.08594 12.6152 4.82359 12.6152 4.5V3.83594H20.6543C20.9935 3.83594 21.2695 4.09879 21.2695 4.42188V15.8281Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M10.0312 10.1641C9.69148 10.1641 9.41602 10.4264 9.41602 10.75V12.6641H8.02148V8.875C8.02148 8.55141 7.74602 8.28906 7.40625 8.28906C7.06648 8.28906 6.79102 8.55141 6.79102 8.875V12.6641H5.39648V7C5.39648 6.67641 5.12102 6.41406 4.78125 6.41406C4.44148 6.41406 4.16602 6.67641 4.16602 7V13.25C4.16602 13.5736 4.44148 13.8359 4.78125 13.8359H10.0312C10.371 13.8359 10.6465 13.5736 10.6465 13.25V10.75C10.6465 10.4264 10.371 10.1641 10.0312 10.1641Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M16.2656 6.72656C14.298 6.72656 12.6973 8.25109 12.6973 10.125C12.6973 11.0479 13.0858 11.886 13.715 12.499C13.7432 12.5298 13.7419 12.5283 13.7729 12.5541C14.4166 13.1534 15.2965 13.5234 16.2656 13.5234C18.2332 13.5234 19.834 11.9989 19.834 10.125C19.834 8.25109 18.2332 6.72656 16.2656 6.72656ZM18.5208 9.53906H16.8809V7.97723C17.6762 8.1841 18.3036 8.7816 18.5208 9.53906ZM15.6504 7.97723V9.8823L14.2365 11.2288C13.4759 9.96559 14.1826 8.35906 15.6504 7.97723ZM15.1066 12.0575L16.5205 10.7109H18.5208C18.1192 12.1109 16.4312 12.7809 15.1066 12.0575Z",fill:"currentColor"})]})}function Ll(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M9.70828 8.66672H3.45828C2.65414 8.66672 2 8.01257 2 7.20828V3.45828C2 2.65414 2.65414 2 3.45828 2H9.70828C10.5126 2 11.1667 2.65414 11.1667 3.45828V7.20828C11.1667 8.01257 10.5126 8.66672 9.70828 8.66672ZM3.45828 3.25C3.34338 3.25 3.25 3.34338 3.25 3.45828V7.20828C3.25 7.32333 3.34338 7.41672 3.45828 7.41672H9.70828C9.82333 7.41672 9.91672 7.32333 9.91672 7.20828V3.45828C9.91672 3.34338 9.82333 3.25 9.70828 3.25H3.45828Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M9.70828 22H3.45828C2.65414 22 2 21.3458 2 20.5417V11.7917C2 10.9874 2.65414 10.3333 3.45828 10.3333H9.70828C10.5126 10.3333 11.1667 10.9874 11.1667 11.7917V20.5417C11.1667 21.3458 10.5126 22 9.70828 22ZM3.45828 11.5833C3.34338 11.5833 3.25 11.6766 3.25 11.7917V20.5417C3.25 20.6566 3.34338 20.75 3.45828 20.75H9.70828C9.82333 20.75 9.91672 20.6566 9.91672 20.5417V11.7917C9.91672 11.6766 9.82333 11.5833 9.70828 11.5833H3.45828Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M20.5414 22H14.2914C13.4872 22 12.833 21.3458 12.833 20.5417V16.7917C12.833 15.9874 13.4872 15.3333 14.2914 15.3333H20.5414C21.3456 15.3333 21.9997 15.9874 21.9997 16.7917V20.5417C21.9997 21.3458 21.3456 22 20.5414 22ZM14.2914 16.5833C14.1764 16.5833 14.083 16.6766 14.083 16.7917V20.5417C14.083 20.6566 14.1764 20.75 14.2914 20.75H20.5414C20.6563 20.75 20.7497 20.6566 20.7497 20.5417V16.7917C20.7497 16.6766 20.6563 16.5833 20.5414 16.5833H14.2914Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M20.5414 13.6667H14.2914C13.4872 13.6667 12.833 13.0126 12.833 12.2083V3.45828C12.833 2.65414 13.4872 2 14.2914 2H20.5414C21.3456 2 21.9997 2.65414 21.9997 3.45828V12.2083C21.9997 13.0126 21.3456 13.6667 20.5414 13.6667ZM14.2914 3.25C14.1764 3.25 14.083 3.34338 14.083 3.45828V12.2083C14.083 12.3233 14.1764 12.4167 14.2914 12.4167H20.5414C20.6563 12.4167 20.7497 12.3233 20.7497 12.2083V3.45828C20.7497 3.34338 20.6563 3.25 20.5414 3.25H14.2914Z",fill:"currentColor"})]})}function Il(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("mask",{id:"mask0_1275_12355",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"1",y:"1",width:"22",height:"22",children:(0,Gt.jsx)("path",{d:"M1 0.999998H23V23H1V0.999998Z",fill:"white"})}),(0,Gt.jsxs)("g",{mask:"url(#mask0_1275_12355)",children:[(0,Gt.jsx)("path",{d:"M18.8879 4.76679V3.04456C18.8879 2.85434 18.7337 2.70012 18.5435 2.70012H4.07686C3.88664 2.70012 3.73242 2.85434 3.73242 3.04456V20.9556C3.73242 21.1458 3.88664 21.3 4.07686 21.3H18.5435C18.7337 21.3 18.8879 21.1458 18.8879 20.9556V6.14441",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M5.11133 21.2999V22.3333C5.11133 22.5235 5.26554 22.6777 5.45577 22.6777H19.9224C20.1126 22.6777 20.2668 22.5235 20.2668 22.3333V4.42225C20.2668 4.23202 20.1126 4.07781 19.9224 4.07781H18.8891",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M7.1776 2.69998V2.01106C7.1776 1.63061 6.86917 1.32218 6.48872 1.32218H6.48868C6.10823 1.32218 5.7998 1.63061 5.7998 2.01106V4.07773C5.7998 4.45817 6.10823 4.7666 6.48868 4.7666H6.48872C6.86917 4.7666 7.1776 4.45817 7.1776 4.07773",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M13.7213 7.52213H11.9991V5.7999C11.9991 5.60968 11.8449 5.45547 11.6547 5.45547H10.9658C10.7756 5.45547 10.6214 5.60968 10.6214 5.7999V7.52213H8.89912C8.7089 7.52213 8.55469 7.67635 8.55469 7.86657V8.55545C8.55469 8.74571 8.7089 8.89988 8.89912 8.89988H10.6214V10.6221C10.6214 10.8123 10.7756 10.9666 10.9658 10.9666H11.6547C11.8449 10.9666 11.9991 10.8123 11.9991 10.6221V8.89988H13.7213C13.9116 8.89988 14.0658 8.74571 14.0658 8.55545V7.86657C14.0658 7.67635 13.9116 7.52213 13.7213 7.52213Z",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M9.24316 13.7219H16.132",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M7.52164 13.7222H6.48828",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M9.24316 15.7888H16.132",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M9.24316 17.8555H16.132",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M7.52164 15.7888H6.48828",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M7.52164 17.8557H6.48828",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}function Fl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M5.66756 2.00049C4.74759 2.00159 4.00208 2.7471 4.00098 3.66707V20.7379C4.06456 21.4565 4.66955 22.0056 5.39091 21.9995H18.3336C18.8859 21.9995 19.3336 21.5518 19.3336 20.9996V19.9383C19.7317 19.7975 19.9984 19.4219 20.0002 18.9997V3.00044C20.0002 2.44818 19.5525 2.00049 19.0002 2.00049H5.66756ZM18.3336 21.3329H5.39091C5.02828 21.344 4.71595 21.0791 4.66761 20.7196V20.6662C4.66761 20.2981 4.96607 19.9996 5.33424 19.9996H18.6669V20.9996C18.6669 21.1836 18.5177 21.3329 18.3336 21.3329ZM19.3336 3.00044V18.9997C19.3336 19.1837 19.1843 19.333 19.0002 19.333H5.33424C5.10011 19.3326 4.87007 19.3944 4.66761 19.512V3.66707C4.66761 3.11482 5.1153 2.66712 5.66756 2.66712H19.0002C19.1843 2.66712 19.3336 2.81635 19.3336 3.00044Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M5.6673 3.66699C5.48322 3.66699 5.33398 3.81622 5.33398 4.00031V5.66689C5.33398 5.85098 5.48322 6.00021 5.6673 6.00021C5.85139 6.00021 6.00062 5.85098 6.00062 5.66689V4.00031C6.00062 3.81622 5.85139 3.66699 5.6673 3.66699Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M5.6673 6.66699C5.48322 6.66699 5.33398 6.81622 5.33398 7.00031V18.3331C5.33398 18.5172 5.48322 18.6664 5.6673 18.6664C5.85139 18.6664 6.00062 18.5172 6.00062 18.3331V7.00031C6.00062 6.81622 5.85139 6.66699 5.6673 6.66699Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M10.6669 7.66691C11.2192 7.66691 11.6669 7.21922 11.6669 6.66696V4.66706C11.6669 4.48297 11.5177 4.33374 11.3336 4.33374C11.1495 4.33374 11.0003 4.48297 11.0003 4.66706V6.66696C11.0003 6.85105 10.851 7.00028 10.6669 7.00028C10.4829 7.00028 10.3336 6.85105 10.3336 6.66696V4.66706C10.3336 4.48297 10.1844 4.33374 10.0003 4.33374C9.81622 4.33374 9.66699 4.48297 9.66699 4.66706V6.66696C9.66699 7.21922 10.1147 7.66691 10.6669 7.66691Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M13.0006 7.66691H13.3339C13.518 7.66691 13.6673 7.51768 13.6673 7.33359C13.6673 7.14951 13.518 7.00028 13.3339 7.00028H13.0006V4.66706C13.0006 4.48297 12.8514 4.33374 12.6673 4.33374C12.4832 4.33374 12.334 4.48297 12.334 4.66706V7.00028C12.334 7.36845 12.6324 7.66691 13.0006 7.66691Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M15.0006 7.66691H15.6673C15.8513 7.66691 16.0006 7.51768 16.0006 7.33359C16.0006 7.14951 15.8513 7.00028 15.6673 7.00028H15.0006V6.33364H15.3339C15.518 6.33364 15.6673 6.18441 15.6673 6.00033C15.6673 5.81624 15.518 5.66701 15.3339 5.66701H15.0006V5.00037H15.6673C15.8513 5.00037 16.0006 4.85114 16.0006 4.66706C16.0006 4.48297 15.8513 4.33374 15.6673 4.33374H15.0006C14.6324 4.33374 14.334 4.6322 14.334 5.00037V7.00028C14.334 7.36845 14.6324 7.66691 15.0006 7.66691Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M7.66761 7.3336V6.33365C8.03578 6.33365 8.33424 6.63211 8.33424 7.00029V7.3336C8.33424 7.51769 8.48348 7.66692 8.66756 7.66692C8.85165 7.66692 9.00088 7.51769 9.00088 7.3336V7.00029C9.00017 6.66396 8.87146 6.34052 8.6409 6.09566C8.96446 5.82728 9.08458 5.38458 8.94106 4.98945C8.79754 4.59433 8.42131 4.33192 8.00093 4.33375H7.66761C7.29944 4.33375 7.00098 4.63221 7.00098 5.00038V7.3336C7.00098 7.51769 7.15021 7.66692 7.33429 7.66692C7.51838 7.66692 7.66761 7.51769 7.66761 7.3336ZM7.66761 5.00038H8.00093C8.18501 5.00038 8.33424 5.14961 8.33424 5.3337C8.33424 5.51779 8.18501 5.66702 8.00093 5.66702H7.66761V5.00038Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M17.3335 9.3335H8.00062C7.63245 9.3335 7.33398 9.63196 7.33398 10.0001V13C7.33398 13.3682 7.63245 13.6666 8.00062 13.6666H17.3335C17.7017 13.6666 18.0001 13.3682 18.0001 13V10.0001C18.0001 9.63196 17.7017 9.3335 17.3335 9.3335ZM8.00062 13V10.0001H17.3335V13H8.00062Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M16.0006 15.3333H9.33429C9.15021 15.3333 9.00098 15.4825 9.00098 15.6666C9.00098 15.8507 9.15021 15.9999 9.33429 15.9999H16.0006C16.1847 15.9999 16.334 15.8507 16.334 15.6666C16.334 15.4825 16.1847 15.3333 16.0006 15.3333Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M15.0007 16.9998H10.3343C10.1502 16.9998 10.001 17.149 10.001 17.3331C10.001 17.5172 10.1502 17.6664 10.3343 17.6664H15.0007C15.1848 17.6664 15.334 17.5172 15.334 17.3331C15.334 17.149 15.1848 16.9998 15.0007 16.9998Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M17.6669 5.00037H18.3336C18.5177 5.00037 18.6669 4.85114 18.6669 4.66706C18.6669 4.48297 18.5177 4.33374 18.3336 4.33374H17.6669C17.1147 4.33374 16.667 4.78143 16.667 5.33369C16.667 5.88595 17.1147 6.33364 17.6669 6.33364C17.851 6.33364 18.0003 6.48287 18.0003 6.66696C18.0003 6.85105 17.851 7.00028 17.6669 7.00028H17.0003C16.8162 7.00028 16.667 7.14951 16.667 7.33359C16.667 7.51768 16.8162 7.66691 17.0003 7.66691H17.6669C18.2192 7.66691 18.6669 7.21922 18.6669 6.66696C18.6669 6.1147 18.2192 5.66701 17.6669 5.66701C17.4829 5.66701 17.3336 5.51778 17.3336 5.33369C17.3336 5.14961 17.4829 5.00037 17.6669 5.00037Z",fill:"currentColor"})]})}function $l(e){let{width:t,height:n}=e;return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:t||24,height:n||24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M21.0625 3.25H2.9375C2.68886 3.25 2.4504 3.34877 2.27459 3.52459C2.09877 3.7004 2 3.93886 2 4.1875V17.3125C2 17.5611 2.09877 17.7996 2.27459 17.9754C2.4504 18.1512 2.68886 18.25 2.9375 18.25H11.6875V20.125H6.84375C6.76087 20.125 6.68138 20.1579 6.62278 20.2165C6.56417 20.2751 6.53125 20.3546 6.53125 20.4375C6.53125 20.5204 6.56417 20.5999 6.62278 20.6585C6.68138 20.7171 6.76087 20.75 6.84375 20.75H17.1562C17.2391 20.75 17.3186 20.7171 17.3772 20.6585C17.4358 20.5999 17.4688 20.5204 17.4688 20.4375C17.4688 20.3546 17.4358 20.2751 17.3772 20.2165C17.3186 20.1579 17.2391 20.125 17.1562 20.125H12.3125V18.25H21.0625C21.3111 18.25 21.5496 18.1512 21.7254 17.9754C21.9012 17.7996 22 17.5611 22 17.3125V4.1875C22 3.93886 21.9012 3.7004 21.7254 3.52459C21.5496 3.34877 21.3111 3.25 21.0625 3.25ZM21.375 17.3125C21.375 17.3954 21.3421 17.4749 21.2835 17.5335C21.2249 17.5921 21.1454 17.625 21.0625 17.625H2.9375C2.85462 17.625 2.77513 17.5921 2.71653 17.5335C2.65792 17.4749 2.625 17.3954 2.625 17.3125V4.1875C2.625 4.10462 2.65792 4.02513 2.71653 3.96653C2.77513 3.90792 2.85462 3.875 2.9375 3.875H21.0625C21.1454 3.875 21.2249 3.90792 21.2835 3.96653C21.3421 4.02513 21.375 4.10462 21.375 4.1875V17.3125Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M4.5 9.34375H5.59375V10.4375C5.59809 10.6019 5.66534 10.7583 5.78162 10.8746C5.8979 10.9909 6.05436 11.0582 6.21875 11.0625H7.46875C7.63314 11.0582 7.7896 10.9909 7.90588 10.8746C8.02216 10.7583 8.08941 10.6019 8.09375 10.4375V9.34375H9.1875C9.35189 9.33941 9.50835 9.27216 9.62463 9.15588C9.74091 9.0396 9.80816 8.88314 9.8125 8.71875V7.46875C9.80816 7.30436 9.74091 7.1479 9.62463 7.03162C9.50835 6.91534 9.35189 6.84809 9.1875 6.84375H8.09375V5.75C8.08941 5.58561 8.02216 5.42915 7.90588 5.31287C7.7896 5.19659 7.63314 5.12934 7.46875 5.125H6.21875C6.05436 5.12934 5.8979 5.19659 5.78162 5.31287C5.66534 5.42915 5.59809 5.58561 5.59375 5.75V6.84375H4.5C4.33561 6.84809 4.17915 6.91534 4.06287 7.03162C3.94659 7.1479 3.87934 7.30436 3.875 7.46875V8.71875C3.87934 8.88314 3.94659 9.0396 4.06287 9.15588C4.17915 9.27216 4.33561 9.33941 4.5 9.34375ZM4.5 7.46875H5.90625C5.98913 7.46875 6.06862 7.43583 6.12722 7.37722C6.18583 7.31862 6.21875 7.23913 6.21875 7.15625V5.7625C6.21875 5.7625 6.22813 5.75 6.21875 5.75H7.45625C7.45625 5.75 7.46875 5.75937 7.46875 5.75V7.15625C7.46875 7.23913 7.50167 7.31862 7.56028 7.37722C7.61888 7.43583 7.69837 7.46875 7.78125 7.46875H9.17812H9.1875V8.70625V8.71875H7.78125C7.69837 8.71875 7.61888 8.75167 7.56028 8.81028C7.50167 8.86888 7.46875 8.94837 7.46875 9.03125V10.425V10.4375H6.23125H6.21875V9.03125C6.21875 8.94837 6.18583 8.86888 6.12722 8.81028C6.06862 8.75167 5.98913 8.71875 5.90625 8.71875H4.5125H4.5V7.48125C4.5 7.48125 4.50781 7.46875 4.5 7.46875Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M20.1248 6.375C20.1248 6.04348 19.9931 5.72554 19.7587 5.49112C19.5243 5.2567 19.2063 5.125 18.8748 5.125C18.5433 5.125 18.2253 5.2567 17.9909 5.49112C17.7565 5.72554 17.6248 6.04348 17.6248 6.375C17.6248 6.55296 17.6632 6.72884 17.7373 6.89062L15.0811 9.12344C14.8684 8.96327 14.6097 8.87613 14.3436 8.875C14.1444 8.87506 13.9481 8.9227 13.7711 9.01395C13.5941 9.10521 13.4415 9.23744 13.3259 9.39963C13.2103 9.56182 13.1352 9.74928 13.1067 9.94639C13.0783 10.1435 13.0973 10.3446 13.1623 10.5328L10.6717 12.0547C10.5243 11.846 10.3166 11.6875 10.0764 11.6005C9.83618 11.5135 9.5751 11.5022 9.32828 11.568C9.08146 11.6339 8.86075 11.7738 8.69587 11.9689C8.53098 12.1641 8.42984 12.405 8.40605 12.6594L6.3248 12.9047C6.26452 12.6941 6.14994 12.503 5.99255 12.3506C5.83515 12.1982 5.64047 12.0898 5.428 12.0364C5.21554 11.9829 4.99276 11.9863 4.78199 12.046C4.57122 12.1058 4.37986 12.2199 4.22709 12.377C4.07432 12.534 3.96551 12.7284 3.91155 12.9408C3.85759 13.1531 3.86039 13.3759 3.91966 13.5868C3.97894 13.7977 4.0926 13.9893 4.24927 14.1425C4.40593 14.2956 4.6001 14.4049 4.8123 14.4594V15.75H4.1873C4.10442 15.75 4.02494 15.7829 3.96633 15.8415C3.90773 15.9001 3.8748 15.9796 3.8748 16.0625C3.8748 16.1454 3.90773 16.2249 3.96633 16.2835C4.02494 16.3421 4.10442 16.375 4.1873 16.375H19.8123C19.8952 16.375 19.9747 16.3421 20.0333 16.2835C20.0919 16.2249 20.1248 16.1454 20.1248 16.0625C20.1248 15.9796 20.0919 15.9001 20.0333 15.8415C19.9747 15.7829 19.8952 15.75 19.8123 15.75H19.1873V7.58438C19.4555 7.51514 19.693 7.35879 19.8627 7.1399C20.0324 6.92101 20.1246 6.65196 20.1248 6.375ZM18.8748 5.75C18.9984 5.75 19.1193 5.78666 19.222 5.85533C19.3248 5.92401 19.4049 6.02162 19.4522 6.13582C19.4995 6.25003 19.5119 6.37569 19.4878 6.49693C19.4637 6.61817 19.4042 6.72953 19.3167 6.81694C19.2293 6.90435 19.118 6.96388 18.9967 6.98799C18.8755 7.01211 18.7498 6.99973 18.6356 6.95242C18.5214 6.90512 18.4238 6.82501 18.3551 6.72223C18.2865 6.61945 18.2498 6.49861 18.2498 6.375C18.2498 6.20924 18.3156 6.05027 18.4329 5.93306C18.5501 5.81585 18.709 5.75 18.8748 5.75ZM14.3436 9.5C14.4672 9.5 14.588 9.53666 14.6908 9.60533C14.7936 9.67401 14.8737 9.77162 14.921 9.88582C14.9683 10 14.9807 10.1257 14.9565 10.2469C14.9324 10.3682 14.8729 10.4795 14.7855 10.5669C14.6981 10.6543 14.5867 10.7139 14.4655 10.738C14.3442 10.7621 14.2186 10.7497 14.1044 10.7024C13.9902 10.6551 13.8926 10.575 13.8239 10.4722C13.7552 10.3695 13.7186 10.2486 13.7186 10.125C13.7186 9.95924 13.7844 9.80027 13.9016 9.68306C14.0188 9.56585 14.1778 9.5 14.3436 9.5ZM13.5092 11.0531C13.6581 11.1874 13.8371 11.2838 14.0311 11.3344V15.75H9.96855V13.9906C10.2367 13.9214 10.4743 13.765 10.644 13.5462C10.8137 13.3273 10.9058 13.0582 10.9061 12.7812C10.9084 12.737 10.9084 12.6927 10.9061 12.6484L13.5092 11.0531ZM9.65605 12.1562C9.77966 12.1562 9.9005 12.1929 10.0033 12.2616C10.1061 12.3303 10.1862 12.4279 10.2335 12.5421C10.2808 12.6563 10.2932 12.7819 10.269 12.9032C10.2449 13.0244 10.1854 13.1358 10.098 13.2232C10.0106 13.3106 9.89922 13.3701 9.77798 13.3942C9.65674 13.4184 9.53108 13.406 9.41687 13.3587C9.30267 13.3114 9.20506 13.2313 9.13638 13.1285C9.06771 13.0257 9.03105 12.9049 9.03105 12.7812C9.03105 12.6155 9.0969 12.4565 9.21411 12.3393C9.33132 12.2221 9.49029 12.1562 9.65605 12.1562ZM4.4998 13.25C4.4998 13.1264 4.53646 13.0055 4.60513 12.9028C4.67381 12.8 4.77142 12.7199 4.88562 12.6726C4.99983 12.6253 5.12549 12.6129 5.24673 12.637C5.36797 12.6611 5.47933 12.7207 5.56674 12.8081C5.65415 12.8955 5.71368 13.0068 5.73779 13.1281C5.76191 13.2493 5.74953 13.375 5.70223 13.4892C5.65492 13.6034 5.57481 13.701 5.47203 13.7697C5.36925 13.8383 5.24841 13.875 5.1248 13.875C4.95904 13.875 4.80007 13.8092 4.68286 13.6919C4.56565 13.5747 4.4998 13.4158 4.4998 13.25ZM5.4373 14.4594C5.65853 14.4021 5.85983 14.2854 6.01933 14.1217C6.17884 13.9581 6.29043 13.7539 6.34199 13.5312L8.50918 13.2766C8.58472 13.4513 8.69915 13.6064 8.84375 13.7301C8.98834 13.8539 9.15929 13.943 9.34355 13.9906V15.75H5.4373V14.4594ZM14.6561 15.75V11.3344C14.9242 11.2651 15.1618 11.1088 15.3315 10.8899C15.5012 10.671 15.5933 10.402 15.5936 10.125C15.5936 9.94704 15.5552 9.77116 15.4811 9.60938L18.1373 7.37656C18.2644 7.47225 18.4087 7.54279 18.5623 7.58438V15.75H14.6561Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"})]})}function Bl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M6.07844 5.90005H14.1148C14.1939 5.90005 14.2698 5.86863 14.3257 5.81272C14.3816 5.7568 14.413 5.68096 14.413 5.60188C14.413 5.5228 14.3816 5.44696 14.3257 5.39104C14.2698 5.33512 14.1939 5.30371 14.1148 5.30371H6.07844C5.99936 5.30371 5.92352 5.33512 5.8676 5.39104C5.81169 5.44696 5.78027 5.5228 5.78027 5.60188C5.78027 5.68096 5.81169 5.7568 5.8676 5.81272C5.92352 5.86863 5.99936 5.90005 6.07844 5.90005Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,Gt.jsx)("path",{d:"M6.07844 7.43349H14.1148C14.1939 7.43349 14.2698 7.40208 14.3257 7.34616C14.3816 7.29025 14.413 7.21441 14.413 7.13533C14.413 7.05625 14.3816 6.98041 14.3257 6.92449C14.2698 6.86857 14.1939 6.83716 14.1148 6.83716H6.07844C5.99936 6.83716 5.92352 6.86857 5.8676 6.92449C5.81169 6.98041 5.78027 7.05625 5.78027 7.13533C5.78027 7.21441 5.81169 7.29025 5.8676 7.34616C5.92352 7.40208 5.99936 7.43349 6.07844 7.43349Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,Gt.jsx)("path",{d:"M20.9372 10.5272V2.33918C20.9372 2.30002 20.9295 2.26124 20.9146 2.22505C20.8996 2.18887 20.8776 2.15599 20.8499 2.1283C20.8222 2.10061 20.7894 2.07864 20.7532 2.06367C20.717 2.04869 20.6782 2.04099 20.639 2.04102H6.07821C6.03905 2.04099 6.00027 2.04869 5.96408 2.06367C5.9279 2.07864 5.89502 2.10061 5.86733 2.1283C5.83963 2.15599 5.81767 2.18887 5.8027 2.22505C5.78772 2.26124 5.78002 2.30002 5.78005 2.33918V3.78743H4.21935C4.18019 3.78741 4.1414 3.7951 4.10522 3.81008C4.06903 3.82506 4.03615 3.84702 4.00846 3.87471C3.98077 3.9024 3.95881 3.93528 3.94383 3.97147C3.92885 4.00765 3.92116 4.04643 3.92118 4.0856V8.37547C3.40531 8.39681 2.91761 8.61653 2.55984 8.98878C2.20207 9.36104 2.00185 9.85706 2.00098 10.3734V20.8086C2.00134 21.1135 2.12262 21.4058 2.33822 21.6214C2.55383 21.837 2.84615 21.9583 3.15105 21.9586H20.8501C21.1551 21.9583 21.4474 21.837 21.663 21.6214C21.8786 21.4058 21.9999 21.1135 22.0002 20.8086V12.2943C21.9999 11.931 21.9008 11.5747 21.7136 11.2634C21.5263 10.9522 21.258 10.6977 20.9372 10.5272ZM6.37638 2.63735H20.3409V10.3238C20.0366 10.2708 19.9362 10.3013 19.0783 10.2923V4.0856C19.0784 4.04643 19.0707 4.00765 19.0557 3.97147C19.0407 3.93528 19.0188 3.9024 18.9911 3.87471C18.9634 3.84702 18.9305 3.82506 18.8943 3.81008C18.8581 3.7951 18.8193 3.78741 18.7802 3.78743H6.37638V2.63735ZM18.482 4.38377V10.2923H12.4687L10.8228 8.46918C10.7948 8.43822 10.7607 8.41347 10.7225 8.39654C10.6844 8.3796 10.6431 8.37086 10.6013 8.37087H4.51752V4.38377H18.482ZM21.4039 20.8086C21.4037 20.9554 21.3453 21.0961 21.2415 21.1999C21.1377 21.3037 20.997 21.3621 20.8501 21.3623H3.15105C3.00425 21.3621 2.86351 21.3037 2.7597 21.1999C2.65589 21.0961 2.59749 20.9554 2.59731 20.8086V10.3734C2.59776 10.0007 2.746 9.64343 3.00952 9.37992C3.27303 9.11641 3.6303 8.96817 4.00296 8.96772H10.4691L12.115 10.7908C12.143 10.8218 12.1771 10.8466 12.2153 10.8636C12.2535 10.8805 12.2948 10.8893 12.3365 10.8893C20.6864 10.8893 20.1712 10.8504 20.5208 10.9915C20.524 10.9929 20.5274 10.9937 20.5307 10.9951C20.7887 11.1009 21.0095 11.281 21.165 11.5125C21.3205 11.744 21.4037 12.0165 21.4041 12.2954L21.4039 20.8086Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,Gt.jsx)("path",{d:"M14.7654 15.0087H13.3211V13.5644C13.3212 13.5252 13.3135 13.4864 13.2985 13.4501C13.2836 13.4139 13.2616 13.381 13.2339 13.3533C13.2062 13.3255 13.1733 13.3036 13.1371 13.2886C13.1009 13.2736 13.0621 13.2658 13.0229 13.2659H10.9783C10.9392 13.2658 10.9004 13.2735 10.8642 13.2885C10.828 13.3035 10.7951 13.3255 10.7674 13.3532C10.7398 13.3808 10.7178 13.4137 10.7028 13.4499C10.6878 13.4861 10.6801 13.5249 10.6802 13.564V15.0084H9.23567C9.15659 15.0084 9.08075 15.0398 9.02483 15.0957C8.96891 15.1516 8.9375 15.2275 8.9375 15.3065V17.3511C8.9375 17.4302 8.96891 17.506 9.02483 17.562C9.08075 17.6179 9.15659 17.6493 9.23567 17.6493H10.6802V19.0936C10.6801 19.1328 10.6878 19.1716 10.7028 19.2077C10.7178 19.2439 10.7398 19.2768 10.7674 19.3045C10.7951 19.3322 10.828 19.3541 10.8642 19.3691C10.9004 19.3841 10.9392 19.3918 10.9783 19.3918H13.0229C13.0621 19.3918 13.1009 19.3841 13.137 19.3691C13.1732 19.3541 13.2061 19.3322 13.2338 19.3045C13.2615 19.2768 13.2835 19.2439 13.2984 19.2077C13.3134 19.1716 13.3211 19.1328 13.3211 19.0936V17.6496H14.7654C14.8046 17.6496 14.8434 17.6419 14.8795 17.627C14.9157 17.612 14.9486 17.59 14.9763 17.5623C15.004 17.5346 15.026 17.5018 15.0409 17.4656C15.0559 17.4294 15.0636 17.3906 15.0636 17.3515V15.3069C15.0636 15.2677 15.0559 15.2289 15.0409 15.1927C15.026 15.1566 15.004 15.1237 14.9763 15.096C14.9486 15.0683 14.9157 15.0463 14.8795 15.0314C14.8434 15.0164 14.8046 15.0087 14.7654 15.0087ZM14.4672 17.0533H13.0229C12.9838 17.0533 12.945 17.061 12.9088 17.0759C12.8726 17.0909 12.8397 17.1129 12.812 17.1406C12.7843 17.1683 12.7624 17.2011 12.7474 17.2373C12.7324 17.2735 12.7247 17.3123 12.7247 17.3515V18.7958H11.2765V17.3515C11.2765 17.3123 11.2688 17.2735 11.2539 17.2373C11.2389 17.2011 11.2169 17.1683 11.1892 17.1406C11.1615 17.1129 11.1286 17.0909 11.0925 17.0759C11.0563 17.061 11.0175 17.0533 10.9783 17.0533H9.53384V15.605H10.9783C11.0175 15.6051 11.0563 15.5974 11.0925 15.5824C11.1286 15.5674 11.1615 15.5455 11.1892 15.5178C11.2169 15.4901 11.2389 15.4572 11.2539 15.421C11.2688 15.3848 11.2765 15.346 11.2765 15.3069V13.8625H12.7247V15.3069C12.7247 15.346 12.7324 15.3848 12.7474 15.421C12.7624 15.4572 12.7843 15.4901 12.812 15.5178C12.8397 15.5455 12.8726 15.5674 12.9088 15.5824C12.945 15.5974 12.9838 15.6051 13.0229 15.605H14.4672V17.0533Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"})]})}function zl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M6.70759 21.8098H17.296C18.2357 21.8098 19.0003 21.0452 19.0003 20.1053V3.89766C19.0003 2.95615 18.2357 2.19019 17.296 2.19019H6.70759C5.76608 2.19019 5 2.95611 5 3.89766V8.00861C5 8.17789 5.13727 8.31517 5.30656 8.31517C5.47584 8.31517 5.61311 8.17789 5.61311 8.00861V3.89766C5.61311 3.29429 6.10407 2.8033 6.70759 2.8033H17.296C17.8978 2.8033 18.3872 3.29425 18.3872 3.89766V20.1053C18.3872 20.707 17.8977 21.1966 17.296 21.1966H6.70759C6.10407 21.1966 5.61311 20.707 5.61311 20.1053V9.76518C5.61311 9.5959 5.47584 9.45863 5.30656 9.45863C5.13727 9.45863 5 9.5959 5 9.76518V20.1053C4.99996 21.0452 5.76608 21.8098 6.70759 21.8098Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M15.1739 7.92022C15.1739 6.17099 13.7507 4.7478 12.0015 4.7478C10.2523 4.7478 8.8291 6.17103 8.8291 7.92022C8.8291 9.64385 10.2235 11.0946 12.0015 11.0946C13.7751 11.0946 15.1739 9.65035 15.1739 7.92022ZM10.466 9.96873C10.7664 9.40982 11.3592 9.04705 12.0022 9.04655C12.0023 9.04655 12.0025 9.04659 12.0027 9.04659C12.0031 9.04659 12.0035 9.04647 12.0039 9.04647C12.6469 9.04659 13.239 9.40951 13.5378 9.96831C13.5053 9.9852 12.9126 10.4815 12.0015 10.4815C11.1714 10.4815 10.7094 10.0929 10.466 9.96873ZM11.159 7.58989C11.159 7.12603 11.5375 6.74865 12.0027 6.74865C12.4664 6.74865 12.8439 7.12599 12.8439 7.58989C12.8439 8.05471 12.4671 8.4327 12.0039 8.4334C12.0038 8.4334 12.0037 8.4334 12.0036 8.4334C12.0031 8.4334 12.0027 8.43352 12.0023 8.43352C11.5372 8.43321 11.159 8.05494 11.159 7.58989ZM12.0015 5.36092C13.4127 5.36092 14.5608 6.50901 14.5608 7.92022C14.5608 8.51056 14.3529 9.07841 13.9857 9.53194C13.7417 9.14861 13.3946 8.84445 12.9874 8.65514C13.2743 8.38887 13.457 8.0116 13.457 7.58985C13.457 6.78797 12.8047 6.1355 12.0027 6.1355C11.1995 6.1355 10.5459 6.78797 10.5459 7.58985C10.5459 8.01199 10.7293 8.38952 11.0172 8.65584C10.6101 8.84526 10.2628 9.14927 10.0183 9.53221C9.65031 9.07752 9.44218 8.50956 9.44218 7.92018C9.44218 6.50901 10.5902 5.36092 12.0015 5.36092Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M7.3584 12.444C7.3584 12.6133 7.49567 12.7506 7.66496 12.7506H16.3371C16.5065 12.7506 16.6437 12.6133 16.6437 12.444C16.6437 12.2747 16.5065 12.1375 16.3371 12.1375H7.66496C7.49563 12.1375 7.3584 12.2747 7.3584 12.444Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M7.66496 14.9188H16.3371C16.5065 14.9188 16.6437 14.7815 16.6437 14.6122C16.6437 14.4429 16.5065 14.3057 16.3371 14.3057H7.66496C7.49567 14.3057 7.3584 14.4429 7.3584 14.6122C7.3584 14.7815 7.49563 14.9188 7.66496 14.9188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M7.66496 17.087H16.3371C16.5065 17.087 16.6437 16.9497 16.6437 16.7804C16.6437 16.6112 16.5065 16.4739 16.3371 16.4739H7.66496C7.49567 16.4739 7.3584 16.6112 7.3584 16.7804C7.3584 16.9497 7.49563 17.087 7.66496 17.087Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M9.41495 18.6418C9.24552 18.6418 9.1084 18.7791 9.1084 18.9484C9.1084 19.1177 9.24552 19.255 9.41495 19.255H14.5881C14.7575 19.255 14.8946 19.1177 14.8946 18.9484C14.8946 18.7791 14.7575 18.6418 14.5881 18.6418H9.41495Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"})]})}function Hl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M16.53 6.22549L19.8594 7.11756L17.0157 17.7302L13.9105 19.5229L4.11426 16.8981L7.6141 3.83646L13.4152 5.39088",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M13.9385 19.4158L14.566 17.074L16.9236 17.7057",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("mask",{id:"mask0_1281_12307",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"2",y:"2",width:"20",height:"20",children:(0,Gt.jsx)("path",{d:"M2 2H22V22H2V2Z",fill:"white"})}),(0,Gt.jsx)("g",{mask:"url(#mask0_1281_12307)",children:(0,Gt.jsx)("path",{d:"M19.5991 8.0907V21.6094H6.92188V17.7239",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,Gt.jsx)("path",{d:"M13.2988 7.10986L13.9107 6.49799",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("mask",{id:"mask1_1281_12307",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"2",y:"2",width:"20",height:"20",children:(0,Gt.jsx)("path",{d:"M2 2H22V22H2V2Z",fill:"white"})}),(0,Gt.jsxs)("g",{mask:"url(#mask1_1281_12307)",children:[(0,Gt.jsx)("path",{d:"M16.7508 5.30025C16.7488 6.02072 16.2674 6.67935 15.5381 6.87478C14.6654 7.10857 13.7685 6.59068 13.5347 5.71806C13.3008 4.84541 13.8187 3.94849 14.6913 3.71466C14.8259 3.67857 14.9636 3.66013 15.1011 3.65896",fill:"white"}),(0,Gt.jsx)("path",{d:"M16.7508 5.30025C16.7488 6.02072 16.2674 6.67935 15.5381 6.87478C14.6654 7.10857 13.7685 6.59068 13.5347 5.71806C13.3008 4.84541 13.8187 3.94849 14.6913 3.71466C14.8259 3.67857 14.9636 3.66013 15.1011 3.65896",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M16.1905 2.44054C16.9649 2.23304 17.7609 2.69261 17.9684 3.46699C18.1759 4.2414 17.7163 5.03738 16.9419 5.24484C16.1676 5.45238 15.3716 4.99281 15.1641 4.21843C14.9566 3.44398 15.4161 2.64804 16.1905 2.44054Z",fill:"white",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M8.65918 8.99144L16.3765 11.0593L8.65918 8.99144Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M8.65918 8.99144L16.3765 11.0593",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M8.25293 10.5075L15.9702 12.5754L8.25293 10.5075Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M8.25293 10.5075L15.9702 12.5754",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M7.84668 12.0237L10.007 12.6025L7.84668 12.0237Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M7.84668 12.0237L10.007 12.6025",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M11.7051 13.0576H11.7054H11.7051Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M11.7051 13.0576H11.7054",stroke:"currentColor",strokeWidth:"0.8",strokeMiterlimit:"2.613",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}function Wl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M5.66756 2.00049C4.74759 2.00159 4.00208 2.7471 4.00098 3.66707V20.7379C4.06456 21.4565 4.66955 22.0056 5.39091 21.9995H18.3336C18.8859 21.9995 19.3336 21.5518 19.3336 20.9996V19.9383C19.7317 19.7975 19.9984 19.4219 20.0002 18.9997V3.00044C20.0002 2.44818 19.5525 2.00049 19.0002 2.00049H5.66756ZM18.3336 21.3329H5.39091C5.02828 21.344 4.71595 21.0791 4.66761 20.7196V20.6662C4.66761 20.2981 4.96607 19.9996 5.33424 19.9996H18.6669V20.9996C18.6669 21.1836 18.5177 21.3329 18.3336 21.3329ZM19.3336 3.00044V18.9997C19.3336 19.1837 19.1843 19.333 19.0002 19.333H5.33424C5.10011 19.3326 4.87007 19.3944 4.66761 19.512V3.66707C4.66761 3.11482 5.1153 2.66712 5.66756 2.66712H19.0002C19.1843 2.66712 19.3336 2.81635 19.3336 3.00044Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M5.6673 3.66699C5.48322 3.66699 5.33398 3.81622 5.33398 4.00031V5.66689C5.33398 5.85098 5.48322 6.00021 5.6673 6.00021C5.85139 6.00021 6.00062 5.85098 6.00062 5.66689V4.00031C6.00062 3.81622 5.85139 3.66699 5.6673 3.66699Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M5.6673 6.66699C5.48322 6.66699 5.33398 6.81622 5.33398 7.00031V18.3331C5.33398 18.5172 5.48322 18.6664 5.6673 18.6664C5.85139 18.6664 6.00062 18.5172 6.00062 18.3331V7.00031C6.00062 6.81622 5.85139 6.66699 5.6673 6.66699Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M10.6669 7.66691C11.2192 7.66691 11.6669 7.21922 11.6669 6.66696V4.66706C11.6669 4.48297 11.5177 4.33374 11.3336 4.33374C11.1495 4.33374 11.0003 4.48297 11.0003 4.66706V6.66696C11.0003 6.85105 10.851 7.00028 10.6669 7.00028C10.4829 7.00028 10.3336 6.85105 10.3336 6.66696V4.66706C10.3336 4.48297 10.1844 4.33374 10.0003 4.33374C9.81622 4.33374 9.66699 4.48297 9.66699 4.66706V6.66696C9.66699 7.21922 10.1147 7.66691 10.6669 7.66691Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M13.0006 7.66691H13.3339C13.518 7.66691 13.6673 7.51768 13.6673 7.33359C13.6673 7.14951 13.518 7.00028 13.3339 7.00028H13.0006V4.66706C13.0006 4.48297 12.8514 4.33374 12.6673 4.33374C12.4832 4.33374 12.334 4.48297 12.334 4.66706V7.00028C12.334 7.36845 12.6324 7.66691 13.0006 7.66691Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M15.0006 7.66691H15.6673C15.8513 7.66691 16.0006 7.51768 16.0006 7.33359C16.0006 7.14951 15.8513 7.00028 15.6673 7.00028H15.0006V6.33364H15.3339C15.518 6.33364 15.6673 6.18441 15.6673 6.00033C15.6673 5.81624 15.518 5.66701 15.3339 5.66701H15.0006V5.00037H15.6673C15.8513 5.00037 16.0006 4.85114 16.0006 4.66706C16.0006 4.48297 15.8513 4.33374 15.6673 4.33374H15.0006C14.6324 4.33374 14.334 4.6322 14.334 5.00037V7.00028C14.334 7.36845 14.6324 7.66691 15.0006 7.66691Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M7.66761 7.3336V6.33365C8.03578 6.33365 8.33424 6.63211 8.33424 7.00029V7.3336C8.33424 7.51769 8.48348 7.66692 8.66756 7.66692C8.85165 7.66692 9.00088 7.51769 9.00088 7.3336V7.00029C9.00017 6.66396 8.87146 6.34052 8.6409 6.09566C8.96446 5.82728 9.08458 5.38458 8.94106 4.98945C8.79754 4.59433 8.42131 4.33192 8.00093 4.33375H7.66761C7.29944 4.33375 7.00098 4.63221 7.00098 5.00038V7.3336C7.00098 7.51769 7.15021 7.66692 7.33429 7.66692C7.51838 7.66692 7.66761 7.51769 7.66761 7.3336ZM7.66761 5.00038H8.00093C8.18501 5.00038 8.33424 5.14961 8.33424 5.3337C8.33424 5.51779 8.18501 5.66702 8.00093 5.66702H7.66761V5.00038Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M17.3335 9.3335H8.00062C7.63245 9.3335 7.33398 9.63196 7.33398 10.0001V13C7.33398 13.3682 7.63245 13.6666 8.00062 13.6666H17.3335C17.7017 13.6666 18.0001 13.3682 18.0001 13V10.0001C18.0001 9.63196 17.7017 9.3335 17.3335 9.3335ZM8.00062 13V10.0001H17.3335V13H8.00062Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M16.0006 15.3333H9.33429C9.15021 15.3333 9.00098 15.4825 9.00098 15.6666C9.00098 15.8507 9.15021 15.9999 9.33429 15.9999H16.0006C16.1847 15.9999 16.334 15.8507 16.334 15.6666C16.334 15.4825 16.1847 15.3333 16.0006 15.3333Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M15.0007 16.9998H10.3343C10.1502 16.9998 10.001 17.149 10.001 17.3331C10.001 17.5172 10.1502 17.6664 10.3343 17.6664H15.0007C15.1848 17.6664 15.334 17.5172 15.334 17.3331C15.334 17.149 15.1848 16.9998 15.0007 16.9998Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M17.6669 5.00037H18.3336C18.5177 5.00037 18.6669 4.85114 18.6669 4.66706C18.6669 4.48297 18.5177 4.33374 18.3336 4.33374H17.6669C17.1147 4.33374 16.667 4.78143 16.667 5.33369C16.667 5.88595 17.1147 6.33364 17.6669 6.33364C17.851 6.33364 18.0003 6.48287 18.0003 6.66696C18.0003 6.85105 17.851 7.00028 17.6669 7.00028H17.0003C16.8162 7.00028 16.667 7.14951 16.667 7.33359C16.667 7.51768 16.8162 7.66691 17.0003 7.66691H17.6669C18.2192 7.66691 18.6669 7.21922 18.6669 6.66696C18.6669 6.1147 18.2192 5.66701 17.6669 5.66701C17.4829 5.66701 17.3336 5.51778 17.3336 5.33369C17.3336 5.14961 17.4829 5.00037 17.6669 5.00037Z",fill:"currentColor"})]})}function Vl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"19",height:"20",viewBox:"0 0 19 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_4135_7688)",children:[(0,Gt.jsx)("path",{d:"M17.8896 13.6503C17.8966 13.6414 17.9037 13.6329 17.9105 13.624C17.9301 13.5984 17.9492 13.5723 17.9679 13.546C17.9711 13.5416 17.9744 13.5372 17.9776 13.5326C18.2969 13.079 18.4702 12.5318 18.4702 11.9591V1.61179C18.4702 0.722964 17.782 0 16.9361 0H7.96261C7.11672 0 6.42842 0.722964 6.42842 1.61179V5.28582C6.00519 5.25973 5.57541 5.33587 5.18341 5.51089C4.63061 5.75777 4.17949 6.1777 3.87855 6.72549L2.41131 9.39487L0.944078 12.0646C0.801886 12.3234 0.70225 12.5959 0.642846 12.8733C0.622948 12.9656 0.607697 13.0587 0.596804 13.1518C0.591285 13.1983 0.586928 13.245 0.583587 13.2917C0.577051 13.3849 0.574873 13.4781 0.576906 13.5712C0.577923 13.6222 0.580682 13.6728 0.584313 13.7237C0.603921 13.9951 0.659549 14.2624 0.749454 14.5171C0.775888 14.5919 0.805662 14.6653 0.837906 14.7376C0.843861 14.7509 0.849235 14.7645 0.855335 14.7777C1.08729 15.2787 1.45882 15.7148 1.95148 16.0137C1.96557 16.0223 1.97965 16.0302 1.99389 16.0384C2.00623 16.0456 2.01858 16.0531 2.03107 16.0601C2.04095 16.0656 2.05097 16.0708 2.06085 16.0763C2.07813 16.0856 2.09527 16.095 2.1127 16.104C2.11894 16.1072 2.12519 16.1101 2.13143 16.1133C2.15278 16.1242 2.17428 16.135 2.19592 16.1452C2.19752 16.146 2.19912 16.1466 2.20071 16.1474C2.5538 16.314 2.93753 16.4011 3.32489 16.4011C3.72634 16.4011 4.12009 16.3087 4.47956 16.1349C4.48232 16.1335 4.48508 16.1323 4.48799 16.1309C4.4906 16.1297 4.49322 16.1286 4.49583 16.1272C4.5792 17.1136 4.98326 18.0305 5.65501 18.7415C6.41259 19.5434 7.42173 19.9902 8.49682 19.9996H8.50001H8.50016H8.50509C8.51366 19.9998 8.52209 19.9999 8.53051 19.9999C10.3854 19.9999 11.953 18.6835 12.4316 16.8934H13.8448C14.2064 16.8934 14.5623 16.8093 14.8876 16.6543C14.8968 16.6506 14.9059 16.6471 14.9148 16.6428C14.9629 16.6192 15.0096 16.5935 15.056 16.567C15.0562 16.5668 15.0564 16.5667 15.0567 16.5665C15.0926 16.5459 15.1278 16.5244 15.1626 16.5021C15.1646 16.5009 15.1665 16.4995 15.1685 16.4983C15.2013 16.4771 15.2337 16.455 15.2657 16.4323C15.269 16.4298 15.2724 16.4274 15.2757 16.4251C15.3058 16.4033 15.3354 16.381 15.3646 16.3579C15.3694 16.3541 15.3742 16.3503 15.379 16.3465C15.4061 16.3247 15.4327 16.3023 15.459 16.2792C15.4652 16.2739 15.4715 16.2687 15.4776 16.2632C15.5024 16.2412 15.5265 16.2183 15.5506 16.1953C15.5573 16.1887 15.5643 16.1825 15.571 16.1759C15.5996 16.1477 15.6278 16.1188 15.6552 16.0891C15.6562 16.0879 15.6574 16.0868 15.6584 16.0856L17.7608 13.8024C17.7781 13.7836 17.7943 13.7642 17.811 13.745C17.8198 13.7349 17.8288 13.7252 17.8375 13.7151C17.8552 13.6939 17.8723 13.6721 17.8896 13.6503ZM4.52255 7.11596C4.88464 6.45694 5.56321 6.06143 6.26924 6.06143C6.41767 6.06143 6.56756 6.07897 6.71586 6.11529C6.9083 6.16244 7.0932 6.23934 7.26531 6.34371C7.88491 6.71969 8.26966 7.42084 8.26966 8.17356C8.26966 8.54145 8.1767 8.90537 8.00052 9.22581L6.71934 11.5571L3.24123 9.44736L4.52255 7.11596ZM4.43294 15.2712C4.41638 15.2825 4.39982 15.2939 4.38298 15.3048C4.37586 15.3095 4.36845 15.3138 4.36119 15.3184C4.34681 15.3275 4.33229 15.3365 4.31762 15.3454C4.30876 15.3506 4.29975 15.3556 4.29089 15.3608C4.27782 15.3683 4.26475 15.3757 4.25153 15.3829C4.24108 15.3886 4.23047 15.394 4.21987 15.3995C4.2084 15.4056 4.19678 15.4114 4.18516 15.4172C4.17281 15.4233 4.16047 15.4293 4.14797 15.4351C4.13824 15.4397 4.12866 15.4441 4.11893 15.4485C4.1044 15.4551 4.08988 15.4613 4.07521 15.4674C4.06809 15.4705 4.06083 15.4734 4.05371 15.4764C4.03643 15.4833 4.01915 15.4902 4.00172 15.4967C3.99809 15.4981 3.99445 15.4993 3.99082 15.5007C3.56294 15.6573 3.09163 15.6594 2.65837 15.499C2.65779 15.4989 2.65706 15.4986 2.65648 15.4984C2.63586 15.4908 2.61538 15.4827 2.59505 15.4743C2.59098 15.4726 2.58691 15.4709 2.58299 15.4693C2.56585 15.4621 2.54886 15.4546 2.53187 15.447C2.52606 15.4442 2.52025 15.4417 2.51444 15.4389C2.4989 15.4319 2.48365 15.4243 2.46839 15.4168C2.46186 15.4136 2.45532 15.4104 2.44893 15.407C2.43368 15.3992 2.41843 15.3911 2.40347 15.3829C2.39737 15.3797 2.39127 15.3765 2.38517 15.3731C2.3644 15.3615 2.34378 15.3495 2.3233 15.3371C1.36441 14.7553 1.03471 13.4624 1.58808 12.455L2.86941 10.1238L6.28899 12.1981C6.27664 12.2068 6.26459 12.2158 6.25224 12.2246C6.23786 12.2349 6.22334 12.2452 6.20911 12.2556C6.20344 12.2597 6.19792 12.2637 6.1924 12.268C6.18209 12.2756 6.17192 12.2835 6.16176 12.2912C6.16118 12.2916 6.16074 12.2921 6.16016 12.2924C6.14593 12.3032 6.13169 12.3139 6.11775 12.3249C6.11121 12.3299 6.10468 12.3351 6.09814 12.3403C6.08696 12.3491 6.07592 12.3581 6.06474 12.3671C6.05268 12.3769 6.04048 12.3865 6.02843 12.3964C6.02087 12.4027 6.01347 12.409 6.00606 12.4152C5.99429 12.425 5.98282 12.4347 5.97134 12.4447C5.96132 12.4534 5.95116 12.4618 5.94113 12.4704C5.93271 12.4778 5.92443 12.4854 5.91615 12.4927C5.90424 12.5034 5.89233 12.5141 5.88042 12.5248C5.87244 12.5321 5.86416 12.5394 5.85617 12.5467C5.84687 12.5553 5.83772 12.5643 5.82857 12.573C5.81637 12.5844 5.80417 12.5959 5.79212 12.6075C5.78587 12.6134 5.77963 12.6194 5.77338 12.6253C5.76321 12.6352 5.75334 12.6455 5.74331 12.6555C5.73082 12.6679 5.71848 12.6803 5.70628 12.6926C5.6903 12.7091 5.67447 12.7256 5.65878 12.7422C5.64702 12.7547 5.63525 12.7671 5.62349 12.7796C5.62131 12.782 5.61899 12.7845 5.61666 12.7869C5.60301 12.8019 5.58965 12.8171 5.57614 12.8322C5.56554 12.8441 5.55465 12.8559 5.54419 12.8678C5.54317 12.869 5.54201 12.8704 5.54099 12.8716C5.52661 12.8881 5.51267 12.9049 5.49858 12.9215C5.48929 12.9325 5.47985 12.9433 5.4707 12.9543C5.46852 12.9571 5.46634 12.9596 5.46416 12.9624C5.45152 12.9778 5.43918 12.9935 5.42669 13.0091C5.41681 13.0214 5.40693 13.0337 5.3972 13.046C5.38907 13.0565 5.38108 13.0671 5.37295 13.0776C5.36757 13.0846 5.36249 13.0916 5.35712 13.0985C5.34738 13.1116 5.33736 13.1246 5.32763 13.1377C5.32444 13.1421 5.32095 13.1466 5.31776 13.151C5.30773 13.1647 5.298 13.1786 5.28827 13.1925C5.27927 13.205 5.27026 13.2175 5.2614 13.2302C5.25704 13.2366 5.25254 13.2429 5.24818 13.2491C5.23889 13.2627 5.22974 13.2766 5.22059 13.2902C5.21289 13.3016 5.20505 13.313 5.19749 13.3246C5.19212 13.3327 5.18675 13.3408 5.18152 13.3489C5.1728 13.3625 5.16423 13.3761 5.15567 13.3896C5.14913 13.4 5.14259 13.4104 5.1362 13.4206C5.12996 13.4307 5.12371 13.4406 5.11761 13.4507C5.10948 13.464 5.10149 13.4774 5.0935 13.4908C5.08798 13.5001 5.08261 13.5093 5.07723 13.5184C5.07026 13.5303 5.06344 13.5422 5.05661 13.5541C5.04906 13.5673 5.0415 13.5805 5.0341 13.5938C5.02974 13.6017 5.02538 13.6098 5.02088 13.6179C5.01333 13.6316 5.00592 13.6454 4.99851 13.6591C4.99154 13.6722 4.98457 13.6852 4.97774 13.6983C4.97586 13.7018 4.97411 13.7055 4.97222 13.7092C4.97019 13.713 4.96816 13.7169 4.96627 13.7209C4.95857 13.7359 4.95087 13.7508 4.94332 13.7658C4.93272 13.787 4.92241 13.8083 4.91209 13.8297C4.90498 13.8444 4.89815 13.859 4.89132 13.8737C4.88101 13.8958 4.87085 13.9179 4.86097 13.9402C4.85458 13.9544 4.84848 13.9686 4.84223 13.9828C4.84151 13.9844 4.84078 13.9861 4.84005 13.9878C4.83729 13.9943 4.83439 14.0008 4.83148 14.0073C4.82524 14.0223 4.81899 14.0371 4.81289 14.052C4.80766 14.0647 4.80258 14.0774 4.7975 14.09C4.79387 14.099 4.79024 14.108 4.78675 14.117C4.78036 14.1331 4.77411 14.1492 4.76787 14.1654C4.7638 14.1761 4.76003 14.1868 4.75596 14.1974C4.75233 14.2075 4.74855 14.2174 4.74492 14.2275C4.73853 14.2451 4.73228 14.2624 4.72604 14.28C4.72313 14.2887 4.72023 14.2974 4.71718 14.3061C4.71355 14.3171 4.70977 14.3282 4.70614 14.3392C4.6999 14.358 4.6935 14.3769 4.6874 14.3958C4.68537 14.4025 4.68334 14.4094 4.6813 14.4161C4.67767 14.4277 4.67404 14.4396 4.67056 14.4514C4.66257 14.4774 4.65472 14.5035 4.64732 14.5299C4.64427 14.5409 4.64122 14.5521 4.63817 14.5632C4.63076 14.5905 4.62335 14.6177 4.61638 14.6451C4.6142 14.6538 4.61217 14.6627 4.60999 14.6715C4.59648 14.7259 4.58399 14.7806 4.57266 14.8357C4.57092 14.8443 4.56889 14.8527 4.56714 14.8612C4.56192 14.8876 4.55712 14.9143 4.55233 14.9409C4.54971 14.9546 4.5471 14.9682 4.54478 14.9819C4.54434 14.9839 4.54405 14.9859 4.54361 14.988C4.53984 15.0104 4.53635 15.033 4.53287 15.0556C4.53069 15.0698 4.52836 15.0838 4.52633 15.098C4.52575 15.1018 4.52517 15.106 4.52473 15.1098C4.52168 15.1308 4.51907 15.152 4.51631 15.1731C4.51573 15.1783 4.515 15.1835 4.51428 15.1887C4.51326 15.1974 4.51195 15.2059 4.51094 15.2144C4.49002 15.2305 4.46881 15.246 4.44746 15.2611C4.44267 15.2646 4.43773 15.2679 4.43294 15.2712ZM5.22306 15.7438C5.22306 15.6463 5.22698 15.5486 5.23511 15.4514C5.23787 15.4162 5.24107 15.3812 5.24499 15.3463C5.25211 15.2802 5.26111 15.2146 5.27186 15.1496C5.27244 15.1458 5.27288 15.142 5.2736 15.1382C5.27781 15.113 5.28246 15.088 5.28725 15.0629C5.289 15.0536 5.29059 15.0443 5.29234 15.0352C5.2967 15.013 5.30163 14.9911 5.30643 14.9691C5.30904 14.957 5.31136 14.945 5.31412 14.9331C5.31848 14.9135 5.32342 14.8945 5.32807 14.8751C5.3317 14.8607 5.33489 14.8463 5.33867 14.8319C5.34317 14.8142 5.34826 14.7967 5.35319 14.779C5.35741 14.7632 5.36162 14.7474 5.36612 14.7318C5.37091 14.7153 5.376 14.6992 5.38108 14.683C5.38616 14.6662 5.39096 14.6493 5.39633 14.6326C5.40141 14.6172 5.40679 14.6018 5.41202 14.5864C5.41768 14.5693 5.42335 14.5519 5.4293 14.5348C5.43468 14.5199 5.44034 14.5052 5.44571 14.4903C5.45225 14.4729 5.45849 14.4555 5.46503 14.4381C5.47055 14.4239 5.4765 14.4098 5.48217 14.3958C5.48929 14.3781 5.49611 14.3603 5.50352 14.3429C5.50918 14.3293 5.51528 14.3159 5.52109 14.3024C5.52894 14.2844 5.53664 14.2664 5.54462 14.2487C5.55058 14.2359 5.55668 14.2232 5.56263 14.2104C5.5712 14.1923 5.57963 14.1739 5.58834 14.1559C5.59444 14.1434 5.60098 14.1312 5.60722 14.1189C5.61637 14.1007 5.62538 14.0827 5.63467 14.0647C5.64106 14.0526 5.64775 14.0407 5.65428 14.0288C5.66401 14.0108 5.6736 13.9928 5.68362 13.975C5.6903 13.9631 5.69727 13.9515 5.7041 13.9397C5.71427 13.922 5.72443 13.9043 5.73489 13.8868C5.74201 13.8752 5.74927 13.8637 5.75653 13.8521C5.76713 13.8349 5.77774 13.8175 5.78878 13.8003C5.79618 13.7888 5.80374 13.7777 5.81129 13.7664C5.82247 13.7493 5.83351 13.7324 5.84498 13.7154C5.85268 13.7043 5.86067 13.6933 5.86851 13.6822C5.88013 13.6655 5.89175 13.6487 5.90366 13.6324C5.9118 13.6213 5.92007 13.6106 5.92835 13.5996C5.94041 13.5834 5.95232 13.5671 5.96466 13.5511C5.97338 13.5401 5.98224 13.5293 5.99095 13.5183C6.0033 13.5027 6.0155 13.4871 6.02813 13.4717C6.03714 13.4607 6.04644 13.4501 6.05559 13.4392C6.06822 13.4241 6.08086 13.4092 6.09378 13.3944C6.10308 13.3835 6.11281 13.3732 6.12225 13.3625C6.13547 13.3478 6.1484 13.3332 6.16176 13.3188C6.17149 13.3083 6.18151 13.2981 6.19139 13.2877C6.20475 13.2735 6.21811 13.2593 6.23191 13.2454C6.24208 13.2351 6.25253 13.225 6.26285 13.2148C6.27664 13.2012 6.29015 13.1875 6.30409 13.1742C6.31484 13.164 6.32574 13.154 6.33648 13.144C6.35057 13.131 6.36437 13.1179 6.3786 13.1051C6.38979 13.0948 6.40126 13.0851 6.41274 13.0752C6.42682 13.0628 6.44077 13.0503 6.45515 13.0381C6.46677 13.0283 6.47882 13.0187 6.49059 13.0089C6.50496 12.9972 6.5192 12.9851 6.53387 12.9735C6.54592 12.9639 6.55827 12.9546 6.57047 12.9452C6.58514 12.9339 6.59966 12.9224 6.61448 12.9113C6.62697 12.902 6.63975 12.893 6.65239 12.8838C6.66735 12.873 6.68216 12.862 6.69727 12.8513C6.71019 12.8423 6.72341 12.8335 6.73663 12.8246C6.75159 12.8144 6.76655 12.804 6.7818 12.7941C6.7953 12.7852 6.8091 12.7767 6.82275 12.768C6.83771 12.7585 6.85253 12.7488 6.86778 12.7396C6.86952 12.7385 6.87141 12.7375 6.87315 12.7364C6.91556 12.7105 6.9587 12.6861 7.00227 12.6623C7.01346 12.6561 7.02479 12.65 7.03597 12.6441C7.07998 12.6207 7.12428 12.598 7.16916 12.5766C7.16959 12.5765 7.17003 12.5762 7.17046 12.576C7.47373 12.4325 7.79704 12.3375 8.12805 12.2951V19.1929C6.49523 18.9825 5.22306 17.5108 5.22306 15.7438ZM8.87169 19.2005V12.2875C8.87256 12.2875 8.87343 12.2876 8.8743 12.2878C8.92339 12.2931 8.97219 12.2997 9.02056 12.3072C9.02332 12.3076 9.02608 12.3081 9.02884 12.3084C9.07575 12.3159 9.12223 12.3246 9.16856 12.3342C9.17393 12.3353 9.17931 12.3363 9.18483 12.3374C9.22942 12.3469 9.27343 12.3574 9.31729 12.3687C9.32411 12.3703 9.33094 12.372 9.33777 12.3739C9.38061 12.3852 9.42317 12.3975 9.46544 12.4106C9.4727 12.4129 9.4801 12.4152 9.48751 12.4175C9.5292 12.4308 9.57074 12.445 9.61169 12.4599C9.61896 12.4625 9.62622 12.4653 9.63348 12.468C9.67458 12.4833 9.7154 12.4993 9.75577 12.5164C9.76231 12.5191 9.7687 12.5219 9.77524 12.5246C9.81634 12.5422 9.85701 12.5605 9.89724 12.5797C9.90218 12.5821 9.90697 12.5846 9.91191 12.587C9.95359 12.6072 9.99484 12.6281 10.0355 12.65C10.0377 12.6513 10.04 12.6525 10.0423 12.6539C10.0823 12.6754 10.1216 12.698 10.1606 12.7213C10.1645 12.7236 10.1684 12.7257 10.1722 12.7282C10.2107 12.7512 10.2484 12.7753 10.2859 12.8C10.2916 12.8039 10.2974 12.8075 10.303 12.8113C10.3391 12.8354 10.3747 12.8605 10.4098 12.8861C10.4163 12.8908 10.4229 12.8956 10.4294 12.9003C10.4638 12.9258 10.4977 12.952 10.5312 12.9787C10.5378 12.9841 10.5444 12.9894 10.5511 12.9947C10.5842 13.0218 10.6169 13.0494 10.649 13.0774C10.6553 13.0831 10.6616 13.0887 10.6679 13.0942C10.7001 13.1231 10.7318 13.1524 10.763 13.1823C10.7684 13.1875 10.7738 13.1928 10.7792 13.1981C10.8108 13.229 10.8422 13.2606 10.8727 13.2927C10.8766 13.2969 10.8805 13.3013 10.8845 13.3054C10.916 13.339 10.9471 13.3732 10.9774 13.4081C10.9791 13.4102 10.9809 13.4122 10.9826 13.4144C11.0124 13.4488 11.0415 13.4841 11.0699 13.52C11.073 13.5238 11.076 13.5276 11.0791 13.5314C11.1071 13.5669 11.1343 13.6031 11.161 13.6399C11.1651 13.6455 11.1693 13.651 11.1733 13.6567C11.199 13.6927 11.224 13.7292 11.2486 13.7661C11.2529 13.7729 11.2574 13.7795 11.2618 13.7862C11.2858 13.823 11.309 13.8602 11.3315 13.8979C11.3359 13.9051 11.3401 13.9123 11.3444 13.9196C11.3667 13.9574 11.3884 13.9957 11.4094 14.0346C11.4133 14.0418 11.4171 14.049 11.4208 14.0561C11.4419 14.0957 11.4622 14.1356 11.4817 14.1761C11.4847 14.1823 11.4876 14.1886 11.4907 14.1949C11.5106 14.2367 11.5298 14.2788 11.5481 14.3215C11.5501 14.3261 11.552 14.3307 11.5539 14.3352C11.5728 14.3799 11.5911 14.4253 11.6083 14.471C11.6088 14.4721 11.6091 14.4732 11.6095 14.4742C11.6266 14.5199 11.6428 14.5661 11.658 14.6126C11.6593 14.6168 11.6608 14.6207 11.6621 14.6248C11.6767 14.6702 11.6904 14.7159 11.7035 14.762C11.7052 14.7681 11.707 14.7742 11.7087 14.7805C11.721 14.8255 11.7325 14.871 11.7431 14.9167C11.7449 14.9241 11.7466 14.9312 11.7482 14.9387C11.7585 14.984 11.768 15.0297 11.7765 15.0757C11.778 15.0835 11.7794 15.0912 11.7807 15.0989C11.789 15.1452 11.7964 15.1916 11.803 15.2384C11.804 15.2457 11.805 15.2532 11.806 15.2607C11.8123 15.3083 11.8178 15.356 11.8223 15.4041C11.8229 15.4105 11.8233 15.4169 11.8239 15.4233C11.8282 15.4729 11.8317 15.5227 11.834 15.5729C11.8342 15.577 11.8343 15.5811 11.8345 15.5852C11.8368 15.6377 11.8381 15.6907 11.8381 15.7439C11.8381 15.8007 11.8368 15.8575 11.834 15.9141C11.8336 15.926 11.8323 15.9377 11.8317 15.9495C11.8293 15.994 11.8265 16.0386 11.8223 16.083C11.8205 16.1014 11.8181 16.1198 11.816 16.1382C11.8121 16.175 11.8082 16.2119 11.8031 16.2485C11.7995 16.2746 11.7948 16.3003 11.7906 16.3262C11.7861 16.3544 11.7819 16.3827 11.7767 16.4107C11.5011 17.8944 10.3244 19.0434 8.87169 19.2005ZM12.5666 16.1121C12.5669 16.1089 12.5669 16.1057 12.5672 16.1024C12.5716 16.0479 12.5749 15.993 12.5774 15.9379C12.5777 15.9295 12.578 15.9211 12.5783 15.9127C12.5803 15.8567 12.5818 15.8004 12.5818 15.7439C12.5818 15.3463 12.5295 14.9613 12.4319 14.596H13.102C13.3074 14.596 13.4738 14.4211 13.4738 14.2054C13.4738 13.9898 13.3074 13.8148 13.102 13.8148H12.1411C11.4704 12.4349 10.1038 11.4878 8.53051 11.4878C8.52252 11.4878 8.51454 11.4879 8.50655 11.4881L8.49928 11.4882H8.49667C8.45411 11.4885 8.41156 11.4898 8.369 11.4916C8.35985 11.4919 8.3507 11.4927 8.3417 11.4931C8.3096 11.4946 8.27765 11.4965 8.24569 11.4988C8.22739 11.5001 8.20924 11.502 8.19094 11.5035C8.16842 11.5055 8.14591 11.5075 8.12354 11.5099C8.10103 11.5122 8.07852 11.5151 8.05601 11.5178C8.03814 11.5201 8.02013 11.5223 8.00212 11.5247C7.97714 11.5282 7.9523 11.532 7.92732 11.536C7.91207 11.5384 7.89682 11.5407 7.88157 11.5435C7.85514 11.5479 7.82856 11.5528 7.80212 11.5578C7.78861 11.5604 7.77525 11.563 7.76175 11.5658C7.73429 11.5714 7.70684 11.5772 7.67939 11.5835C7.66705 11.5862 7.6547 11.5891 7.64236 11.592C7.61447 11.5986 7.58644 11.6054 7.5587 11.6126C7.55434 11.6137 7.55013 11.6146 7.54592 11.6158L8.64438 9.61643C8.88577 9.17744 9.0133 8.67847 9.0133 8.17356C9.0133 7.14267 8.48607 6.18243 7.63727 5.66729C7.60343 5.64684 7.56901 5.62731 7.53459 5.60824C7.52369 5.60229 7.51265 5.59664 7.50176 5.59084C7.47736 5.57787 7.45296 5.56536 7.42827 5.55315C7.41592 5.54705 7.40372 5.5411 7.39123 5.53515C7.36596 5.52325 7.34054 5.51165 7.31483 5.50051C7.30423 5.49593 7.29363 5.49105 7.28288 5.48647C7.24686 5.47137 7.2107 5.45687 7.1741 5.44329C7.17351 5.44314 7.17279 5.44283 7.17206 5.44253V1.61179C7.17206 1.15372 7.52674 0.781253 7.96261 0.781253H16.9361C17.372 0.781253 17.7265 1.15372 17.7265 1.61179V11.959C17.7265 12.1386 17.7023 12.3147 17.6558 12.4828H15.7278C14.9875 12.4828 14.3852 13.1156 14.3852 13.8935V16.0229C14.2115 16.0811 14.0292 16.1121 13.8448 16.1121H12.5666ZM15.1289 15.5372V13.8935C15.1289 13.5463 15.3976 13.2641 15.7278 13.2641H17.2215L15.2989 15.3524L15.1289 15.5372Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M9.48364 4.27442H15.3899C15.5953 4.27442 15.7617 4.09955 15.7617 3.88379C15.7617 3.66803 15.5953 3.49316 15.3899 3.49316H9.48364C9.27826 3.49316 9.11182 3.66803 9.11182 3.88379C9.11182 4.09955 9.27826 4.27442 9.48364 4.27442Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M15.4802 6.93359H15.4793C15.2739 6.93359 15.1079 7.10861 15.1079 7.32422C15.1079 7.53998 15.2748 7.71485 15.4802 7.71485C15.6855 7.71485 15.852 7.53998 15.852 7.32422C15.852 7.10861 15.6855 6.93359 15.4802 6.93359Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M14.2714 7.32422C14.2714 7.10861 14.105 6.93359 13.8996 6.93359H9.48364C9.27826 6.93359 9.11182 7.10861 9.11182 7.32422C9.11182 7.53998 9.27826 7.71485 9.48364 7.71485H13.8996C14.105 7.71485 14.2714 7.53998 14.2714 7.32422Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M15.7617 10.7646C15.7617 10.5489 15.5952 10.374 15.3899 10.374H11.2927C11.0875 10.374 10.9209 10.5489 10.9209 10.7646C10.9209 10.9803 11.0875 11.1553 11.2927 11.1553H15.3899C15.5952 11.1553 15.7617 10.9804 15.7617 10.7646Z",fill:"currentColor"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_4135_7688",children:(0,Gt.jsx)("rect",{width:"19",height:"20",fill:"white"})})})]})}function Ul(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"45",height:"45",viewBox:"0 0 45 45",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M22.5 9.28125H29.8438V10.75H22.5V9.28125Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M22.5 12.2188H29.8438V13.6875H22.5V12.2188Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M22.5 15.1562H29.8438V16.625H22.5V15.1562Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M22.5 18.0938H29.8438V19.5625H22.5V18.0938Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M14.3279 10.6163C14.8658 10.7945 15.4467 10.7945 15.9846 10.6163C16.1149 11.076 16.3911 11.4809 16.7715 11.7699C17.1519 12.0589 17.616 12.2165 18.0938 12.2188H18.8281C19.0229 12.2188 19.2097 12.2961 19.3474 12.4338C19.4851 12.5716 19.5625 12.7584 19.5625 12.9531V15.1562H21.0312V12.9531C21.0312 12.3688 20.7991 11.8084 20.386 11.3953C19.9728 10.9821 19.4124 10.75 18.8281 10.75H18.0938C17.899 10.75 17.7122 10.6726 17.5745 10.5349C17.4367 10.3972 17.3594 10.2104 17.3594 10.0156V9.73509C17.83 9.20495 18.0911 8.52138 18.0938 7.8125V6.34375C18.0938 5.56468 17.7843 4.81751 17.2334 4.26662C16.6825 3.71574 15.9353 3.40625 15.1562 3.40625C14.3772 3.40625 13.63 3.71574 13.0791 4.26662C12.5282 4.81751 12.2188 5.56468 12.2188 6.34375V7.8125C12.2214 8.52138 12.4825 9.20495 12.9531 9.73509V10.0156C12.9531 10.2104 12.8758 10.3972 12.738 10.5349C12.6003 10.6726 12.4135 10.75 12.2188 10.75H11.4844C10.9001 10.75 10.3397 10.9821 9.92653 11.3953C9.51336 11.8084 9.28125 12.3688 9.28125 12.9531V15.1562H10.75V12.9531C10.75 12.7584 10.8274 12.5716 10.9651 12.4338C11.1028 12.2961 11.2896 12.2188 11.4844 12.2188H12.2188C12.6965 12.2165 13.1606 12.0589 13.541 11.7699C13.9214 11.4809 14.1976 11.076 14.3279 10.6163ZM13.6875 6.34375C13.6875 5.95421 13.8422 5.58063 14.1177 5.30519C14.3931 5.02974 14.7667 4.875 15.1562 4.875C15.5458 4.875 15.9194 5.02974 16.1948 5.30519C16.4703 5.58063 16.625 5.95421 16.625 6.34375V7.8125C16.625 8.20204 16.4703 8.57562 16.1948 8.85106C15.9194 9.12651 15.5458 9.28125 15.1562 9.28125C14.7667 9.28125 14.3931 9.12651 14.1177 8.85106C13.8422 8.57562 13.6875 8.20204 13.6875 7.8125V6.34375Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M23.2344 7.8125H29.1094C29.3041 7.8125 29.4909 7.73513 29.6287 7.59741C29.7664 7.45968 29.8438 7.27289 29.8438 7.07812V4.14062C29.8438 3.94586 29.7664 3.75907 29.6287 3.62134C29.4909 3.48362 29.3041 3.40625 29.1094 3.40625H23.2344C23.0396 3.40625 22.8528 3.48362 22.7151 3.62134C22.5774 3.75907 22.5 3.94586 22.5 4.14062V7.07812C22.5 7.27289 22.5774 7.45968 22.7151 7.59741C22.8528 7.73513 23.0396 7.8125 23.2344 7.8125ZM23.9688 4.875H28.375V6.34375H23.9688V4.875Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M44.5312 19.5625C44.5301 18.3942 44.0655 17.2742 43.2394 16.4481C42.4133 15.622 41.2933 15.1574 40.125 15.1562H35.7188V4.14062C35.7188 3.94586 35.6414 3.75907 35.5037 3.62134C35.3659 3.48362 35.1791 3.40625 34.9844 3.40625H32.7812V1.20312C32.7812 1.00836 32.7039 0.821565 32.5662 0.683843C32.4284 0.546121 32.2416 0.46875 32.0469 0.46875H7.07812C6.88336 0.46875 6.69657 0.546121 6.55884 0.683843C6.42112 0.821565 6.34375 1.00836 6.34375 1.20312V17.3594H4.14062C3.16714 17.3605 2.23386 17.7478 1.54551 18.4361C0.857148 19.1245 0.469916 20.0578 0.46875 21.0312V40.8594C0.469916 41.8329 0.857148 42.7661 1.54551 43.4545C2.23386 44.1429 3.16714 44.5301 4.14062 44.5312H34.9844C35.9289 44.528 36.8359 44.1608 37.5167 43.5061C38.1975 42.8514 38.5999 41.9595 38.6401 41.0158L44.5048 19.7578C44.5224 19.6942 44.5313 19.6285 44.5312 19.5625ZM34.25 4.875V21.0312H32.7812V4.875H34.25ZM7.8125 1.9375H31.3125V21.0312H16.929L13.4723 17.5745C13.3346 17.4368 13.1479 17.3594 12.9531 17.3594H7.8125V1.9375ZM37.1875 40.8594C37.1875 41.4437 36.9554 42.0041 36.5422 42.4172C36.1291 42.8304 35.5687 43.0625 34.9844 43.0625H4.14062C3.55632 43.0625 2.99595 42.8304 2.58278 42.4172C2.16961 42.0041 1.9375 41.4437 1.9375 40.8594V21.0312C1.9375 20.4469 2.16961 19.8866 2.58278 19.4734C2.99595 19.0602 3.55632 18.8281 4.14062 18.8281H12.6491L16.1058 22.2848C16.2435 22.4226 16.4302 22.5 16.625 22.5H34.9844C35.5687 22.5 36.1291 22.7321 36.5422 23.1453C36.9554 23.5584 37.1875 24.1188 37.1875 24.7031V40.8594ZM38.6562 35.436V24.7031C38.6552 23.857 38.3624 23.0371 37.8273 22.3816C37.2923 21.7261 36.5476 21.2751 35.7188 21.1047V16.625H40.125C40.8881 16.6246 41.6213 16.9212 42.1696 17.4519C42.7178 17.9826 43.0381 18.7058 43.0625 19.4685L38.6562 35.436Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M26.9062 29.1094H23.2344V25.4375C23.2344 25.2427 23.157 25.0559 23.0193 24.9182C22.8816 24.7805 22.6948 24.7031 22.5 24.7031H16.625C16.4302 24.7031 16.2434 24.7805 16.1057 24.9182C15.968 25.0559 15.8906 25.2427 15.8906 25.4375V29.1094H12.2188C12.024 29.1094 11.8372 29.1867 11.6995 29.3245C11.5617 29.4622 11.4844 29.649 11.4844 29.8438V35.7188C11.4844 35.9135 11.5617 36.1003 11.6995 36.238C11.8372 36.3758 12.024 36.4531 12.2188 36.4531H15.8906V40.125C15.8906 40.3198 15.968 40.5066 16.1057 40.6443C16.2434 40.782 16.4302 40.8594 16.625 40.8594H22.5C22.6948 40.8594 22.8816 40.782 23.0193 40.6443C23.157 40.5066 23.2344 40.3198 23.2344 40.125V36.4531H26.9062C27.101 36.4531 27.2878 36.3758 27.4255 36.238C27.5633 36.1003 27.6406 35.9135 27.6406 35.7188V29.8438C27.6406 29.649 27.5633 29.4622 27.4255 29.3245C27.2878 29.1867 27.101 29.1094 26.9062 29.1094ZM26.1719 34.9844H22.5C22.3052 34.9844 22.1184 35.0617 21.9807 35.1995C21.843 35.3372 21.7656 35.524 21.7656 35.7188V39.3906H17.3594V35.7188C17.3594 35.524 17.282 35.3372 17.1443 35.1995C17.0066 35.0617 16.8198 34.9844 16.625 34.9844H12.9531V30.5781H16.625C16.8198 30.5781 17.0066 30.5008 17.1443 30.363C17.282 30.2253 17.3594 30.0385 17.3594 29.8438V26.1719H21.7656V29.8438C21.7656 30.0385 21.843 30.2253 21.9807 30.363C22.1184 30.5008 22.3052 30.5781 22.5 30.5781H26.1719V34.9844Z",fill:"currentColor"})]})}function ql(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"47",height:"47",viewBox:"0 0 47 47",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.5 3.375C17.9469 3.375 13.4375 7.88444 13.4375 13.4375C13.4375 18.9906 17.9469 23.5 23.5 23.5C29.0531 23.5 33.5625 18.9906 33.5625 13.4375C33.5625 7.88444 29.0531 3.375 23.5 3.375ZM23.5 6.25C27.4675 6.25 30.6875 9.47 30.6875 13.4375C30.6875 17.405 27.4675 20.625 23.5 20.625C19.5325 20.625 16.3125 17.405 16.3125 13.4375C16.3125 9.47 19.5325 6.25 23.5 6.25Z",fill:"currentColor"}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.25 40.75H23.5C24.2935 40.75 24.9375 41.394 24.9375 42.1875C24.9375 42.981 24.2935 43.625 23.5 43.625H4.8125C4.019 43.625 3.375 42.981 3.375 42.1875C3.375 42.1875 3.375 41.0016 3.375 39.3125C3.375 32.1667 9.16669 26.375 16.3125 26.375H23.5C24.2935 26.375 24.9375 27.019 24.9375 27.8125C24.9375 28.606 24.2935 29.25 23.5 29.25H16.3125C10.7551 29.25 6.25 33.7551 6.25 39.3125V40.75Z",fill:"currentColor"}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35.7202 26.375C30.5639 26.375 26.3779 30.561 26.3779 35.7173C26.3779 40.8736 30.5639 45.0596 35.7202 45.0596C40.8765 45.0596 45.0625 40.8736 45.0625 35.7173C45.0625 30.561 40.8765 26.375 35.7202 26.375ZM35.7202 29.25C39.2895 29.25 42.1875 32.148 42.1875 35.7173C42.1875 39.2866 39.2895 42.1846 35.7202 42.1846C32.1509 42.1846 29.2529 39.2866 29.2529 35.7173C29.2529 32.148 32.1509 29.25 35.7202 29.25Z",fill:"currentColor"}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35.1222 35.8107L38.2832 32.5605C38.8367 31.9913 39.7481 31.9783 40.3159 32.5318C40.8851 33.0852 40.8981 33.9952 40.3446 34.5644L36.1529 38.874C35.8826 39.1529 35.5103 39.3096 35.1222 39.3096C34.7341 39.3096 34.3632 39.1529 34.0915 38.874L31.0957 35.7935C30.5423 35.2242 30.5552 34.3143 31.1245 33.7608C31.6937 33.2074 32.6037 33.2203 33.1571 33.7896L35.1222 35.8107Z",fill:"currentColor"})]})}function Gl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"47",height:"47",viewBox:"0 0 47 47",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.5 3.375C17.9469 3.375 13.4375 7.88444 13.4375 13.4375C13.4375 18.9906 17.9469 23.5 23.5 23.5C29.0531 23.5 33.5625 18.9906 33.5625 13.4375C33.5625 7.88444 29.0531 3.375 23.5 3.375ZM23.5 6.25C27.4675 6.25 30.6875 9.47 30.6875 13.4375C30.6875 17.405 27.4675 20.625 23.5 20.625C19.5325 20.625 16.3125 17.405 16.3125 13.4375C16.3125 9.47 19.5325 6.25 23.5 6.25Z",fill:"currentColor"}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.25 40.75H23.5C24.2935 40.75 24.9375 41.394 24.9375 42.1875C24.9375 42.981 24.2935 43.625 23.5 43.625H4.8125C4.019 43.625 3.375 42.981 3.375 42.1875C3.375 42.1875 3.375 41.0016 3.375 39.3125C3.375 32.1667 9.16669 26.375 16.3125 26.375H23.5C24.2935 26.375 24.9375 27.019 24.9375 27.8125C24.9375 28.606 24.2935 29.25 23.5 29.25H16.3125C10.7551 29.25 6.25 33.7551 6.25 39.3125V40.75Z",fill:"currentColor"}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35.7202 26.375C30.5639 26.375 26.3779 30.561 26.3779 35.7173C26.3779 40.8736 30.5639 45.0596 35.7202 45.0596C40.8765 45.0596 45.0625 40.8736 45.0625 35.7173C45.0625 30.561 40.8765 26.375 35.7202 26.375ZM35.7202 29.25C39.2895 29.25 42.1875 32.148 42.1875 35.7173C42.1875 39.2866 39.2895 42.1846 35.7202 42.1846C32.1509 42.1846 29.2529 39.2866 29.2529 35.7173C29.2529 32.148 32.1509 29.25 35.7202 29.25Z",fill:"currentColor"}),(0,Gt.jsx)("g",{clipPath:"url(#clip0_3268_26408)",children:(0,Gt.jsx)("path",{d:"M32.8438 32.8438L38.5937 38.5937M32.8438 38.5937L38.5937 32.8438",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_3268_26408",children:(0,Gt.jsx)("rect",{width:"8.625",height:"8.625",fill:"white",transform:"translate(31.4062 31.4062)"})})})]})}function Yl(){return(0,Gt.jsx)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Gt.jsx)("path",{d:"M19.1 9.63363C19.6688 9.07656 20 8.31559 20 7.5C20 5.84586 18.6543 4.5 17 4.5C16.4534 4.5 15.9157 4.65023 15.4443 4.93457C15.2868 5.0298 15.236 5.23453 15.3311 5.39227C15.4261 5.55 15.6312 5.60027 15.7887 5.50555C16.1562 5.28387 16.5749 5.16668 17 5.16668C18.2864 5.16668 19.3333 6.2134 19.3333 7.5C19.3333 8.2923 18.9365 9.02262 18.2705 9.45457C17.7112 9.82145 17.0023 9.92723 16.3548 9.74281C16.1797 9.69234 15.9935 9.79457 15.9427 9.97164C15.8922 10.1487 15.9948 10.3331 16.1719 10.3837C16.4414 10.4609 16.72 10.5 17 10.5C17.5241 10.5 18.0308 10.357 18.4806 10.0988C20.1918 10.7188 21.3333 12.3344 21.3333 14.1666V15.8333H18.2938C18.0577 13.6069 16.657 11.6586 14.6139 10.7335C15.2641 10.0716 15.6666 9.16563 15.6666 8.16668C15.6667 6.14484 14.0218 4.5 12 4.5C9.9782 4.5 8.33332 6.14484 8.33332 8.16668C8.33332 9.16594 8.73613 10.0721 9.38664 10.7342C8.69906 11.0466 8.06137 11.4836 7.52051 12.0214C6.48367 13.0612 5.85273 14.3957 5.70297 15.8334H2.66668V14.1667C2.66668 13.0124 3.11754 11.9241 3.93492 11.1032C4.38488 10.6561 4.9327 10.315 5.52254 10.1007C5.97242 10.3578 6.47754 10.5 7 10.5C7.27996 10.5 7.55859 10.4609 7.82812 10.3838C8.00519 10.3332 8.10773 10.1487 8.0573 9.97168C8.00652 9.79461 7.82031 9.69254 7.64519 9.74285C6.99805 9.92758 6.28941 9.82195 5.72789 9.45379C5.06352 9.02262 4.66668 8.29234 4.66668 7.5C4.66668 6.2134 5.71355 5.16668 7 5.16668C7.42512 5.16668 7.84375 5.28387 8.21125 5.50555C8.36945 5.60027 8.57355 5.54949 8.66894 5.39227C8.76398 5.23457 8.7132 5.0298 8.55566 4.93457C8.0843 4.65023 7.54656 4.5 7 4.5C5.3457 4.5 4 5.84586 4 7.5C4 8.31496 4.33066 9.07535 4.89781 9.63191C4.36918 9.87766 3.88094 10.2169 3.46355 10.6315C2.51984 11.5794 2 12.8348 2 14.1667V16.1667C2 16.3508 2.1491 16.5 2.33332 16.5H5.66664V19.1667C5.66664 19.3508 5.81574 19.5 5.99996 19.5H18C18.1842 19.5 18.3333 19.3507 18.3333 19.1667V16.5H21.6666C21.8509 16.5 21.9999 16.3507 21.9999 16.1667V14.1667C22 12.1958 20.8546 10.4425 19.1 9.63363ZM9 8.16668C9 6.51254 10.3457 5.16668 12 5.16668C13.6543 5.16668 15 6.51254 15 8.16668C15 9.82082 13.6543 11.1667 12 11.1667C10.3457 11.1667 9 9.82078 9 8.16668ZM17.6667 18.8333H6.33332V16.5C6.33332 14.9886 6.9225 13.5653 7.99152 12.493C8.55469 11.9329 9.23742 11.4984 9.96941 11.2173C10.5512 11.6058 11.2494 11.8333 12 11.8333C12.7519 11.8333 13.4512 11.6052 14.0336 11.2154C16.2124 12.0526 17.6667 14.1531 17.6667 16.5V18.8333Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.3"})})}function Zl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"17",height:"17",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M2.57873 2.57923C3.69079 1.46717 5.35486 1.042 7.49984 1.042H9.1665C9.51168 1.042 9.7915 1.32182 9.7915 1.667C9.7915 2.01218 9.51168 2.292 9.1665 2.292H7.49984C5.47815 2.292 4.22556 2.70017 3.46261 3.46311C2.69967 4.22605 2.2915 5.47865 2.2915 7.50034V12.5003C2.2915 14.522 2.69967 15.7746 3.46261 16.5376C4.22556 17.3005 5.47815 17.7087 7.49984 17.7087H12.4998C14.5215 17.7087 15.7741 17.3005 16.5371 16.5376C17.3 15.7746 17.7082 14.522 17.7082 12.5003V10.8337C17.7082 10.4885 17.988 10.2087 18.3332 10.2087C18.6783 10.2087 18.9582 10.4885 18.9582 10.8337V12.5003C18.9582 14.6453 18.533 16.3094 17.4209 17.4214C16.3089 18.5335 14.6448 18.9587 12.4998 18.9587H7.49984C5.35486 18.9587 3.69079 18.5335 2.57873 17.4214C1.46667 16.3094 1.0415 14.6453 1.0415 12.5003V7.50034C1.0415 5.35536 1.46667 3.69128 2.57873 2.57923Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M15.1638 0.844992C16.0916 0.75392 17.0114 1.16137 17.9251 2.07506C18.8388 2.98875 19.2463 3.9086 19.1552 4.83639C19.0673 5.7314 18.5276 6.47317 17.9251 7.07561L11.3512 13.6495C11.1635 13.8311 10.9182 13.9898 10.6816 14.1088C10.4463 14.227 10.1691 14.3313 9.90489 14.3691L7.39338 14.7278C6.77497 14.8129 6.18329 14.6441 5.76817 14.2307C5.35216 13.8163 5.18199 13.2245 5.27295 12.6025L5.27313 12.6012L5.63083 10.0973L5.63099 10.0962C5.66852 9.82849 5.77229 9.54936 5.89141 9.31237C6.01077 9.07487 6.17149 8.82813 6.3579 8.64173L12.9246 2.07506C13.527 1.47262 14.2688 0.932845 15.1638 0.844992ZM15.2859 2.08901C14.8226 2.13449 14.3393 2.42805 13.8084 2.95894L7.24178 9.52561C7.17818 9.58921 7.0889 9.7133 7.00827 9.87372C6.92755 10.0343 6.88144 10.1797 6.86884 10.27L6.86856 10.2721L6.51022 12.7804L6.50988 12.7828C6.46791 13.0687 6.55196 13.2471 6.65026 13.345C6.74955 13.4439 6.93241 13.5291 7.22148 13.4897L7.22297 13.4895L9.72812 13.1316C9.81389 13.1194 9.95758 13.0736 10.1202 12.9919C10.2792 12.912 10.4075 12.8222 10.4788 12.7541L17.0412 6.19173C17.5721 5.66083 17.8657 5.17761 17.9112 4.71428C17.9534 4.28374 17.7942 3.71192 17.0412 2.95894C16.2883 2.20597 15.7164 2.04675 15.2859 2.08901Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M12.2561 2.85687C12.5885 2.7637 12.9335 2.9576 13.0266 3.28996C13.5259 5.07089 14.9199 6.46628 16.7119 6.97401C17.044 7.0681 17.2369 7.41361 17.1428 7.74571C17.0487 8.07782 16.7032 8.27076 16.3711 8.17666C14.1631 7.55106 12.4404 5.82978 11.823 3.62737C11.7299 3.29501 11.9238 2.95004 12.2561 2.85687Z",fill:"currentColor"})]})}function Kl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"18",height:"18",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M9.99987 7.6414C8.69505 7.6414 7.64154 8.69491 7.64154 9.99973C7.64154 11.3046 8.69505 12.3581 9.99987 12.3581C11.3047 12.3581 12.3582 11.3046 12.3582 9.99973C12.3582 8.69491 11.3047 7.6414 9.99987 7.6414ZM6.39154 9.99973C6.39154 8.00455 8.00469 6.3914 9.99987 6.3914C11.995 6.3914 13.6082 8.00455 13.6082 9.99973C13.6082 11.9949 11.995 13.6081 9.99987 13.6081C8.00469 13.6081 6.39154 11.9949 6.39154 9.99973Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M1.88112 7.4972C3.87355 4.36523 6.79322 2.47473 9.99987 2.47473C13.2067 2.47473 16.1264 4.3654 18.1189 7.49761C18.573 8.20956 18.779 9.12153 18.779 9.99556C18.779 10.8696 18.573 11.7816 18.1189 12.4935C16.1264 15.6257 13.2067 17.5164 9.99987 17.5164C6.79308 17.5164 3.87329 15.6257 1.88085 12.4935C1.42671 11.7816 1.2207 10.8696 1.2207 9.99556C1.2207 9.12136 1.42679 8.20921 1.88112 7.4972ZM9.99987 3.72473C7.32333 3.72473 4.75978 5.30073 2.93555 8.16852L2.93503 8.16934C2.63954 8.63227 2.4707 9.29494 2.4707 9.99556C2.4707 10.6962 2.63954 11.3589 2.93503 11.8218L2.93555 11.8226C4.75978 14.6904 7.32333 16.2664 9.99987 16.2664C12.6764 16.2664 15.24 14.6904 17.0642 11.8226L17.0647 11.8218C17.3602 11.3589 17.529 10.6962 17.529 9.99556C17.529 9.29494 17.3602 8.63227 17.0647 8.16934L17.0642 8.16852C15.24 5.30073 12.6764 3.72473 9.99987 3.72473Z",fill:"currentColor"})]})}function Xl(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M11.25 9.75001H12.375C12.5823 9.75001 12.75 9.58228 12.75 9.375V7.87499C12.75 7.66771 12.5823 7.49998 12.375 7.49998H11.25V6.37501C11.25 6.16773 11.0823 6 10.875 6H9.37499C9.16771 6 8.99998 6.16773 8.99998 6.37501V7.50001H7.87498C7.6677 7.50001 7.49997 7.66774 7.49997 7.87502V9.37504C7.49997 9.58232 7.6677 9.75005 7.87498 9.75005H8.99998V10.875C8.99998 11.0823 9.16771 11.2501 9.37499 11.2501H10.875C11.0823 11.2501 11.25 11.0823 11.25 10.875V9.75001ZM10.875 9.00002C10.6677 9.00002 10.5 9.16775 10.5 9.37504V10.5H9.75V9.37504C9.75 9.16775 9.58227 9.00002 9.37499 9.00002H8.24999V8.25004H9.37499C9.58227 8.25004 9.75 8.0823 9.75 7.87502V6.75002H10.5V7.87502C10.5 8.0823 10.6677 8.25004 10.875 8.25004H12V9.00002H10.875Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M18.6401 6.85987L14.8901 3.10986C14.8198 3.03955 14.7246 3 14.625 3H6.74998C5.9231 3 5.25 3.67271 5.25 4.50001V19.5C5.25 20.3273 5.9231 21 6.75001 21H17.25C18.0769 21 18.75 20.3273 18.75 19.5V7.12499C18.75 7.02539 18.7104 6.93019 18.6401 6.85987ZM15 4.28029L17.4697 6.75001H15.75C15.3362 6.75001 15 6.41346 15 6.00002V4.28029ZM18 19.5C18 19.9134 17.6638 20.25 17.25 20.25H6.75001C6.33619 20.25 6.00002 19.9134 6.00002 19.5V4.50001C6.00002 4.08657 6.33622 3.75002 6.75001 3.75002H14.25V6.00002C14.25 6.82729 14.9231 7.5 15.75 7.5H18V19.5Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M8.625 12.75C8.00463 12.75 7.5 13.2546 7.5 13.875C7.5 14.4954 8.00463 15 8.625 15C9.24537 15 9.75 14.4954 9.75 13.875C9.75 13.2547 9.24537 12.75 8.625 12.75ZM8.625 14.25C8.41846 14.25 8.24999 14.0819 8.24999 13.875C8.24999 13.6681 8.41846 13.5 8.625 13.5C8.83154 13.5 9.00001 13.6681 9.00001 13.875C9.00001 14.0819 8.83154 14.25 8.625 14.25Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M8.625 16.5C8.00463 16.5 7.5 17.0046 7.5 17.625C7.5 18.2454 8.00463 18.75 8.625 18.75C9.24537 18.75 9.75 18.2454 9.75 17.625C9.75 17.0046 9.24537 16.5 8.625 16.5ZM8.625 18C8.41846 18 8.24999 17.8319 8.24999 17.625C8.24999 17.4181 8.41846 17.25 8.625 17.25C8.83154 17.25 9.00001 17.4181 9.00001 17.625C9.00001 17.8319 8.83154 18 8.625 18Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M11.25 13.875C11.25 14.0823 11.4177 14.25 11.625 14.25H16.125C16.3323 14.25 16.5 14.0823 16.5 13.875C16.5 13.6677 16.3323 13.5 16.125 13.5H11.625C11.4177 13.5 11.25 13.6678 11.25 13.875Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M16.125 17.25H11.625C11.4177 17.25 11.25 17.4177 11.25 17.625C11.25 17.8323 11.4177 18 11.625 18H16.125C16.3323 18 16.5 17.8323 16.5 17.625C16.5 17.4177 16.3323 17.25 16.125 17.25Z",fill:"currentColor"})]})}function Ql(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"17",height:"17",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M4.13815 4.1947C5.80861 4.026 7.47927 3.94163 9.15005 3.94163C11.9545 3.94163 14.7668 4.08437 17.5617 4.36134C17.9052 4.39538 18.156 4.70143 18.122 5.04493C18.088 5.38842 17.7819 5.63929 17.4384 5.60525C14.6833 5.33222 11.9122 5.19163 9.15005 5.19163C7.52113 5.19163 5.89209 5.27389 4.26286 5.43846L4.26103 5.43864L2.56103 5.60531C2.2175 5.63899 1.91171 5.38781 1.87803 5.04428C1.84435 4.70074 2.09553 4.39495 2.43906 4.36128L4.13815 4.1947Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M7.88303 3.15376L7.69975 4.24514C7.64258 4.58555 7.32028 4.81516 6.97987 4.75799C6.63946 4.70083 6.40984 4.37852 6.46701 4.03811L6.65034 2.94645C6.65355 2.92743 6.65684 2.90752 6.66018 2.88735C6.71756 2.54079 6.80174 2.03235 7.14066 1.64804C7.53571 1.20006 8.13846 1.04163 8.90838 1.04163H11.0917C11.871 1.04163 12.4731 1.21279 12.8658 1.66533C13.2052 2.05642 13.2873 2.56667 13.3421 2.90738C13.3448 2.92396 13.3474 2.94014 13.3499 2.95588L13.533 4.03734C13.5905 4.37768 13.3613 4.70027 13.021 4.75786C12.6807 4.81546 12.3581 4.58625 12.3005 4.24591L12.1165 3.15887C12.0468 2.73135 12.0027 2.57789 11.9217 2.48459C11.8769 2.43296 11.7208 2.29163 11.0917 2.29163H8.90838C8.26996 2.29163 8.11855 2.42903 8.07818 2.4748C8.00142 2.56185 7.9581 2.7081 7.88303 3.15376Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M15.7486 6.99292C16.0931 7.01516 16.3543 7.31242 16.3321 7.65689L15.7902 16.052L15.7891 16.0678C15.7671 16.3813 15.743 16.7261 15.6784 17.0469C15.6114 17.3796 15.4933 17.7306 15.254 18.0421C14.7531 18.6944 13.9005 18.9583 12.675 18.9583H7.32505C6.09958 18.9583 5.24702 18.6944 4.74605 18.0421C4.50679 17.7306 4.38872 17.3796 4.32172 17.0469C4.25712 16.7261 4.23297 16.3813 4.21102 16.0678L4.20967 16.0486L3.66801 7.65689C3.64578 7.31242 3.90699 7.01516 4.25145 6.99292C4.59591 6.97069 4.89318 7.23191 4.91541 7.57637L5.45685 15.9646L5.45697 15.9663C5.48049 16.3019 5.50039 16.5681 5.54712 16.8001C5.59262 17.0261 5.6558 17.1745 5.73738 17.2807C5.87807 17.4639 6.22552 17.7083 7.32505 17.7083H12.675C13.7746 17.7083 14.122 17.4639 14.2627 17.2807C14.3443 17.1745 14.4075 17.0261 14.453 16.8001C14.4997 16.5681 14.5196 16.3019 14.5431 15.9663L14.5432 15.9646L15.0847 7.57637C15.1069 7.23191 15.4042 6.97069 15.7486 6.99292Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M7.98338 13.75C7.98338 13.4048 8.2632 13.125 8.60838 13.125H11.3834C11.7286 13.125 12.0084 13.4048 12.0084 13.75C12.0084 14.0951 11.7286 14.375 11.3834 14.375H8.60838C8.2632 14.375 7.98338 14.0951 7.98338 13.75Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M7.29171 10.4166C7.29171 10.0714 7.57153 9.79163 7.91671 9.79163H12.0834C12.4286 9.79163 12.7084 10.0714 12.7084 10.4166C12.7084 10.7618 12.4286 11.0416 12.0834 11.0416H7.91671C7.57153 11.0416 7.29171 10.7618 7.29171 10.4166Z",fill:"currentColor"})]})}function Jl(){return(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_2325_2631)",children:[(0,Gt.jsx)("rect",{x:"1.6",y:"6.6",width:"16.8",height:"6.8",rx:"3.4",fill:"white",stroke:"#303F9F",strokeWidth:"0.8"}),(0,Gt.jsx)("path",{d:"M10 6.6H9.6V7V13V13.4H10H15C16.8778 13.4 18.4 11.8778 18.4 10C18.4 8.12223 16.8778 6.6 15 6.6H10Z",fill:"white",stroke:"#303F9F",strokeWidth:"0.8"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_2325_2631",children:(0,Gt.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})}function ec(){return(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_2197_3518)",children:[(0,Gt.jsx)("path",{d:"M1.17772 16.0967L1 16.5009L3.56446 14.6981L3.43235 14.5117L1.17772 16.0967Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M14.6797 6.74542L14.6781 6.74313L13.9954 5.78C13.8724 5.6065 13.6314 5.56512 13.4572 5.68762L4.37003 12.0757C4.27826 12.1402 4.21928 12.2413 4.20832 12.3527L4.13749 13.0779C4.12971 13.1577 4.09704 13.2332 4.04408 13.2935L2.97657 14.5116C2.85948 14.6453 2.84929 14.8414 2.95201 14.9864L2.95366 14.9887C3.05639 15.1335 3.24529 15.1898 3.41105 15.1246L4.92094 14.5307C4.99582 14.5012 5.07816 14.4959 5.15632 14.5153L5.86621 14.6918C5.97518 14.7189 6.09063 14.6973 6.18239 14.6328L15.2696 8.24477C15.4438 8.12226 15.4853 7.88227 15.3623 7.70877L14.6796 6.74564L14.6797 6.74542Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M3.205 14.809C3.1845 14.78 3.18658 14.7413 3.20994 14.7146L4.27745 13.4965C4.37338 13.387 4.43159 13.2527 4.44573 13.1082L4.51656 12.3828C4.51875 12.3607 4.53048 12.3406 4.54868 12.3278L13.6358 5.93976C13.6704 5.91541 13.7184 5.92371 13.7427 5.9581L15.1097 7.88677C15.1341 7.92116 15.1258 7.96899 15.0912 7.99323L6.00408 14.3813C5.98588 14.394 5.96297 14.3983 5.94126 14.393L5.23148 14.2165C5.08984 14.1814 4.94326 14.191 4.80753 14.2442L3.29753 14.8381C3.26442 14.8511 3.22715 14.84 3.20665 14.8111L3.205 14.809Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M12.2741 9.97367L6.00397 14.3814C5.98577 14.3942 5.96286 14.3986 5.94115 14.3931L5.23127 14.2166C5.08973 14.1815 4.94315 14.1911 4.80742 14.2445L3.29753 14.8384C3.26453 14.8513 3.22715 14.8402 3.20665 14.8114L3.205 14.8091C3.1845 14.7802 3.18658 14.7414 3.20994 14.7148L4.27745 13.4967C4.37338 13.3872 4.43148 13.2529 4.44573 13.1082L4.51656 12.3831C4.51875 12.3609 4.53048 12.3408 4.54868 12.3281L8.92441 9.25195L12.2741 9.97378V9.97367Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M14.2466 6.44255L17.2902 4.30587L17.8652 5.11819L14.8215 7.25488L14.2466 6.44255Z",fill:"#E3E5EA",stroke:"#303F9F",strokeWidth:"0.1"}),(0,Gt.jsx)("path",{d:"M17.9655 5.10879L17.3328 4.21484L17.0417 4.41917L17.6744 5.31311L17.9655 5.10879Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M16.1529 8.77377C16.0036 8.87859 15.8179 8.90272 15.6389 8.85653C15.4599 8.81067 15.287 8.6945 15.1632 8.51947L13.1643 5.69483C12.9165 5.34477 12.9578 4.891 13.2568 4.68125C13.4061 4.57643 13.5917 4.55241 13.7707 4.5986C13.9497 4.64445 14.1224 4.76041 14.2463 4.93544L16.2452 7.76008C16.2887 7.82155 16.3234 7.8863 16.349 7.95236C16.4706 8.26201 16.3994 8.60082 16.153 8.77377H16.1529Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M16.3808 8.053C16.3462 8.09777 16.3052 8.13773 16.2573 8.17136C16.108 8.27618 15.9223 8.30031 15.7433 8.25412C15.5643 8.20826 15.3914 8.09209 15.2676 7.91706L13.2687 5.09242C13.2034 5.00026 13.1585 4.9009 13.1327 4.80078C12.952 5.03509 12.9563 5.40185 13.1642 5.69556L15.1632 8.52021C15.287 8.69523 15.4599 8.81141 15.6389 8.85727C15.8178 8.90334 16.0035 8.87932 16.1528 8.7745C16.3729 8.62001 16.4528 8.33328 16.3808 8.053Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M18.9584 5.89121L18.6258 6.12476C18.5814 6.15587 18.5201 6.14528 18.4888 6.10117L16.5685 3.38757C16.5372 3.34346 16.5479 3.28253 16.5922 3.25152L16.925 3.01786C16.9694 2.98674 17.0307 2.99734 17.0619 3.04145L18.9822 5.75483C19.0134 5.79905 19.0028 5.86009 18.9585 5.89121H18.9584Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M18.982 5.7543L18.9111 5.65406C18.725 5.78465 18.4681 5.74032 18.3369 5.55503L16.6684 3.19727L16.5921 3.25088C16.5478 3.28199 16.5373 3.34281 16.5684 3.38692L18.4888 6.10053C18.52 6.14475 18.5813 6.15523 18.6257 6.12411L18.9583 5.89056C19.0027 5.85944 19.0133 5.79841 18.982 5.75419V5.7543Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M12.087 8.56138L12.8169 9.59123L13.0697 9.41347L12.3398 8.38363C12.2906 8.31407 12.194 8.29748 12.1241 8.34661C12.0543 8.39564 12.0376 8.49183 12.087 8.56138Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M11.8626 9.39146L12.2743 9.97222L12.5271 9.79447L12.1154 9.2137C12.0662 9.14415 11.9696 9.12756 11.8998 9.17669C11.8299 9.22571 11.8133 9.32191 11.8626 9.39146Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M11.3199 9.77427L11.7315 10.355L11.9844 10.1773L11.5727 9.59652C11.5235 9.52696 11.4269 9.51037 11.357 9.5595C11.2872 9.60853 11.2705 9.70472 11.3199 9.77427Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M10.7771 10.1551L11.1888 10.7359L11.4416 10.5581L11.03 9.97738C10.9807 9.90782 10.8842 9.89123 10.8143 9.94036C10.7445 9.98939 10.7278 10.0856 10.7771 10.1551Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M9.91606 10.0868L10.646 11.1166L10.8988 10.9389L10.1689 9.90902C10.1197 9.83946 10.0231 9.82287 9.95323 9.872C9.88339 9.92114 9.86673 10.0172 9.91606 10.0868Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M9.6917 10.9168L10.1034 11.4976L10.3562 11.3199L9.94452 10.7391C9.89529 10.6695 9.7987 10.6529 9.72886 10.7021C9.65903 10.7512 9.64236 10.8473 9.6917 10.9168Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M9.14897 11.2997L9.56065 11.8804L9.81347 11.7027L9.40179 11.1219C9.35256 11.0524 9.25598 11.0358 9.18614 11.0849C9.1163 11.1339 9.09964 11.2301 9.14897 11.2997Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M8.60625 11.6805L9.01793 12.2613L9.27074 12.0835L8.85907 11.5028C8.80984 11.4332 8.71325 11.4166 8.64342 11.4658C8.57358 11.5148 8.55691 11.611 8.60625 11.6805Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M7.74541 11.6141L8.47536 12.644L8.72817 12.4662L7.99823 11.4364C7.949 11.3668 7.85241 11.3502 7.78258 11.3993C7.71274 11.4484 7.69607 11.5446 7.74541 11.6141Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M7.52104 12.4442L7.93272 13.025L8.18554 12.8472L7.77386 12.2664C7.72463 12.1969 7.62805 12.1803 7.55821 12.2294C7.48837 12.2786 7.47171 12.3746 7.52104 12.4442Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M6.97832 12.8251L7.39 13.4058L7.64281 13.2281L7.23114 12.6473C7.18191 12.5777 7.08532 12.5611 7.01549 12.6103C6.94565 12.6593 6.92898 12.7555 6.97832 12.8251Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M6.43559 13.2059L6.84727 13.7867L7.10009 13.6089L6.68841 13.0282C6.63919 12.9586 6.5426 12.942 6.47276 12.9911C6.40292 13.0403 6.38626 13.1364 6.43559 13.2059Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M4.24107 14.8647L3.50071 13.8201C3.47133 13.7787 3.41377 13.7688 3.37222 13.7981L3.34689 13.8159C3.21204 13.9107 3.15942 14.0779 3.20393 14.2272L2.91866 14.5181C2.70564 14.7012 2.89399 15.0292 2.89399 15.0292C2.89399 15.0292 3.14122 15.3158 3.3857 15.1772L3.75638 15.0069C3.88268 15.0987 4.05853 15.1054 4.19338 15.0105L4.21871 14.9927C4.26037 14.9634 4.27023 14.9061 4.24085 14.8647H4.24107Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M8.88239 9.78435C8.76837 9.8645 8.74118 10.0215 8.82165 10.135C8.90212 10.2485 9.05967 10.2756 9.17369 10.1954C9.28771 10.1153 9.3149 9.95829 9.23443 9.84484C9.15396 9.73129 8.99641 9.70421 8.88239 9.78435Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M8.21607 11.2724C8.15106 11.3181 8.13549 11.4078 8.18143 11.4725C8.22736 11.5373 8.31737 11.5528 8.38239 11.507C8.4474 11.4613 8.46297 11.3716 8.41703 11.3069C8.37109 11.2421 8.28108 11.2266 8.21607 11.2724Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M7.14259 10.9323C7.00083 11.032 6.96695 11.2272 7.06705 11.3685C7.16715 11.5097 7.36317 11.5434 7.50504 11.4437C7.6468 11.344 7.68067 11.1488 7.58058 11.0075C7.48048 10.8663 7.28446 10.8326 7.14259 10.9323Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.77012 12.9794C5.70029 13.0286 5.68362 13.1246 5.73296 13.1942C5.78229 13.2637 5.87877 13.2803 5.94861 13.2312C6.01845 13.1822 6.03511 13.086 5.98577 13.0164C5.93655 12.9469 5.83996 12.9303 5.77012 12.9794Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.00104 12.4253C5.91542 12.4855 5.89492 12.6035 5.95543 12.6887C6.01595 12.774 6.13436 12.7944 6.21998 12.7342C6.30561 12.6739 6.32611 12.556 6.26559 12.4707C6.20518 12.3854 6.08667 12.365 6.00104 12.4253Z",fill:"#E3E5EA"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_2197_3518",children:(0,Gt.jsx)("rect",{width:"18",height:"13.5",fill:"white",transform:"translate(1 3)"})})})]})}const tc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M16.5102 16.5104C19.8297 13.191 19.8297 7.80905 16.5102 4.48959C13.1908 1.17014 7.80887 1.17014 4.48941 4.48959C1.16996 7.80905 1.16996 13.191 4.48941 16.5104C7.80887 19.8299 13.1908 19.8299 16.5102 16.5104Z",fill:"#F9F9F9",stroke:"#303F9F"}),(0,Gt.jsx)("path",{d:"M12.521 18.0454C16.688 16.9289 19.1609 12.6457 18.0444 8.47862C16.9278 4.31157 12.6446 1.83866 8.47756 2.95522C4.31052 4.07178 1.83761 8.35498 2.95417 12.522C4.07072 16.6891 8.35393 19.162 12.521 18.0454Z",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,Gt.jsx)("path",{d:"M17.8074 10.616L17.8074 10.0422C17.8074 9.67588 17.5293 9.37891 17.1863 9.37891L3.69346 9.37891C3.35046 9.37891 3.0724 9.67588 3.0724 10.0422L3.0724 10.616C3.0724 10.9823 3.35046 11.2793 3.69346 11.2793L17.1863 11.2793C17.5293 11.2793 17.8074 10.9823 17.8074 10.616Z",fill:"url(#paint0_linear_2194_4856)"}),(0,Gt.jsx)("defs",{children:(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2194_4856",x1:"10.5767",y1:"9.29981",x2:"10.5767",y2:"11.2059",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),nc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M19 15.4495V5.5505C19 3.58961 17.4104 2 15.4495 2L5.5505 2C3.58961 2 2 3.58961 2 5.5505V15.4495C2 17.4104 3.58961 19 5.5505 19H15.4495C17.4104 19 19 17.4104 19 15.4495Z",fill:"#303F9F",stroke:"#303F9F"}),(0,Gt.jsx)("path",{d:"M14.9893 2.6H6.01069C4.12702 2.6 2.6 4.12702 2.6 6.01069V14.9893C2.6 16.873 4.12702 18.4 6.01069 18.4H14.9893C16.873 18.4 18.4 16.873 18.4 14.9893V6.01069C18.4 4.12702 16.873 2.6 14.9893 2.6Z",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,Gt.jsx)("path",{d:"M18 11.3019L18 10.6981C18 10.3125 17.7169 10 17.3678 10L3.63222 10C3.28306 10 3 10.3125 3 10.6981L3 11.3019C3 11.6875 3.28306 12 3.63222 12L17.3678 12C17.7169 12 18 11.6875 18 11.3019Z",fill:"url(#paint0_linear_2196_4878)"}),(0,Gt.jsx)("defs",{children:(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2196_4878",x1:"10.6392",y1:"9.91676",x2:"10.6392",y2:"11.9227",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),rc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("rect",{x:"1",y:"5",width:"18",height:"9",rx:"4.5",fill:"#303F9F",stroke:"#303F9F"}),(0,Gt.jsx)("rect",{x:"1.64639",y:"5.64492",width:"16.707",height:"7.8",rx:"3.9",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,Gt.jsx)("path",{d:"M10.4207 13C10.1863 13 10 12.7912 10 12.5332V6.46682C10 6.20878 10.1863 6 10.4165 6C10.6467 6 10.8372 6.20878 10.8372 6.46682V12.5332C10.8372 12.7912 10.6509 13 10.4207 13Z",fill:"url(#paint0_linear_2196_4891)"}),(0,Gt.jsx)("defs",{children:(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2196_4891",x1:"9.96516",y1:"9.43502",x2:"10.8049",y2:"9.43502",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),ic=()=>(0,Gt.jsxs)("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M11.148 13.8379C11.0523 13.8718 10.9477 13.8718 10.852 13.8379L1.18401 10.4187C0.789363 10.2791 0.789418 9.72101 1.18409 9.58151L10.852 6.16438C10.9478 6.13055 11.0522 6.13055 11.148 6.16438L20.8159 9.58151C21.2106 9.72101 21.2106 10.2791 20.816 10.4187L11.148 13.8379Z",fill:"#303F9F",stroke:"#303F9F",strokeWidth:"0.3"}),(0,Gt.jsxs)("mask",{id:"path-2-outside-1_2197_2585",maskUnits:"userSpaceOnUse",x:"1.80764",y:"0.308683",width:"18.3847",height:"18.3848",fill:"black",children:[(0,Gt.jsx)("rect",{fill:"white",x:"1.80764",y:"0.308683",width:"18.3847",height:"18.3848"}),(0,Gt.jsx)("path",{d:"M10.9994 12.5727C10.9992 12.5727 10.999 12.5727 10.9987 12.5727L3.71949 9.99702C3.7186 9.9967 3.7186 9.99545 3.71949 9.99513L10.9977 7.42389C10.998 7.42381 10.9982 7.42381 10.9984 7.42389L18.2777 9.99798C18.2786 9.99829 18.2786 9.99955 18.2777 9.99986L10.9994 12.5727Z"})]}),(0,Gt.jsx)("path",{d:"M10.9994 12.5727C10.9992 12.5727 10.999 12.5727 10.9987 12.5727L3.71949 9.99702C3.7186 9.9967 3.7186 9.99545 3.71949 9.99513L10.9977 7.42389C10.998 7.42381 10.9982 7.42381 10.9984 7.42389L18.2777 9.99798C18.2786 9.99829 18.2786 9.99955 18.2777 9.99986L10.9994 12.5727Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M18.2777 9.99798L18.5444 9.24374L18.5444 9.24374L18.2777 9.99798ZM18.2777 9.99986L18.011 9.2456L18.2777 9.99986ZM10.9977 7.42389L11.2642 8.1782L10.9977 7.42389ZM10.9984 7.42389L10.7317 8.17812L10.9984 7.42389ZM3.71949 9.99702L3.45264 10.7512L3.71949 9.99702ZM3.71949 9.99513L3.98597 10.7494L3.71949 9.99513ZM10.9987 12.5727L11.2656 11.8185L10.9987 12.5727ZM10.9994 12.5727L11.266 13.3269L10.9994 12.5727ZM11.2656 11.8185L3.98634 9.24283L3.45264 10.7512L10.7319 13.3268L11.2656 11.8185ZM3.98597 10.7494L11.2642 8.1782L10.7313 6.66957L3.45301 9.24082L3.98597 10.7494ZM10.7317 8.17812L18.011 10.7522L18.5444 9.24374L11.2651 6.66965L10.7317 8.17812ZM18.011 9.2456L10.7328 11.8184L11.266 13.3269L18.5443 10.7541L18.011 9.2456ZM18.011 10.7522C17.3012 10.5012 17.3004 9.49682 18.011 9.2456L18.5443 10.7541C19.2568 10.5023 19.2559 9.49535 18.5444 9.24374L18.011 10.7522ZM11.2642 8.1782C11.092 8.23906 10.904 8.23906 10.7317 8.17812L11.2651 6.66965C11.0924 6.60857 10.9039 6.60857 10.7313 6.66957L11.2642 8.1782ZM3.98634 9.24283C4.69653 9.49412 4.69622 10.4985 3.98597 10.7494L3.45301 9.24082C2.74098 9.49236 2.74067 10.4993 3.45264 10.7512L3.98634 9.24283ZM10.7319 13.3268C10.9049 13.3881 11.0935 13.3879 11.266 13.3269L10.7328 11.8184C10.9049 11.7576 11.093 11.7574 11.2656 11.8185L10.7319 13.3268Z",fill:"#F9F9F9",mask:"url(#path-2-outside-1_2197_2585)"}),(0,Gt.jsx)("path",{d:"M11.0013 12.8066C10.8356 12.8066 10.7039 12.6575 10.7039 12.4732V8.14009C10.7039 7.95577 10.8356 7.80664 10.9984 7.80664C11.1612 7.80664 11.2959 7.95577 11.2959 8.14009V12.4732C11.2959 12.6575 11.1641 12.8066 11.0013 12.8066Z",fill:"url(#paint0_linear_2197_2585)"}),(0,Gt.jsx)("defs",{children:(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2197_2585",x1:"10.6792",y1:"10.2602",x2:"11.273",y2:"10.2602",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),oc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("ellipse",{cx:"10",cy:"10",rx:"9",ry:"5",fill:"#303F9F",stroke:"#303F9F"}),(0,Gt.jsx)("path",{d:"M10 14.4C12.2578 14.4 14.3216 13.9433 15.8357 13.1862C17.326 12.4411 18.4 11.3377 18.4 10C18.4 8.6623 17.326 7.55892 15.8357 6.8138C14.3216 6.05672 12.2578 5.6 10 5.6C7.74223 5.6 5.67842 6.05672 4.16426 6.8138C2.67402 7.55892 1.6 8.6623 1.6 10C1.6 11.3377 2.67402 12.4411 4.16426 13.1862C5.67842 13.9433 7.74223 14.4 10 14.4Z",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,Gt.jsx)("path",{d:"M9.5025 14C9.2225 14 9 13.7614 9 13.4665V6.53351C9 6.23861 9.2225 6 9.4975 6C9.7725 6 10 6.23861 10 6.53351V13.4665C10 13.7614 9.7775 14 9.5025 14Z",fill:"url(#paint0_linear_2197_2605)"}),(0,Gt.jsx)("defs",{children:(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2197_2605",x1:"8.95838",y1:"9.92573",x2:"9.96137",y2:"9.92573",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),ac=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("rect",{x:"1",y:"6",width:"17",height:"10",rx:"3",fill:"#303F9F",stroke:"#303F9F"}),(0,Gt.jsx)("rect",{x:"1.64663",y:"6.64687",width:"15.8",height:"8.8",rx:"2.4",fill:"#E3E5EA",stroke:"#F9F9F9",strokeWidth:"0.8"}),(0,Gt.jsx)("path",{d:"M9.50206 15.2559C9.28067 15.2559 9.10474 15.0173 9.10474 14.7223V7.78937C9.10474 7.49447 9.28067 7.25586 9.49811 7.25586C9.71555 7.25586 9.89543 7.49447 9.89543 7.78937V14.7223C9.89543 15.0173 9.7195 15.2559 9.50206 15.2559Z",fill:"url(#paint0_linear_2197_2617)"}),(0,Gt.jsx)("defs",{children:(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2197_2617",x1:"9.08299",y1:"11.2559",x2:"9.88753",y2:"11.2559",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]})})]}),sc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_2197_3320)",children:[(0,Gt.jsx)("path",{d:"M17.9613 6.53516L17.7789 6.60719C17.6237 6.95833 15.1538 8.1513 14.826 8.23834C14.2936 8.38089 12.2257 9.25725 11.6734 9.3878C11.4481 9.44032 9.71944 10.0376 7.84224 10.6918C7.77289 11.0955 7.34198 13.8671 7.19586 14.4658C7.11331 14.8035 7.02003 15.1666 6.91602 15.5328C7.02333 15.4742 7.13065 15.4097 7.23714 15.3377C7.45672 15.1876 7.67383 15.006 7.88186 14.7915C7.94625 14.7254 8.01064 14.6549 8.07255 14.5799C8.32516 14.2843 8.56125 13.9316 8.76846 13.5129C8.82377 13.4019 8.87825 13.2834 8.9286 13.1603C9.01446 12.9577 9.09371 12.7416 9.1647 12.5105C9.2068 12.377 9.2456 12.2374 9.28192 12.0949C9.30421 12.0063 9.33393 11.9148 9.37108 11.8248C9.47674 11.5697 9.64762 11.3311 9.91509 11.205C9.96297 11.1825 17.4322 7.95923 17.504 7.93071C17.5098 7.92771 17.5874 7.8902 17.6179 7.86619C17.7805 7.74764 17.9134 7.51355 17.9712 7.20743C18.0075 7.01385 18.0166 6.78576 17.9613 6.53666V6.53516Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M8.08327 12.6935C7.919 13.6749 7.63915 14.6217 7.2363 15.3375C7.08111 15.4441 6.92426 15.5356 6.76824 15.6121C6.70467 15.6436 6.64111 15.6737 6.57755 15.7007C6.15901 15.8807 5.75451 15.9678 5.40863 15.9933C5.40863 15.9933 5.01403 15.9963 4.98184 15.9933C4.90424 15.9873 4.82829 15.9783 4.754 15.9678C4.139 15.8837 3.66185 15.6692 3.2912 15.3885C3.26313 15.3675 3.06583 15.1995 3.03199 15.1664C2.94696 15.0824 2.86854 14.9969 2.79672 14.9083C2.78351 14.8933 2.69683 14.7808 2.68528 14.7628C2.65226 14.7163 2.62171 14.6713 2.59199 14.6232C2.57136 14.5917 2.49293 14.4582 2.4756 14.4252C2.06614 13.6734 2.01579 12.908 2.01001 12.7805C2.01001 12.767 2.01001 12.7625 2.01001 12.7625L6.25477 11.1523C6.70055 11.3189 7.1455 11.502 7.60118 11.5455C7.61108 11.5455 7.61934 11.5455 7.62842 11.5485C7.68125 11.553 7.73078 11.556 7.77453 11.562C8.16582 11.6145 8.23434 11.7916 8.08327 12.6935Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M17.8549 6.98526C17.7996 7.0873 17.7344 7.16834 17.6634 7.22536C17.6279 7.25537 17.5924 7.27938 17.5544 7.29739C17.5404 7.30489 9.5404 10.4441 9.5404 10.4441C9.46362 10.4742 9.39015 10.5222 9.32329 10.5882C9.27954 10.6287 9.23744 10.6782 9.19946 10.7323C9.10288 10.8673 9.02198 11.0384 8.96419 11.2365C8.94851 11.286 8.93613 11.337 8.92374 11.388C8.90558 11.4691 8.88247 11.5516 8.85605 11.6341C8.76029 11.9297 8.615 12.2224 8.42596 12.5015C8.38056 12.569 8.33268 12.6365 8.28232 12.701C8.07842 12.9697 7.8349 13.2233 7.56 13.4513C7.49561 13.5054 7.42875 13.5594 7.36106 13.6104C7.04736 13.8475 6.69817 14.0546 6.32422 14.2197C6.27881 14.2392 6.23259 14.2587 6.18553 14.2782C6.04189 14.3352 5.89578 14.3877 5.74636 14.4342C5.24198 14.5873 4.7541 14.6503 4.30668 14.6293C4.24806 14.6278 4.19028 14.6233 4.13249 14.6173C3.72304 14.5768 3.35156 14.4703 3.03787 14.2992C2.99742 14.2782 2.9578 14.2542 2.91982 14.2302C2.83645 14.1776 2.7572 14.1206 2.68373 14.0591C2.63832 14.0216 2.5954 13.9811 2.55412 13.9405C2.25116 13.6389 2.05717 13.2458 2.01094 12.7791C2.01011 12.7731 2.00929 12.7671 2.00929 12.7611C2.00598 12.7176 2.00268 12.674 2.00186 12.629C1.99278 12.3739 2.0291 12.1143 2.10422 11.8562C2.12321 11.7887 2.1455 11.7227 2.16944 11.6566C2.26685 11.391 2.40553 11.1299 2.57641 10.8778C2.61026 10.8283 2.64493 10.7788 2.68125 10.7323C2.84883 10.5072 3.04365 10.2941 3.26158 10.096C3.31772 10.0435 3.3755 9.99247 3.43576 9.94295C3.94675 9.51828 4.56506 9.17314 5.2428 8.96606C5.99236 8.73796 6.70313 8.71245 7.29997 8.85351C7.3594 8.86852 7.41802 8.88502 7.4758 8.90303C7.65741 8.95705 7.82747 9.03058 7.98184 9.11912C8.04045 9.15213 8.09741 9.18814 8.15189 9.22566C8.16345 9.23316 8.17418 9.23916 8.18574 9.24667C8.35249 9.34121 8.52915 9.36071 8.70003 9.29319C8.70003 9.29319 16.9724 6.04889 16.9832 6.04589C17.036 6.02938 17.0888 6.01588 17.14 6.00987C17.2771 5.98736 17.405 5.99787 17.5181 6.03388C17.5544 6.04589 17.5899 6.05939 17.6229 6.0759C17.9276 6.22746 18.0695 6.5846 17.8549 6.98526Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M8.19699 11.7816C8.08555 12.0742 7.91962 12.3608 7.70746 12.6265C7.6505 12.6985 7.59107 12.769 7.52833 12.8365C7.02724 13.3813 6.33547 13.8164 5.55619 13.9995C5.23424 14.0745 4.91972 14.1196 4.61924 14.1346C3.99598 14.1616 3.43959 14.0565 3.02436 13.8089C2.62233 13.5703 2.35404 13.1982 2.29048 12.6925C2.21453 12.0967 2.55547 11.2804 3.21918 10.5916C3.69714 10.0949 4.34104 9.66577 5.11867 9.42868C5.93179 9.17958 6.67475 9.18558 7.24353 9.39866C7.2782 9.41067 7.31204 9.42568 7.34589 9.43918C7.37066 9.44969 7.3946 9.46019 7.41854 9.47219C7.47797 9.50071 7.53411 9.53072 7.58859 9.56523C8.02033 9.83084 8.29688 10.254 8.34723 10.7972C8.37695 11.1199 8.32082 11.4545 8.19616 11.7816H8.19699Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M7.34674 9.43723C7.33931 9.52876 7.33106 9.6188 7.3195 9.71034C7.29556 9.90842 7.26172 10.102 7.21631 10.2896C7.05947 10.9408 6.77549 11.4615 6.47913 11.9267C5.91696 12.8091 5.28958 13.5519 4.62009 14.1326C4.54497 14.1356 4.47067 14.1386 4.3972 14.1356C4.3518 14.1356 4.3064 14.1356 4.26099 14.1341C3.81192 14.1146 3.40824 14.0186 3.08465 13.8415C3.03759 13.816 2.99219 13.789 2.94926 13.7605C2.8469 13.6929 2.75444 13.6149 2.67272 13.5264C2.60585 13.4543 2.54724 13.3778 2.49606 13.2938C2.47707 13.2638 2.45974 13.2322 2.44323 13.1992C2.42011 13.1542 2.39947 13.1062 2.38049 13.0567C2.33756 12.9441 2.30784 12.8226 2.29051 12.6905C2.29051 12.6875 2.29051 12.686 2.29051 12.683C2.26739 12.4955 2.28555 12.2839 2.34334 12.0618C2.36067 11.9943 2.38214 11.9252 2.4069 11.8547C2.49606 11.6026 2.63309 11.3415 2.8114 11.0849C2.84442 11.0369 2.87992 10.9888 2.91624 10.9408C3.00787 10.8223 3.10858 10.7037 3.2192 10.5897C3.69717 10.093 4.34107 9.66382 5.1187 9.42672C5.93182 9.17762 6.67478 9.18363 7.24356 9.39671C7.27823 9.40872 7.31207 9.42372 7.34592 9.43723H7.34674Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M17.2407 8.04297C17.1978 8.06098 17.1524 8.08048 17.1045 8.10149C17.1582 7.79087 17.1804 7.45173 17.1903 7.16962C17.1945 7.05407 17.1961 6.94603 17.1912 6.84099L17.3133 6.79297C17.3299 7.16062 17.3084 7.6228 17.2399 8.04297H17.2407Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M17.6558 7.48113C17.65 7.62068 17.6368 7.74823 17.6178 7.86378C17.5865 7.88779 17.5543 7.9058 17.5212 7.9208L17.5039 7.92831C17.5485 7.69571 17.5526 7.43611 17.5576 7.18851C17.5617 7.02495 17.5617 6.85988 17.5576 6.69481L17.6591 6.6543C17.669 6.92891 17.6682 7.20502 17.6558 7.48113Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M16.666 7.6121C16.5446 7.81018 16.368 7.8657 16.2318 8.02327C16.0914 8.18383 15.961 8.39391 15.8553 8.63551C15.7959 8.66102 15.7365 8.68503 15.6746 8.71204C15.7819 8.39842 15.9412 8.13131 16.1005 7.92123C16.2805 7.68263 16.7097 7.56858 16.6676 7.04788L16.7758 7.00586C16.7981 7.22495 16.7626 7.45604 16.666 7.6136V7.6121Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M15.8225 7.38281C15.8175 7.69644 15.6747 7.96805 15.5509 8.15562C15.4139 8.3627 15.2248 8.63581 15.1134 8.95094C15.0638 8.97195 15.0135 8.99446 14.9631 9.01547C15.0399 8.73185 15.158 8.46775 15.2463 8.32969C15.3751 8.12861 15.6599 7.75496 15.711 7.42633L15.8217 7.38281H15.8225Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M14.6674 7.83984C14.6038 7.9779 14.5535 8.12196 14.5362 8.19399C14.4924 8.38156 14.4676 8.58264 14.4387 8.78072C14.4156 8.94429 14.3933 9.10635 14.3719 9.27142L14.2134 9.33894C14.2695 8.9818 14.3405 8.63216 14.3958 8.32604C14.4231 8.17898 14.4561 8.03642 14.4965 7.90737L14.6666 7.83984H14.6674Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M15.2379 7.61328C15.2396 7.6688 15.233 7.73633 15.2173 7.81136C15.105 8.36358 14.8112 8.62469 14.7063 9.12739C14.67 9.14389 14.6329 9.1589 14.5957 9.17391C14.6172 8.98333 14.665 8.80476 14.7385 8.62168C14.8425 8.35908 15.1232 8.00794 15.0662 7.68381L15.2379 7.61478V7.61328Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M14.1227 8.05664C14.0732 8.39428 14.0352 8.74542 13.9832 9.10706C13.9659 9.23011 13.9469 9.35016 13.9263 9.4627L13.8181 9.50772C13.8866 9.14458 13.9304 8.76042 13.9766 8.38827C13.989 8.29223 14.0006 8.1962 14.0146 8.10016L14.1227 8.05664Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M13.2799 9.73943C13.2105 9.76944 13.142 9.79795 13.0735 9.82647C13.2171 9.58637 13.3476 9.31926 13.4664 9.04165C13.5622 8.81806 13.6695 8.46692 13.6249 8.25234L13.7677 8.19531C13.8643 8.64099 13.5911 9.24423 13.2807 9.73943H13.2799Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M12.5865 10.0389C12.4891 10.0809 12.3917 10.123 12.2968 10.1635C12.4033 9.9924 12.5106 9.82133 12.6022 9.62626C12.6501 9.52121 12.7351 9.37566 12.7566 9.2376C12.7946 8.996 12.75 8.94498 12.6526 8.88646C12.5444 8.82194 12.3802 8.88496 12.2654 8.87296C12.2159 8.86845 12.168 8.86095 12.1201 8.85045L12.5717 8.67188C12.6922 8.67488 12.8061 8.70789 12.8647 8.83694C12.9943 9.12206 12.8144 9.59925 12.5874 10.0389H12.5865Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M11.7682 10.3913C11.6997 10.4198 11.6328 10.4498 11.5668 10.4783C11.6395 10.2833 11.7129 10.0897 11.7525 9.86008C11.8797 9.12028 11.3902 9.31086 11.1408 9.23883C11.1392 9.23883 11.1375 9.23883 11.1367 9.23733L11.5544 9.07227C11.6683 9.07977 11.7781 9.12179 11.8475 9.28685C11.9606 9.55846 11.8855 10.0086 11.7691 10.3913H11.7682Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M10.8042 10.808H10.8034C10.7415 10.8366 10.6812 10.8621 10.6243 10.8891C10.654 10.8216 10.6895 10.7435 10.725 10.661C10.829 10.4209 10.8744 10.1118 10.8505 9.80865L10.8306 9.55355C10.7828 9.51303 10.6754 9.426 10.6697 9.42149L10.8381 9.35547C10.9355 9.44701 11.0172 9.58056 11.0387 9.79214C11.0742 10.1553 10.8967 10.5274 10.8034 10.8065L10.8042 10.808Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M10.2692 11.0442C10.2222 11.0652 10.1784 11.0862 10.1388 11.1027C10.1908 10.9272 10.2238 10.7366 10.2271 10.549C10.2428 9.73118 9.75908 9.99379 9.47676 9.90225C9.47428 9.90225 9.47098 9.90075 9.46851 9.89925L9.96959 9.70117C10.1223 9.75369 10.2552 9.88875 10.3122 10.1664C10.37 10.447 10.3452 10.7621 10.2701 11.0442H10.2692Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M9.38589 11.487C9.39166 11.1373 9.34461 10.453 9.19932 10.0059L9.02514 10.0749C9.04743 10.1289 9.06724 10.1844 9.08375 10.246C9.22491 10.6691 9.26371 11.1463 9.24637 11.6355C9.23482 11.9251 9.20675 12.2207 9.16465 12.5119C9.20675 12.3783 9.24555 12.2388 9.28187 12.0962C9.30416 12.0077 9.33388 11.9161 9.37103 11.8261C9.37846 11.7135 9.38341 11.601 9.38506 11.4885L9.38589 11.487ZM8.81298 10.2985C8.79565 10.252 8.78492 10.2099 8.77996 10.1709L8.6355 10.2279C8.68255 10.6421 8.81711 11.0443 8.84765 11.4689C8.89636 12.1457 8.82124 12.8375 8.7684 13.5113C8.82371 13.4002 8.8782 13.2817 8.92855 13.1586C8.98882 12.3213 9.04412 11.5365 8.89471 10.6991C8.87159 10.5686 8.82454 10.4305 8.81298 10.2985Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M8.47455 12.0772C8.39035 12.9085 8.26074 13.7248 8.08739 14.5081C8.08161 14.5321 8.07748 14.5546 8.07253 14.5787C8.00979 14.6537 7.94623 14.7227 7.88184 14.7902C7.8967 14.7242 7.91155 14.6582 7.92724 14.5937C8.09482 13.8884 8.22772 13.1666 8.32018 12.4163C8.3986 11.786 8.51005 10.9817 8.42419 10.3125L8.52491 10.2734C8.60003 10.8572 8.53151 11.5039 8.47455 12.0787V12.0772Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M7.77123 11.7813C7.74481 12.7432 7.58301 13.5805 7.27675 14.3624C7.11825 14.7675 6.95975 15.2237 6.76906 15.6139C6.7055 15.6454 6.64193 15.6754 6.57837 15.7024C6.82272 15.2447 7.01176 14.649 7.19502 14.1388C7.46001 13.4005 7.602 12.6442 7.62511 11.7633C7.63667 11.3762 7.62099 11.007 7.58797 10.6454L7.7283 10.5898C7.76545 10.974 7.78279 11.3687 7.77123 11.7813Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M5.6795 15.8336C5.59035 15.8906 5.49954 15.9446 5.40873 15.9926C5.25354 16.0046 5.1099 16.0031 4.98195 15.9926C4.90435 15.9866 4.8284 15.9776 4.75411 15.9671C4.96956 15.9056 5.1842 15.8171 5.39883 15.7135C5.71087 15.5635 6.48932 15.0352 6.16242 14.2159C5.98907 13.7837 5.66959 13.6757 5.43102 13.4101C5.07275 13.0139 4.86142 12.3642 4.61377 11.7744L4.72686 11.7324C4.83583 11.971 4.94232 12.2156 5.05707 12.4422C5.20483 12.7378 5.35673 13.0319 5.55072 13.2285C5.72243 13.4041 5.91064 13.5046 6.07327 13.7132C6.68662 14.4965 6.22764 15.4824 5.68033 15.8336H5.6795Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M3.90032 15.0882C3.70963 15.1947 3.50325 15.3013 3.29192 15.3883C3.19947 15.3178 3.11279 15.2442 3.03271 15.1662C3.20442 15.1152 3.37695 15.0552 3.55113 14.9876C3.71293 14.9261 3.89042 14.8781 4.03571 14.7355C4.33124 14.4474 4.29161 13.9717 4.17687 13.484C4.05634 12.9693 3.86813 12.5237 3.64854 12.1395L3.79466 12.084C4.05387 12.5567 4.27923 13.1239 4.37169 13.7677C4.47488 14.4819 4.2652 14.8826 3.90032 15.0882Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M2.79755 14.9078C2.75792 14.8613 2.72077 14.8118 2.6861 14.7623C2.87267 14.4937 2.99732 14.15 2.94366 13.6864C2.90899 13.3817 2.78021 13.1461 2.70014 12.8805C2.66464 12.762 2.63575 12.6479 2.60107 12.5384L2.74471 12.4844C2.81571 12.6975 2.87762 12.9301 2.94614 13.1356C3.01796 13.3502 3.07409 13.5348 3.084 13.7914C3.09968 14.2236 2.97751 14.6032 2.79672 14.9093L2.79755 14.9078Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M2.59199 14.6233C2.54989 14.5587 2.51109 14.4912 2.4756 14.4252C2.51852 14.2736 2.54742 14.104 2.5565 13.906C2.57301 13.5293 2.45578 13.1136 2.28078 12.9051C2.1908 12.797 2.09916 12.7625 2.01001 12.782C2.01001 12.7685 2.01001 12.764 2.01001 12.764L2.26262 12.668C2.44093 12.773 2.59199 13.0521 2.66794 13.4888C2.72407 13.8129 2.68858 14.2421 2.59282 14.6248L2.59199 14.6233Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M4.39723 14.1362C4.35183 14.1362 4.30643 14.1362 4.26102 14.1347C4.26598 13.9321 4.22883 13.71 4.176 13.4849C4.00512 12.7556 3.69968 12.1659 3.35874 11.6842C3.18704 11.4411 3.00377 11.264 2.81226 11.0855C2.84528 11.0374 2.88077 10.9894 2.9171 10.9414C3.16145 11.162 3.38764 11.4231 3.59731 11.7517C3.93495 12.2814 4.25524 12.9657 4.37082 13.767C4.3898 13.9006 4.39888 14.0251 4.39723 14.1362Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M3.08539 13.8427C3.03834 13.8172 2.99294 13.7902 2.95001 13.7617C2.94836 13.7377 2.94588 13.7122 2.94341 13.6867C2.90873 13.382 2.77996 13.1464 2.69988 12.8808C2.62806 12.6422 2.58266 12.4141 2.46709 12.2296C2.42829 12.168 2.38701 12.1125 2.34326 12.0645C2.3606 11.997 2.38206 11.928 2.40683 11.8574C2.49763 11.9535 2.57936 12.072 2.64622 12.2221C2.7651 12.4907 2.84765 12.8403 2.94588 13.1359C3.0177 13.3505 3.07384 13.5351 3.08374 13.7917C3.08374 13.8097 3.08457 13.8262 3.08457 13.8442L3.08539 13.8427Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M2.67274 13.5269C2.60587 13.4549 2.54726 13.3784 2.49608 13.2943C2.47709 13.2643 2.45976 13.2328 2.44325 13.1998C2.42509 13.1488 2.40362 13.1008 2.38051 13.0572C2.33758 12.9447 2.30786 12.8231 2.29053 12.6911C2.29053 12.6881 2.29053 12.6866 2.29053 12.6836C2.45563 12.8021 2.59431 13.0737 2.66696 13.4864C2.66861 13.4999 2.67109 13.5119 2.67274 13.5269Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M8.19681 11.7817C7.81708 12.7766 6.79675 13.707 5.55601 13.9996C5.23406 14.0746 4.91954 14.1196 4.61906 14.1346C3.87445 14.1691 3.22395 14.0086 2.79881 13.6469C2.67911 13.5449 2.57675 13.4294 2.49585 13.2943C2.53465 13.0797 2.58831 12.8351 2.59656 12.7736C2.66425 12.2574 2.80376 11.7727 2.99776 11.3765C3.0704 11.228 3.15295 11.0854 3.1901 10.8978C3.20991 10.7988 3.21487 10.6953 3.22065 10.5902C3.2256 10.4912 3.23055 10.3936 3.24624 10.2991C3.35355 9.64334 3.90829 9.48728 3.98919 8.81951C4.01231 8.62743 3.98919 8.42035 4.01809 8.23127C4.07505 7.84862 4.326 7.65504 4.54311 7.69706C4.76022 7.73908 4.95339 7.95216 5.14821 8.13523C5.26543 8.24628 5.38513 8.34682 5.51473 8.39634C5.6237 8.43986 5.73597 8.44286 5.84741 8.44736C6.0282 8.45336 6.18835 8.34832 6.35923 8.2988C6.41701 8.28229 6.47562 8.27029 6.53754 8.27179C6.81656 8.28229 7.2062 8.83001 7.31599 9.2967C7.32672 9.34172 7.39772 9.64484 7.42331 9.74988C7.55126 10.2721 7.59419 10.7448 7.7791 11.0599C7.95824 11.3645 8.16049 11.4801 8.19846 11.7802L8.19681 11.7817Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.76061 10.2892C6.73585 10.3417 6.69209 10.3462 6.65577 10.3717C6.55423 10.4468 6.54433 10.6583 6.55671 10.8744C6.56166 10.9615 6.57074 11.05 6.57817 11.1295C6.58891 11.2376 6.59221 11.3486 6.58891 11.4567C6.5823 11.7613 6.52699 12.0629 6.43288 12.315C6.38996 12.429 6.33878 12.5356 6.28099 12.6256C6.25127 12.6421 6.2199 12.6541 6.18936 12.6646C5.98051 12.7367 5.7601 12.6992 5.56197 12.5626C5.45548 12.4891 5.34074 12.5266 5.24745 12.6451C5.20618 12.6977 5.15335 12.7322 5.10382 12.7382C4.98494 12.7517 4.86359 12.6766 4.7472 12.7187C4.68116 12.7427 4.62255 12.8027 4.56558 12.8687C4.52761 12.9122 4.49129 12.9603 4.45414 13.0038C4.42855 13.0338 4.40213 13.0608 4.37489 13.0863C4.14375 13.3099 3.87876 13.3969 3.61708 13.466C3.60469 13.469 3.42638 13.514 3.34879 13.5305C3.1647 13.574 2.98061 13.6115 2.79735 13.643C2.67765 13.541 2.57528 13.4254 2.49438 13.2904C2.53318 13.0758 2.58684 12.8312 2.5951 12.7697C2.66279 12.2535 2.8023 11.7688 2.99629 11.3726C3.06894 11.2241 3.15149 11.0815 3.18864 10.8939C3.20845 10.7949 3.2134 10.6914 3.21918 10.5863C3.22413 10.4873 3.22909 10.3897 3.24477 10.2952C3.35209 9.63943 3.90683 9.48337 3.98773 8.8156C4.01084 8.62353 3.98773 8.41644 4.01662 8.22737C4.07358 7.84471 4.32454 7.65114 4.54165 7.69315C4.75875 7.73517 4.95192 7.94826 5.14674 8.13133C5.26396 8.24237 5.38366 8.34291 5.51327 8.39243C5.62224 8.43595 5.7345 8.43895 5.84595 8.44345C6.02673 8.44946 6.18688 8.34441 6.35776 8.29489C6.44362 8.36242 6.52452 8.43145 6.57735 8.559C6.70778 8.87563 6.72181 9.68595 6.77052 10.0761C6.7796 10.1466 6.7862 10.2307 6.76061 10.2862V10.2892Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.64771 9.89594C5.56681 10.2066 5.31916 10.4046 5.24981 10.7573C5.2267 10.8728 5.22587 11.0004 5.20111 11.1144C5.17634 11.2285 5.1136 11.335 5.04756 11.3065C4.97492 11.2765 4.94933 11.1159 4.90227 11.0109C4.83871 10.8668 4.72974 10.8173 4.62738 10.8143C4.43751 10.8083 4.24847 10.9389 4.10566 11.1655C4.07924 11.206 4.05448 11.251 4.03136 11.299C4.00825 11.347 3.98679 11.3995 3.96615 11.4521C3.95459 11.4821 3.88277 11.6697 3.85883 11.7327C3.69621 12.1589 3.32886 12.8851 3.03993 12.3089C2.81539 11.8617 3.13404 11.9533 3.23145 11.6096C3.24961 11.5451 3.26034 11.4656 3.25786 11.3635C3.25621 11.293 3.25456 11.2195 3.25621 11.1474C3.25869 10.9929 3.2752 10.8458 3.34206 10.7618C3.37756 10.7168 3.42214 10.6988 3.46094 10.6613C3.64585 10.4827 3.63099 9.93796 3.81095 9.74288C3.87947 9.66935 3.96697 9.66185 4.03549 9.58382C4.0941 9.51929 4.13125 9.41125 4.16014 9.29721C4.17418 9.24318 4.18656 9.18616 4.19729 9.13064C4.21132 9.06311 4.33928 8.44036 4.38881 8.19727C4.66866 8.21377 4.94272 8.45387 5.12516 8.84252C5.20606 8.67446 5.36291 8.70747 5.45702 8.85153C5.54865 8.99108 5.5924 9.20567 5.63615 9.40975C5.63698 9.41425 5.63863 9.41875 5.63945 9.42476C5.65596 9.50279 5.67165 9.58532 5.67495 9.67085C5.67743 9.75339 5.66752 9.82692 5.64936 9.89594H5.64771Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.22578 11.2106C6.19111 11.2662 6.14819 11.3037 6.11682 11.3667C6.04087 11.5168 6.05573 11.7523 6.01363 11.9414C6.00455 11.9819 5.99134 12.024 5.96988 12.045C5.95254 12.063 5.93273 12.0645 5.91292 12.066C5.79487 12.069 5.67187 12.0059 5.59014 11.8514C5.58436 11.8409 5.57859 11.8289 5.57446 11.8169C5.50924 11.6683 5.48778 11.4507 5.53896 11.2887C5.53896 11.2857 5.53896 11.2812 5.53896 11.2782C5.52575 11.1356 5.57528 10.978 5.64463 10.897C5.72965 10.798 5.83532 10.783 5.93603 10.7695C5.89806 10.5894 5.94263 10.3643 6.03427 10.2698C6.12672 10.1737 6.2555 10.2172 6.32237 10.3673C6.34136 10.6644 6.35044 11.0141 6.22661 11.2121L6.22578 11.2106Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.60161 13.1608C5.44807 13.1413 5.43073 13.5765 5.5851 13.596C5.73864 13.6155 5.75598 13.1803 5.60161 13.1608Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.38813 12.2999C6.14378 12.2684 6.11653 12.9586 6.36088 12.9902C6.60523 13.0217 6.63248 12.3314 6.38813 12.2999Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M7.19559 12.1491C7.0437 12.1296 7.02636 12.5587 7.17908 12.5783C7.33097 12.5978 7.34831 12.1686 7.19559 12.1491Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.72183 11.0416C6.72183 11.0416 6.72018 11.0341 6.71935 11.0296C6.6822 10.839 6.50224 10.8165 6.45106 10.995C6.45023 10.9995 6.44858 11.0025 6.44776 11.007C6.42052 11.1016 6.40896 11.1961 6.4362 11.2982C6.46097 11.3897 6.51215 11.4512 6.56746 11.4587C6.62359 11.4662 6.6789 11.4182 6.71027 11.3342C6.74577 11.2411 6.74081 11.1436 6.72183 11.0431V11.0416Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M7.10315 10.3228C6.97438 10.3063 6.96034 10.6709 7.08912 10.6875C7.2179 10.704 7.23276 10.3393 7.10315 10.3228Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.43112 9.07867C6.30234 9.06216 6.28748 9.42681 6.41708 9.44331C6.54586 9.45982 6.56072 9.09518 6.43112 9.07867Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.73783 11.4107C5.71389 11.3222 5.66436 11.2622 5.6107 11.2547C5.55621 11.2472 5.50338 11.2952 5.47201 11.3762C5.43899 11.4633 5.43982 11.5638 5.46128 11.6583C5.46211 11.6628 5.46293 11.6658 5.46376 11.6703C5.50586 11.8549 5.66766 11.8759 5.72297 11.7034C5.72379 11.7004 5.72544 11.6959 5.72627 11.6928C5.75516 11.6043 5.76259 11.5053 5.737 11.4107H5.73783Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.63818 11.8268C4.54655 11.8148 4.49371 11.9843 4.52674 12.1284L4.52921 12.1404C4.56058 12.277 4.68028 12.292 4.72156 12.1644C4.72238 12.1614 4.72403 12.1569 4.72486 12.1539C4.76861 12.0189 4.72898 11.8373 4.63735 11.8268H4.63818Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.48221 10.2853C4.42855 10.3469 4.3881 10.4444 4.40461 10.5674C4.41452 10.644 4.44919 10.71 4.49047 10.7385C4.57054 10.8075 4.6729 10.683 4.67951 10.5254C4.68611 10.3529 4.57302 10.1818 4.48304 10.2853H4.48221Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.91248 12.3894C3.7449 12.3683 3.72674 12.841 3.89432 12.862C4.06189 12.883 4.08005 12.4104 3.91248 12.3894Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.11427 12.7211C3.0507 12.7136 2.98631 12.8067 2.98466 12.9252C2.98301 13.0453 3.02924 13.1518 3.09693 13.1608C3.1605 13.1683 3.22488 13.0753 3.22654 12.9567C3.22819 12.8367 3.18196 12.7301 3.11427 12.7211Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.1545 13.3407C3.94317 13.3137 3.91923 13.911 4.13138 13.938C4.34271 13.965 4.36665 13.3677 4.1545 13.3407Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.06194 11.1451C3.92325 11.1271 3.90839 11.5188 4.04708 11.5368C4.18576 11.5548 4.20062 11.1631 4.06194 11.1451Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.83963 8.7526C4.68774 8.73309 4.6704 9.16226 4.82312 9.18177C4.97502 9.20128 4.99235 8.77211 4.83963 8.7526Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.69649 9.49115C5.69649 9.49115 5.69402 9.48515 5.69319 9.48365C5.61394 9.30808 5.43893 9.40862 5.43563 9.63971C5.43398 9.73275 5.45627 9.82579 5.4992 9.87831C5.55203 9.94283 5.63045 9.93983 5.67833 9.8588C5.67998 9.8558 5.68081 9.8543 5.68246 9.8513C5.73942 9.75526 5.74602 9.5992 5.69649 9.48965V9.49115Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.38501 11.1757C3.3396 11.1187 3.2909 11.1247 3.24137 11.1577C3.23889 11.1577 3.23724 11.1607 3.23476 11.1622C3.14066 11.2253 3.12992 11.5134 3.21825 11.5989C3.22073 11.6004 3.22238 11.6034 3.22486 11.6049C3.27109 11.6499 3.31897 11.6679 3.3685 11.6229C3.4139 11.5824 3.44444 11.4999 3.44775 11.4083C3.45105 11.3168 3.42711 11.2283 3.38583 11.1757H3.38501Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.27659 8.9245C4.10736 8.90349 4.08837 9.38068 4.25842 9.40319C4.42765 9.4242 4.44664 8.94701 4.27659 8.9245Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.24572 12.2017C5.11859 12.1852 5.10456 12.5439 5.23169 12.5604C5.35881 12.5769 5.37285 12.2182 5.24572 12.2017Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.43445 12.3163C6.39152 12.4304 6.34034 12.5369 6.28256 12.6269C6.25284 12.6434 6.22147 12.6554 6.19092 12.666C6.18597 12.4784 6.25449 12.2833 6.3874 12.2998C6.40391 12.3013 6.41959 12.3073 6.43362 12.3163H6.43445Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.58974 11.4587C6.58232 11.4587 6.57489 11.4587 6.56746 11.4587C6.51215 11.4512 6.46097 11.3897 6.4362 11.2982C6.40896 11.1961 6.42052 11.1016 6.44776 11.0071C6.44941 11.0026 6.44941 10.9995 6.45106 10.995C6.47087 10.923 6.51297 10.8825 6.55755 10.875C6.5625 10.962 6.57158 11.0506 6.57901 11.1301C6.58975 11.2381 6.59305 11.3492 6.58974 11.4572V11.4587Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.43112 9.07867C6.30234 9.06216 6.28748 9.42681 6.41708 9.44331C6.54586 9.45982 6.56072 9.09518 6.43112 9.07867Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.73783 11.4107C5.71389 11.3222 5.66436 11.2622 5.6107 11.2547C5.55621 11.2472 5.50338 11.2952 5.47201 11.3762C5.43899 11.4633 5.43982 11.5638 5.46128 11.6583C5.46211 11.6628 5.46293 11.6658 5.46376 11.6703C5.50586 11.8549 5.66766 11.8759 5.72297 11.7034C5.72379 11.7004 5.72544 11.6959 5.72627 11.6928C5.75516 11.6043 5.76259 11.5053 5.737 11.4107H5.73783Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.63818 11.8268C4.54655 11.8148 4.49371 11.9843 4.52674 12.1284L4.52921 12.1404C4.56058 12.277 4.68028 12.292 4.72156 12.1644C4.72238 12.1614 4.72403 12.1569 4.72486 12.1539C4.76861 12.0189 4.72898 11.8373 4.63735 11.8268H4.63818Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.48221 10.2853C4.42855 10.3469 4.3881 10.4444 4.40461 10.5674C4.41452 10.644 4.44919 10.71 4.49047 10.7385C4.57054 10.8075 4.6729 10.683 4.67951 10.5254C4.68611 10.3529 4.57302 10.1818 4.48304 10.2853H4.48221Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.91248 12.3894C3.7449 12.3683 3.72674 12.841 3.89432 12.862C4.06189 12.883 4.08005 12.4104 3.91248 12.3894Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.11427 12.7211C3.0507 12.7136 2.98631 12.8067 2.98466 12.9252C2.98301 13.0453 3.02924 13.1518 3.09693 13.1608C3.1605 13.1683 3.22488 13.0753 3.22654 12.9567C3.22819 12.8367 3.18196 12.7301 3.11427 12.7211Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.06194 11.1451C3.92325 11.1271 3.90839 11.5188 4.04708 11.5368C4.18576 11.5548 4.20062 11.1631 4.06194 11.1451Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.83963 8.7526C4.68774 8.73309 4.6704 9.16226 4.82312 9.18177C4.97502 9.20128 4.99235 8.77211 4.83963 8.7526Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.69649 9.49115C5.69649 9.49115 5.69402 9.48515 5.69319 9.48365C5.61394 9.30808 5.43893 9.40862 5.43563 9.63971C5.43398 9.73275 5.45627 9.82579 5.4992 9.87831C5.55203 9.94283 5.63045 9.93983 5.67833 9.8588C5.67998 9.8558 5.68081 9.8543 5.68246 9.8513C5.73942 9.75526 5.74602 9.5992 5.69649 9.48965V9.49115Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.38501 11.1757C3.3396 11.1187 3.2909 11.1247 3.24137 11.1577C3.23889 11.1577 3.23724 11.1607 3.23476 11.1622C3.14066 11.2253 3.12992 11.5134 3.21825 11.5989C3.22073 11.6004 3.22238 11.6034 3.22486 11.6049C3.27109 11.6499 3.31897 11.6679 3.3685 11.6229C3.4139 11.5824 3.44444 11.4999 3.44775 11.4083C3.45105 11.3168 3.42711 11.2283 3.38583 11.1757H3.38501Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.27659 8.9245C4.10736 8.90349 4.08837 9.38068 4.25842 9.40319C4.42765 9.4242 4.44664 8.94701 4.27659 8.9245Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.24572 12.2017C5.11859 12.1852 5.10456 12.5439 5.23169 12.5604C5.35881 12.5769 5.37285 12.2182 5.24572 12.2017Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.72605 11.6928C5.72605 11.6928 5.72357 11.7003 5.72275 11.7033C5.6922 11.7979 5.62946 11.8339 5.5725 11.8174C5.50729 11.6688 5.48583 11.4512 5.53701 11.2892C5.53701 11.2862 5.53701 11.2817 5.53701 11.2787C5.53866 11.2787 5.54031 11.2757 5.54196 11.2742C5.54361 11.2742 5.54444 11.2727 5.54691 11.2712C5.56673 11.2577 5.58819 11.2517 5.60965 11.2547C5.66414 11.2622 5.71284 11.3207 5.73678 11.4107C5.76237 11.5053 5.75494 11.6058 5.72605 11.6928Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.48221 10.2853C4.42855 10.3469 4.3881 10.4444 4.40461 10.5674C4.41452 10.644 4.44919 10.71 4.49047 10.7385C4.57054 10.8075 4.6729 10.683 4.67951 10.5254C4.68611 10.3529 4.57302 10.1818 4.48304 10.2853H4.48221Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.10658 11.1676C4.08016 11.2081 4.0554 11.2531 4.03229 11.3011C4.00917 11.3491 3.98771 11.4016 3.96707 11.4542C3.92579 11.3356 3.96129 11.133 4.062 11.145C4.07934 11.1465 4.0942 11.1555 4.10658 11.1676Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.83963 8.7526C4.68774 8.73309 4.6704 9.16226 4.82312 9.18177C4.97502 9.20128 4.99235 8.77211 4.83963 8.7526Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.64779 9.89699C5.60156 9.94051 5.5413 9.93301 5.4992 9.87898C5.45545 9.82496 5.43398 9.73343 5.43564 9.64039C5.43811 9.45732 5.54956 9.35528 5.63458 9.4123C5.63541 9.4168 5.63706 9.4213 5.63788 9.4273C5.6544 9.50534 5.67008 9.58787 5.67338 9.6734C5.67586 9.75594 5.66595 9.82946 5.64779 9.89849V9.89699Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.4469 11.4065C3.4436 11.498 3.41306 11.5805 3.36765 11.6211C3.32143 11.6646 3.2752 11.6496 3.23145 11.6091C3.24961 11.5445 3.26034 11.465 3.25786 11.363C3.25621 11.2924 3.25456 11.2189 3.25621 11.1469C3.30079 11.1229 3.34454 11.1214 3.38582 11.1739C3.42709 11.2249 3.45103 11.3164 3.44773 11.4065H3.4469Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.25766 9.40113C4.21061 9.39513 4.17759 9.35461 4.15942 9.29759C4.17346 9.24357 4.18584 9.18654 4.19657 9.13102C4.21061 9.06349 4.22464 8.99447 4.23867 8.92694C4.25023 8.92244 4.26344 8.92094 4.27665 8.92244C4.4467 8.94345 4.42689 9.42214 4.25848 9.40113H4.25766Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.50448 11.065C4.43597 11.056 4.3658 11.158 4.36332 11.2871C4.36167 11.4176 4.41203 11.5332 4.4855 11.5437C4.55401 11.5527 4.62418 11.4507 4.62666 11.3216C4.62831 11.1911 4.57795 11.0755 4.50448 11.065Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.48181 10.2294C5.41577 10.1814 5.34313 10.2774 5.33818 10.4005C5.33405 10.4995 5.37532 10.5896 5.42733 10.6076C5.44384 10.6196 5.462 10.6241 5.48181 10.6151C5.52474 10.5956 5.56106 10.531 5.56271 10.447C5.56519 10.345 5.533 10.2654 5.48181 10.2294Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.04829 8.80901C5.9839 8.80151 5.91869 8.89605 5.91703 9.01609C5.91538 9.13764 5.96244 9.24569 6.03095 9.25469C6.09534 9.26219 6.16056 9.16765 6.16221 9.04761C6.16386 8.92606 6.11681 8.81802 6.04829 8.80901Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.4817 9.87536C6.433 9.86936 6.38924 9.93839 6.38594 10.0269C6.38264 10.1155 6.42061 10.195 6.46932 10.201C6.51802 10.207 6.56178 10.138 6.56508 10.0494C6.56838 9.9609 6.53041 9.88137 6.4817 9.87536Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.95052 9.18612C6.88448 9.17712 6.81761 9.27466 6.81596 9.39771C6.81431 9.52226 6.86219 9.6333 6.93236 9.64231C6.9984 9.65131 7.06526 9.55377 7.06691 9.43072C7.06856 9.30617 7.02069 9.19513 6.95052 9.18612Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M7.09408 11.3853C6.98016 11.3703 6.96778 11.6914 7.0817 11.7064C7.19562 11.7214 7.208 11.4003 7.09408 11.3853Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M7.67788 11.5318C7.53177 11.5138 7.51526 11.9265 7.6622 11.9445C7.80831 11.9625 7.82482 11.5498 7.67788 11.5318Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.16551 13.1512L6.16386 13.1452C6.13661 13.0462 6.07305 12.9892 6.01279 13.0102C5.95583 13.0312 5.90382 13.1287 5.90217 13.2383C5.90052 13.3388 5.92776 13.4319 5.97812 13.4784C6.03838 13.5339 6.11515 13.5024 6.15395 13.3973L6.15643 13.3913C6.18284 13.3208 6.18615 13.2278 6.16551 13.1512Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.9475 12.2701C5.80551 12.2521 5.789 12.6543 5.93182 12.6723C6.07381 12.6903 6.09032 12.2881 5.9475 12.2701Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.09817 13.0709C5.02883 13.0619 4.95784 13.1654 4.95536 13.2959C4.95371 13.428 5.00407 13.545 5.07919 13.5556C5.14853 13.5646 5.21952 13.461 5.222 13.3305C5.22365 13.1984 5.1733 13.0814 5.09817 13.0709Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.57214 12.8836C4.53499 12.7816 4.45492 12.7591 4.40291 12.8401C4.35503 12.9152 4.35338 13.0442 4.39135 13.1327C4.43511 13.2333 4.53499 13.2258 4.57131 13.1132C4.59608 13.0367 4.59856 12.9572 4.57131 12.8821L4.57214 12.8836Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.48915 13.1783C3.41568 13.1693 3.34056 13.2773 3.3389 13.4154C3.33725 13.5549 3.39091 13.6795 3.46933 13.6885C3.5428 13.6975 3.61793 13.5894 3.61958 13.4514C3.62123 13.3118 3.56757 13.1888 3.48832 13.1783H3.48915Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.51054 12.397C3.51054 12.397 3.50641 12.3925 3.50476 12.391C3.4412 12.3234 3.35617 12.3835 3.35039 12.5275C3.34461 12.6701 3.42469 12.7526 3.49321 12.7016C3.49568 12.7001 3.49733 12.6986 3.49981 12.6971C3.5642 12.6491 3.5708 12.463 3.51137 12.3985L3.51054 12.397Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.22558 11.9339C4.16119 11.9264 4.11661 12.0749 4.16284 12.1635L4.1711 12.1785C4.19586 12.2265 4.23383 12.231 4.2619 12.1905C4.2652 12.186 4.26768 12.1815 4.27098 12.177C4.32382 12.1004 4.29079 11.9414 4.22641 11.9339H4.22558Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.50448 11.065C4.43597 11.056 4.3658 11.158 4.36332 11.2871C4.36167 11.4176 4.41203 11.5332 4.4855 11.5437C4.55401 11.5527 4.62418 11.4507 4.62666 11.3216C4.62831 11.1911 4.57795 11.0755 4.50448 11.065Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.48206 10.2294C5.41602 10.1814 5.34337 10.2774 5.33842 10.4005C5.33429 10.4995 5.37557 10.5896 5.42757 10.6076C5.44408 10.6196 5.46225 10.6241 5.48206 10.6151C5.52498 10.5956 5.56131 10.531 5.56296 10.447C5.56543 10.345 5.53324 10.2654 5.48206 10.2294Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.04829 8.80901C5.9839 8.80151 5.91869 8.89605 5.91703 9.01609C5.91538 9.13764 5.96244 9.24569 6.03095 9.25469C6.09534 9.26219 6.16056 9.16765 6.16221 9.04761C6.16386 8.92606 6.11681 8.81802 6.04829 8.80901Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M6.4817 9.87536C6.433 9.86936 6.38924 9.93839 6.38594 10.0269C6.38264 10.1155 6.42061 10.195 6.46932 10.201C6.51802 10.207 6.56178 10.138 6.56508 10.0494C6.56838 9.9609 6.53041 9.88137 6.4817 9.87536Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.9475 12.2701C5.80551 12.2521 5.789 12.6543 5.93182 12.6723C6.07381 12.6903 6.09032 12.2881 5.9475 12.2701Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.56817 12.8708C4.5302 12.9143 4.49387 12.9623 4.45673 13.0059C4.43114 13.0359 4.40472 13.0629 4.37748 13.0884C4.35601 13.0059 4.36344 12.9038 4.40389 12.8408C4.45342 12.7628 4.52855 12.7793 4.56817 12.8708Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.62047 13.4514V13.4679C3.60726 13.4709 3.42895 13.5159 3.35135 13.5324C3.34227 13.4964 3.33814 13.4574 3.33897 13.4154C3.34145 13.2773 3.41574 13.1693 3.48921 13.1783C3.56846 13.1888 3.62129 13.3133 3.62047 13.4514Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M3.51079 12.397C3.51079 12.397 3.50666 12.3925 3.50501 12.391C3.44144 12.3234 3.35642 12.3835 3.35064 12.5275C3.34486 12.6701 3.42493 12.7526 3.49345 12.7016C3.49593 12.7001 3.49758 12.6986 3.50005 12.6971C3.56444 12.6491 3.57105 12.463 3.51161 12.3985L3.51079 12.397Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.22558 11.9339C4.16119 11.9264 4.11661 12.0749 4.16284 12.1635L4.1711 12.1785C4.19586 12.2265 4.23383 12.231 4.2619 12.1905C4.2652 12.186 4.26768 12.1815 4.27098 12.177C4.32382 12.1004 4.29079 11.9414 4.22641 11.9339H4.22558Z",fill:"#E3E5EA"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_2197_3320",children:(0,Gt.jsx)("rect",{width:"16",height:"10",fill:"white",transform:"translate(2 6)"})})})]});function lc(){return(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_2197_2564)",children:[(0,Gt.jsx)("path",{d:"M18.0001 15.4019C18.0001 15.4019 17.5787 16.9005 17.2682 17.4802C16.9577 18.0599 16.2036 18.7053 16.2036 18.7053L13.6199 18.6069L13.5979 18.6155L12.9812 18.8561L12.6108 19.0006C12.6108 19.0006 10.0271 18.0271 9.84963 17.9287C9.82213 17.9134 9.62009 17.6459 9.29851 17.2049C7.54789 14.8045 2.25366 7.26368 2.25366 7.26368L2.35513 7.10977L2.68613 6.60737L2.66972 6.58298L2.65885 6.56668C2.86101 6.53091 3.12382 6.47305 3.42267 6.38029L3.42588 6.3793L3.43032 6.37788C3.67771 6.30076 3.94995 6.19958 4.23227 6.06723C4.86102 5.77266 5.41835 5.38357 5.88808 4.91027C6.3638 4.43084 6.72896 3.87451 7.03347 3.23712L7.89797 2.74609L13.7973 12.4594L13.9305 12.4813L13.9649 12.487L14.5849 12.589L14.8061 12.6253L14.826 12.6286L14.8619 12.6345L15.0034 13.1315L15.0393 13.258L17.6008 14.1002L18.0001 15.4019Z",fill:"url(#paint0_linear_2197_2564)"}),(0,Gt.jsx)("path",{d:"M7.03331 3.23665L7.90912 2.72266C7.90912 2.72266 7.80954 3.11633 7.5434 3.63044L7.02222 3.25853",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M2.98592 7.09724C2.79741 7.10818 2.26514 7.26132 2.26514 7.26132L2.35507 7.10861L2.68608 6.60621L2.66434 6.57219C2.72311 6.55743 3.25827 6.43404 3.42261 6.37913C3.42372 6.3788 3.42482 6.37847 3.42582 6.37814H3.42593C3.42738 6.37749 3.42882 6.37705 3.43026 6.37672H3.43037C3.58828 6.33439 3.17277 7.08641 2.98592 7.09724Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M17.8799 15.4565C17.8806 15.3486 17.8695 15.2369 17.8431 15.1175C17.7678 14.7768 17.6787 14.4392 17.6009 14.0996C17.6063 14.1231 17.3366 14.352 17.3143 14.3761C17.1106 14.598 16.9382 14.8377 16.7819 15.094C16.4601 15.622 16.2103 16.1927 16.0423 16.786C16.0073 16.9095 15.9757 17.0347 15.9672 17.1626C15.9513 17.4003 16.0284 17.6511 16.076 17.8828C16.1033 18.0157 16.132 18.1484 16.1623 18.2807C16.1827 18.3701 16.1868 18.4651 16.2174 18.552C16.2632 18.6823 16.3188 18.6175 16.4102 18.5489C16.5824 18.4195 16.7271 18.257 16.8506 18.0822C17.238 17.5331 17.4886 16.8879 17.7046 16.2583C17.8018 15.9752 17.8783 15.7278 17.8801 15.4564L17.8799 15.4565Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M15.0033 13.1303C14.9924 13.1575 14.9785 13.1809 14.9613 13.1986C14.9119 13.2493 14.839 13.268 14.7712 13.2899C14.1814 13.4809 13.8026 14.0399 13.5213 14.5858C13.2425 15.1268 13.0129 15.6924 12.8364 16.2736C12.7529 16.5489 12.6805 16.8351 12.7119 17.1208C12.7337 17.3193 12.8048 17.5087 12.8752 17.6959C13.0577 18.1802 13.1784 18.3594 13.5979 18.6143L12.9811 18.8549C12.8716 18.3001 12.4763 17.8174 12.4131 17.2532C12.3838 16.9902 12.4287 16.7289 12.5045 16.4735C12.5508 16.3177 12.6084 16.1643 12.6679 16.014C12.786 15.7152 12.9118 15.4195 13.0454 15.1271C13.1532 14.8909 13.266 14.6571 13.3836 14.4256C13.4436 14.3078 13.5049 14.1905 13.5673 14.0739C13.768 13.6993 13.9858 13.326 14.2937 13.0307C14.4098 12.9192 14.6325 12.6593 14.806 12.624C14.8077 12.6237 14.8092 12.6234 14.8108 12.623C14.816 12.6243 14.821 12.6257 14.826 12.6273L14.8618 12.6332L15.0033 13.1303Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M14.8632 12.6444C14.7027 12.8506 14.4552 12.976 14.2732 13.163C14.0905 13.3508 13.9411 13.5671 13.7981 13.785C13.7738 13.8221 13.7496 13.8594 13.7254 13.8966C13.5932 14.1003 13.4608 14.3043 13.3411 14.5155C13.2005 14.7633 13.0774 15.0208 12.9729 15.2854C12.9222 15.4138 12.8894 15.5565 12.8287 15.6797C12.7642 15.8109 12.7145 15.9515 12.6599 16.0875C12.629 16.1642 12.5982 16.241 12.5673 16.3177C12.5463 16.3699 12.5254 16.422 12.5044 16.4742C12.4415 16.6307 12.4669 16.8003 12.4115 16.9534H12.4226L9.29834 17.2044L11.2471 16.8222C11.2471 16.8222 11.2477 16.8223 11.2477 16.8222C11.374 16.6691 11.5004 16.5161 11.6267 16.3631C11.8644 16.0751 12.1022 15.7871 12.3401 15.499C12.4956 15.3106 12.6539 15.1295 12.7915 14.9271C12.934 14.7174 13.0633 14.4994 13.1921 14.2815C13.3284 14.0511 13.4646 13.82 13.5776 13.5774C13.6918 13.3322 13.7677 13.0762 13.8375 12.8162C13.8675 12.7046 13.8956 12.5925 13.9239 12.4805C14.2385 12.5332 14.5532 12.5859 14.8678 12.6386C14.8662 12.6406 14.8648 12.6426 14.8632 12.6445V12.6444Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M7.03386 3.23633C7.03386 3.23633 7.03332 3.23759 7.03296 3.23813L7.03368 3.23633H7.03386Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M7.02532 3.22628L5.76938 1.45316L5.7666 1.44922L5.76816 1.45425C5.76938 1.45797 5.7706 1.4618 5.7717 1.46563L5.77359 1.47153C5.77459 1.47471 5.77559 1.47788 5.77658 1.48116C5.95002 2.05926 5.19896 3.03814 4.04603 3.76664C2.79575 4.55662 1.49789 4.76871 1.11133 4.2545L2.64483 6.53604L2.66479 6.56579C3.03716 6.50016 3.61467 6.36015 4.24408 6.06634C4.87516 5.77177 5.43427 5.38247 5.9061 4.90938C6.3836 4.43039 6.74077 3.87942 7.03352 3.23623L7.02532 3.22639V3.22628Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.76807 1.45508L5.77161 1.46645C5.77039 1.46263 5.76929 1.45891 5.76807 1.45508Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.0459 3.76595C5.19882 3.03745 5.94977 2.05857 5.77645 1.48047C5.91617 2.06743 5.19882 3.03745 4.0459 3.76595Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M5.77648 1.48145C5.77548 1.47828 5.77449 1.47511 5.77349 1.47182C5.77293 1.46986 5.77227 1.46789 5.7716 1.46592L5.76805 1.45454C5.75175 1.40346 5.73257 1.35456 5.70363 1.30993C5.34523 0.75798 4.02187 0.962967 2.74785 1.76793C1.47395 2.57289 0.73176 3.67286 1.09016 4.22493C1.09681 4.23521 1.10391 4.24505 1.11123 4.25479C1.49779 4.769 2.79553 4.55702 4.04593 3.76693C5.19885 3.03843 5.9162 2.06841 5.77648 1.48145Z",fill:"#F9F9F9"})]}),(0,Gt.jsxs)("defs",{children:[(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2197_2564",x1:"1.5983",y1:"10.7225",x2:"17.3918",y2:"10.7225",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsx)("clipPath",{id:"clip0_2197_2564",children:(0,Gt.jsx)("rect",{width:"17",height:"18",fill:"white",transform:"translate(1 1)"})})]})]})}const cc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_2296_2718)",children:[(0,Gt.jsx)("path",{d:"M6.21416 5.03881C5.82323 4.68307 5.67399 4.08428 5.85188 3.58546C6.02977 3.08663 6.52407 2.71729 7.05179 2.68931C7.57952 2.66133 8.10911 2.976 8.33718 3.45326C8.30951 3.47251 8.282 3.4918 8.25429 3.5112C9.28792 2.80572 10.7402 2.72819 11.8126 3.36964C12.0442 2.83637 12.7558 2.56336 13.3198 2.69852C13.8839 2.83351 14.3081 3.40784 14.2726 3.98816C14.2427 4.4764 13.9358 4.89795 13.641 5.28824C13.9397 5.68191 14.1188 6.16541 14.1491 6.65925C14.1761 7.09951 14.0743 7.52946 13.8464 7.90673C13.6845 8.17493 13.6896 8.18146 13.913 8.38593C14.0903 8.54825 14.2214 8.74872 14.3258 8.96455C14.5543 9.43687 14.6818 9.95616 14.7083 10.48C14.7305 10.9168 14.5408 11.4032 14.6641 11.8116C14.8328 12.3705 14.8695 12.9815 14.683 13.5414C14.6016 13.7855 14.3386 14.0519 14.2998 14.2845C14.2769 14.4218 14.3788 14.6483 14.4 14.7889C14.4284 14.9774 14.4427 15.1668 14.4194 15.3568C14.3621 15.8221 14.1616 16.2782 13.8174 16.596C13.3883 16.9923 12.7751 17.1409 12.1929 17.1092C11.6109 17.0776 11.0507 16.8832 10.5093 16.6671C10.231 16.8696 9.88943 16.9934 9.54627 16.9731C9.20311 16.9528 8.86855 16.8099 8.61647 16.5759C8.61134 16.5984 8.60642 16.6208 8.60129 16.6434C7.9401 16.8636 7.18436 17.1091 6.50098 16.9749C5.82474 16.8421 5.23339 16.3395 4.99231 15.6927C4.75137 15.0459 4.86898 14.277 5.29244 13.7314C5.27126 13.709 5.25004 13.6867 5.22902 13.6643C4.88748 13.3031 4.84476 12.869 4.85678 12.3712C4.86881 11.8734 5.06609 11.382 5.40148 11.014C5.20025 10.4681 5.05929 9.95518 5.14397 9.37915C5.22886 8.80303 5.54426 8.24183 6.05299 7.95963C6.07107 7.91911 6.03491 8.00015 6.05299 7.95963C5.60694 7.06351 5.69588 5.8964 6.21405 5.03861L6.21416 5.03881Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M14.6577 15.3855C14.6808 15.1983 14.6744 14.9971 14.6375 14.7522C14.6274 14.6853 14.6072 14.6163 14.5858 14.5431C14.5672 14.4797 14.5325 14.3614 14.5368 14.3235C14.5499 14.2452 14.63 14.1207 14.7005 14.0111C14.7812 13.8857 14.8646 13.7562 14.9108 13.6169C15.0996 13.051 15.0938 12.4025 14.8942 11.7411C14.8358 11.5482 14.869 11.31 14.9041 11.0578C14.9309 10.8654 14.9586 10.6662 14.9484 10.4668C14.9199 9.90513 14.7794 9.34895 14.5421 8.8588C14.4115 8.58856 14.2588 8.37565 14.0754 8.20752C14.048 8.18244 14.0169 8.15381 13.9932 8.13076C14.0107 8.09885 14.0351 8.0588 14.0521 8.03061C14.3027 7.6158 14.4192 7.13617 14.3892 6.6436C14.36 6.16582 14.2013 5.69234 13.9384 5.29182C14.2011 4.93759 14.4814 4.51012 14.5126 4.00187C14.5552 3.30223 14.056 2.62662 13.376 2.46376C12.7538 2.31469 12.0672 2.57032 11.7227 3.04597C10.7191 2.54859 9.43643 2.58255 8.42341 3.12708C8.11324 2.69095 7.57627 2.41969 7.03961 2.44821C6.41665 2.48125 5.8357 2.9156 5.62593 3.50425C5.43812 4.03116 5.55931 4.65093 5.91762 5.076C5.46767 5.93266 5.40384 7.00847 5.74973 7.86891C5.30677 8.19377 4.99727 8.72949 4.90697 9.34391C4.85216 9.71601 4.88213 10.0608 4.96497 10.4137C4.96562 10.4169 4.96546 10.4201 4.96632 10.4232C4.97095 10.4431 4.97654 10.4616 4.98152 10.4809C5.02145 10.6389 5.07058 10.7987 5.12873 10.964C4.81432 11.3587 4.62948 11.8614 4.61723 12.3652C4.60638 12.8105 4.62652 13.3174 4.98576 13.7512C4.61012 14.3446 4.52248 15.1182 4.76779 15.7767C5.03702 16.4994 5.69931 17.0623 6.45492 17.2108C6.9457 17.3072 7.45911 17.2272 7.93751 17.1C7.9568 17.0997 7.97622 17.098 7.9957 17.0928C8.00855 17.0895 8.02145 17.086 8.03409 17.0822C8.09484 17.0649 8.15458 17.0443 8.21275 17.0213C8.35388 16.9783 8.49072 16.9334 8.62158 16.8899C8.88713 17.0804 9.20348 17.1936 9.53179 17.2129C9.87012 17.233 10.2231 17.1355 10.5387 16.9371C10.6886 16.9957 10.8422 17.0518 10.9984 17.1036C11.0267 17.1202 11.0574 17.1293 11.0889 17.1332C11.4397 17.2445 11.8042 17.3287 12.1795 17.3489C12.5045 17.3666 12.8185 17.3316 13.106 17.2493C13.4432 17.1527 13.7433 16.9908 13.9801 16.7722C14.3489 16.4315 14.5897 15.9389 14.6578 15.3853L14.6577 15.3855ZM13.6548 16.4188C13.3113 16.7359 12.7836 16.9001 12.2064 16.8685C11.8796 16.8507 11.5546 16.7754 11.238 16.6752C10.9075 16.3486 10.5471 15.9804 10.376 15.5435C10.2233 15.1539 10.2435 14.6151 10.5774 14.3397C10.7967 14.1589 11.1245 14.107 11.4134 14.0611L12.7571 13.8483C12.8889 13.8275 12.9778 13.7043 12.9572 13.573C12.9367 13.4417 12.8137 13.3522 12.6827 13.3729L11.339 13.5857C11.0065 13.6385 10.5927 13.704 10.2723 13.9683C9.73751 14.4096 9.71927 15.1858 9.92857 15.7201C10.0373 15.9981 10.1992 16.2426 10.3812 16.4643C10.377 16.467 10.3723 16.4691 10.3683 16.4721C10.1158 16.6558 9.82881 16.7484 9.56081 16.7327C9.34266 16.7196 9.12566 16.6457 8.94168 16.525C9.37961 16.069 9.62406 15.4242 9.54046 14.7873C9.48509 14.3671 9.30109 14.0162 9.02224 13.7997C8.6291 13.4945 8.12692 13.4924 7.68373 13.4907C7.32179 13.4892 6.91541 13.4686 6.67562 13.2415C6.57923 13.1505 6.42727 13.1549 6.33612 13.2516C6.24497 13.3483 6.24918 13.5006 6.34562 13.592C6.71262 13.9393 7.22749 13.9703 7.68113 13.972C8.06577 13.9736 8.46336 13.9752 8.72774 14.1805C8.96836 14.3673 9.04193 14.6809 9.0642 14.8511C9.15712 15.5572 8.69777 16.3051 8.04393 16.5696C7.55423 16.7165 7.01986 16.8312 6.54762 16.7385C5.95191 16.6215 5.42976 16.1778 5.21749 15.6078C5.00512 15.0381 5.10913 14.3593 5.48218 13.8786C5.55509 13.7847 5.54871 13.6515 5.46696 13.5653L5.40354 13.4982C5.13129 13.2105 5.08511 12.869 5.09705 12.3762C5.10601 12.0043 5.23472 11.6339 5.45336 11.3318C5.62382 11.5041 5.82752 11.6454 6.05813 11.7794C6.68476 12.1433 7.29825 12.3099 7.88142 12.2743C8.04904 12.2641 8.2123 12.2357 8.36828 12.191C8.87937 12.0446 9.3106 11.7233 9.54994 11.2929C9.91195 10.6422 9.76716 9.79917 9.22012 9.37394C8.90658 9.13039 8.50903 9.04961 8.18964 8.98468L7.25173 8.79398C7.12169 8.76756 6.99494 8.85175 6.96842 8.98195C6.94191 9.11214 7.02569 9.23919 7.15558 9.26557L8.09349 9.45627C8.3779 9.51414 8.70035 9.57953 8.92537 9.75446C9.27761 10.0284 9.37154 10.6258 9.13056 11.0592C8.90094 11.4722 8.39904 11.7609 7.8529 11.7939C7.37252 11.8234 6.83533 11.6743 6.29944 11.363C5.87619 11.1171 5.59788 10.8771 5.46069 10.4143C5.45722 10.4014 5.45328 10.3884 5.45016 10.3754C5.44674 10.3628 5.44342 10.3499 5.44009 10.3371C5.36406 10.0254 5.33563 9.72666 5.38174 9.41325C5.45913 8.88725 5.73174 8.4391 6.11571 8.20086C6.17332 8.18437 6.22975 8.14454 6.26724 8.06781L6.26739 8.06786L6.27114 8.05925C6.27138 8.05849 6.27198 8.05766 6.27222 8.0569C6.27237 8.05644 6.27247 8.05613 6.27261 8.05567C6.27276 8.05521 6.2729 8.05475 6.27315 8.05449L6.27694 8.04573L6.27679 8.04568C6.3207 7.93654 6.28887 7.84743 6.23807 7.78943C5.8732 6.99674 5.94311 5.95055 6.41928 5.16249C6.47882 5.06405 6.46049 4.93718 6.37541 4.85986C6.05373 4.56713 5.93129 4.07595 6.07763 3.66537C6.22392 3.25495 6.6293 2.95193 7.06382 2.92897C7.44187 2.90885 7.81992 3.10197 8.03529 3.41127C8.00178 3.48555 8.00655 3.57503 8.05591 3.64709C8.13077 3.75611 8.27972 3.78449 8.38893 3.70942C9.35781 3.04822 10.7149 2.99314 11.6889 3.57584C11.7482 3.61137 11.8204 3.61994 11.8855 3.59825C11.9513 3.5769 12.0047 3.52837 12.0324 3.46491C12.206 3.06582 12.7809 2.81682 13.2632 2.93194C13.7158 3.04049 14.061 3.50748 14.0326 3.97306C14.0061 4.40533 13.6974 4.81414 13.4493 5.14246C13.3842 5.22867 13.3842 5.34752 13.4496 5.43344C13.7187 5.78817 13.8818 6.22862 13.9092 6.67356C13.9332 7.06797 13.8403 7.45113 13.6408 7.78167C13.4206 8.14635 13.4391 8.27785 13.7507 8.563C13.8885 8.68913 14.0059 8.8547 14.1094 9.06907C14.3189 9.50209 14.4429 9.99411 14.4683 10.4919C14.4726 10.5789 14.4666 10.6711 14.4565 10.7666C14.4499 10.7598 14.4438 10.7526 14.4361 10.7465C14.3329 10.6631 14.1816 10.6797 14.0984 10.7829C13.5672 11.4423 12.7479 11.8822 11.9065 11.959C11.282 12.0162 10.7463 11.8397 10.4734 11.4872C10.2785 11.2354 10.2157 10.8767 10.3135 10.5735C10.4112 10.27 10.6714 10.0153 10.9764 9.92455C11.141 9.87805 11.327 9.8672 11.522 9.85921C11.6118 9.85546 11.7017 9.85176 11.7909 9.8441C12.2207 9.80748 12.5386 9.66681 12.7354 9.42674C12.8196 9.32396 12.8049 9.1724 12.7023 9.08817C12.5997 9.00394 12.4485 9.0191 12.3642 9.12183C12.2531 9.25758 12.0468 9.33931 11.7506 9.36466C11.6684 9.37165 11.5857 9.37494 11.5029 9.37853C11.2872 9.38739 11.0606 9.39988 10.8404 9.46335C10.3807 9.6002 10.0038 9.96934 9.85662 10.4266C9.70945 10.8838 9.80029 11.4035 10.094 11.7827C10.4677 12.2655 11.1614 12.5107 11.9497 12.4385C12.1768 12.4177 12.4004 12.3753 12.6178 12.3131C13.3094 12.115 13.9355 11.713 14.4062 11.1611C14.3768 11.4003 14.3627 11.6436 14.4344 11.8812C14.5534 12.2755 14.6536 12.8702 14.4553 13.4651C14.4281 13.5467 14.3615 13.6504 14.2969 13.7506C14.1964 13.9069 14.0924 14.0682 14.063 14.2446C14.0392 14.387 14.0847 14.5424 14.1249 14.6794C14.1409 14.734 14.1574 14.7904 14.1626 14.8248C14.1928 15.0253 14.1987 15.185 14.181 15.3275C14.1268 15.7678 13.9399 16.1556 13.6547 16.4191L13.6548 16.4188Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M11.3354 7.19094C11.4447 7.1154 11.4724 6.96565 11.3972 6.85618C11.3221 6.74675 11.1725 6.7195 11.0632 6.79473C10.5644 7.13916 10.1245 7.31524 9.71847 7.33289C9.2373 7.3537 8.78497 7.11607 8.6184 6.7549C8.56273 6.63424 8.42006 6.58236 8.29977 6.63771C8.17928 6.69367 8.12679 6.83672 8.18235 6.95718C8.43217 7.49909 9.05751 7.84314 9.73845 7.81366C9.91053 7.80632 10.0854 7.77706 10.2641 7.72577C10.6039 7.62833 10.9583 7.4511 11.3353 7.19074L11.3354 7.19094Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M11.1345 5.24804C11.2493 5.18133 11.2891 5.03475 11.2228 4.91964C11.2209 4.91448 11.2208 4.89439 11.232 4.87463C11.2505 4.84168 11.2904 4.80994 11.3441 4.78511C11.4733 4.72566 11.6315 4.73014 11.7571 4.79703C11.8826 4.86387 11.9749 4.99262 11.9979 5.13331C12.0193 5.26436 12.1429 5.35321 12.2737 5.33144C12.2829 5.32998 12.292 5.3278 12.3009 5.32538C12.4167 5.29224 12.4919 5.17667 12.4718 5.05481C12.4244 4.76505 12.2417 4.5097 11.983 4.37202C11.7242 4.23433 11.4105 4.22488 11.1442 4.34802C10.9973 4.41553 10.8833 4.51575 10.8142 4.638C10.72 4.80478 10.717 5.00474 10.8063 5.15989C10.8725 5.27495 11.0193 5.31445 11.1347 5.24809L11.1345 5.24804Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M9.04483 5.30767C9.05421 5.30626 9.06316 5.30404 9.07206 5.30146C9.18768 5.26826 9.26289 5.15285 9.24315 5.03093C9.18106 4.64992 8.88895 4.32825 8.5163 4.23004C8.1436 4.13198 7.73093 4.26858 7.48907 4.56949C7.30852 4.79446 7.26898 5.07551 7.38806 5.28552C7.45361 5.40105 7.60044 5.44141 7.71551 5.37546C7.83089 5.30961 7.87113 5.16267 7.80574 5.04719C7.7892 5.01813 7.80873 4.93857 7.86306 4.87089C7.98414 4.72023 8.2073 4.64639 8.39376 4.69561C8.58026 4.74469 8.73809 4.91855 8.76917 5.10924C8.79055 5.24029 8.91392 5.32909 9.04488 5.30752L9.04483 5.30767Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M9.83533 6.52995C10.2343 6.57962 10.9838 5.92628 10.4035 5.70355C10.1172 5.59376 9.03597 5.60575 9.26138 6.10462C9.36394 6.33168 9.58845 6.49919 9.83533 6.52995Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M7.14198 3.22498C6.85846 3.21045 6.57345 3.34064 6.39822 3.56426C6.22274 3.78814 6.16427 4.09645 6.24571 4.3688C6.28347 4.49492 6.4154 4.56685 6.54139 4.5307C6.5425 4.53038 6.54361 4.53006 6.54473 4.52973C6.67175 4.49138 6.74385 4.35709 6.70577 4.22985C6.66896 4.10708 6.69644 3.96216 6.77565 3.86119C6.85471 3.76016 6.98832 3.69892 7.11652 3.70568C7.24924 3.71252 7.36199 3.61038 7.36892 3.47768C7.37585 3.34498 7.27418 3.23184 7.14177 3.22509L7.14198 3.22498Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M12.5784 3.70889C12.6162 3.84193 12.763 3.91573 12.8908 3.86902C12.9996 3.88513 13.0963 3.93526 13.1597 4.01026C13.245 4.11145 13.2833 4.25531 13.2596 4.38588C13.2358 4.51659 13.3223 4.64182 13.4529 4.66554C13.4903 4.67235 13.5272 4.67006 13.5615 4.66018C13.6468 4.63559 13.7152 4.56479 13.7322 4.47143C13.7818 4.19898 13.7051 3.91038 13.5268 3.69897C13.3534 3.49365 13.0889 3.37828 12.801 3.38213C12.7262 3.38301 12.6561 3.41902 12.6116 3.47933C12.5667 3.53938 12.5525 3.61694 12.5731 3.68913L12.5787 3.70899L12.5784 3.70889Z",fill:"#303F9F"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_2296_2718",children:(0,Gt.jsx)("rect",{width:"12.2479",height:"16.1672",fill:"white",transform:"translate(6.6355 0.320312) rotate(17.6122)"})})})]}),dc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M18.6789 3.77361L18.6789 3.775L18.7495 16.4657C18.7414 16.4695 18.7323 16.4735 18.7221 16.4777C18.6254 16.5179 18.4682 16.5619 18.2464 16.6065C17.8067 16.6948 17.1613 16.776 16.3535 16.8447C14.7404 16.9819 12.5069 17.0672 10.0363 17.0672C7.56574 17.0672 5.33183 16.9818 3.71837 16.8445C2.91032 16.7758 2.26479 16.6946 1.82491 16.6063C1.60297 16.5617 1.44573 16.5177 1.34898 16.4776C1.33832 16.4732 1.32888 16.469 1.32057 16.4651L1.25 3.77361C1.25 3.77345 1.25 3.7733 1.25 3.77315C1.25007 3.76116 1.2529 3.74922 1.26164 3.73385C1.27554 3.71106 1.29948 3.69727 1.32634 3.69727H18.6026C18.63 3.69727 18.6539 3.71154 18.6671 3.73352C18.6761 3.74925 18.6789 3.76138 18.6789 3.77361ZM1.32107 16.5553L1.32106 16.5539L1.32107 16.5553ZM18.9289 3.77361L19 16.5553C19 16.9754 14.987 17.3172 10.0363 17.3172L18.9289 3.77361Z",fill:"#E3E5EA",stroke:"#303F9F",strokeWidth:"0.5"}),(0,Gt.jsx)("path",{d:"M18.9289 6.67773V6.8155C18.9289 7.23553 14.916 7.57736 9.96526 7.57736C5.01456 7.57736 1 7.23553 1 6.8155V6.67773C1 7.09737 5.01456 7.43959 9.96526 7.43959C14.916 7.43959 18.9289 7.09737 18.9289 6.67773Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M18.9289 6.56445V6.70222C18.9289 7.12225 14.916 7.46408 9.96526 7.46408C5.01456 7.46408 1 7.12225 1 6.70261V6.56485C1 6.98449 5.01456 7.32671 9.96526 7.32671C14.916 7.32671 18.9289 6.98449 18.9289 6.56485V6.56445Z",fill:"#303F9F"}),(0,Gt.jsx)("mask",{id:"path-4-inside-1_2197_3557",fill:"white",children:(0,Gt.jsx)("path",{d:"M18.8834 3.60726C18.424 3.94154 14.6076 4.20277 9.96575 4.20277C5.32392 4.20277 1.50548 3.94154 1.04614 3.60726C1.10331 3.51079 1.20773 3.44727 1.32643 3.44727H18.6027C18.7214 3.44727 18.8262 3.51079 18.883 3.60726H18.8834Z"})}),(0,Gt.jsx)("path",{d:"M18.8834 3.60726C18.424 3.94154 14.6076 4.20277 9.96575 4.20277C5.32392 4.20277 1.50548 3.94154 1.04614 3.60726C1.10331 3.51079 1.20773 3.44727 1.32643 3.44727H18.6027C18.7214 3.44727 18.8262 3.51079 18.883 3.60726H18.8834Z",fill:"url(#paint0_linear_2197_3557)"}),(0,Gt.jsx)("path",{d:"M18.8834 3.60726L19.4718 4.41582L21.9569 2.60726H18.8834V3.60726ZM1.04614 3.60726L0.185851 3.09746L-0.278079 3.88034L0.457722 4.41582L1.04614 3.60726ZM18.883 3.60726L18.0211 4.11444L18.3111 4.60726H18.883V3.60726ZM18.2949 2.79871C18.4109 2.71429 18.4751 2.71916 18.3174 2.75838C18.2055 2.78621 18.037 2.81823 17.806 2.85161C17.3468 2.91794 16.7099 2.97988 15.9259 3.03263C14.3619 3.13785 12.2705 3.20277 9.96575 3.20277V5.20277C12.3028 5.20277 14.4405 5.13708 16.0601 5.02812C16.8678 4.97377 17.5613 4.90772 18.0919 4.83106C18.3558 4.79294 18.5972 4.74971 18.8 4.69927C18.9571 4.66022 19.241 4.5838 19.4718 4.41582L18.2949 2.79871ZM9.96575 3.20277C7.66097 3.20277 5.56907 3.13785 4.00462 3.03263C3.22032 2.97988 2.58315 2.91794 2.12379 2.8516C1.89263 2.81822 1.72412 2.78619 1.61213 2.75836C1.45431 2.71913 1.51851 2.71425 1.63456 2.79871L0.457722 4.41582C0.688609 4.58384 0.972619 4.66025 1.12967 4.69929C1.33256 4.74973 1.57398 4.79295 1.83793 4.83107C2.36876 4.90773 3.06245 4.97378 3.8704 5.02812C5.49047 5.13708 7.62869 5.20277 9.96575 5.20277V3.20277ZM1.90643 4.11706C1.79017 4.31326 1.57376 4.44727 1.32643 4.44727V2.44727C0.841689 2.44727 0.416453 2.70832 0.185851 3.09746L1.90643 4.11706ZM1.32643 4.44727H18.6027V2.44727H1.32643V4.44727ZM18.6027 4.44727C18.3572 4.44727 18.139 4.31473 18.0211 4.11444L19.7448 3.10009C19.5134 2.70684 19.0855 2.44727 18.6027 2.44727V4.44727ZM18.883 4.60726H18.8834V2.60726H18.883V4.60726Z",fill:"#303F9F",mask:"url(#path-4-inside-1_2197_3557)"}),(0,Gt.jsx)("path",{d:"M9.9644 3.95203C14.7906 3.95203 18.703 3.73891 18.703 3.47601C18.703 3.21312 14.7906 3 9.9644 3C5.13822 3 1.22583 3.21312 1.22583 3.47601C1.22583 3.73891 5.13822 3.95203 9.9644 3.95203Z",fill:"#D0D1D3"}),(0,Gt.jsx)("path",{d:"M9.9644 3.95203C14.7906 3.95203 18.703 3.73891 18.703 3.47601C18.703 3.21312 14.7906 3 9.9644 3C5.13822 3 1.22583 3.21312 1.22583 3.47601C1.22583 3.73891 5.13822 3.95203 9.9644 3.95203Z",fill:"url(#paint1_radial_2197_3557)"}),(0,Gt.jsx)("path",{d:"M17.9971 3.4395C18.0909 3.45158 18.1746 3.46378 18.2479 3.47601C18.1746 3.48825 18.0909 3.50045 17.9971 3.51253C17.5604 3.56877 16.9248 3.61982 16.1353 3.66283C14.5575 3.74878 12.3757 3.80203 9.9644 3.80203C7.55313 3.80203 5.37134 3.74878 3.79346 3.66283C3.00398 3.61982 2.36842 3.56877 1.93171 3.51253C1.8379 3.50045 1.75424 3.48824 1.68087 3.47601C1.75424 3.46378 1.8379 3.45158 1.93171 3.4395C2.36842 3.38326 3.00398 3.3322 3.79346 3.2892C5.37134 3.20325 7.55313 3.15 9.9644 3.15C12.3757 3.15 14.5575 3.20325 16.1353 3.2892C16.9248 3.3322 17.5604 3.38326 17.9971 3.4395Z",fill:"#E3E5EA",stroke:"#303F9F",strokeWidth:"0.3"}),(0,Gt.jsxs)("defs",{children:[(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2197_3557",x1:"1.04614",y1:"3.82482",x2:"18.8834",y2:"3.82482",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#CCCCCC"}),(0,Gt.jsx)("stop",{offset:"0.01",stopColor:"#D9D9D9"}),(0,Gt.jsx)("stop",{offset:"0.03",stopColor:"#EAEAEA"}),(0,Gt.jsx)("stop",{offset:"0.06",stopColor:"#F6F6F6"}),(0,Gt.jsx)("stop",{offset:"0.09",stopColor:"#FDFDFD"}),(0,Gt.jsx)("stop",{offset:"0.2",stopColor:"white"}),(0,Gt.jsx)("stop",{offset:"0.43",stopColor:"white"}),(0,Gt.jsx)("stop",{offset:"0.8",stopColor:"white"}),(0,Gt.jsx)("stop",{offset:"1",stopColor:"#CCCCCC"})]}),(0,Gt.jsxs)("radialGradient",{id:"paint1_radial_2197_3557",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.9644 12.2342) scale(8.73658 0.436829)",children:[(0,Gt.jsx)("stop",{stopColor:"#DEDEDE"}),(0,Gt.jsx)("stop",{offset:"0.59",stopColor:"#D5D5D5"}),(0,Gt.jsx)("stop",{offset:"1",stopColor:"#CCCCCC"})]})]})]}),uc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_2296_2659)",children:[(0,Gt.jsx)("path",{d:"M11.1709 5.89258H8.82665C8.82665 5.89258 8.82665 5.89258 8.82227 5.89258V6.26445C8.82227 6.26445 8.82446 6.26445 8.82665 6.26445H11.1709C11.1709 6.26445 11.1709 6.26445 11.1753 6.26445V5.89258C11.1753 5.89258 11.1731 5.89258 11.1709 5.89258Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M11.1753 5.65234C11.1753 5.65234 11.1731 5.65234 11.171 5.65234H8.82666C8.82666 5.65234 8.82666 5.65234 8.82227 5.65234C8.75429 5.65234 8.69946 5.70639 8.69946 5.77342C8.69946 5.84044 8.75429 5.89233 8.82227 5.89449C8.82227 5.89449 8.82446 5.89449 8.82666 5.89449H11.171C11.171 5.89449 11.171 5.89449 11.1753 5.89449C11.2433 5.89449 11.2981 5.84044 11.2981 5.77342C11.2981 5.70639 11.2433 5.65451 11.1753 5.65234Z",fill:"url(#paint0_linear_2296_2659)"}),(0,Gt.jsx)("path",{d:"M11.1753 6.26758C11.1753 6.26758 11.1731 6.26758 11.171 6.26758H8.82666C8.82666 6.26758 8.82666 6.26758 8.82227 6.26758C8.75429 6.26758 8.69946 6.32163 8.69946 6.38865C8.69946 6.45567 8.75429 6.50756 8.82227 6.50972C8.82227 6.50972 8.82446 6.50972 8.82666 6.50972H11.171C11.171 6.50972 11.171 6.50972 11.1753 6.50972C11.2433 6.50972 11.2981 6.45567 11.2981 6.38865C11.2981 6.32163 11.2433 6.26974 11.1753 6.26758Z",fill:"url(#paint1_linear_2296_2659)"}),(0,Gt.jsx)("mask",{id:"path-4-inside-1_2296_2659",fill:"white",children:(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3948 1H10.0001H9.60534L9.28955 4.71868H10.0001H10.7106L10.3948 1ZM10.7104 4.71875H8.82446V5.65274H8.82885H11.1731H11.1775V4.71875H10.7126H10.7104ZM11.1731 7.06836H11.6645C12.057 7.06836 12.3772 7.34726 12.3772 7.69102V8.65096H7.6228V7.69102C7.6228 7.34726 7.94298 7.06836 8.33552 7.06836H8.82227V6.50977H8.82665H11.1688H11.1709H11.1731V7.06836ZM12.3684 8.65234H7.63158C7.28289 8.65234 7 8.91179 7 9.23393V10.9609V10.9614V16.0977V16.0979V17.4187C7 17.7408 7.28289 18.0002 7.63158 18.0002H12.3684C12.7171 18.0002 13 17.7408 13 17.4187V16.0979V16.0977V10.9614V10.9609V9.23393C13 8.91179 12.7171 8.65234 12.3684 8.65234Z"})}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3948 1H10.0001H9.60534L9.28955 4.71868H10.0001H10.7106L10.3948 1ZM10.7104 4.71875H8.82446V5.65274H8.82885H11.1731H11.1775V4.71875H10.7126H10.7104ZM11.1731 7.06836H11.6645C12.057 7.06836 12.3772 7.34726 12.3772 7.69102V8.65096H7.6228V7.69102C7.6228 7.34726 7.94298 7.06836 8.33552 7.06836H8.82227V6.50977H8.82665H11.1688H11.1709H11.1731V7.06836ZM12.3684 8.65234H7.63158C7.28289 8.65234 7 8.91179 7 9.23393V10.9609V10.9614V16.0977V16.0979V17.4187C7 17.7408 7.28289 18.0002 7.63158 18.0002H12.3684C12.7171 18.0002 13 17.7408 13 17.4187V16.0979V16.0977V10.9614V10.9609V9.23393C13 8.91179 12.7171 8.65234 12.3684 8.65234Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M10.3948 1L11.1919 0.932308L11.1298 0.2L10.3948 0.2V1ZM9.60534 1V0.2H8.8704L8.80821 0.932308L9.60534 1ZM9.28955 4.71868L8.49242 4.65099L8.41874 5.51868H9.28955V4.71868ZM10.7106 4.71868V5.51868H11.5814L11.5077 4.65099L10.7106 4.71868ZM8.82446 4.71875V3.91875H8.02446V4.71875H8.82446ZM8.82446 5.65274H8.02446V6.45274H8.82446V5.65274ZM11.1775 5.65274V6.45274H11.9775V5.65274H11.1775ZM11.1775 4.71875H11.9775V3.91875H11.1775V4.71875ZM11.1731 7.06836H10.3731V7.86836H11.1731V7.06836ZM12.3772 8.65096V9.45096H13.1772V8.65096H12.3772ZM7.6228 8.65096H6.8228V9.45096H7.6228V8.65096ZM8.82227 7.06836V7.86836H9.62227V7.06836H8.82227ZM8.82227 6.50977V5.70977H8.02227V6.50977H8.82227ZM11.1731 6.50977H11.9731V5.70977H11.1731V6.50977ZM10.0001 1.8H10.3948V0.2H10.0001V1.8ZM9.60534 1.8H10.0001V0.2H9.60534V1.8ZM10.0867 4.78637L10.4025 1.06769L8.80821 0.932308L8.49242 4.65099L10.0867 4.78637ZM10.0001 3.91868H9.28955V5.51868H10.0001V3.91868ZM10.7106 3.91868H10.0001V5.51868H10.7106V3.91868ZM9.59768 1.06769L9.91347 4.78637L11.5077 4.65099L11.1919 0.932308L9.59768 1.06769ZM8.82446 5.51875H10.7104V3.91875H8.82446V5.51875ZM9.62446 5.65274V4.71875H8.02446V5.65274H9.62446ZM8.82885 4.85274H8.82446V6.45274H8.82885V4.85274ZM11.1731 4.85274H8.82885V6.45274H11.1731V4.85274ZM11.1775 4.85274H11.1731V6.45274H11.1775V4.85274ZM10.3775 4.71875V5.65274H11.9775V4.71875H10.3775ZM10.7126 5.51875H11.1775V3.91875H10.7126V5.51875ZM10.7104 5.51875H10.7126V3.91875H10.7104V5.51875ZM11.6645 6.26836H11.1731V7.86836H11.6645V6.26836ZM13.1772 7.69102C13.1772 6.80672 12.3932 6.26836 11.6645 6.26836V7.86836C11.6725 7.86836 11.6625 7.87138 11.642 7.85348C11.6199 7.83424 11.5772 7.77891 11.5772 7.69102H13.1772ZM13.1772 8.65096V7.69102H11.5772V8.65096H13.1772ZM7.6228 9.45096H12.3772V7.85096H7.6228V9.45096ZM6.8228 7.69102V8.65096H8.4228V7.69102H6.8228ZM8.33552 6.26836C7.60679 6.26836 6.8228 6.80672 6.8228 7.69102H8.4228C8.4228 7.77891 8.38008 7.83424 8.35803 7.85348C8.33752 7.87138 8.32747 7.86836 8.33552 7.86836V6.26836ZM8.82227 6.26836H8.33552V7.86836H8.82227V6.26836ZM8.02227 6.50977V7.06836H9.62227V6.50977H8.02227ZM8.82665 5.70977H8.82227V7.30977H8.82665V5.70977ZM11.1688 5.70977H8.82665V7.30977H11.1688V5.70977ZM11.1709 5.70977H11.1688V7.30977H11.1709V5.70977ZM11.1731 5.70977H11.1709V7.30977H11.1731V5.70977ZM11.9731 7.06836V6.50977H10.3731V7.06836H11.9731ZM7.63158 9.45234H12.3684V7.85234H7.63158V9.45234ZM7.8 9.23393C7.8 9.3159 7.76226 9.37835 7.72658 9.41117C7.69222 9.44277 7.65646 9.45234 7.63158 9.45234V7.85234C6.90544 7.85234 6.2 8.40822 6.2 9.23393H7.8ZM7.8 10.9609V9.23393H6.2V10.9609H7.8ZM6.2 10.9609V10.9614H7.8V10.9609H6.2ZM6.2 10.9614V16.0977H7.8V10.9614H6.2ZM6.2 16.0977V16.0979H7.8V16.0977H6.2ZM7.8 17.4187V16.0979H6.2V17.4187H7.8ZM7.63158 17.2002C7.65646 17.2002 7.69222 17.2098 7.72658 17.2414C7.76226 17.2742 7.8 17.3367 7.8 17.4187H6.2C6.2 18.2444 6.90545 18.8002 7.63158 18.8002V17.2002ZM12.3684 17.2002H7.63158V18.8002H12.3684V17.2002ZM12.2 17.4187C12.2 17.3367 12.2377 17.2742 12.2734 17.2414C12.3078 17.2098 12.3435 17.2002 12.3684 17.2002V18.8002C13.0946 18.8002 13.8 18.2444 13.8 17.4187H12.2ZM12.2 16.0979V17.4187H13.8V16.0979H12.2ZM13.8 16.0979V16.0977H12.2V16.0979H13.8ZM13.8 16.0977V10.9614H12.2V16.0977H13.8ZM13.8 10.9614V10.9609H12.2V10.9614H13.8ZM12.2 9.23393V10.9609H13.8V9.23393H12.2ZM12.3684 9.45234C12.3435 9.45234 12.3078 9.44277 12.2734 9.41117C12.2377 9.37835 12.2 9.3159 12.2 9.23393H13.8C13.8 8.40822 13.0946 7.85234 12.3684 7.85234V9.45234Z",fill:"#303F9F",mask:"url(#path-4-inside-1_2296_2659)"}),(0,Gt.jsx)("path",{d:"M9.92529 8.45771C9.92529 8.49014 9.95599 8.51393 9.99547 8.51393C10.0349 8.51393 10.0656 8.48798 10.0656 8.45771V7.59723C10.0656 7.5648 10.0349 7.54102 9.99547 7.54102C9.95599 7.54102 9.92529 7.56696 9.92529 7.59723V8.45771Z",fill:"url(#paint2_linear_2296_2659)"}),(0,Gt.jsx)("path",{d:"M9.26514 8.45771C9.26514 8.49014 9.29803 8.51393 9.33531 8.51393C9.37479 8.51393 9.40549 8.48798 9.40549 8.45771V7.59723C9.40549 7.5648 9.37479 7.54102 9.33531 7.54102C9.29584 7.54102 9.26514 7.56696 9.26514 7.59723V8.45771Z",fill:"url(#paint3_linear_2296_2659)"}),(0,Gt.jsx)("path",{d:"M8.60742 8.45771C8.60742 8.49014 8.63812 8.51393 8.6776 8.51393C8.71707 8.51393 8.74777 8.48798 8.74777 8.45771V7.59723C8.74777 7.5648 8.71488 7.54102 8.6776 7.54102C8.63812 7.54102 8.60742 7.56696 8.60742 7.59723V8.45771Z",fill:"url(#paint4_linear_2296_2659)"}),(0,Gt.jsx)("path",{d:"M7.94727 8.45771C7.94727 8.49014 7.97797 8.51393 8.01744 8.51393C8.05691 8.51393 8.08762 8.48798 8.08762 8.45771V7.59723C8.08762 7.5648 8.05691 7.54102 8.01744 7.54102C7.97797 7.54102 7.94727 7.56696 7.94727 7.59723V8.45771Z",fill:"url(#paint5_linear_2296_2659)"}),(0,Gt.jsx)("path",{d:"M10.7324 8.45771C10.7324 8.49014 10.7017 8.51393 10.6622 8.51393C10.6227 8.51393 10.592 8.48798 10.592 8.45771V7.59723C10.592 7.5648 10.6227 7.54102 10.6622 7.54102C10.7017 7.54102 10.7324 7.56696 10.7324 7.59723V8.45771Z",fill:"url(#paint6_linear_2296_2659)"}),(0,Gt.jsx)("path",{d:"M11.3925 8.45771C11.3925 8.49014 11.3618 8.51393 11.3224 8.51393C11.2829 8.51393 11.2522 8.48798 11.2522 8.45771V7.59723C11.2522 7.5648 11.2829 7.54102 11.3224 7.54102C11.3618 7.54102 11.3925 7.56696 11.3925 7.59723V8.45771Z",fill:"url(#paint7_linear_2296_2659)"}),(0,Gt.jsx)("path",{d:"M12.0525 8.45771C12.0525 8.49014 12.0218 8.51393 11.9823 8.51393C11.9428 8.51393 11.9121 8.48798 11.9121 8.45771V7.59723C11.9121 7.5648 11.9428 7.54102 11.9823 7.54102C12.0218 7.54102 12.0525 7.56696 12.0525 7.59723V8.45771Z",fill:"url(#paint8_linear_2296_2659)"}),(0,Gt.jsx)("path",{d:"M9.71924 13.5484C9.71924 13.7019 9.84643 13.8273 10.0021 13.8273C10.1578 13.8273 10.285 13.7019 10.285 13.5484C10.285 13.3949 10.1578 13.2695 10.0021 13.2695C9.84643 13.2695 9.71924 13.3949 9.71924 13.5484Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M10.0153 12.8047C8.97144 12.8047 8.47583 13.5527 8.47583 13.5527C8.47583 13.5527 8.94294 14.3008 10.0153 14.3008C10.9912 14.3008 11.5175 13.5527 11.5175 13.5527C11.5175 13.5527 10.8815 12.8047 10.0153 12.8047ZM10.0131 14.2165C9.05916 14.2165 8.5789 13.5506 8.5789 13.5506C8.5789 13.5506 9.08329 12.8847 10.0131 12.8847C10.785 12.8847 11.3969 13.5506 11.3969 13.5506C11.3969 13.5506 10.8815 14.2165 10.0131 14.2165Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M9.99769 14.2261C9.62049 14.2261 9.31348 13.9234 9.31348 13.5515C9.31348 13.1796 9.62049 12.877 9.99769 12.877C10.3749 12.877 10.6819 13.1796 10.6819 13.5515C10.6819 13.9234 10.3749 14.2261 9.99769 14.2261ZM9.99769 12.9786C9.67751 12.9786 9.41655 13.2358 9.41655 13.5493C9.41655 13.8628 9.67751 14.1201 9.99769 14.1201C10.3179 14.1201 10.5766 13.865 10.5766 13.5493C10.5766 13.2337 10.3179 12.9786 9.99769 12.9786Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M11.0637 12.1855C11.0637 12.1855 10.6667 12.7996 10.6667 13.0158C10.6667 13.232 10.8444 13.4071 11.0637 13.4071C11.283 13.4071 11.4606 13.232 11.4606 13.0158C11.4606 12.7996 11.0637 12.1855 11.0637 12.1855Z",fill:"#303F9F"})]}),(0,Gt.jsxs)("defs",{children:[(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2296_2659",x1:"8.59131",y1:"5.77117",x2:"11.1978",y2:"5.77117",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsxs)("linearGradient",{id:"paint1_linear_2296_2659",x1:"8.59131",y1:"6.3864",x2:"11.1978",y2:"6.3864",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsxs)("linearGradient",{id:"paint2_linear_2296_2659",x1:"9.91945",y1:"8.01844",x2:"10.0602",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsxs)("linearGradient",{id:"paint3_linear_2296_2659",x1:"9.2593",y1:"8.01844",x2:"9.40007",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsxs)("linearGradient",{id:"paint4_linear_2296_2659",x1:"8.60158",y1:"8.01844",x2:"8.74235",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsxs)("linearGradient",{id:"paint5_linear_2296_2659",x1:"7.94142",y1:"8.01844",x2:"8.08219",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsxs)("linearGradient",{id:"paint6_linear_2296_2659",x1:"10.5862",y1:"8.01844",x2:"10.727",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsxs)("linearGradient",{id:"paint7_linear_2296_2659",x1:"11.2464",y1:"8.01844",x2:"11.3871",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsxs)("linearGradient",{id:"paint8_linear_2296_2659",x1:"11.9063",y1:"8.01844",x2:"12.047",y2:"8.01844",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsx)("clipPath",{id:"clip0_2296_2659",children:(0,Gt.jsx)("rect",{width:"6",height:"17",fill:"white",transform:"translate(7 1)"})})]})]}),pc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_2293_2593)",children:[(0,Gt.jsx)("path",{d:"M18 7L18 14L17.492 14L17.492 7L18 7Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M17.4919 7L17.4919 14L17.2277 14L17.2277 7L17.4919 7Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M17.2483 10.4628L17.2483 10.5L17.2483 10.5372L17.2286 14L15.2857 13.4755L13.661 13.4456L4.04943 12.6965C4.04943 12.6965 3.88667 12.412 3.84652 12.2019C3.775 11.831 3.775 9.17063 3.84652 8.7997C3.8874 8.58959 4.04943 8.30513 4.04943 8.30513L13.661 7.55599L15.2857 7.52609L17.2286 7.00162L17.2483 10.4636L17.2483 10.4628Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M4.05005 8.30449L4.05005 12.6959L2.54726 12.7031L1.6269 12.7031C1.6269 12.7031 0.902874 12.3282 1.01089 9.95307C1.07585 8.53157 1.6269 8.29721 1.6269 8.29721L2.54726 8.29721L4.05005 8.30449Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M4.0566 8.30395C3.94785 8.30395 3.86026 9.28744 3.86026 10.4996C3.86026 11.7118 3.94785 12.6953 4.0566 12.6953C4.16535 12.6953 4.25293 11.7118 4.25293 10.4996C4.25293 9.28744 4.16535 8.30395 4.0566 8.30395Z",fill:"#E3E5EA"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_2293_2593",children:(0,Gt.jsx)("rect",{width:"7",height:"17",fill:"white",transform:"matrix(1.19249e-08 -1 -1 -1.19249e-08 18 14)"})})})]}),hc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M7.39006 7.17383H10.4316C10.6471 7.17383 10.8216 7.37154 10.8216 7.61568V16.4664C10.8216 16.7105 10.6471 16.9083 10.4316 16.9083H7.39006C7.17454 16.9083 7 16.7105 7 16.4664V7.61568C7 7.37154 7.17454 7.17383 7.39006 7.17383Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M9.22633 7.17417H10.2326C10.2326 7.17417 10.011 7.08305 9.9002 6.94379C9.78941 6.80453 9.80762 6.54492 9.80762 6.54492H9.14893C9.15348 6.7392 9.16714 6.97817 9.21267 7.13119C9.21722 7.14494 9.22178 7.16042 9.22633 7.17589V7.17417Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M9.6773 3.98438H9.25537C9.31456 4.05143 9.37375 4.14083 9.39804 4.25258C9.42536 4.37293 9.42536 4.68927 9.41929 4.9867H10.0233V4.37637C10.0233 4.15974 9.86853 3.98438 9.6773 3.98438Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M8.23693 3.07127C8.23693 2.87699 8.20657 2.75836 8.029 2.75149C7.94704 2.74805 7.81804 2.74805 7.70117 2.74805V2.89418C7.70117 3.00594 7.78161 3.09706 7.88026 3.09706H8.06391C8.1489 3.09706 8.22023 3.16411 8.23845 3.25523V3.07299L8.23693 3.07127Z",fill:"#E3E5EA"}),(0,Gt.jsxs)("mask",{id:"path-5-outside-1_2305_2625",maskUnits:"userSpaceOnUse",x:"6",y:"1",width:"10",height:"17",fill:"black",children:[(0,Gt.jsx)("rect",{fill:"white",x:"6",y:"1",width:"10",height:"17"}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.69238 3.98966C9.87995 4.02497 10.0233 4.20991 10.0233 4.4323V4.71129C10.1479 4.78687 10.2328 4.93581 10.2328 5.1072V6.10781C10.2328 6.35563 10.0554 6.55653 9.83663 6.55653H9.80719C9.80523 6.60932 9.80384 6.82197 9.90036 6.94328C10.0112 7.08254 10.2327 7.17366 10.2327 7.17366L9.09445 7.17366L8.72716 7.17366L7.58886 7.17366C7.58886 7.17366 7.81045 7.08254 7.92124 6.94328C8.01902 6.82039 8.01632 6.60377 8.01434 6.55455C7.81313 6.53318 7.65566 6.34133 7.65566 6.10781V5.1072C7.65566 4.92968 7.74666 4.77623 7.8787 4.70346V4.4323C7.8787 4.19747 8.03847 4.00441 8.24143 3.98516V3.29976C8.24143 3.18801 8.16099 3.09689 8.06234 3.09689H7.8787C7.78004 3.09689 7.6996 3.00576 7.6996 2.89401V2.20287C7.6996 2.09112 7.78004 2 7.8787 2H10.5818C10.6782 2 10.7572 2.08702 10.7607 2.19527H11.3575C11.4221 2.19527 11.4766 2.24454 11.4933 2.31175H14.0306L14.062 2.27376C14.1592 2.15513 14.2912 2.0812 14.4339 2.06229L14.7526 2.02103C14.763 2.01977 14.773 2.02107 14.7822 2.02447H14.8998C14.956 2.02447 15 2.07604 15 2.13794V2.91332C15 2.97693 14.9545 3.02679 14.8998 3.02679H14.7865C14.7762 3.03143 14.7646 3.03341 14.7526 3.03195L14.4339 2.99069C14.2927 2.97178 14.1607 2.89785 14.062 2.77922L14.0309 2.74157H11.4922C11.4743 2.80657 11.4207 2.85375 11.3575 2.85375H10.7609V2.89401C10.7609 3.00576 10.6804 3.09689 10.5818 3.09689H9.87147C9.77282 3.09689 9.69238 3.18801 9.69238 3.29976V3.98966ZM9.78507 15.1024C9.78233 15.515 9.78048 15.7977 9.78047 15.8825L9.78199 15.8808C9.78199 15.7964 9.78384 15.5143 9.78658 15.1024H9.78507ZM7 15.1024V16.5721C7 16.8077 7.16847 17.0002 7.37791 17.0002H9.45416L9.45551 16.9983H10.4452C10.6532 16.9983 10.8232 16.8074 10.8232 16.5702V15.1024H10.8277V8.99391H10.8232V7.69023C10.8232 7.45469 10.6547 7.26214 10.4452 7.26214H9.60745C9.68182 7.34294 9.75467 7.47704 9.78199 7.70742C9.79653 7.8315 9.80427 8.31674 9.80761 8.99391H9.80608C9.80274 8.31776 9.79499 7.83334 9.78048 7.70938C9.75316 7.479 9.68031 7.34318 9.60594 7.2641H7.37791C7.16999 7.2641 7 7.45493 7 7.69219V8.99391V15.1024Z"})]}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.69238 3.98966C9.87995 4.02497 10.0233 4.20991 10.0233 4.4323V4.71129C10.1479 4.78687 10.2328 4.93581 10.2328 5.1072V6.10781C10.2328 6.35563 10.0554 6.55653 9.83663 6.55653H9.80719C9.80523 6.60932 9.80384 6.82197 9.90036 6.94328C10.0112 7.08254 10.2327 7.17366 10.2327 7.17366L9.09445 7.17366L8.72716 7.17366L7.58886 7.17366C7.58886 7.17366 7.81045 7.08254 7.92124 6.94328C8.01902 6.82039 8.01632 6.60377 8.01434 6.55455C7.81313 6.53318 7.65566 6.34133 7.65566 6.10781V5.1072C7.65566 4.92968 7.74666 4.77623 7.8787 4.70346V4.4323C7.8787 4.19747 8.03847 4.00441 8.24143 3.98516V3.29976C8.24143 3.18801 8.16099 3.09689 8.06234 3.09689H7.8787C7.78004 3.09689 7.6996 3.00576 7.6996 2.89401V2.20287C7.6996 2.09112 7.78004 2 7.8787 2H10.5818C10.6782 2 10.7572 2.08702 10.7607 2.19527H11.3575C11.4221 2.19527 11.4766 2.24454 11.4933 2.31175H14.0306L14.062 2.27376C14.1592 2.15513 14.2912 2.0812 14.4339 2.06229L14.7526 2.02103C14.763 2.01977 14.773 2.02107 14.7822 2.02447H14.8998C14.956 2.02447 15 2.07604 15 2.13794V2.91332C15 2.97693 14.9545 3.02679 14.8998 3.02679H14.7865C14.7762 3.03143 14.7646 3.03341 14.7526 3.03195L14.4339 2.99069C14.2927 2.97178 14.1607 2.89785 14.062 2.77922L14.0309 2.74157H11.4922C11.4743 2.80657 11.4207 2.85375 11.3575 2.85375H10.7609V2.89401C10.7609 3.00576 10.6804 3.09689 10.5818 3.09689H9.87147C9.77282 3.09689 9.69238 3.18801 9.69238 3.29976V3.98966ZM9.78507 15.1024C9.78233 15.515 9.78048 15.7977 9.78047 15.8825L9.78199 15.8808C9.78199 15.7964 9.78384 15.5143 9.78658 15.1024H9.78507ZM7 15.1024V16.5721C7 16.8077 7.16847 17.0002 7.37791 17.0002H9.45416L9.45551 16.9983H10.4452C10.6532 16.9983 10.8232 16.8074 10.8232 16.5702V15.1024H10.8277V8.99391H10.8232V7.69023C10.8232 7.45469 10.6547 7.26214 10.4452 7.26214H9.60745C9.68182 7.34294 9.75467 7.47704 9.78199 7.70742C9.79653 7.8315 9.80427 8.31674 9.80761 8.99391H9.80608C9.80274 8.31776 9.79499 7.83334 9.78048 7.70938C9.75316 7.479 9.68031 7.34318 9.60594 7.2641H7.37791C7.16999 7.2641 7 7.45493 7 7.69219V8.99391V15.1024Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M9.69238 3.98966H8.89238V4.65311L9.54438 4.77585L9.69238 3.98966ZM10.0233 4.71129H9.22325V5.16187L9.60858 5.39543L10.0233 4.71129ZM9.80719 6.55653V5.75653H9.03633L9.00774 6.52686L9.80719 6.55653ZM9.90036 6.94328L9.27432 7.44136L9.27432 7.44136L9.90036 6.94328ZM10.2327 7.17366L10.2327 7.97366L10.537 6.43378L10.2327 7.17366ZM9.09445 7.17366L9.09445 7.97366L9.09445 7.97366L9.09445 7.17366ZM8.72716 7.17366L8.72716 6.37366L8.72716 6.37366L8.72716 7.17366ZM7.58886 7.17366L7.28461 6.43378L7.58886 7.97366L7.58886 7.17366ZM7.92124 6.94328L7.29521 6.44521L7.29521 6.44521L7.92124 6.94328ZM8.01434 6.55455L8.81369 6.52234L8.78587 5.832L8.09883 5.75903L8.01434 6.55455ZM7.8787 4.70346L8.26484 5.4041L8.6787 5.17601V4.70346H7.8787ZM8.24143 3.98516L8.31697 4.78158L9.04143 4.71287V3.98516H8.24143ZM10.7607 2.19527L9.96116 2.22147L9.98652 2.99527H10.7607V2.19527ZM11.4933 2.31175L10.7169 2.50466L10.8678 3.11175H11.4933V2.31175ZM14.0306 2.31175V3.11175H14.407L14.6469 2.82182L14.0306 2.31175ZM14.062 2.27376L14.6784 2.78383L14.681 2.78058L14.062 2.27376ZM14.4339 2.06229L14.3312 1.26891L14.3288 1.26923L14.4339 2.06229ZM14.7526 2.02103L14.6562 1.22683L14.6499 1.22765L14.7526 2.02103ZM14.7822 2.02447L14.5057 2.77517L14.6396 2.82447H14.7822V2.02447ZM14.7865 3.02679V2.22679H14.6156L14.4596 2.29662L14.7865 3.02679ZM14.7526 3.03195L14.6499 3.82535L14.6562 3.82612L14.7526 3.03195ZM14.4339 2.99069L14.3276 3.78361L14.3312 3.78407L14.4339 2.99069ZM14.062 2.77922L13.4457 3.28928L13.4469 3.29074L14.062 2.77922ZM14.0309 2.74157L14.6472 2.2315L14.4072 1.94157H14.0309V2.74157ZM11.4922 2.74157V1.94157H10.8829L10.721 2.529L11.4922 2.74157ZM10.7609 2.85375V2.05375H9.96086V2.85375H10.7609ZM9.78047 15.8825L8.98047 15.8824L8.98039 17.9978L10.3802 16.4119L9.78047 15.8825ZM9.78507 15.1024V14.3024H8.99038L8.98509 15.0971L9.78507 15.1024ZM9.78199 15.8808L10.3818 16.4102L10.582 16.1833V15.8808H9.78199ZM9.78658 15.1024L10.5866 15.1077L10.5919 14.3024H9.78658V15.1024ZM9.45416 17.0002V17.8002H9.87579L10.1141 17.4524L9.45416 17.0002ZM9.45551 16.9983V16.1983H9.03388L8.79556 16.5461L9.45551 16.9983ZM10.8232 15.1024V14.3024H10.0232V15.1024H10.8232ZM10.8277 15.1024V15.9024H11.6277V15.1024H10.8277ZM10.8277 8.99391H11.6277V8.19391H10.8277V8.99391ZM10.8232 8.99391H10.0232V9.79391H10.8232V8.99391ZM9.60745 7.26214V6.46214H7.78393L9.01881 7.80389L9.60745 7.26214ZM9.78199 7.70742L10.5766 7.61435L10.5764 7.61322L9.78199 7.70742ZM9.80761 8.99391V9.79391H10.6116L10.6076 8.98997L9.80761 8.99391ZM9.80608 8.99391L9.00609 8.99786L9.01002 9.79391H9.80608V8.99391ZM9.78048 7.70938L10.575 7.61631L10.5749 7.61518L9.78048 7.70938ZM9.60594 7.2641L10.1887 6.71606L9.9518 6.4641H9.60594V7.2641ZM10.8233 4.4323C10.8233 3.88965 10.4661 3.32125 9.84038 3.20346L9.54438 4.77585C9.29383 4.72868 9.22325 4.53016 9.22325 4.4323H10.8233ZM10.8233 4.71129V4.4323H9.22325V4.71129H10.8233ZM11.0328 5.1072C11.0328 4.67804 10.82 4.25875 10.4379 4.02715L9.60858 5.39543C9.47585 5.31498 9.43276 5.19359 9.43276 5.1072H11.0328ZM11.0328 6.10781V5.1072H9.43276V6.10781H11.0328ZM9.83663 7.35653C10.5881 7.35653 11.0328 6.70081 11.0328 6.10781H9.43276C9.43276 6.04161 9.45644 5.96426 9.51699 5.89566C9.57889 5.82555 9.6903 5.75653 9.83663 5.75653V7.35653ZM9.80719 7.35653H9.83663V5.75653H9.80719V7.35653ZM10.5264 6.44521C10.572 6.5025 10.5916 6.55146 10.5988 6.57171C10.6029 6.58334 10.6051 6.59178 10.6062 6.59625C10.6068 6.59862 10.6071 6.60036 10.6073 6.60142C10.6075 6.60249 10.6076 6.60306 10.6076 6.60311C10.6076 6.60318 10.6076 6.60288 10.6075 6.60222C10.6074 6.60157 10.6073 6.60068 10.6072 6.59958C10.607 6.59728 10.6069 6.5947 10.6068 6.59204C10.6066 6.58638 10.6067 6.58351 10.6066 6.58621L9.00774 6.52686C9.00575 6.58032 9.00408 6.70177 9.02606 6.8453C9.04517 6.97008 9.09688 7.21832 9.27432 7.44136L10.5264 6.44521ZM10.2327 7.17366C10.537 6.43378 10.5371 6.43383 10.5373 6.43388C10.5373 6.4339 10.5374 6.43395 10.5375 6.43399C10.5377 6.43406 10.5378 6.43413 10.538 6.43419C10.5383 6.43433 10.5386 6.43446 10.5389 6.43458C10.5395 6.43483 10.5401 6.43507 10.5406 6.43528C10.5416 6.43571 10.5425 6.43607 10.5432 6.43636C10.5446 6.43694 10.5453 6.43726 10.5454 6.43733C10.5457 6.43744 10.5438 6.43662 10.5404 6.43498C10.5329 6.43144 10.5216 6.42573 10.5097 6.41878C10.469 6.39515 10.4885 6.39762 10.5264 6.44521L9.27432 7.44136C9.42298 7.62821 9.60876 7.74586 9.70654 7.80261C9.76381 7.83585 9.81482 7.86162 9.85239 7.87952C9.87145 7.88859 9.88778 7.89599 9.90058 7.90163C9.907 7.90445 9.9126 7.90687 9.91726 7.90885C9.9196 7.90984 9.92171 7.91073 9.92358 7.91151C9.92452 7.91191 9.9254 7.91227 9.92622 7.91261C9.92663 7.91278 9.92702 7.91294 9.9274 7.9131C9.92759 7.91318 9.92777 7.91325 9.92796 7.91333C9.92805 7.91337 9.92818 7.91342 9.92823 7.91344C9.92836 7.9135 9.92849 7.91355 10.2327 7.17366ZM9.09445 7.97366L10.2327 7.97366L10.2327 6.37366L9.09445 6.37366L9.09445 7.97366ZM8.72716 7.97366L9.09445 7.97366L9.09445 6.37366L8.72716 6.37366L8.72716 7.97366ZM7.58886 7.97366L8.72716 7.97366L8.72716 6.37366L7.58886 6.37366L7.58886 7.97366ZM7.29521 6.44521C7.33307 6.39762 7.35265 6.39515 7.31195 6.41878C7.29997 6.42573 7.28866 6.43144 7.28122 6.43498C7.27778 6.43663 7.27592 6.43744 7.27618 6.43733C7.27632 6.43726 7.27705 6.43695 7.27842 6.43636C7.2791 6.43607 7.27995 6.43571 7.28098 6.43528C7.2815 6.43507 7.28205 6.43483 7.28266 6.43458C7.28296 6.43446 7.28327 6.43433 7.2836 6.4342C7.28376 6.43413 7.28393 6.43406 7.2841 6.43399C7.28418 6.43396 7.28431 6.4339 7.28435 6.43389C7.28448 6.43383 7.28461 6.43378 7.58886 7.17366C7.89312 7.91355 7.89325 7.9135 7.89338 7.91344C7.89343 7.91342 7.89356 7.91337 7.89365 7.91333C7.89383 7.91325 7.89402 7.91318 7.89421 7.9131C7.89459 7.91294 7.89498 7.91278 7.89539 7.91261C7.89621 7.91227 7.89708 7.91191 7.89802 7.91151C7.89989 7.91073 7.902 7.90984 7.90434 7.90885C7.90901 7.90687 7.9146 7.90445 7.92102 7.90163C7.93383 7.89599 7.95015 7.88859 7.96921 7.87952C8.00679 7.86162 8.05779 7.83585 8.11507 7.80261C8.21285 7.74586 8.39863 7.62821 8.54728 7.44136L7.29521 6.44521ZM7.21499 6.58677C7.21485 6.58327 7.21504 6.58581 7.21485 6.59145C7.21464 6.5976 7.21416 6.60193 7.21398 6.60313C7.21362 6.6055 7.21496 6.59405 7.22248 6.57263C7.22949 6.55267 7.24909 6.50318 7.29521 6.44521L8.54728 7.44136C8.72672 7.21582 8.7778 6.96419 8.79643 6.83945C8.81797 6.69522 8.81577 6.57378 8.81369 6.52234L7.21499 6.58677ZM6.85566 6.10781C6.85566 6.6726 7.2488 7.27775 7.92985 7.35008L8.09883 5.75903C8.23304 5.77328 8.32879 5.84236 8.38173 5.90786C8.43452 5.97317 8.45566 6.04515 8.45566 6.10781H6.85566ZM6.85566 5.1072V6.10781H8.45566V5.1072H6.85566ZM7.49256 4.00282C7.08358 4.22822 6.85566 4.66375 6.85566 5.1072H8.45566C8.45566 5.19561 8.40974 5.32424 8.26484 5.4041L7.49256 4.00282ZM7.0787 4.4323V4.70346H8.6787V4.4323H7.0787ZM8.1659 3.18873C7.47754 3.25402 7.0787 3.86447 7.0787 4.4323H8.6787C8.6787 4.49586 8.6571 4.56834 8.60375 4.63371C8.55022 4.6993 8.453 4.76868 8.31697 4.78158L8.1659 3.18873ZM7.44143 3.29976V3.98516H9.04143V3.29976H7.44143ZM8.06234 3.89689C7.62835 3.89689 7.44143 3.53318 7.44143 3.29976H9.04143C9.04143 2.84283 8.69364 2.29689 8.06234 2.29689V3.89689ZM7.8787 3.89689H8.06234V2.29689H7.8787V3.89689ZM6.8996 2.89401C6.8996 3.35094 7.2474 3.89689 7.8787 3.89689V2.29689C8.31269 2.29689 8.4996 2.66059 8.4996 2.89401H6.8996ZM6.8996 2.20287V2.89401H8.4996V2.20287H6.8996ZM7.8787 1.2C7.2474 1.2 6.8996 1.74594 6.8996 2.20287H8.4996C8.4996 2.4363 8.31269 2.8 7.8787 2.8V1.2ZM10.5818 1.2H7.8787V2.8H10.5818V1.2ZM11.5603 2.16908C11.5457 1.72326 11.1979 1.2 10.5818 1.2V2.8C10.1584 2.8 9.96868 2.45078 9.96116 2.22147L11.5603 2.16908ZM11.3575 1.39527H10.7607V2.99527H11.3575V1.39527ZM12.2697 2.11885C12.1822 1.76646 11.8585 1.39527 11.3575 1.39527V2.99527C10.9857 2.99527 10.7711 2.72262 10.7169 2.50466L12.2697 2.11885ZM14.0306 1.51175H11.4933V3.11175H14.0306V1.51175ZM13.4457 1.7637L13.4143 1.80169L14.6469 2.82182L14.6784 2.78382L13.4457 1.7637ZM14.3288 1.26923C13.9767 1.3159 13.6637 1.49746 13.4431 1.76693L14.681 2.78058C14.6546 2.8128 14.6058 2.8465 14.539 2.85535L14.3288 1.26923ZM14.6499 1.22765L14.3312 1.26891L14.5366 2.85567L14.8553 2.81441L14.6499 1.22765ZM15.0587 1.27376C14.9336 1.22768 14.7959 1.2099 14.6562 1.22685L14.849 2.8152C14.7301 2.82963 14.6124 2.81447 14.5057 2.77517L15.0587 1.27376ZM14.8998 1.22447H14.7822V2.82447H14.8998V1.22447ZM15.8 2.13794C15.8 1.73919 15.4959 1.22447 14.8998 1.22447V2.82447C14.416 2.82447 14.2 2.4129 14.2 2.13794H15.8ZM15.8 2.91332V2.13794H14.2V2.91332H15.8ZM14.8998 3.82679C15.4798 3.82679 15.8 3.3304 15.8 2.91332H14.2C14.2 2.62346 14.4292 2.22679 14.8998 2.22679V3.82679ZM14.7865 3.82679H14.8998V2.22679H14.7865V3.82679ZM14.6562 3.82612C14.8187 3.84585 14.9762 3.81838 15.1134 3.75696L14.4596 2.29662C14.5761 2.24448 14.7105 2.22097 14.849 2.23778L14.6562 3.82612ZM14.3312 3.78407L14.6499 3.82533L14.8553 2.23857L14.5366 2.19731L14.3312 3.78407ZM13.4469 3.29074C13.6663 3.55457 13.9762 3.73651 14.3276 3.7836L14.5401 2.19777C14.6093 2.20704 14.655 2.24112 14.6771 2.2677L13.4469 3.29074ZM13.4146 3.25163L13.4457 3.28928L14.6784 2.26916L14.6472 2.2315L13.4146 3.25163ZM11.4922 3.54157H14.0309V1.94157H11.4922V3.54157ZM11.3575 3.65375C11.8472 3.65375 12.1688 3.29754 12.2635 2.95413L10.721 2.529C10.7798 2.31561 10.9942 2.05375 11.3575 2.05375V3.65375ZM10.7609 3.65375H11.3575V2.05375H10.7609V3.65375ZM11.5609 2.89401V2.85375H9.96086V2.89401H11.5609ZM10.5818 3.89689C11.2131 3.89689 11.5609 3.35094 11.5609 2.89401H9.96086C9.96086 2.66059 10.1478 2.29689 10.5818 2.29689V3.89689ZM9.87147 3.89689H10.5818V2.29689H9.87147V3.89689ZM10.4924 3.29976C10.4924 3.53318 10.3055 3.89689 9.87147 3.89689V2.29689C9.24017 2.29689 8.89238 2.84283 8.89238 3.29976H10.4924ZM10.4924 3.98966V3.29976H8.89238V3.98966H10.4924ZM10.5805 15.8825C10.5805 15.8012 10.5823 15.5226 10.5851 15.1077L8.98509 15.0971C8.98236 15.5073 8.98048 15.7941 8.98047 15.8824L10.5805 15.8825ZM9.18222 15.3514L9.18071 15.3531L10.3802 16.4119L10.3818 16.4102L9.18222 15.3514ZM8.9866 15.0971C8.98387 15.5066 8.98199 15.7929 8.98199 15.8808H10.582C10.582 15.7999 10.5838 15.522 10.5866 15.1077L8.9866 15.0971ZM9.78507 15.9024H9.78658V14.3024H9.78507V15.9024ZM6.2 15.1024V16.5721H7.8V15.1024H6.2ZM6.2 16.5721C6.2 17.1507 6.63388 17.8002 7.37791 17.8002V16.2002C7.5296 16.2002 7.64578 16.272 7.71089 16.3459C7.77438 16.418 7.8 16.5002 7.8 16.5721H6.2ZM7.37791 17.8002H9.45416V16.2002H7.37791V17.8002ZM10.1141 17.4524L10.1155 17.4505L8.79556 16.5461L8.79422 16.5481L10.1141 17.4524ZM9.45551 17.7983H10.4452V16.1983H9.45551V17.7983ZM10.4452 17.7983C11.1839 17.7983 11.6232 17.1548 11.6232 16.5702H10.0232C10.0232 16.4982 10.049 16.4154 10.1132 16.3429C10.1783 16.2693 10.2941 16.1983 10.4452 16.1983V17.7983ZM11.6232 16.5702V15.1024H10.0232V16.5702H11.6232ZM10.8232 15.9024H10.8277V14.3024H10.8232V15.9024ZM11.6277 15.1024V8.99391H10.0277V15.1024H11.6277ZM10.8277 8.19391H10.8232V9.79391H10.8277V8.19391ZM11.6232 8.99391V7.69023H10.0232V8.99391H11.6232ZM11.6232 7.69023C11.6232 7.11172 11.1893 6.46214 10.4452 6.46214V8.06214C10.2936 8.06214 10.1774 7.99042 10.1123 7.91647C10.0488 7.84434 10.0232 7.76216 10.0232 7.69023H11.6232ZM10.4452 6.46214H9.60745V8.06214H10.4452V6.46214ZM9.01881 7.80389C9.00655 7.79057 8.99684 7.77771 8.98947 7.76625C8.98214 7.75486 8.97822 7.74656 8.97663 7.74284C8.97344 7.73536 8.98154 7.75086 8.98756 7.80163L10.5764 7.61322C10.5331 7.24756 10.4044 6.94668 10.1961 6.72038L9.01881 7.80389ZM8.98742 7.80049C8.987 7.79683 8.98939 7.82187 8.99225 7.89624C8.99479 7.96242 8.9971 8.0501 8.99914 8.15832C9.00321 8.37432 9.00595 8.66066 9.00761 8.99785L10.6076 8.98997C10.6044 8.34461 10.5978 7.79581 10.5766 7.61435L8.98742 7.80049ZM9.80761 8.19391H9.80608V9.79391H9.80761V8.19391ZM10.6061 8.98996C10.6029 8.3456 10.5963 7.79764 10.575 7.61631L8.98591 7.80245C8.98548 7.79878 8.98787 7.82377 8.99072 7.89801C8.99326 7.96408 8.99557 8.05162 8.99761 8.15965C9.00168 8.37531 9.00442 8.66119 9.00609 8.99786L10.6061 8.98996ZM10.5749 7.61518C10.5321 7.25448 10.4051 6.94616 10.1887 6.71606L9.02314 7.81213C9.00792 7.79595 8.99661 7.78091 8.98853 7.76838C8.98048 7.7559 8.97633 7.74702 8.97478 7.74337C8.97172 7.73618 8.97997 7.75235 8.98604 7.80359L10.5749 7.61518ZM9.60594 6.4641H7.37791V8.0641H9.60594V6.4641ZM7.37791 6.4641C6.63928 6.4641 6.2 7.10756 6.2 7.69219H7.8C7.8 7.76418 7.77412 7.84701 7.71 7.91944C7.64482 7.99307 7.5291 8.0641 7.37791 8.0641V6.4641ZM6.2 7.69219V8.99391H7.8V7.69219H6.2ZM6.2 8.99391V15.1024H7.8V8.99391H6.2Z",fill:"#303F9F",mask:"url(#path-5-outside-1_2305_2625)"})]}),mc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_2303_2600)",children:[(0,Gt.jsx)("path",{d:"M7.609 18.0008H12.375C12.8829 18.0008 13.2952 17.5852 13.2952 17.0732V16.4512H6.68878V17.0732C6.68878 17.5852 7.10102 18.0008 7.609 18.0008Z",fill:"url(#paint0_linear_2303_2600)"}),(0,Gt.jsx)("path",{d:"M11.4867 1H8.40159C7.73404 1 7.18882 1.5496 7.18882 2.22252V2.39142H12.6995V2.22252C12.6995 1.5496 12.1543 1 11.4867 1Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M11.8583 4.9541C11.8552 4.91958 11.8526 4.88581 11.8504 4.85313H8.15049C8.14842 4.88595 8.14586 4.91987 8.1427 4.95453C8.12996 5.09455 8.10669 5.25649 8.06296 5.41197C8.02094 5.56134 7.95041 5.74042 7.82156 5.88391C7.63663 6.08985 7.38135 6.25114 7.1977 6.35348C7.10145 6.40711 7.01519 6.44979 6.95269 6.47922C6.92132 6.494 6.8956 6.50558 6.87722 6.51369L6.86171 6.52044L6.86254 6.52227C6.58787 6.64731 6.39734 6.92376 6.39734 7.24669V16.1823C6.39734 16.624 6.75318 16.9781 7.18351 16.9781H12.8138C13.2462 16.9781 13.6 16.6246 13.6 16.1823V7.24669C13.6 6.92376 13.4095 6.64731 13.1348 6.52227L13.1354 6.51929L13.1246 6.51464C13.106 6.50658 13.0801 6.49506 13.0486 6.48036C12.9856 6.45107 12.8989 6.40855 12.8021 6.35493C12.6178 6.25277 12.3607 6.09068 12.176 5.88122C12.0495 5.73769 11.9798 5.55947 11.938 5.41038C11.8946 5.25526 11.8713 5.09379 11.8583 4.9541Z",fill:"white",stroke:"#303F9F",strokeWidth:"0.8"}),(0,Gt.jsx)("path",{d:"M7.94423 3.69922H12.0426C12.2306 3.69922 12.3831 3.85286 12.3831 4.04238V4.4767C12.3831 4.66622 12.2306 4.81986 12.0426 4.81986H7.94423C7.75622 4.81986 7.6038 4.66622 7.6038 4.4767V4.04238C7.6038 3.85286 7.75622 3.69922 7.94423 3.69922Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M7.6356 1.70312H12.2819C12.5242 1.70312 12.7207 1.90118 12.7207 2.14548V3.77819C12.7207 4.0225 12.5242 4.22055 12.2819 4.22055H7.6356C7.39324 4.22055 7.19677 4.0225 7.19677 3.77819V2.14548C7.19677 1.90118 7.39324 1.70312 7.6356 1.70312Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M12.3351 3.97097C12.4122 3.97097 12.4761 3.90663 12.4761 3.82888V2.12647C12.4761 2.04872 12.4122 1.98438 12.3351 1.98438C12.258 1.98438 12.1942 2.04872 12.1942 2.12647V3.82888C12.1942 3.90663 12.258 3.97097 12.3351 3.97097Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M11.7472 3.97097C11.8244 3.97097 11.8882 3.90663 11.8882 3.82888V2.12647C11.8882 2.04872 11.8244 1.98438 11.7472 1.98438C11.6701 1.98438 11.6063 2.04872 11.6063 2.12647V3.82888C11.6063 3.90663 11.6701 3.97097 11.7472 3.97097Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M11.1623 3.97097C11.2394 3.97097 11.3032 3.90663 11.3032 3.82888V2.12647C11.3032 2.04872 11.2394 1.98438 11.1623 1.98438C11.0851 1.98438 11.0213 2.04872 11.0213 2.12647V3.82888C11.0213 3.90663 11.0851 3.97097 11.1623 3.97097Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M10.5771 3.97097C10.6542 3.97097 10.718 3.90663 10.718 3.82888V2.12647C10.718 2.04872 10.6542 1.98438 10.5771 1.98438C10.4999 1.98438 10.4361 2.04872 10.4361 2.12647V3.82888C10.4361 3.90663 10.4999 3.97097 10.5771 3.97097Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M9.98941 3.97097C10.0665 3.97097 10.1304 3.90663 10.1304 3.82888V2.12647C10.1304 2.04872 10.0665 1.98438 9.98941 1.98438C9.91229 1.98438 9.84846 2.04872 9.84846 2.12647V3.82888C9.84846 3.90663 9.91229 3.97097 9.98941 3.97097Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M9.40421 3.97097C9.48134 3.97097 9.54517 3.90663 9.54517 3.82888V2.12647C9.54517 2.04872 9.48134 1.98438 9.40421 1.98438C9.32708 1.98438 9.26325 2.04872 9.26325 2.12647V3.82888C9.26325 3.90663 9.32708 3.97097 9.40421 3.97097Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M8.819 3.97097C8.89613 3.97097 8.95996 3.90663 8.95996 3.82888V2.12647C8.95996 2.04872 8.89613 1.98438 8.819 1.98438C8.74188 1.98438 8.67805 2.04872 8.67805 2.12647V3.82888C8.67805 3.90663 8.74188 3.97097 8.819 3.97097Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M8.23136 3.97097C8.30848 3.97097 8.37231 3.90663 8.37231 3.82888V2.12647C8.37231 2.04872 8.30848 1.98438 8.23136 1.98438C8.15423 1.98438 8.0904 2.04872 8.0904 2.12647V3.82888C8.0904 3.90663 8.15423 3.97097 8.23136 3.97097Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M7.64615 3.97097C7.72328 3.97097 7.78711 3.90663 7.78711 3.82888V2.12647C7.78711 2.04872 7.72328 1.98438 7.64615 1.98438C7.56902 1.98438 7.50519 2.04872 7.50519 2.12647V3.82888C7.50519 3.90663 7.56902 3.97097 7.64615 3.97097Z",fill:"white"})]}),(0,Gt.jsxs)("defs",{children:[(0,Gt.jsxs)("linearGradient",{id:"paint0_linear_2303_2600",x1:"13.5701",y1:"17.2116",x2:"6.94399",y2:"17.2116",gradientUnits:"userSpaceOnUse",children:[(0,Gt.jsx)("stop",{stopColor:"#A7B3C1"}),(0,Gt.jsx)("stop",{offset:"0.21",stopColor:"#C1C9D3"}),(0,Gt.jsx)("stop",{offset:"0.5",stopColor:"#DFE3E7"}),(0,Gt.jsx)("stop",{offset:"0.75",stopColor:"#F2F3F4"}),(0,Gt.jsx)("stop",{offset:"0.93",stopColor:"#F9F9F9"})]}),(0,Gt.jsx)("clipPath",{id:"clip0_2303_2600",children:(0,Gt.jsx)("rect",{width:"8",height:"17",fill:"white",transform:"matrix(-1 0 0 1 14 1)"})})]})]}),fc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("g",{clipPath:"url(#clip0_2296_2765)",children:(0,Gt.jsx)("path",{d:"M16.5898 3C16.3633 3 16.1797 3.18364 16.1797 3.41016V14.8328C16.1797 15.5754 15.5751 16.1797 14.8321 16.1797H10.8792C10.1348 16.1797 9.53149 15.5796 9.53149 14.8325V14.7365C9.91849 14.6062 10.2239 14.2967 10.3488 13.9073C11.9722 13.7452 13.2709 12.4646 13.4611 10.8495H14.8325C15.0591 10.8495 15.2427 10.6658 15.2427 10.4393V8.68203C15.2427 8.45552 15.0591 8.27188 14.8325 8.27188H13.4854V7.03151C13.4854 6.57839 13.3009 6.13318 12.9783 5.80913L10.9095 3.74137C10.4314 3.26329 9.7964 3 9.12134 3C8.4547 3 7.80216 3.27021 7.33122 3.74113L5.26116 5.81012C4.93624 6.13655 4.75727 6.5703 4.75727 7.03151V8.27188H3.41016C3.18364 8.27188 3 8.45552 3 8.68203V10.4393C3 10.6658 3.18364 10.8495 3.41016 10.8495H4.78155C4.97176 12.4646 6.27053 13.7452 7.89393 13.9073C8.01884 14.2967 8.32418 14.6062 8.71118 14.7365V14.8325C8.71118 16.0344 9.68281 17 10.8792 17H14.832C16.0275 17 17 16.0278 17 14.8328V3.41016C17 3.18364 16.8164 3 16.5898 3ZM13.4854 9.09219H14.4224V10.0292H13.4854V9.09219ZM4.7573 10.0291H3.82031V9.09219H4.7573V10.0291ZM9.58984 10.9078H8.65286V9.97082H9.58984V10.9078ZM7.83254 9.5607V13.0729C6.55707 12.875 5.57759 11.7694 5.57759 10.4393V7.03151C5.57759 6.7887 5.67168 6.56046 5.84154 6.3898L7.91105 4.32139C8.22952 4.00297 8.67066 3.82031 9.12134 3.82031C9.57727 3.82031 10.0063 3.99827 10.3296 4.32161L12.398 6.38882C12.5677 6.55936 12.6651 6.79362 12.6651 7.03151V10.4393C12.6651 11.7694 11.6857 12.875 10.4102 13.0729V9.5607C10.4102 9.33418 10.2265 9.15054 10 9.15054H8.2427C8.01618 9.15054 7.83254 9.33415 7.83254 9.5607ZM8.65286 11.7281H9.58984V13.5146C9.58984 13.7729 9.37965 13.9831 9.12134 13.9831C8.86302 13.9831 8.65286 13.7729 8.65286 13.5146V11.7281Z",fill:"#303F9F"})}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_2296_2765",children:(0,Gt.jsx)("rect",{width:"14",height:"14",fill:"white",transform:"translate(3 3)"})})})]}),gc=()=>(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_2197_2888)",children:[(0,Gt.jsx)("path",{d:"M6 2H13V2.50799H6V2Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M6 2.50781H13V2.77202H6V2.50781Z",fill:"#F9F9F9"}),(0,Gt.jsx)("path",{d:"M9.46283 2.75195H9.5H9.53717L13 2.77166L12.4755 4.71456L12.4456 6.33924L11.6965 15.9508C11.6965 15.9508 11.412 16.1136 11.2019 16.1537C10.831 16.2252 8.17063 16.2252 7.7997 16.1537C7.58959 16.1128 7.30513 15.9508 7.30513 15.9508L6.55599 6.33924L6.52609 4.71456L6.00162 2.77166L9.46363 2.75195H9.46283Z",fill:"#E3E5EA"}),(0,Gt.jsx)("path",{d:"M7.30424 15.9492H11.6956L11.7029 17.452V18.3724C11.7029 18.3724 11.3279 19.0964 8.95282 18.9884C7.53133 18.9234 7.29697 18.3724 7.29697 18.3724V17.452L7.30424 15.9492Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M7.30444 15.9424C7.30444 16.0512 8.28793 16.1388 9.50012 16.1388C10.7123 16.1388 11.6958 16.0512 11.6958 15.9424C11.6958 15.8337 10.7123 15.7461 9.50012 15.7461C8.28793 15.7461 7.30444 15.8337 7.30444 15.9424Z",fill:"#E3E5EA"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_2197_2888",children:(0,Gt.jsx)("rect",{width:"7",height:"17",fill:"white",transform:"matrix(-1 0 0 1 13 2)"})})})]});function vc(){return(0,Gt.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_4502_9420)",children:[(0,Gt.jsx)("mask",{id:"mask0_4502_9420",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:(0,Gt.jsx)("path",{d:"M20 0H0V20H20V0Z",fill:"white"})}),(0,Gt.jsxs)("g",{mask:"url(#mask0_4502_9420)",children:[(0,Gt.jsx)("mask",{id:"mask1_4502_9420",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:(0,Gt.jsx)("path",{d:"M0 1.90735e-06H20V20H0V1.90735e-06Z",fill:"white"})}),(0,Gt.jsx)("g",{mask:"url(#mask1_4502_9420)",children:(0,Gt.jsx)("path",{d:"M17.5 18.7109L18.7563 17.4745C19.3729 16.8629 19.3729 15.8714 18.7563 15.2599L17.5 14.0234M18.8281 16.3672H12.8516M14.5703 8.75L13.314 9.98649C12.6974 10.598 12.6974 11.5895 13.314 12.201L14.5703 13.4375M13.2422 11.0938H19.2187M3.90191 11.7188H6.875M3.90191 8.59375H10.4687M11.9488 5.46875H3.90191M11.6016 19.2188H3.125C1.83059 19.2188 0.78125 18.1694 0.78125 16.875V3.125C0.78125 1.83059 1.83059 0.781252 3.125 0.781252H12.73C14.0245 0.781252 15.0738 1.83059 15.0738 3.125V5.97656",stroke:"#4B5563",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_4502_9420",children:(0,Gt.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})}function xc(){return(0,Gt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M23.0748 3.6916L20.8246 1.44159C20.6053 1.22213 20.2493 1.22185 20.0297 1.44132C20.0297 1.44146 20.0296 1.44159 20.0293 1.44159L13.2795 8.19173C13.1739 8.29713 13.1147 8.4401 13.1147 8.58926V10.8394C13.1147 11.15 13.3666 11.4018 13.6771 11.4018H15.9272C16.0764 11.4018 16.2194 11.3426 16.3248 11.2371L23.0748 4.48705C23.2944 4.26758 23.2945 3.91161 23.0752 3.69201C23.075 3.69201 23.075 3.69173 23.0748 3.6916ZM15.6943 10.2769H14.2396V8.82235L20.4271 2.63484L21.8817 4.08939L15.6943 10.2769Z",fill:"#ffffff"}),(0,Gt.jsx)("path",{d:"M21.5521 8.02696C21.2416 8.02696 20.9898 8.27877 20.9898 8.58933V16.4643C20.9888 17.3959 20.2338 18.1509 19.3023 18.152H13.6773C13.5555 18.1517 13.437 18.1912 13.3397 18.2644L9.73975 20.9645V18.7145C9.73975 18.4038 9.48794 18.152 9.17725 18.152H3.55225C2.62071 18.1509 1.86571 17.3959 1.86488 16.4645V6.33933C1.86585 5.40793 2.62071 4.65293 3.55225 4.65196H13.6773C13.9879 4.65196 14.2398 4.40016 14.2398 4.08946C14.2398 3.7789 13.9879 3.5271 13.6773 3.5271H3.55225C1.99959 3.52861 0.74126 4.78695 0.739746 6.33933V16.4645C0.74126 18.017 1.99959 19.2753 3.55225 19.277H8.61475V22.0895C8.61475 22.4 8.86655 22.6518 9.17725 22.6518C9.29902 22.6518 9.41736 22.6123 9.51478 22.5394L13.8653 19.2768H19.3023C20.8549 19.2753 22.1131 18.017 22.1148 16.4643V8.58946C22.1148 8.27877 21.8628 8.02696 21.5521 8.02696Z",fill:"#ffffff"}),(0,Gt.jsx)("path",{d:"M10.3021 6.9021H4.67738C4.36655 6.9021 4.11475 7.1539 4.11475 7.4646C4.11475 7.77516 4.36655 8.02696 4.67738 8.02696H10.3021C10.6128 8.02696 10.8647 7.77516 10.8647 7.4646C10.8647 7.1539 10.6128 6.9021 10.3021 6.9021Z",fill:"#ffffff"}),(0,Gt.jsx)("path",{d:"M4.67738 11.4021H10.3021C10.6128 11.4021 10.8647 11.1502 10.8647 10.8396C10.8647 10.5289 10.6128 10.2771 10.3021 10.2771H4.67738C4.36655 10.2771 4.11475 10.5289 4.11475 10.8396C4.11475 11.1502 4.36655 11.4021 4.67738 11.4021Z",fill:"#ffffff"}),(0,Gt.jsx)("path",{d:"M4.67738 14.777H18.1773C18.4879 14.777 18.7396 14.5252 18.7396 14.2145C18.7396 13.9039 18.4878 13.6521 18.1773 13.6521H4.67738C4.36655 13.6521 4.11475 13.9039 4.11475 14.2145C4.11475 14.5252 4.36655 14.777 4.67738 14.777Z",fill:"#ffffff"})]})}function yc(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M6.77171 18.4931L3.7687 21.6943C3.37979 22.1088 2.70825 22.0963 2.3063 21.6943C1.90435 21.2923 1.8915 20.621 2.3063 20.2319L5.51837 17.2188",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M12.6314 17.8351C14.4172 16.0493 14.4172 13.1538 12.6314 11.368C10.8455 9.58214 7.95009 9.58214 6.16424 11.368C4.37838 13.1538 4.37838 16.0493 6.16424 17.8351C7.95009 19.621 10.8455 19.621 12.6314 17.8351Z",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M7.77246 10.1234V2H18.3415L22 5.65852V21.1056H7.77246V19.0801",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M21.797 5.65841H18.3418V2.20312",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M10.0078 3.8291H16.5119",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M10.0078 5.6582H13.2598",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M10.0078 8.19922H20.1704",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M13.8779 10.0283H20.1707",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M15.7354 13.6865H20.1709",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M15.7354 15.5166H17.9531",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M15.1846 17.3457H20.1712",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M13.8779 19.1748H15.089",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Gt.jsx)("path",{d:"M10.7703 13.6865L8.941 15.5158L8.02637 14.6012",stroke:"currentColor",strokeMiterlimit:"22.9256",strokeLinecap:"round",strokeLinejoin:"round"})]})}function bc(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M2.375 10.6252C2.628 10.6252 2.83334 10.4199 2.83334 10.1669C2.83334 7.4737 3.882 4.94095 5.78684 3.03703C5.96559 2.85828 5.96559 2.5677 5.78684 2.38895C5.60809 2.2102 5.3175 2.2102 5.13875 2.38895C3.06067 4.46611 1.91667 7.22803 1.91667 10.1669C1.91667 10.4199 2.122 10.6252 2.375 10.6252Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M21.6247 10.6252C21.8777 10.6252 22.083 10.4199 22.083 10.1669C22.083 7.22803 20.939 4.46611 18.8609 2.38895C18.6822 2.2102 18.3916 2.2102 18.2128 2.38895C18.0341 2.5677 18.0341 2.85828 18.2128 3.03703C20.1177 4.94095 21.1663 7.4737 21.1663 10.1669C21.1663 10.4199 21.3717 10.6252 21.6247 10.6252Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M10.6247 4.83167C10.8777 4.83167 11.083 4.62633 11.083 4.37333V2.83333C11.083 2.32825 11.4946 1.91667 11.9997 1.91667C12.5048 1.91667 12.9163 2.32825 12.9163 2.83333V4.37333C12.9163 4.62633 13.1217 4.83167 13.3747 4.83167C13.6277 4.83167 13.833 4.62725 13.833 4.37333V2.83333C13.833 1.82225 13.0108 1 11.9997 1C10.9886 1 10.1663 1.82225 10.1663 2.83333V4.37333C10.1663 4.62725 10.3717 4.83167 10.6247 4.83167Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M11.9997 22.9997C13.7688 22.9997 15.208 21.5605 15.208 19.7913C15.208 19.5383 15.0027 19.333 14.7497 19.333C14.4967 19.333 14.2913 19.5383 14.2913 19.7913C14.2913 21.0545 13.2628 22.083 11.9997 22.083C10.7365 22.083 9.70801 21.0545 9.70801 19.7913C9.70801 19.5383 9.50267 19.333 9.24967 19.333C8.99667 19.333 8.79134 19.5383 8.79134 19.7913C8.79134 21.5605 10.2305 22.9997 11.9997 22.9997Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"}),(0,Gt.jsx)("path",{d:"M4.20866 20.25H19.792C20.5501 20.25 21.167 19.6331 21.167 18.875C21.167 18.4726 20.9919 18.0922 20.6857 17.83C19.2411 16.609 18.417 14.8325 18.417 12.9515V10.1667C18.417 6.62833 15.5387 3.75 12.0003 3.75C8.46199 3.75 5.58366 6.62833 5.58366 10.1667V12.9515C5.58366 14.8334 4.75957 16.609 3.32224 17.8236C3.00874 18.0922 2.83366 18.4726 2.83366 18.875C2.83366 19.6331 3.44966 20.25 4.20866 20.25ZM12.0003 4.66667C15.0336 4.66667 17.5003 7.13342 17.5003 10.1667V12.9515C17.5003 15.1038 18.4427 17.1343 20.0862 18.5239C20.1917 18.6138 20.2503 18.7412 20.2503 18.875C20.2503 19.128 20.045 19.3333 19.792 19.3333H4.20866C3.95566 19.3333 3.75032 19.128 3.75032 18.875C3.75032 18.7412 3.80899 18.6138 3.91074 18.5267C5.55707 17.1343 6.50032 15.1029 6.50032 12.9515V10.1667C6.50032 7.13342 8.96707 4.66667 12.0003 4.66667Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.2"})]})}function jc(){return(0,Gt.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Gt.jsx)("path",{d:"M21.25 11.9999H8.895M4.534 11.9999H2.75M4.534 11.9999C4.534 11.4217 4.76368 10.8672 5.17251 10.4584C5.58134 10.0496 6.13583 9.81989 6.714 9.81989C7.29217 9.81989 7.84666 10.0496 8.25549 10.4584C8.66432 10.8672 8.894 11.4217 8.894 11.9999C8.894 12.5781 8.66432 13.1326 8.25549 13.5414C7.84666 13.9502 7.29217 14.1799 6.714 14.1799C6.13583 14.1799 5.58134 13.9502 5.17251 13.5414C4.76368 13.1326 4.534 12.5781 4.534 11.9999ZM21.25 18.6069H15.502M15.502 18.6069C15.502 19.1852 15.2718 19.7403 14.8628 20.1492C14.4539 20.5582 13.8993 20.7879 13.321 20.7879C12.7428 20.7879 12.1883 20.5572 11.7795 20.1484C11.3707 19.7396 11.141 19.1851 11.141 18.6069M15.502 18.6069C15.502 18.0286 15.2718 17.4745 14.8628 17.0655C14.4539 16.6566 13.8993 16.4269 13.321 16.4269C12.7428 16.4269 12.1883 16.6566 11.7795 17.0654C11.3707 17.4742 11.141 18.0287 11.141 18.6069M11.141 18.6069H2.75M21.25 5.39289H18.145M13.784 5.39289H2.75M13.784 5.39289C13.784 4.81472 14.0137 4.26023 14.4225 3.8514C14.8313 3.44257 15.3858 3.21289 15.964 3.21289C16.2503 3.21289 16.5338 3.26928 16.7983 3.37883C17.0627 3.48839 17.3031 3.64897 17.5055 3.8514C17.7079 4.05383 17.8685 4.29415 17.9781 4.55864C18.0876 4.82313 18.144 5.10661 18.144 5.39289C18.144 5.67917 18.0876 5.96265 17.9781 6.22714C17.8685 6.49163 17.7079 6.73195 17.5055 6.93438C17.3031 7.13681 17.0627 7.29739 16.7983 7.40695C16.5338 7.5165 16.2503 7.57289 15.964 7.57289C15.3858 7.57289 14.8313 7.34321 14.4225 6.93438C14.0137 6.52555 13.784 5.97106 13.784 5.39289Z",stroke:"#6B7280",strokeMiterlimit:"10",strokeLinecap:"round"})})}function wc(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_6346_25158)",children:[(0,Gt.jsx)("path",{d:"M21.375 3H19.5V2.25C19.5 1.85218 19.342 1.47064 19.0607 1.18934C18.7794 0.908035 18.3978 0.75 18 0.75C17.6022 0.75 17.2206 0.908035 16.9393 1.18934C16.658 1.47064 16.5 1.85218 16.5 2.25V3H13.5V2.25C13.5 1.85218 13.342 1.47064 13.0607 1.18934C12.7794 0.908035 12.3978 0.75 12 0.75C11.6022 0.75 11.2206 0.908035 10.9393 1.18934C10.658 1.47064 10.5 1.85218 10.5 2.25V3H7.5V2.25C7.5 1.85218 7.34196 1.47064 7.06066 1.18934C6.77936 0.908035 6.39782 0.75 6 0.75C5.60218 0.75 5.22064 0.908035 4.93934 1.18934C4.65804 1.47064 4.5 1.85218 4.5 2.25V3H2.625C2.12772 3 1.65081 3.19754 1.29917 3.54917C0.947544 3.90081 0.75 4.37772 0.75 4.875V19.875C0.75 20.3723 0.947544 20.8492 1.29917 21.2008C1.65081 21.5525 2.12772 21.75 2.625 21.75H13.125C13.2245 21.75 13.3198 21.7105 13.3902 21.6402C13.4605 21.5698 13.5 21.4745 13.5 21.375C13.5 21.2755 13.4605 21.1802 13.3902 21.1098C13.3198 21.0395 13.2245 21 13.125 21H2.625C2.32691 20.9991 2.04127 20.8803 1.83049 20.6695C1.6197 20.4587 1.50089 20.1731 1.5 19.875V8.25H22.5V14.625C22.5 14.7245 22.5395 14.8198 22.6098 14.8902C22.6802 14.9605 22.7755 15 22.875 15C22.9745 15 23.0698 14.9605 23.1402 14.8902C23.2105 14.8198 23.25 14.7245 23.25 14.625V4.875C23.25 4.37772 23.0525 3.90081 22.7008 3.54917C22.3492 3.19754 21.8723 3 21.375 3ZM17.25 2.25C17.25 2.05109 17.329 1.86032 17.4697 1.71967C17.6103 1.57902 17.8011 1.5 18 1.5C18.1989 1.5 18.3897 1.57902 18.5303 1.71967C18.671 1.86032 18.75 2.05109 18.75 2.25V4.5C18.75 4.69891 18.671 4.88968 18.5303 5.03033C18.3897 5.17098 18.1989 5.25 18 5.25C17.8011 5.25 17.6103 5.17098 17.4697 5.03033C17.329 4.88968 17.25 4.69891 17.25 4.5V2.25ZM11.25 2.25C11.25 2.05109 11.329 1.86032 11.4697 1.71967C11.6103 1.57902 11.8011 1.5 12 1.5C12.1989 1.5 12.3897 1.57902 12.5303 1.71967C12.671 1.86032 12.75 2.05109 12.75 2.25V4.5C12.75 4.69891 12.671 4.88968 12.5303 5.03033C12.3897 5.17098 12.1989 5.25 12 5.25C11.8011 5.25 11.6103 5.17098 11.4697 5.03033C11.329 4.88968 11.25 4.69891 11.25 4.5V2.25ZM5.25 2.25C5.25 2.05109 5.32902 1.86032 5.46967 1.71967C5.61032 1.57902 5.80109 1.5 6 1.5C6.19891 1.5 6.38968 1.57902 6.53033 1.71967C6.67098 1.86032 6.75 2.05109 6.75 2.25V4.5C6.75 4.69891 6.67098 4.88968 6.53033 5.03033C6.38968 5.17098 6.19891 5.25 6 5.25C5.80109 5.25 5.61032 5.17098 5.46967 5.03033C5.32902 4.88968 5.25 4.69891 5.25 4.5V2.25ZM22.5 7.5H1.5V4.875C1.50089 4.57691 1.6197 4.29127 1.83049 4.08049C2.04127 3.8697 2.32691 3.75089 2.625 3.75H4.5V4.5C4.5 4.89782 4.65804 5.27936 4.93934 5.56066C5.22064 5.84196 5.60218 6 6 6C6.39782 6 6.77936 5.84196 7.06066 5.56066C7.34196 5.27936 7.5 4.89782 7.5 4.5V3.75H10.5V4.5C10.5 4.89782 10.658 5.27936 10.9393 5.56066C11.2206 5.84196 11.6022 6 12 6C12.3978 6 12.7794 5.84196 13.0607 5.56066C13.342 5.27936 13.5 4.89782 13.5 4.5V3.75H16.5V4.5C16.5 4.89782 16.658 5.27936 16.9393 5.56066C17.2206 5.84196 17.6022 6 18 6C18.3978 6 18.7794 5.84196 19.0607 5.56066C19.342 5.27936 19.5 4.89782 19.5 4.5V3.75H21.375C21.6731 3.75089 21.9587 3.8697 22.1695 4.08049C22.3803 4.29127 22.4991 4.57691 22.5 4.875V7.5Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M11.25 10.875C11.25 10.6761 11.171 10.4853 11.0303 10.3447C10.8897 10.204 10.6989 10.125 10.5 10.125H9C8.80109 10.125 8.61032 10.204 8.46967 10.3447C8.32902 10.4853 8.25 10.6761 8.25 10.875V12C8.25 12.1989 8.32902 12.3897 8.46967 12.5303C8.61032 12.671 8.80109 12.75 9 12.75H10.5C10.6989 12.75 10.8897 12.671 11.0303 12.5303C11.171 12.3897 11.25 12.1989 11.25 12V10.875ZM9 12V10.875H10.5V12H9Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M6.75 10.875C6.75 10.6761 6.67098 10.4853 6.53033 10.3447C6.38968 10.204 6.19891 10.125 6 10.125H4.5C4.30109 10.125 4.11032 10.204 3.96967 10.3447C3.82902 10.4853 3.75 10.6761 3.75 10.875V12C3.75 12.1989 3.82902 12.3897 3.96967 12.5303C4.11032 12.671 4.30109 12.75 4.5 12.75H6C6.19891 12.75 6.38968 12.671 6.53033 12.5303C6.67098 12.3897 6.75 12.1989 6.75 12V10.875ZM4.5 12V10.875H6V12H4.5Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M19.5 12.75C19.6989 12.75 19.8897 12.671 20.0303 12.5303C20.171 12.3897 20.25 12.1989 20.25 12V10.875C20.25 10.6761 20.171 10.4853 20.0303 10.3447C19.8897 10.204 19.6989 10.125 19.5 10.125H18C17.8011 10.125 17.6103 10.204 17.4697 10.3447C17.329 10.4853 17.25 10.6761 17.25 10.875V12C17.25 12.1989 17.329 12.3897 17.4697 12.5303C17.6103 12.671 17.8011 12.75 18 12.75H19.5ZM18 10.875H19.5V12H18V10.875Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M11.25 14.25C11.25 14.0511 11.171 13.8603 11.0303 13.7197C10.8897 13.579 10.6989 13.5 10.5 13.5H9C8.80109 13.5 8.61032 13.579 8.46967 13.7197C8.32902 13.8603 8.25 14.0511 8.25 14.25V15.375C8.25 15.5739 8.32902 15.7647 8.46967 15.9053C8.61032 16.046 8.80109 16.125 9 16.125H10.5C10.6989 16.125 10.8897 16.046 11.0303 15.9053C11.171 15.7647 11.25 15.5739 11.25 15.375V14.25ZM9 15.375V14.25H10.5V15.375H9Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M6.75 14.25C6.75 14.0511 6.67098 13.8603 6.53033 13.7197C6.38968 13.579 6.19891 13.5 6 13.5H4.5C4.30109 13.5 4.11032 13.579 3.96967 13.7197C3.82902 13.8603 3.75 14.0511 3.75 14.25V15.375C3.75 15.5739 3.82902 15.7647 3.96967 15.9053C4.11032 16.046 4.30109 16.125 4.5 16.125H6C6.19891 16.125 6.38968 16.046 6.53033 15.9053C6.67098 15.7647 6.75 15.5739 6.75 15.375V14.25ZM4.5 15.375V14.25H6V15.375H4.5Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M10.5 16.875H9C8.80109 16.875 8.61032 16.954 8.46967 17.0947C8.32902 17.2353 8.25 17.4261 8.25 17.625V18.75C8.25 18.9489 8.32902 19.1397 8.46967 19.2803C8.61032 19.421 8.80109 19.5 9 19.5H10.5C10.6989 19.5 10.8897 19.421 11.0303 19.2803C11.171 19.1397 11.25 18.9489 11.25 18.75V17.625C11.25 17.4261 11.171 17.2353 11.0303 17.0947C10.8897 16.954 10.6989 16.875 10.5 16.875ZM9 18.75V17.625H10.5V18.75H9Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M13.5 12.75H15C15.1989 12.75 15.3897 12.671 15.5303 12.5303C15.671 12.3897 15.75 12.1989 15.75 12V10.875C15.75 10.6761 15.671 10.4853 15.5303 10.3447C15.3897 10.204 15.1989 10.125 15 10.125H13.5C13.3011 10.125 13.1103 10.204 12.9697 10.3447C12.829 10.4853 12.75 10.6761 12.75 10.875V12C12.75 12.1989 12.829 12.3897 12.9697 12.5303C13.1103 12.671 13.3011 12.75 13.5 12.75ZM13.5 10.875H15V12H13.5V10.875Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M12.75 15.375C12.75 15.5739 12.829 15.7647 12.9697 15.9053C13.1103 16.046 13.3011 16.125 13.5 16.125C13.5995 16.125 13.6948 16.0855 13.7652 16.0152C13.8355 15.9448 13.875 15.8495 13.875 15.75C13.875 15.6505 13.8355 15.5552 13.7652 15.4848C13.6948 15.4145 13.5995 15.375 13.5 15.375V14.25H15C15.0995 14.25 15.1948 14.2105 15.2652 14.1402C15.3355 14.0698 15.375 13.9745 15.375 13.875C15.375 13.7755 15.3355 13.6802 15.2652 13.6098C15.1948 13.5395 15.0995 13.5 15 13.5H13.5C13.3011 13.5 13.1103 13.579 12.9697 13.7197C12.829 13.8603 12.75 14.0511 12.75 14.25V15.375Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M6 16.875H4.5C4.30109 16.875 4.11032 16.954 3.96967 17.0947C3.82902 17.2353 3.75 17.4261 3.75 17.625V18.75C3.75 18.9489 3.82902 19.1397 3.96967 19.2803C4.11032 19.421 4.30109 19.5 4.5 19.5H6C6.19891 19.5 6.38968 19.421 6.53033 19.2803C6.67098 19.1397 6.75 18.9489 6.75 18.75V17.625C6.75 17.4261 6.67098 17.2353 6.53033 17.0947C6.38968 16.954 6.19891 16.875 6 16.875ZM4.5 18.75V17.625H6V18.75H4.5Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M18.375 13.5C17.4108 13.5 16.4683 13.7859 15.6666 14.3216C14.8649 14.8573 14.2401 15.6186 13.8711 16.5094C13.5021 17.4002 13.4056 18.3804 13.5937 19.3261C13.7818 20.2717 14.2461 21.1404 14.9279 21.8221C15.6096 22.5039 16.4783 22.9682 17.4239 23.1563C18.3696 23.3444 19.3498 23.2479 20.2406 22.8789C21.1314 22.5099 21.8927 21.8851 22.4284 21.0834C22.9641 20.2817 23.25 19.3392 23.25 18.375C23.2485 17.0825 22.7344 15.8434 21.8205 14.9295C20.9066 14.0156 19.6675 13.5015 18.375 13.5ZM18.375 22.5C17.5592 22.5 16.7616 22.2581 16.0833 21.8048C15.4049 21.3516 14.8762 20.7073 14.564 19.9536C14.2518 19.1998 14.1701 18.3704 14.3293 17.5703C14.4884 16.7701 14.8813 16.0351 15.4582 15.4582C16.0351 14.8813 16.7701 14.4884 17.5703 14.3293C18.3704 14.1701 19.1998 14.2518 19.9536 14.564C20.7073 14.8762 21.3516 15.4049 21.8048 16.0833C22.2581 16.7616 22.5 17.5592 22.5 18.375C22.4987 19.4686 22.0637 20.5171 21.2904 21.2904C20.5171 22.0637 19.4686 22.4987 18.375 22.5Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M20.542 16.803L17.6252 19.7198L16.2996 18.3938C16.2289 18.3255 16.1341 18.2877 16.0358 18.2885C15.9375 18.2894 15.8434 18.3288 15.7739 18.3983C15.7044 18.4679 15.6649 18.5619 15.6641 18.6602C15.6632 18.7586 15.701 18.8533 15.7693 18.924L17.3601 20.5151C17.4304 20.5854 17.5258 20.6249 17.6252 20.6249C17.7246 20.6249 17.82 20.5854 17.8903 20.5151L21.0722 17.3333C21.1405 17.2625 21.1783 17.1678 21.1775 17.0695C21.1766 16.9712 21.1372 16.8771 21.0676 16.8076C20.9981 16.7381 20.9041 16.6986 20.8057 16.6978C20.7074 16.6969 20.6127 16.7347 20.542 16.803Z",fill:"currentColor"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_6346_25158",children:(0,Gt.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}function _c(){return(0,Gt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5174 1.43775C16.6841 1.28855 17.8645 1.76567 19.0639 2.89422L19.0653 2.89552C20.2688 4.03361 20.8166 5.1881 20.7344 6.36399C20.655 7.50024 19.9963 8.46195 19.2452 9.2555M19.2452 9.2555L11.0392 17.9412C10.8079 18.1931 10.4964 18.4065 10.2011 18.5643C9.90203 18.7243 9.55607 18.8611 9.23128 18.9189L9.22628 18.9197L6.00743 19.4695C5.22687 19.6041 4.47837 19.409 3.94516 18.9034C3.41271 18.3984 3.17742 17.6621 3.26459 16.8776L3.26484 16.8753L3.63645 13.6213C3.67961 13.2976 3.79982 12.9473 3.94153 12.6435C4.08273 12.3407 4.27538 12.0196 4.50336 11.7769L4.50483 11.7754L12.7148 3.08538C13.4664 2.2915 14.3899 1.58192 15.5174 1.43775M13.8047 4.11605L5.59664 12.8039C5.51467 12.8914 5.40206 13.0607 5.30097 13.2774C5.20171 13.4903 5.14209 13.6872 5.12422 13.8138L4.75541 17.0433L4.7553 17.0443C4.71279 17.4292 4.83242 17.6776 4.97734 17.815C5.12163 17.9518 5.37313 18.0568 5.75257 17.9913L5.75372 17.9911L8.97083 17.4416C9.09611 17.419 9.28912 17.351 9.49388 17.2415C9.70146 17.1306 9.85762 17.0109 9.93578 16.9251L9.94474 16.9153L18.1548 8.22538C18.8235 7.51904 19.195 6.87538 19.2381 6.25939C19.2784 5.68293 19.0414 4.93767 18.0355 3.98613C17.0352 3.04514 16.2808 2.85234 15.7076 2.92563C15.0952 3.00394 14.473 3.41017 13.8047 4.11605Z",fill:"#3F51B5"}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7745 4.30938C12.1838 4.24561 12.5673 4.52571 12.6311 4.93498C13.0082 7.3556 14.9727 9.20821 17.4152 9.45421C17.8273 9.49572 18.1277 9.86347 18.0862 10.2756C18.0447 10.6877 17.677 10.9882 17.2648 10.9467C14.1473 10.6327 11.6318 8.26527 11.1489 5.16589C11.0852 4.75662 11.3653 4.37314 11.7745 4.30938Z",fill:"#3F51B5"}),(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.25 22.0004C2.25 21.5862 2.58579 21.2504 3 21.2504H21C21.4142 21.2504 21.75 21.5862 21.75 22.0004C21.75 22.4147 21.4142 22.7504 21 22.7504H3C2.58579 22.7504 2.25 22.4147 2.25 22.0004Z",fill:"#3F51B5"})]})}function Cc(){return(0,Gt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_6406_28720)",children:[(0,Gt.jsx)("path",{d:"M2.97626 21.9999C2.78308 21.9999 2.59424 21.9427 2.43361 21.8354C2.27298 21.7281 2.14779 21.5755 2.07386 21.3971C1.99993 21.2186 1.98059 21.0222 2.01829 20.8328C2.05598 20.6433 2.14902 20.4693 2.28563 20.3327L20.3325 2.28582C20.5157 2.10266 20.7641 1.99976 21.0231 1.99976C21.2822 1.99976 21.5306 2.10266 21.7138 2.28582C21.8969 2.46899 21.9998 2.71741 21.9998 2.97645C21.9998 3.23548 21.8969 3.48391 21.7138 3.66707L3.66688 21.7139C3.57627 21.8047 3.46861 21.8767 3.3501 21.9258C3.23158 21.9749 3.10453 22.0001 2.97626 21.9999Z",fill:"#E43B3B"}),(0,Gt.jsx)("path",{d:"M21.0233 21.9999C20.895 22.0001 20.768 21.9749 20.6495 21.9258C20.531 21.8767 20.4233 21.8047 20.3327 21.7139L2.28582 3.66707C2.10266 3.48391 1.99976 3.23548 1.99976 2.97645C1.99976 2.71741 2.10266 2.46899 2.28582 2.28582C2.46899 2.10266 2.71741 1.99976 2.97645 1.99976C3.23548 1.99976 3.48391 2.10266 3.66707 2.28582L21.7139 20.3327C21.8506 20.4693 21.9436 20.6433 21.9813 20.8328C22.019 21.0222 21.9996 21.2186 21.9257 21.3971C21.8518 21.5755 21.7266 21.7281 21.566 21.8354C21.4053 21.9427 21.2165 21.9999 21.0233 21.9999Z",fill:"#E43B3B"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_6406_28720",children:(0,Gt.jsx)("rect",{width:"20",height:"20",fill:"white",transform:"translate(2 2)"})})})]})}function Sc(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M12.6438 21.0001H11.2832C11.1452 21.0001 11.0274 20.9003 11.0047 20.7641L10.852 19.8465C10.3807 19.7324 9.93318 19.5467 9.51727 19.2926L8.76088 19.833C8.64851 19.9133 8.49462 19.9005 8.39704 19.8029L7.43548 18.8408C7.33786 18.7431 7.32519 18.5892 7.40555 18.4769L7.9469 17.7203C7.69475 17.3068 7.50992 16.8593 7.39564 16.3855L6.48279 16.2328C6.34673 16.21 6.24702 16.0923 6.24702 15.9543V14.5937C6.24702 14.4557 6.34677 14.3379 6.48286 14.3152L7.3956 14.1627C7.51002 13.6873 7.69419 13.2398 7.94492 12.8281L7.40442 12.0719C7.32413 11.9595 7.33687 11.8055 7.4346 11.7079L8.39668 10.7468C8.49441 10.6492 8.64833 10.6365 8.76067 10.717L9.51734 11.2591C9.92922 11.0083 10.3768 10.824 10.8521 10.7096L11.0047 9.80032C11.0275 9.6643 11.1452 9.5647 11.2832 9.5647H12.6437C12.7816 9.5647 12.8994 9.66433 12.9222 9.80036L13.0747 10.7095C13.5534 10.8242 14.0009 11.0073 14.4095 11.2555L15.1662 10.7149C15.2786 10.6346 15.4324 10.6474 15.53 10.745L16.4917 11.7071C16.5893 11.8048 16.602 11.9587 16.5217 12.071L15.9806 12.8276C16.2332 13.2416 16.4182 13.6891 16.5324 14.1624L17.4465 14.3151C17.5826 14.3379 17.6823 14.4556 17.6823 14.5936V15.9542C17.6823 16.0922 17.5826 16.21 17.4465 16.2327L16.5325 16.3855C16.4182 16.86 16.2336 17.3076 15.982 17.7204L16.5225 18.4772C16.6027 18.5895 16.59 18.7433 16.4924 18.8409L15.5303 19.8031C15.4327 19.9006 15.2789 19.9134 15.1665 19.8332L14.4099 19.2929C13.9943 19.5467 13.5467 19.7323 13.075 19.8465L12.9222 20.7641C12.8996 20.9003 12.7818 21.0001 12.6438 21.0001ZM11.5224 20.4354H12.4046L12.5494 19.5655C12.5687 19.4496 12.6578 19.3577 12.773 19.3349C13.3065 19.2292 13.8074 19.0215 14.2618 18.7176C14.3593 18.6523 14.4872 18.6542 14.5829 18.7225L15.3002 19.2348L15.924 18.6109L15.4116 17.8934C15.3433 17.7979 15.3414 17.67 15.4067 17.5723C15.7075 17.1226 15.9141 16.6217 16.0207 16.0836C16.0435 15.9684 16.1353 15.8794 16.2511 15.86L17.1176 15.7152V14.8328L16.2511 14.688C16.1353 14.6686 16.0435 14.5796 16.0207 14.4644C15.9145 13.9284 15.7074 13.4275 15.4052 12.9757C15.3398 12.878 15.3419 12.75 15.4102 12.6544L15.9232 11.9371L15.2998 11.3135L14.5827 11.8258C14.4871 11.8941 14.3592 11.896 14.2615 11.8308C13.8186 11.5345 13.3178 11.3295 12.7729 11.2215C12.6578 11.1987 12.5688 11.107 12.5494 10.9912L12.4049 10.1295H11.5221L11.3774 10.9913C11.358 11.107 11.269 11.1987 11.1539 11.2215C10.6144 11.3285 10.1135 11.5347 9.66519 11.8346C9.56739 11.9 9.43934 11.8979 9.34377 11.8295L8.62641 11.3156L8.00305 11.9383L8.51531 12.6551C8.58364 12.7506 8.58561 12.8785 8.52028 12.9762C8.22057 13.4242 8.01438 13.9251 7.9074 14.4647C7.88457 14.5799 7.7928 14.6689 7.67697 14.6883L6.81177 14.8328V15.7153L7.67704 15.86C7.79284 15.8794 7.88457 15.9684 7.9074 16.0836C8.01385 16.6206 8.22074 17.1214 8.52233 17.5723C8.5877 17.67 8.58568 17.798 8.51728 17.8935L8.00407 18.6109L8.6273 19.2345L9.34433 18.7222C9.43991 18.6538 9.56781 18.6519 9.66547 18.7172C10.1203 19.0214 10.6211 19.2293 11.154 19.3349C11.2693 19.3577 11.3584 19.4496 11.3776 19.5655L11.5224 20.4354Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M11.9635 17.7333C10.6074 17.7333 9.50421 16.63 9.50421 15.274C9.50421 13.9179 10.6074 12.8147 11.9635 12.8147C13.3195 12.8147 14.4227 13.9179 14.4227 15.274C14.4228 16.6301 13.3195 17.7333 11.9635 17.7333ZM11.9635 13.3794C10.9188 13.3794 10.0689 14.2293 10.0689 15.274C10.0689 16.3187 10.9188 17.1686 11.9635 17.1686C13.0081 17.1686 13.858 16.3187 13.858 15.274C13.858 14.2293 13.0081 13.3794 11.9635 13.3794Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M19.6189 17.7176H15.8471C15.6911 17.7176 15.5647 17.5912 15.5647 17.4353C15.5647 17.2794 15.6911 17.1529 15.8471 17.1529H19.6189C20.0615 17.1529 20.4353 16.7743 20.4353 16.3261V4.35311C20.4353 3.91839 20.0691 3.56471 19.6189 3.56471H4.3806C3.93071 3.56471 3.56471 3.91839 3.56471 4.35311V16.3261C3.56471 16.7743 3.93833 17.1529 4.3806 17.1529H8.08235C8.23828 17.1529 8.36471 17.2794 8.36471 17.4353C8.36471 17.5912 8.23828 17.7176 8.08235 17.7176H4.3806C3.63222 17.7176 3 17.0804 3 16.3261V4.35311C3 3.60699 3.61934 3 4.3806 3H19.6189C20.3804 3 21 3.60699 21 4.35311V16.3261C21 17.0804 20.3676 17.7176 19.6189 17.7176Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M20.7176 6.98829H3.28235C3.12642 6.98829 3 6.86187 3 6.70594C3 6.55001 3.12642 6.42358 3.28235 6.42358H20.7176C20.8736 6.42358 21 6.55001 21 6.70594C21 6.86187 20.8736 6.98829 20.7176 6.98829Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M9.88236 5.39991H5.11765C4.96172 5.39991 4.8353 5.27349 4.8353 5.11756C4.8353 4.96163 4.96172 4.83521 5.11765 4.83521H9.88236C10.0383 4.83521 10.1647 4.96163 10.1647 5.11756C10.1647 5.27349 10.0383 5.39991 9.88236 5.39991Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M14.6471 5.39991H14.1176C13.9617 5.39991 13.8353 5.27349 13.8353 5.11756C13.8353 4.96163 13.9617 4.83521 14.1176 4.83521H14.6471C14.803 4.83521 14.9294 4.96163 14.9294 5.11756C14.9294 5.27349 14.803 5.39991 14.6471 5.39991Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M16.7647 5.39991H16.2353C16.0794 5.39991 15.9529 5.27349 15.9529 5.11756C15.9529 4.96163 16.0794 4.83521 16.2353 4.83521H16.7647C16.9206 4.83521 17.0471 4.96163 17.0471 5.11756C17.0471 5.27349 16.9206 5.39991 16.7647 5.39991Z",fill:"currentColor"}),(0,Gt.jsx)("path",{d:"M18.8824 5.39991H18.3529C18.197 5.39991 18.0706 5.27349 18.0706 5.11756C18.0706 4.96163 18.197 4.83521 18.3529 4.83521H18.8824C19.0383 4.83521 19.1647 4.96163 19.1647 5.11756C19.1647 5.27349 19.0383 5.39991 18.8824 5.39991Z",fill:"currentColor"})]})}function Ac(){return(0,Gt.jsxs)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M19.3984 18.2054H19.4484V18.1554V5.74454C19.4484 5.60602 19.5606 5.49377 19.6992 5.49377C19.8377 5.49377 19.9499 5.60602 19.9499 5.74454V18.4562C19.9499 18.5217 19.9229 18.5872 19.8765 18.6335L16.3878 22.1222C16.3414 22.1685 16.2761 22.1956 16.2105 22.1956H4.30073C4.16222 22.1956 4.04997 22.0834 4.04997 21.9449V2.05516C4.04997 1.91664 4.16222 1.80439 4.30073 1.80439H19.6992C19.8377 1.80439 19.95 1.91664 19.95 2.05516V4.30071C19.95 4.43922 19.8377 4.55147 19.6992 4.55147C19.5607 4.55147 19.4485 4.43922 19.4485 4.30071V2.35588V2.30588H19.3985H4.6015H4.5515V2.35588V21.6441V21.6941H4.6015H15.9096H15.9596V21.6441V18.4561C15.9596 18.3176 16.0719 18.2054 16.2104 18.2054H19.3984ZM16.5112 18.7069H16.4612V18.7569V21.2188V21.3395L16.5466 21.2542L19.0085 18.7922L19.0939 18.7069H18.9732H16.5112Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,Gt.jsx)("path",{d:"M17.7945 8.2204H17.8445V8.1704V4.60149V4.55149H17.7945H6.20552H6.15552V4.60149V8.1704V8.2204H6.20552H17.7945ZM5.9048 4.05H18.0952C18.2338 4.05 18.346 4.16221 18.346 4.30072V8.47116C18.346 8.60968 18.2338 8.72193 18.0953 8.72193H5.9048C5.76628 8.72193 5.65403 8.60968 5.65403 8.47116V4.30076C5.65403 4.16225 5.76628 4.05 5.9048 4.05Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,Gt.jsx)("path",{d:"M11.0577 17.2028H11.1077V17.1528V10.0551V10.0051H11.0577H6.20552H6.15552V10.0551V17.1528V17.2028H6.20552H11.0577ZM5.9048 9.50361H11.3584C11.4969 9.50361 11.6091 9.61581 11.6092 9.75434C11.6092 9.75434 11.6092 9.75435 11.6092 9.75435V17.4536C11.6092 17.5921 11.4969 17.7044 11.3584 17.7044H5.9048C5.76628 17.7044 5.65403 17.5921 5.65403 17.4536V9.75438C5.65403 9.61586 5.76628 9.50361 5.9048 9.50361Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,Gt.jsx)("path",{d:"M17.7945 12.7116H17.8445V12.6616V10.0551V10.0051H17.7945H12.9423H12.8923V10.0551V12.6616V12.7116H12.9423H17.7945ZM12.6416 9.50361H18.0952C18.2338 9.50361 18.346 9.61583 18.346 9.75434V12.9624C18.346 13.1009 18.2337 13.2132 18.0952 13.2132H12.6416C12.5031 13.2132 12.3908 13.1009 12.3908 12.9624V9.75438C12.3908 9.61586 12.5031 9.50361 12.6416 9.50361Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"}),(0,Gt.jsx)("path",{d:"M17.7945 17.2028H17.8445V17.1528V14.5463V14.4963H17.7945H12.9423H12.8923V14.5463V17.1528V17.2028H12.9423H17.7945ZM12.6416 13.9948H18.0952C18.2338 13.9948 18.346 14.107 18.346 14.2456V17.4536C18.346 17.5921 18.2337 17.7044 18.0952 17.7044H12.6416C12.5031 17.7044 12.3908 17.5921 12.3908 17.4536V14.2456C12.3908 14.1071 12.5031 13.9948 12.6416 13.9948Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.1"})]})}function kc(){return(0,Gt.jsx)("svg",{className:"MuiSvgIcon-root",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Gt.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.1419 14.0858C12.1419 14.2408 12.0196 14.3668 11.8691 14.3668L8.24094 14.3669C8.09045 14.3669 7.9682 14.2409 7.9682 14.0858C7.9682 13.9308 8.09041 13.8048 8.24094 13.8048L11.8691 13.8048C12.0196 13.8048 12.1419 13.9307 12.1419 14.0858ZM18.8192 14.5089C18.961 14.4566 19.0347 14.2954 18.9839 14.1498C18.9329 14.0035 18.7769 13.9275 18.6351 13.9796L17.6533 14.3423C18.3635 13.0172 18.7355 11.5312 18.7355 9.99979C18.7353 5.02621 14.8269 0.999877 9.99983 1C8.24894 1.00004 6.55963 1.53156 5.11458 2.53771C4.98983 2.62461 4.95697 2.79954 5.04154 2.92808C5.1254 3.05641 5.29523 3.09022 5.41999 3.00337C6.77449 2.06042 8.3581 1.56206 9.99987 1.56202C14.5157 1.56189 18.1899 5.34697 18.19 9.99979C18.19 11.5002 17.8093 12.9536 17.0844 14.2369L16.6611 13.0189C16.6101 12.8728 16.4538 12.7968 16.3123 12.8494C16.1705 12.9015 16.0966 13.0625 16.1476 13.2086L16.7592 14.9675C16.8104 15.1173 16.9666 15.1933 17.112 15.1391L18.8192 14.5089ZM14.9586 17.0719C14.8742 16.9433 14.7049 16.9097 14.5801 16.9966C13.2256 17.9395 11.6415 18.4379 10.0002 18.4379C5.484 18.4381 1.80976 14.6528 1.80964 10.0002C1.80961 8.49979 2.19032 7.04642 2.91547 5.76308L3.33899 6.98085C3.38999 7.12713 3.54602 7.20312 3.6878 7.15057C3.82958 7.09827 3.90334 6.93752 3.85254 6.79144L3.24037 5.03252C3.19056 4.883 3.03096 4.80607 2.88766 4.86091L1.18089 5.49113C1.03911 5.54347 0.96511 5.70418 1.01615 5.85026C1.06671 5.99633 1.22318 6.07253 1.36496 6.01998L2.34631 5.65774C1.63612 6.98277 1.26411 8.46856 1.26415 10.0002C1.26427 14.9733 5.17326 19.0001 10.0002 19C11.7511 19 13.4402 18.4682 14.8852 17.462C15.0103 17.3749 15.0429 17.2005 14.9586 17.0719ZM12.4338 9.94786C12.4339 11.382 11.3011 12.5492 9.90889 12.5492C8.51691 12.5492 7.38407 11.3821 7.38403 9.94799C7.38399 8.51335 8.51675 7.34645 9.90877 7.34641C10.6792 7.34641 11.3697 7.70406 11.8334 8.26653L9.95822 10.366L8.9244 9.2458C8.82077 9.13337 8.64799 9.1291 8.53883 9.23563C8.42991 9.34265 8.42557 9.52041 8.52896 9.63288L9.76356 10.9711C9.87205 11.089 10.0553 11.0872 10.1618 10.9675L12.1468 8.74571C12.3297 9.10529 12.4338 9.51393 12.4338 9.94786ZM13.3464 6.57315C13.4482 6.45879 13.6205 6.45121 13.7315 6.55659C13.8425 6.66147 13.8496 6.83948 13.7474 6.95334L12.5351 8.31059C12.8166 8.78879 12.9793 9.34912 12.9793 9.94786C12.9794 11.6919 11.6019 13.1109 9.90889 13.111C8.21612 13.111 6.83858 11.692 6.83854 9.94799C6.8385 8.20374 8.21596 6.78443 9.90873 6.78439C10.8214 6.78435 11.6419 7.19722 12.2047 7.85059L13.3464 6.57315ZM14.2873 12.3339C14.8959 10.3467 14.8559 7.97745 14.7997 5.85608C13.1142 5.56855 11.3934 4.96428 9.99991 4.12117C8.60554 4.96452 6.88556 5.56867 5.19968 5.85632C5.14367 7.97774 5.1042 10.347 5.71295 12.3344C6.38347 14.5235 7.78655 15.9602 10.0002 16.7246C12.2138 15.96 13.6164 14.5232 14.2873 12.3339ZM15.1062 5.33665C13.3669 5.07011 11.5598 4.44239 10.1417 3.55346C10.0543 3.49878 9.94497 3.49878 9.85808 3.55346C8.44872 4.43911 6.62539 5.07216 4.89312 5.33693C4.76259 5.35681 4.66449 5.47072 4.66083 5.60708C4.60116 7.83145 4.53388 10.3527 5.19291 12.5035C5.92892 14.9061 7.47378 16.4708 9.91585 17.2876C9.97162 17.3061 10.0283 17.3061 10.0843 17.2876C12.5263 16.4708 14.0713 14.9059 14.8072 12.5032C15.4659 10.3525 15.3983 7.83125 15.3385 5.60687C15.3351 5.47039 15.2372 5.35652 15.1062 5.33665Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.3"})})})}function Mc(){return(0,Gt.jsxs)("svg",{width:"25",height:"26",viewBox:"0 0 25 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M17.8569 11.2142C13.9121 11.2142 10.7141 14.4122 10.7141 18.3571C10.7141 22.302 13.9121 25.4999 17.8569 25.4999C21.8018 25.4999 24.9998 22.302 24.9998 18.3571C24.9951 14.4141 21.7999 11.2189 17.8569 11.2142ZM17.8569 20.1428C16.9588 20.1439 16.2002 19.4766 16.0869 18.5857C15.9735 17.6947 16.5408 16.8586 17.4105 16.6348V14.3392C17.4105 14.0927 17.6104 13.8928 17.8569 13.8928C18.1035 13.8928 18.3034 14.0927 18.3034 14.3392V16.6348C19.1731 16.8586 19.7404 17.6947 19.627 18.5857C19.5136 19.4766 18.755 20.1439 17.8569 20.1428ZM23.6605 18.8035C23.4139 18.8035 23.2141 18.6037 23.2141 18.3571C23.2141 15.3985 20.8156 13 17.8569 13C14.8983 13 12.4998 15.3985 12.4998 18.3571C12.4998 18.6037 12.3 18.8035 12.0534 18.8035C11.8068 18.8035 11.607 18.6037 11.607 18.3571C11.607 14.9053 14.4052 12.1071 17.8569 12.1071C21.3087 12.1071 24.1069 14.9054 24.1069 18.3571C24.1069 18.4755 24.0599 18.5891 23.9762 18.6728C23.8925 18.7565 23.7789 18.8035 23.6605 18.8035Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M17.857 19.2501C18.3501 19.2501 18.7498 18.8503 18.7498 18.3572C18.7498 17.8641 18.3501 17.4644 17.857 17.4644C17.3639 17.4644 16.9641 17.8641 16.9641 18.3572C16.9641 18.8503 17.3639 19.2501 17.857 19.2501Z",fill:"#303F9F"}),(0,Gt.jsx)("path",{d:"M9.82143 18.3572C9.82637 14.86 12.0889 11.7663 15.4201 10.7018C13.1107 5.48974 8.95804 1.0058 8.47901 0.5C7.61697 1.41786 0 9.69284 0 17.0178C4.08627e-05 20.0246 1.59193 22.8067 4.18413 24.3303C6.77634 25.854 9.98145 25.8913 12.6085 24.4286C10.8399 22.907 9.82233 20.6902 9.82143 18.3572ZM8.48215 24.6071C4.29263 24.6024 0.897549 21.2074 0.89285 17.0178C0.89285 16.7713 1.09271 16.5714 1.33927 16.5714C1.58584 16.5714 1.7857 16.7713 1.7857 17.0178C1.78987 20.7144 4.78551 23.7101 8.48211 23.7143C8.72868 23.7143 8.92854 23.9141 8.92854 24.1607C8.92854 24.4072 8.72868 24.6071 8.48215 24.6071Z",fill:"#303F9F"})]})}function Oc(){return(0,Gt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsxs)("g",{clipPath:"url(#clip0_6755_6150)",children:[(0,Gt.jsx)("path",{d:"M4.125 23.25H13.125C13.6811 23.2485 14.2283 23.1107 14.7188 22.8488C14.7676 22.8211 14.8097 22.7828 14.8418 22.7367C14.8738 22.6906 14.8952 22.6379 14.9042 22.5825C14.9132 22.5271 14.9096 22.4703 14.8937 22.4164C14.8779 22.3626 14.8501 22.313 14.8125 22.2712C13.8868 21.2818 13.372 19.9774 13.3725 18.6225C13.3725 16.8525 14.76 14.3175 16.2825 12.7313C16.4213 12.5917 16.4995 12.4031 16.5 12.2062V9.5175C16.5132 9.06394 16.436 8.61229 16.2729 8.18888C16.1097 7.76547 15.8639 7.37878 15.5497 7.05137C15.2356 6.72395 14.8594 6.46236 14.4431 6.28185C14.0268 6.10135 13.5787 6.00553 13.125 6H10.5V1.875C10.4991 1.57691 10.3803 1.29127 10.1695 1.08049C9.95873 0.869703 9.67309 0.75089 9.375 0.75H7.875C7.57691 0.75089 7.29127 0.869703 7.08049 1.08049C6.8697 1.29127 6.75089 1.57691 6.75 1.875V6H4.125C3.23069 6.00257 2.37373 6.35898 1.74136 6.99136C1.10898 7.62373 0.752572 8.48069 0.75 9.375V19.875C0.752572 20.7693 1.10898 21.6263 1.74136 22.2586C2.37373 22.891 3.23069 23.2474 4.125 23.25ZM6.75 19.9688C6.75052 20.1007 6.71625 20.2304 6.65064 20.3448C6.58503 20.4592 6.4904 20.5543 6.37629 20.6205C6.26219 20.6867 6.13265 20.7216 6.00075 20.7217C5.86884 20.7219 5.73923 20.6872 5.625 20.6213L4.2975 19.8525C4.18385 19.7866 4.08951 19.6919 4.02393 19.5781C3.95835 19.4642 3.92383 19.3351 3.92383 19.2038C3.92383 19.0724 3.95835 18.9433 4.02393 18.8294C4.08951 18.7156 4.18385 18.6209 4.2975 18.555L5.625 17.79C5.73896 17.7242 5.86822 17.6896 5.99981 17.6895C6.1314 17.6895 6.26068 17.7241 6.37467 17.7898C6.48866 17.8555 6.58335 17.9501 6.64923 18.064C6.71511 18.1779 6.74987 18.3072 6.75 18.4387V19.9688ZM11.625 20.6063C11.511 20.672 11.3818 20.7067 11.2502 20.7067C11.1186 20.7068 10.9893 20.6722 10.8753 20.6064C10.7613 20.5407 10.6666 20.4461 10.6008 20.3322C10.5349 20.2183 10.5001 20.0891 10.5 19.9575V18.4387C10.5001 18.3072 10.5349 18.1779 10.6008 18.064C10.6666 17.9501 10.7613 17.8555 10.8753 17.7898C10.9893 17.7241 11.1186 17.6895 11.2502 17.6895C11.3818 17.6896 11.511 17.7242 11.625 17.79L12.63 18.3713C12.6035 18.9012 12.6489 19.4323 12.765 19.95L11.625 20.6063ZM7.5 3.25125H9.75V6H7.5V3.25125ZM3.75 10.4587C3.7499 10.2672 3.78757 10.0774 3.86084 9.90039C3.93411 9.72337 4.04156 9.56252 4.17704 9.42704C4.31252 9.29156 4.47337 9.18411 4.65039 9.11084C4.82742 9.03757 5.01716 8.9999 5.20875 9H12.0413C12.2328 8.9999 12.4226 9.03757 12.5996 9.11084C12.7766 9.18411 12.9375 9.29156 13.073 9.42704C13.2084 9.56252 13.3159 9.72337 13.3892 9.90039C13.4624 10.0774 13.5001 10.2672 13.5 10.4587V14.2913C13.5001 14.4828 13.4624 14.6726 13.3892 14.8496C13.3159 15.0266 13.2084 15.1875 13.073 15.323C12.9375 15.4584 12.7766 15.5659 12.5996 15.6392C12.4226 15.7124 12.2328 15.7501 12.0413 15.75H5.20875C5.01716 15.7501 4.82742 15.7124 4.65039 15.6392C4.47337 15.5659 4.31252 15.4584 4.17704 15.323C4.04156 15.1875 3.93411 15.0266 3.86084 14.8496C3.78757 14.6726 3.7499 14.4828 3.75 14.2913V10.4587Z",fill:"#AF5F00"}),(0,Gt.jsx)("path",{d:"M19.062 12.0503C18.8393 11.9816 18.6 11.9898 18.3825 12.0736C16.8187 12.6544 14.1206 16.3456 14.1206 18.6207C14.1316 19.841 14.6241 21.0076 15.4909 21.8667C16.3577 22.7257 17.5287 23.2077 18.749 23.2077C19.9694 23.2077 21.1404 22.7257 22.0072 21.8667C22.874 21.0076 23.3665 19.841 23.3775 18.6207C23.3775 16.2544 20.6531 12.5228 19.062 12.0503ZM19.5 21.7501C19.4258 21.7501 19.3533 21.7281 19.2916 21.6869C19.23 21.6457 19.1819 21.5871 19.1535 21.5186C19.1251 21.4501 19.1177 21.3747 19.1322 21.3019C19.1467 21.2292 19.1824 21.1624 19.2348 21.1099C19.2873 21.0575 19.3541 21.0217 19.4268 21.0073C19.4996 20.9928 19.575 21.0002 19.6435 21.0286C19.712 21.057 19.7706 21.1051 19.8118 21.1667C19.853 21.2284 19.875 21.3009 19.875 21.3751C19.875 21.4745 19.8355 21.5699 19.7651 21.6402C19.6948 21.7106 19.5994 21.7501 19.5 21.7501ZM21.1275 18.6226C21.1275 18.5231 21.167 18.4277 21.2373 18.3574C21.3076 18.2871 21.403 18.2476 21.5025 18.2476C21.6019 18.2476 21.6973 18.2871 21.7676 18.3574C21.838 18.4277 21.8775 18.5231 21.8775 18.6226C21.8783 19.4219 21.5723 20.1911 21.0225 20.7713C20.9537 20.8436 20.8591 20.8858 20.7593 20.8886C20.6596 20.8914 20.5627 20.8546 20.49 20.7863C20.4181 20.7181 20.3762 20.6241 20.3734 20.525C20.3706 20.426 20.4071 20.3298 20.475 20.2576C20.895 19.817 21.1287 19.2313 21.1275 18.6226Z",fill:"#AF5F00"})]}),(0,Gt.jsx)("defs",{children:(0,Gt.jsx)("clipPath",{id:"clip0_6755_6150",children:(0,Gt.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}function Tc(){return(0,Gt.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M8.00001 2H5.00001C3.3457 2 2 3.3457 2 5.00001V8.00001C2 9.65432 3.3457 11 5.00001 11H8.00001C9.65432 11 11 9.65432 11 8.00001V5.00001C11 3.3457 9.65432 2 8.00001 2ZM9.00002 8.00001C9.00002 8.55129 8.55177 9.00002 8.00001 9.00002H5.00001C4.44825 9.00002 4 8.55129 4 8.00001V5.00001C4 4.44873 4.44825 4 5.00001 4H8.00001C8.55177 4 9.00002 4.44873 9.00002 5.00001V8.00001Z",fill:"black"}),(0,Gt.jsx)("path",{d:"M19 2H16C14.3457 2 13 3.3457 13 5.00001V8.00001C13 9.65432 14.3457 11 16 11H19C20.6543 11 22 9.65432 22 8.00001V5.00001C22 3.3457 20.6543 2 19 2ZM20 8.00001C20 8.55129 19.5518 9.00002 19 9.00002H16C15.4483 9.00002 15 8.55129 15 8.00001V5.00001C15 4.44873 15.4483 4 16 4H19C19.5518 4 20 4.44873 20 5.00001V8.00001Z",fill:"black"}),(0,Gt.jsx)("path",{d:"M8.00001 13H5.00001C3.3457 13 2 14.3457 2 16V19C2 20.6543 3.3457 22 5.00001 22H8.00001C9.65432 22 11 20.6543 11 19V16C11 14.3457 9.65432 13 8.00001 13ZM9.00002 19C9.00002 19.5513 8.55177 20 8.00001 20H5.00001C4.44825 20 4 19.5513 4 19V16C4 15.4487 4.44825 15 5.00001 15H8.00001C8.55177 15 9.00002 15.4487 9.00002 16V19Z",fill:"black"}),(0,Gt.jsx)("path",{d:"M19 13H16C14.3457 13 13 14.3457 13 16V19C13 20.6543 14.3457 22 16 22H19C20.6543 22 22 20.6543 22 19V16C22 14.3457 20.6543 13 19 13ZM20 19C20 19.5513 19.5518 20 19 20H16C15.4483 20 15 19.5513 15 19V16C15 15.4487 15.4483 15 16 15H19C19.5518 15 20 15.4487 20 16V19Z",fill:"black"})]})}function Ec(){return(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M11.3566 8.69835H9.2608V6.00369C9.2608 5.4947 8.87157 5.10547 8.36258 5.10547C7.85358 5.10547 7.46436 5.4947 7.46436 6.00369V8.99776C7.46436 9.8361 8.12305 10.4948 8.96139 10.4948H11.3566C11.8656 10.4948 12.2549 10.1056 12.2549 9.59657C12.2549 9.08758 11.8656 8.69835 11.3566 8.69835Z",fill:"black"}),(0,Gt.jsx)("path",{d:"M15.5481 3.60894C16.0442 3.60894 16.4463 3.20679 16.4463 2.71072C16.4463 2.21465 16.0442 1.8125 15.5481 1.8125C15.052 1.8125 14.6499 2.21465 14.6499 2.71072C14.6499 3.20679 15.052 3.60894 15.5481 3.60894Z",fill:"black"}),(0,Gt.jsx)("path",{d:"M17.7939 7.322C17.7041 6.84295 17.225 6.5136 16.746 6.60342C16.2669 6.69325 15.9376 7.1723 16.0274 7.65135C16.7759 11.5436 14.201 15.3162 10.3087 16.0347C6.41646 16.7833 2.64393 14.2084 1.92535 10.3161C1.17684 6.42378 3.75173 2.65125 7.64402 1.93268C8.60212 1.75303 9.62011 1.78297 10.5782 1.99256C11.0573 2.11232 11.5363 1.81291 11.6561 1.33386C11.7758 0.854813 11.4764 0.375763 10.9974 0.256C6.14699 -0.851805 1.35648 2.1722 0.248676 7.02259C-0.859129 11.873 2.16488 16.6635 7.01527 17.7713C11.8657 18.8791 16.6562 15.8551 17.764 11.0047C18.0334 9.80707 18.0634 8.54957 17.8239 7.35194L17.7939 7.322Z",fill:"black"})]})}function Pc(){return(0,Gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Gt.jsx)("path",{d:"M10.4613 13.7551C10.3429 13.8846 10.1755 13.9583 10 13.9583C9.82453 13.9583 9.65714 13.8846 9.53873 13.7551L6.2054 10.1092C5.97248 9.85448 5.99019 9.45915 6.24494 9.22623C6.49969 8.99332 6.89502 9.01102 7.12794 9.26577L9.375 11.7235V2.5C9.375 2.15482 9.65482 1.875 10 1.875C10.3452 1.875 10.625 2.15482 10.625 2.5V11.7235L12.8721 9.26577C13.105 9.01102 13.5003 8.99332 13.7551 9.22623C14.0098 9.45915 14.0275 9.85448 13.7946 10.1092L10.4613 13.7551Z",fill:"white"}),(0,Gt.jsx)("path",{d:"M3.125 12.5C3.125 12.1548 2.84518 11.875 2.5 11.875C2.15482 11.875 1.875 12.1548 1.875 12.5V12.5457C1.87498 13.6854 1.87497 14.604 1.9721 15.3265C2.07295 16.0765 2.2887 16.7081 2.79029 17.2097C3.29189 17.7113 3.92345 17.9271 4.67354 18.0279C5.39602 18.125 6.31462 18.125 7.45428 18.125H12.5457C13.6854 18.125 14.604 18.125 15.3265 18.0279C16.0766 17.9271 16.7081 17.7113 17.2097 17.2097C17.7113 16.7081 17.9271 16.0765 18.0279 15.3265C18.125 14.604 18.125 13.6854 18.125 12.5457V12.5C18.125 12.1548 17.8452 11.875 17.5 11.875C17.1548 11.875 16.875 12.1548 16.875 12.5C16.875 13.6962 16.8737 14.5304 16.789 15.1599C16.7068 15.7714 16.5565 16.0952 16.3258 16.3258C16.0952 16.5565 15.7714 16.7068 15.1599 16.789C14.5304 16.8737 13.6962 16.875 12.5 16.875H7.5C6.30382 16.875 5.46956 16.8737 4.8401 16.789C4.22862 16.7068 3.90481 16.5565 3.67418 16.3258C3.44354 16.0952 3.29317 15.7714 3.21096 15.1599C3.12633 14.5304 3.125 13.6962 3.125 12.5Z",fill:"white"})]})}function Dc(){return(0,Gt.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Gt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.16663 2.2915C5.36967 2.2915 2.29163 5.36955 2.29163 9.1665C2.29163 12.9635 5.36967 16.0415 9.16663 16.0415C12.9636 16.0415 16.0416 12.9635 16.0416 9.1665C16.0416 5.36955 12.9636 2.2915 9.16663 2.2915ZM1.04163 9.1665C1.04163 4.67919 4.67931 1.0415 9.16663 1.0415C13.6539 1.0415 17.2916 4.67919 17.2916 9.1665C17.2916 13.6538 13.6539 17.2915 9.16663 17.2915C4.67931 17.2915 1.04163 13.6538 1.04163 9.1665ZM16.7982 16.4591C16.6053 16.4444 16.4446 16.6052 16.4592 16.798C16.4595 16.7991 16.4627 16.8205 16.4788 16.8809C16.4978 16.9518 16.5259 17.046 16.5689 17.1896C16.6084 17.3212 16.634 17.4066 16.6551 17.4699C16.6767 17.5348 16.6841 17.5472 16.6809 17.5411C16.7687 17.7052 16.9787 17.7582 17.1339 17.6554C17.1281 17.6592 17.1406 17.6518 17.1903 17.605C17.2389 17.5592 17.302 17.4962 17.3992 17.399C17.4964 17.3019 17.5593 17.2388 17.6051 17.1902C17.6439 17.149 17.6556 17.1334 17.6564 17.1325C17.7577 16.9779 17.7052 16.7695 17.5426 16.6815C17.5416 16.6811 17.5239 16.6729 17.47 16.655C17.4067 16.6339 17.3214 16.6083 17.1897 16.5688C17.0462 16.5258 16.952 16.4976 16.881 16.4787C16.8206 16.4626 16.7992 16.4594 16.7982 16.4591ZM15.2136 16.9026C15.1343 15.9388 15.9389 15.1342 16.9027 15.2135C17.0693 15.2272 17.2709 15.2879 17.4884 15.3534C17.5083 15.3594 17.5284 15.3654 17.5485 15.3714C17.5667 15.3769 17.5848 15.3823 17.6028 15.3876C17.8026 15.4472 17.9901 15.5032 18.1313 15.5788C18.9446 16.0143 19.2071 17.0548 18.6977 17.8239C18.6093 17.9575 18.4708 18.0956 18.3231 18.2429C18.3098 18.2562 18.2965 18.2695 18.2831 18.2829C18.2696 18.2964 18.2563 18.3097 18.243 18.323C18.0957 18.4707 17.9576 18.6091 17.824 18.6976C17.0549 19.2069 16.0144 18.9444 15.5789 18.1312C15.5033 17.9899 15.4474 17.8025 15.3878 17.6027C15.3824 17.5847 15.377 17.5666 15.3715 17.5484C15.3655 17.5283 15.3595 17.5082 15.3535 17.4884C15.288 17.2708 15.2273 17.0692 15.2136 16.9026Z",fill:"white"})})}function Rc(){return(0,Gt.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",children:(0,Gt.jsx)("path",{d:"M720-400v-120H600v-80h120v-120h80v120h120v80H800v120h-80Zm-360-80q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM40-160v-112q0-34 17.5-62.5T104-378q62-31 126-46.5T360-440q66 0 130 15.5T616-378q29 15 46.5 43.5T680-272v112H40Zm80-80h480v-32q0-11-5.5-20T580-306q-54-27-109-40.5T360-360q-56 0-111 13.5T140-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T440-640q0-33-23.5-56.5T360-720q-33 0-56.5 23.5T280-640q0 33 23.5 56.5T360-560Zm0-80Zm0 400Z"})})}const Nc=[{name:"ListUsers",group:"AGM"},{name:"ReadUser",group:"AGM"},{name:"CreateUser",group:"AGM"},{name:"UpdateUser",group:"AGM"},{name:"DeleteUser",group:"AGM"},{name:"ListRoles",group:"AGM"},{name:"ReadRole",group:"AGM"},{name:"CreateRole",group:"AGM"},{name:"UpdateRole",group:"AGM"},{name:"DeleteRole",group:"AGM"},{name:"ListGroups",group:"AGM"},{name:"ReadGroup",group:"AGM"},{name:"CreateGroup",group:"AGM"},{name:"DeleteGroup",group:"AGM"},{name:"ListPolicies",group:"AGM"},{name:"ReadPolicy",group:"AGM"},{name:"CreatePolicy",group:"AGM"},{name:"UpdatePolicy",group:"AGM"},{name:"DeletePolicy",group:"AGM"},{name:"CreateProgram",group:"RPMCORE"},{name:"ListPrograms",group:"RPMCORE"},{name:"ReadProgram",group:"RPMCORE"},{name:"UpdateProgram",group:"RPMCORE"},{name:"ListAllPatients",group:"RPMCORE"},{name:"ListPatients",group:"RPMCORE"},{name:"ReadPatient",group:"RPMCORE"},{name:"CreatePatient",group:"RPMCORE"},{name:"DeletePatients",group:"RPMCORE"},{name:"DismissAlerts",group:"RPMCORE"},{name:"UpdatePatientConfiguration",group:"RPMCORE"},{name:"UpdatePatientProfile",group:"RPMCORE"},{name:"ListCourses",group:"RPMCORE"},{name:"ReadCourse",group:"RPMCORE"},{name:"CreateCourse",group:"RPMCORE"},{name:"UpdateCourse",group:"RPMCORE"},{name:"DeleteCourse",group:"RPMCORE"},{name:"CreateRule",group:"RPMCORE"},{name:"ListRule",group:"RPMCORE"},{name:"ReadRule",group:"RPMCORE"},{name:"DeleteRule",group:"RPMCORE"},{name:"CreatePatientRule",group:"RPMCORE"},{name:"ListPatientRules",group:"RPMCORE"},{name:"ReadPatientRule",group:"RPMCORE"},{name:"DeletePatientRule",group:"RPMCORE"},{name:"ListTemplate",group:"RPMCORE"},{name:"CreateCourse",group:"RPMCORE"},{name:"ListCourses",group:"RPMCORE"},{name:"ReadCourse",group:"RPMCORE"},{name:"UpdateCourse",group:"RPMCORE"},{name:"DeleteCourse",group:"RPMCORE"},{name:"CreateMedicalHistory",group:"RPMCORE"},{name:"ListMedicalHistory",group:"RPMCORE"},{name:"ReadMedicalHistory",group:"RPMCORE"},{name:"UpdateListMedicalHistory",group:"RPMCORE"},{name:"DeleteMedicalHistory",group:"RPMCORE"},{name:"ReadMedicalQuestion",group:"RPMCORE"},{name:"UpdateMedicalQuestion",group:"RPMCORE"},{name:"ListNote",group:"RPMCORE"},{name:"CreateNote",group:"RPMCORE"},{name:"UpdateNote",group:"RPMCORE"},{name:"DeleteNote",group:"RPMCORE"},{name:"ListPractitionerNote",group:"RPMCORE"},{name:"CreatePractitionerNote",group:"RPMCORE"},{name:"UpdatePractitionerNote",group:"RPMCORE"},{name:"DeletePractitionerNote",group:"RPMCORE"},{name:"ListConsultation",group:"RPMCORE"}].reduce((e,t)=>(e["".concat(t.group,"/").concat(t.name)]="".concat(t.group,"/").concat(t.name),e),{}),Lc={PROGRAM:{MAIN:"/rpm/program"},DOCTOR:{DASHBOARD:"/rpm/doc/dashboard",PROGRAM:"/rpm/program",PROFILE:"/rpm/profile",CHANGEPASSWORD:"/rpm/change-password",USERS:"/rpm/users",ROLES:"/rpm/roles",LOGS:"/rpm/logs"},PATIENT:{DASHBOARD:"/rpm/patient/dashboard",PERSONALDETAILS:"/rpm/patient/details",MEDICALHISTORY:"/rpm/patient/history",NOTES:"/rpm/patient/notes",RULES:"/rpm/patient/rules",ADDEDITRULE:"/rpm/patient/rules/add"},USERMANUAL:"https://www.yrpal.com/assets/pdf/Web-Portal-Manual.pdf"},Ic="https://api.ecommfy.com/forms/api/by-slug/ecommfyshops/yrpal_web",Fc={current_page:1,from:1,last_page:1,per_page:20,to:0,total:0,per_page_options:[10,20,30,50,100]},$c="error",Bc="success",zc="hh:mm a",Hc="ddd MMM DD YYYY HH:mm:ss [GMT]ZZ (z)",Wc="MM/DD/YYYY HH:mm:ss",Vc="DD/MM/YYYY ",Uc="Daily",qc="Intervals",Gc={SYSTEM:"SYSTEM",CUSTOM:"CUSTOM",PREDEFINED:"PREDEFINED"},Yc=[{id:"CUSTOM",value:"CUSTOM",label:"Custom"},{id:"PREDEFINED",value:"PREDEFINED",label:"Predefined"}],Zc={CLIENT:"rootTypeRole",PROGRAM:"programTypeRole"},Kc={MALE:"Male",FEMALE:"Female",OTHER:"Other"},Xc=["Orthopedics","Internal Medicine","Obstetrics and Gynecology","Dermatology","Pediatrics","Radiology","General Surgery","Ophthalmology","Fitness Trainer","Dietitian","Other"],Qc={email_notification:{reading_reminder:!1,missed_mandate:!1,non_compliant_user:!1},push_notification:{reading_reminder:!0,missed_mandate:!0,non_compliant_user:!1,course:!0,prescriptions:!0,medical_history:!0,rule:!0,profile:!0,notes:!0},whatsapp_notification:{welcome_message:!0},follow_up_setting:{send_follow_up_reminder_flag:!0,follow_up_day:1,follow_up_time:"10:30"}},Jc=[{id:"BGA+",label:"A+",value:"A+"},{id:"BGA-",label:"A-",value:"A-"},{id:"BGB+",label:"B+",value:"B+"},{id:"BGB-",label:"B-",value:"B-"},{id:"BGO+",label:"O+",value:"O+"},{id:"BGO-",label:"O-",value:"O-"},{id:"BGAB+",label:"AB+",value:"AB+"},{id:"BGAB-",label:"AB-",value:"AB-"}],ed=[{name:"Years",value:"YEAR"},{name:"Months",value:"MONTH"},{name:"Days",value:"DAY"},{name:"Present",value:"PRESENT"},{name:"Custom",value:"CUSTOM"}],td=[{name:"Days",value:"DAY"},{name:"Weeks",value:"WEEK"},{name:"Months",value:"MONTH"}],nd=[{name:"Low",value:"LOW"},{name:"Medium",value:"MEDIUM"},{name:"High",value:"HIGH"}],rd=[{name:"Hourly",value:"HOURLY"},{name:"Daily",value:"DAILY"},{name:"Weekly",value:"WEEKLY"}],id=["Father","Mother","Sibling","Child_Son/Daughter","GrandParent"],od={data:{content:[{id:1,disease_name:"Hypertension"},{id:2,disease_name:"Diabetes"},{id:3,disease_name:"Pneumonia"},{id:4,disease_name:"Tuberculosis"},{id:5,disease_name:"Asthma"},{id:6,disease_name:"Alzheimer"},{id:7,disease_name:"Osteoporosis"},{id:8,disease_name:"Cirrhosis"},{id:9,disease_name:"Chronic Kidney Disease (CKD)"},{id:10,disease_name:"Dementia"},{id:11,disease_name:"Migraine"},{id:12,disease_name:"Hypothyroidism"}]}},ad=[{name:"Su",value:"SUN"},{name:"Mo",value:"MON"},{name:"Tu",value:"TUE"},{name:"We",value:"WED"},{name:"Th",value:"THU"},{name:"Fr",value:"FRI"},{name:"Sa",value:"SAT"}],sd=[{question:"Do you drink alcohol?",answer:"No",remark:""},{question:"Do you smoke?",answer:"No",remark:""},{question:"Do you consume caffeine regularly (i.e. colas, coffee, teas, chocolates)?",answer:"No",remark:""},{question:"Do you have a sedentary lifestyle?",answer:"No",remark:""}],ld=["e","E","+","-","."],cd=[{name:"BloodPressure",value:"bp"},{name:"BloodGlucose",value:"glucose"}],dd=[{name:"BloodPressure",value:"bp"},{name:"BloodGlucose",value:"glucose"},{name:"Others",value:"others"}],ud=[{key:"1",text:"Once Daily"},{key:"2",text:"Twice Daily"},{key:"3",text:"Three Times Daily"},{key:"4",text:"Four Times Daily"},{key:"5",text:"Every One Hour"},{key:"6",text:"Every Two Hour"},{key:"7",text:"Every Three Hour"},{key:"0",text:"As Needed"}],pd=[{key:"TAB",text:"Tablet"},{key:"CAP",text:"Capsule"},{key:"LQD",text:"Liquid"},{key:"SPR",text:"Spray"},{key:"OIN",text:"Ointment"},{key:"GEL",text:"Gel"},{key:"CRM",text:"Cream"},{key:"PWD",text:"Powder"},{key:"INJ",text:"Injection"},{key:"DRP",text:"Drops"},{key:"INH",text:"Inhalor"},{key:"GMY",text:"Gummy"},{key:"NCAN",text:"Nasal Canulas"}],hd=[{key:"CIR",text:(0,Gt.jsx)(tc,{}),form:"TAB"},{key:"SQR",text:(0,Gt.jsx)(nc,{}),form:"TAB"},{key:"SQR1",text:(0,Gt.jsx)(rc,{}),form:"TAB"},{key:"TRI",text:(0,Gt.jsx)(ic,{}),form:"TAB"},{key:"OVL",text:(0,Gt.jsx)(oc,{}),form:"TAB"},{key:"OVL1",text:(0,Gt.jsx)(ac,{}),form:"TAB"},{key:"RND",text:(0,Gt.jsx)(Jl,{}),form:"CAP"},{key:"CHM",text:(0,Gt.jsx)(mc,{}),form:"LQD"},{key:"SPRCN",text:(0,Gt.jsx)(hc,{}),form:"SPR"},{key:"HTUBE",text:(0,Gt.jsx)(gc,{}),form:"OIN"},{key:"VTUBE",text:(0,Gt.jsx)(pc,{}),form:"GEL"},{key:"CRMBOX",text:(0,Gt.jsx)(dc,{}),form:"CRM"},{key:"SPOON",text:(0,Gt.jsx)(sc,{}),form:"PWD"},{key:"NIDL",text:(0,Gt.jsx)(ec,{}),form:"INJ"},{key:"DRPBT",text:(0,Gt.jsx)(uc,{}),form:"DRP"},{key:"INHLR",text:(0,Gt.jsx)(lc,{}),form:"INH"},{key:"GUM",text:(0,Gt.jsx)(cc,{}),form:"GMY"},{key:"MASK",text:(0,Gt.jsx)(fc,{}),form:"NCAN"}],md=[{key:"mg",text:"mg",form:["TAB","CAP","CRM","GMY","OIN"]},{key:"mcg",text:"mcg",form:["TAB","CAP","GMY"]},{key:"g",text:"g",form:["PWD"]},{key:"ml",text:"ml",form:["LQD","SPR","GEL","INJ","DRP","INH"]},{key:"CFU",text:"CFU",form:["TAB","CAP","LQD"]},{key:"IU",text:"IU",form:["INJ"]},{key:"%",text:"%",form:["INJ","OIN"]},{key:"mcg/ml",text:"mcg/ml",form:["INJ","LQD"]},{key:"mEq",text:"mEq",form:["TAB","LQD","INH"]},{key:"mg/ml",text:"mg/ml",form:["LQD","INJ"]},{key:"l/min",text:"l/min",form:["NCAN"]}],fd=[{key:"WHITE",color:"white"},{key:"RED",color:"red"},{key:"LIGHTGREEN",color:"lightgreen"},{key:"BLUE",color:"blue"},{key:"ORANGE",color:"orange"},{key:"PINK",color:"pink"},{key:"SKYBLUE",color:"skyblue"},{key:"YELLOW",color:"yellow"},{key:"GREEN",color:"green"}],gd=[{text:"and",sign:"AND"},{text:"or",sign:"OR"},{text:"eq",sign:"is"},{text:"not",sign:"is not"},{text:"gt",sign:"Greater than"},{text:"gte",sign:"Greater than equal to"},{text:"lt",sign:"Less than"},{text:"lte",sign:"Less than equal to"},{text:"bor",sign:"|"},{text:"band",sign:"&"},{text:"plus",sign:"+"},{text:"minus",sign:"-"},{text:"div",sign:"/"},{text:"mul",sign:"*"},{text:"mod",sign:"%"}],vd={ERR_DUPLICATE_STORE_NAME_IN_TENANT:"ERR_DUPLICATE_STORE_NAME_IN_TENANT",ERR_DUPLICATE_RECORD:" ERR_DUPLICATE_RECORD",ERR_DUPLICATE_KEY:"ERR_DUPLICATE_KEY ",ERR_MATCHING_PASSWORDS:"ERR_MATCHING_PASSWORDS",ERR_USER_EXISTS:"ERR_USER_EXISTS",ERR_GROUP_NOT_FOUND:"ERR_GROUP_NOT_FOUND",ERR_EMPTY_PATH:"ERR_EMPTY_PATH","AR51_SYS:RESOURCE_ACCESS_DENIED":"RESOURCE_ACCESS_DENIED","AR51_SYS:ERR_INVALID_CREDS":"ERR_INVALID_CREDS",ERR_PASSWORD_TOO_WEAK:"ERR_PASSWORD_TOO_WEAK",ERR_EMPTY_VALUE:"ERR_EMPTY_VALUE",ERR_BAD_ESCALATION:"ERR_BAD_ESCALATION",username:"username",regexp:"regexp",ERR_BAD_PASSWORD:"ERR_BAD_PASSWORD",ERR_BAD_GROUP_UPDATE:"ERR_BAD_GROUP_UPDATE",ERR_ROLE_EXISTS:"ERR_ROLE_EXISTS",OVERLAPPING_TIME_RANGE:"OVERLAPPING_TIME_RANGE",ERR_MAX_VALUE:"ERR_MAX_VALUE",ERR_ACCESS_DENIED:"ERR_ACCESS_DENIED",PROGRAM_NOT_FOUND:"PROGRAM_NOT_FOUND",BAD_TIME_RANGE:"BAD_TIME_RANGE",ERR_NOT_FOUND:"ERR_NOT_FOUND",ERR_SCHEDULE_ALREADY_ASSIGNED:"ERR_SCHEDULE_ALREADY_ASSIGNED",ERR_INCORRECT_MEDICAL_HISTORY_DURATION:"ERR_INCORRECT_MEDICAL_HISTORY_DURATION",ERR_ONLY_ONE_FUTURE_COURSE_CAN_BE_ASSIGNED:"ERR_ONLY_ONE_FUTURE_COURSE_CAN_BE_ASSIGNED",ERR_MEDICINE_START_DATE_CANNOT_BE_AFTER_END_DATE:"ERR_MEDICINE_START_DATE_CANNOT_BE_AFTER_END_DATE",ERR_TEMPLATE_NAME_ALREADY_EXIST:"ERR_TEMPLATE_NAME_ALREADY_EXIST",ERR_MOBILE_NUMBER_ALREADY_EXIST:"ERR_MOBILE_NUMBER_ALREADY_EXIST",ERR_RULE_ALREADY_EXIST:"ERR_RULE_ALREADY_EXIST",WORKOUT_ALREADY_EXISTS:"ERR_WORKOUT_ALREADY_EXISTS"},xd={first_name:"First &",last_name:"Last Name",attributes:{mobile:"1234567890",qualifications:"",registration:"XXXX"}},yd=function(e){const t={};return Object.keys(e).forEach(n=>{const r=(e[n][0]||"").split(":");Object.keys(vd).every(e=>r[0]!==e||(t[n]="error:rpm_".concat(vd[e].toLocaleLowerCase()),!1))}),t},bd=function(e,t){let n=t;return Object.keys(vd).every(t=>e!==t||(n="error:rpm_".concat(vd[t].toLocaleLowerCase()),!1)),n},jd=(e,t)=>{var n;let r=[],i={};const o=null===e||void 0===e?void 0:e.isAdmin,a=(null===e||void 0===e||null===(n=e.permissions)||void 0===n?void 0:n.allowedActions)||{};return Object.keys(a).forEach(e=>{const n=null===e||void 0===e?void 0:e.split("/").filter(e=>e)[1];var i;n===t&&(r=null===(i=a[e])||void 0===i?void 0:i.list)}),i={isAdmin:o,showMenuManageUser:o,showProgramList:o||wd(r,[Nc["RPMCORE/ListPrograms"]]),showViewProgramBtn:o||wd(r,[Nc["RPMCORE/ReadProgram"]]),showAddProgramBtn:o||wd(r,[Nc["RPMCORE/CreateProgram"]]),showEditProgramBtn:o||wd(r,[Nc["RPMCORE/UpdateProgram"]]),showPatientList:o||wd(r,[Nc["RPMCORE/ListPatients"]]),showViewPatientBtn:o||wd(r,[Nc["RPMCORE/ReadPatient"]]),showAddPatientBtn:o||wd(r,[Nc["RPMCORE/CreatePatient"]]),showAllPatientListText:o||wd(r,[Nc["RPMCORE/ListAllPatients"]]),showDeletePatientBtn:o||wd(r,[Nc["RPMCORE/DeletePatients"]]),showDismissAlertPatientBtn:o||wd(r,[Nc["RPMCORE/DismissAlerts"]]),showUpdatePatientConfig:o||wd(r,[Nc["RPMCORE/UpdatePatientConfiguration"]]),showUpdatePatientProfile:o||wd(r,[Nc["RPMCORE/UpdatePatientProfile"]]),showRuleList:o||wd(r,[Nc["RPMCORE/ListRule"]]),showViewRuleBtn:o||wd(r,[Nc["RPMCORE/ReadRule"]]),showAddRuleBtn:o||wd(r,[Nc["RPMCORE/CreateRule"]]),showDeleteRuleBtn:o||wd(r,[Nc["RPMCORE/DeleteRule"]]),showTemplateList:o||wd(r,[Nc["RPMCORE/ListTemplate"]]),showPatientRuleList:o||wd(r,[Nc["RPMCORE/ListPatientRules"]]),showViewPatientRuleBtn:o||wd(r,[Nc["RPMCORE/ReadPatientRule"]]),showAddPatientRuleBtn:o||wd(r,[Nc["RPMCORE/CreatePatientRule"]]),showDeletePatientRuleBtn:o||wd(r,[Nc["RPMCORE/DeletePatientRule"]]),showCourseList:o||wd(r,[Nc["RPMCORE/ListCourses"]]),showViewCourseBtn:o||wd(r,[Nc["RPMCORE/ReadCourse"]]),showAddCourseBtn:o||wd(r,[Nc["RPMCORE/CreateCourse"]]),showDeleteCourseBtn:o||wd(r,[Nc["RPMCORE/DeleteCourse"]]),showEditCourseBtn:o||wd(r,[Nc["RPMCORE/UpdateCourse"]]),showMedicalHistoryList:o||wd(r,[Nc["RPMCORE/ListMedicalHistory"]]),showMedicalHistoryBtn:o||wd(r,[Nc["RPMCORE/ReadMedicalHistory"]]),showAddMedicalHistoryBtn:o||wd(r,[Nc["RPMCORE/CreateMedicalHistory"]]),showDeleteMedicalHistoryBtn:o||wd(r,[Nc["RPMCORE/DeleteMedicalHistory"]]),showEditMedicalHistoryBtn:o||wd(r,[Nc["RPMCORE/UpdateListMedicalHistory"]]),showSocialHistoryList:o||wd(r,[Nc["RPMCORE/ReadMedicalQuestion"]]),editSocialHistoryList:o||wd(r,[Nc["RPMCORE/UpdateMedicalQuestion"]]),showConsultationList:o||wd(r,[Nc["RPMCORE/ListConsultation"]]),showPrescriptionNoteList:o||wd(r,[Nc["RPMCORE/ListPractitionerNote"]]),showCreatePrescriptionNoteList:o||wd(r,[Nc["RPMCORE/CreatePractitionerNote"]]),showEditPrescriptionNote:o||wd(r,[Nc["RPMCORE/UpdatePractitionerNote"]]),showDeletePrescriptionList:o||wd(r,[Nc["RPMCORE/DeletePractitionerNote"]]),showNoteList:o||wd(r,[Nc["RPMCORE/ListNote"]]),showCreateNoteList:o||wd(r,[Nc["RPMCORE/CreateNote"]]),showEditNote:o||wd(r,[Nc["RPMCORE/UpdateNote"]]),showDeleteList:o||wd(r,[Nc["RPMCORE/DeleteNote"]]),showPrescriptionNoteList_showNoteList:o||wd(r,[Nc["RPMCORE/ListNote"]])||wd(r,[Nc["RPMCORE/ListPractitionerNote"]]),showCreatePrescriptionNoteList_showCreateNoteList:o||wd(r,[Nc["RPMCORE/CreateNote"]])||wd(r,[Nc["RPMCORE/CreatePractitionerNote"]]),showEditPrescriptionNote_showEditNote:o||wd(r,[Nc["RPMCORE/UpdateNote"]])||wd(r,[Nc["RPMCORE/UpdatePractitionerNote"]]),showDeletePrescriptionList_showDeleteList:o||wd(r,[Nc["RPMCORE/DeleteNote"]])||wd(r,[Nc["RPMCORE/DeletePractitionerNote"]])},i},wd=(e,t)=>!as((e||[]).find(e=>t.includes(e))),_d=e=>{switch(e){case"report":case"prescription_report":return!1;default:return!0}},Cd=async(e,t,n,r,i,o,a,s)=>{try{await e(((e,t,n,r,i,o,a)=>async s=>{s(na(!0));try{let s;s=o&&a?"".concat(pa.by_course,"/").concat(o,"/").concat(e,"/").concat(t,"/").concat(a,".pdf"):"".concat(pa.by_patient,"/").concat(e,"/").concat(n,".pdf?start_date=").concat(r,"&end_date=").concat(i);const l=await cu(s,{responseType:"arraybuffer"}),c=new Blob([null===l||void 0===l?void 0:l.data],{type:"application/pdf"}),d=new File([c],"report.pdf",{type:"application/pdf"}),u=window.URL.createObjectURL(d),p=document.createElement("a");return p.setAttribute("href",u),p.setAttribute("target","_blank"),p.style.display="none",document.body.appendChild(p),p.click(),document.body.removeChild(p),null===l||void 0===l?void 0:l.data}finally{s(na(!1))}})(t,n,r,i,o,a,s)),e(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(l){e(Zo({subTitle:l.message,severity:$c}))}},Sd=async(e,t,n,r,i,o,a,s)=>{try{await e(((e,t,n,r,i,o,a)=>async s=>{s(na(!0));try{let s;s=o&&a?"".concat(pa.by_course,"/").concat(o,"/").concat(e,"/").concat(t,"/").concat(a,"/detailed_report.pdf?&history_limit=20&note_limit=20"):"".concat(pa.by_patient,"/").concat(e,"/").concat(n,"/detailed_report.pdf?start_date=").concat(r,"&end_date=").concat(i,"&vital=").concat(n,"&history_limit=20");const l=await cu(s,{responseType:"arraybuffer"}),c=new Blob([null===l||void 0===l?void 0:l.data],{type:"application/pdf"}),d=new File([c],"report.pdf",{type:"application/pdf"}),u=window.URL.createObjectURL(d),p=document.createElement("a");return p.setAttribute("href",u),p.setAttribute("target","_blank"),p.style.display="none",document.body.appendChild(p),p.click(),document.body.removeChild(p),null===l||void 0===l?void 0:l.data}finally{s(na(!1))}})(t,n,r,i,o,a,s)),e(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(l){e(Zo({subTitle:l.message,severity:$c}))}},Ad=async(e,t,n)=>{try{await e(((e,t)=>async n=>{n(na(!0));try{const n="".concat(pa.consultation,"/").concat(e,"/").concat(t,"/doctor_report.pdf"),r=await cu(n,{responseType:"arraybuffer"}),i=new Blob([null===r||void 0===r?void 0:r.data],{type:"application/pdf"}),o=new File([i],"report.pdf",{type:"application/pdf"}),a=window.URL.createObjectURL(o),s=document.createElement("a");return s.setAttribute("href",a),s.setAttribute("target","_blank"),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),null===r||void 0===r?void 0:r.data}finally{n(na(!1))}})(t,n)),e(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(r){e(Zo({subTitle:r.message,severity:$c}))}},kd=e=>{const t=null===e||void 0===e?void 0:e.map(e=>e.values.activity),n=new Set(t);return Array.from(n)},Md=["ADMIN","PRESCRIPTION","DOCTOR","OTHER","SUMMARY"],Od=[{name:"Hospital",value:"hospital"},{name:"Clinic",value:"clinic"},{name:"Fitness_Center",value:"fitnessCenter"},{name:"Wellness_Center",value:"wellnessCenter"}],Td={TEXT_FIELD:"textfield",NUMBER:"number",DROPDOWN:"dropdown",MULTI_DROPDOWN:"multi_dropdown",SELECT:"select",FILE:"file"},Ed=[{goal:"Weight Gain",category:["Dietitian"]},{goal:"Weight Loss",category:["Dietitian"]},{goal:"Muscle Gain",category:["Dietitian"]},{goal:"General Fitness",category:["Dietitian"]},{goal:"Disease Management",category:["Dietitian"]},{goal:"Improve Stamina",category:["Dietitian"]},{goal:"Insomnia",category:["Dietitian"]},{goal:"Special Population (Specially Abled)",category:["Dietitian","Fitness"]},{goal:"Senior Citizen fitness",category:["Dietitian"]},{goal:"Stress Reduction through Physical Activity",category:["Dietitian"]}],Pd=[{name:"BMI",unit:"-",field_type:Td.NUMBER,range:{min:18,max:25}},{name:"Muscle Mass",unit:"kg",field_type:Td.NUMBER,range:{min:20,max:80}},{name:"Daily Calorie Intake",unit:"kcal/day",field_type:Td.NUMBER,range:{min:2e3,max:4e3}},{name:"Protein Intake",unit:"g/day",field_type:Td.NUMBER,range:{min:50,max:200}},{name:"Waist Circumference",unit:"cm",field_type:Td.NUMBER,range:{min:60,max:100}},{name:"Calorie Deficit",unit:"kcal/day",field_type:Td.NUMBER,range:{min:200,max:1e3}},{name:"Daily Steps",unit:"steps/day",field_type:Td.NUMBER,range:{min:5e3,max:15e3}},{name:"Physical Activity Duration",unit:"min/day",field_type:Td.NUMBER,range:{min:30,max:90}},{name:"Energy Level",unit:"rating",field_type:Td.SELECT,range:{min:1,max:5}},{name:"Pain Level",unit:"rating",field_type:Td.SELECT,range:{min:1,max:10}}],Dd=["Weight Gain","Weight Loss","Muscle Gain","General Fitness","Disease Management","Improve Stamina","Insomnia","Special Population (Specially Abled)","Senior Citizen fitness","Stress Reduction through Physical Activity"],Rd=[{name:"Gender",unit:"",field_type:Td.SELECT,range:"",key:"gender",options:["Male","Female","Other"],traceableBy:["Provider"]},{name:"Height",unit:"cm,feet",field_type:Td.NUMBER,range:"2-250",key:"height",traceableBy:["Provider"]},{name:"Body Weight",unit:"kg,lb",field_type:Td.NUMBER,range:"40-220",key:"weight",traceableBy:["Provider"]},{name:"Body Fat %",unit:"%",field_type:Td.TEXT_FIELD,range:"10-30",key:"bodyfat",traceableBy:["Provider"]},{name:"Sleep Duration",unit:"hrs/day",field_type:Td.SELECT,range:"6-9",key:"sleepTime",traceableBy:["Provider"]},{name:"Workout Frequency",unit:"sessions/week",field_type:Td.SELECT,range:"3-6",key:"workoutFrequency",traceableBy:["Provider"]},{name:"Meal Frequency",unit:"meals/day",field_type:Td.SELECT,range:"",key:"mealsPerDay",traceableBy:["Provider"]},{name:"Allergies & deseases",unit:"",field_type:Td.TEXT_FIELD,range:"",key:"allergiesDeseases",traceableBy:["Provider"]},{name:"Blood Pressure",unit:"",field_type:Td.TEXT_FIELD,range:"",key:"blood_pressure",traceableBy:["Provider"]},{name:"Blood Glucose",unit:"",field_type:Td.TEXT_FIELD,range:"",key:"blood_glucose",traceableBy:["Provider"]},{name:"Next Assessment",unit:"",field_type:Td.TEXT_FIELD,range:"",key:"nextSessionDate",disabled:!0,traceableBy:["Provider"],is_required:!0}],Nd=e=>oa()(e,"auth.isLoggedIn"),Ld=e=>oa()(e,"header.headerData"),Id=e=>oa()(e,"loader"),Fd=e=>oa()(e,"message"),$d=e=>oa()(e,"header.headerData.breadcrumb"),Bd=e=>oa()(e,"header.headerData.course"),zd=e=>oa()(e,"header.headerData.complianceStatus"),Hd=e=>oa()(e,"header.headerData.course_glucose"),Wd=e=>oa()(e,"dashboard"),Vd=e=>oa()(e,"dashboard.vitals.bp.course"),Ud=e=>oa()(e,"dashboard.vitals.glucose.course"),qd=e=>oa()(e,"user"),Gd=e=>oa()(e,"Programs.programData"),Yd="LOGIN",Zd="LOGOUT",Kd="USER",Xd=()=>(e,t)=>{const n=(r=t(),oa()(r,"app"));var r;const i="".concat(n.redirectBase,"/login"),o="".concat(n.loginURL,"/authgateway/api/authenticate?client_id=").concat(n.defaultTenant,"&redirect_uri=").concat(i);window.location.href=o},Qd=()=>async e=>{try{await cu(ha.logout,{})}catch(t){console.log(t)}finally{$o.clearToken(),(e=>{e({type:Zd})})(e),e(Xd())}},Jd=()=>async e=>{e(na(!0));try{const t=ma.INTROSPECT,{data:n}=await cu(t),r=!ta()(((null===n||void 0===n?void 0:n.roles)||[]).find(e=>"root"===e.name&&e.kind===Gc.SYSTEM));return e((e=>t=>t({type:Kd,data:e}))((0,i.A)((0,i.A)({},n),{},{isAdmin:r}))),(0,i.A)((0,i.A)({},n),{},{isAdmin:r,showMenuManageUser:r,showStaffMenu:r||eu(n,[Nc["AGM/ListUsers"]]),showCreateUserBtn:r||eu(n,[Nc["AGM/CreateUser"]]),showReadUserBtn:r||eu(n,[Nc["AGM/ReadUser"]]),showUpdateUserBtn:r||eu(n,[Nc["AGM/UpdateUser"]]),showDeleteUserBtn:r||eu(n,[Nc["AGM/DeleteUser"]]),showRoleMenu:r||eu(n,[Nc["AGM/ListRoles"]]),showCreateRoleBtn:r||eu(n,[Nc["AGM/CreateRole"]]),showReadRoleBtn:r||eu(n,[Nc["AGM/ReadRole"]]),showUpdateRoleBtn:r||eu(n,[Nc["AGM/UpdateRole"]]),showDeleteRoleBtn:r||eu(n,[Nc["AGM/DeleteRole"]]),showProgramList:r||eu(n,[Nc["RPMCORE/ListPrograms"]]),showViewProgramBtn:r||eu(n,[Nc["RPMCORE/ReadProgram"]]),showAddProgramBtn:r||eu(n,[Nc["RPMCORE/CreateProgram"]]),showEditProgramBtn:r||eu(n,[Nc["RPMCORE/UpdateProgram"]])})}finally{e(na(!1))}},eu=(e,t)=>{var n;if(e.isAdmin)return!0;const r=(null===e||void 0===e||null===(n=e.permissions)||void 0===n?void 0:n.allowedActions)||{};return Object.keys(r).some(e=>{var n;return!ta()(((null===(n=r[e])||void 0===n?void 0:n.list)||[]).find(e=>t.includes(e)))})},tu=["headers"],nu=["headers"],ru=["headers"],iu=["headers"];let ou=null;const au=()=>{},su=()=>{},lu=e=>{null===ou&&(ou=Qo().create()),e.baseURL&&(ou.defaults.baseURL=e.baseURL),e["X-Cw-Tenant-Id"]&&(ou.defaults.headers.common["X-Cw-Tenant-Id"]=e["X-Cw-Tenant-Id"]),e.Authorization&&(ou.defaults.headers.common.Authorization=e.Authorization)};async function cu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{headers:n}=t,r=Ko(t,tu),o=(0,i.A)({headers:(0,i.A)({"Content-Type":"application/json"},n)},r),a=await ou.get(e,o);if(a.status>=200&&a.status<300)return{data:a.data,status:a.status};const s=new Error(a.statusText);throw s.response=a,s}async function du(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{headers:r}=n,o=Ko(n,nu),a=(0,i.A)({headers:(0,i.A)({"Content-Type":"application/json"},r)},o);try{const n=await ou.post(e,is(t),a);if(n.status>=200&&n.status<300)return{data:n.data,status:n.status,headers:n.headers};const r=new Error(n.statusText);throw r.response=n,r}catch(s){throw au({message:su(s),severity:"error"}),s}}async function uu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{headers:r}=n,o=Ko(n,ru),a=(0,i.A)({headers:(0,i.A)({"Content-Type":"application/json"},r)},o);try{const n=await ou.put(e,is(t),a);if(n.status>=200&&n.status<300)return{data:n.data,status:n.status};const r=new Error(n.statusText);throw r.response=n,r}catch(s){throw au({message:su(s),severity:"error"}),s}}async function pu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{headers:r}=t,o=Ko(t,iu),a=(0,i.A)({headers:(0,i.A)({"Content-Type":"application/json"},r)},o);(0,Jo.isEmpty)(n)||(a.data=is(n));try{const t=await ou.delete(e,a);if(t.status>=200&&t.status<300)return{status:t.status};const n=new Error(t.statusText);throw n.response=t,n}catch(s){throw au({message:su(s),severity:"error"}),s}}const hu=e=>{ou.interceptors.response.use(e=>e,function(t){const n=t.config;if(t.response&&t.response.status){var r,i;if(401===t.response.status&&n.url===ha.refresh)return e.dispatch(Qd()),Promise.reject(t);if(403===t.response.status&&!n._retry&&"AR51_SYS:ERR_INVALID_CREDS"===(null===t||void 0===t||null===(r=t.response)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.code)){n._retry=!0;const{refreshToken:r,accountId:i}=$o.getAccessToken();if(!r||!i)return e.dispatch(Qd()),Promise.reject(t);const o="".concat(null===n||void 0===n?void 0:n.baseURL,"/authgateway/api/token?grant_type=refresh_token&client_id=").concat(i,"&refresh_token=").concat(r);return ou.post(o,{}).then(r=>{let{data:o,status:a}=r;return 200===a?(mu({accessToken:o.access_token,accountId:i,refreshToken:o.refresh_token,expiresIn:o.expiresIn}),n.headers={"Content-Type":"application/json",Authorization:"Bearer ".concat(o.access_token),"X-CW-Tenant-Id":i},ou(n)):(e.dispatch(Qd()),Promise.reject(t))})}return Promise.reject(t)}return Promise.reject(t)})},mu=e=>{lu({Authorization:"Bearer ".concat(e.accessToken),"X-Cw-Tenant-Id":e.accountId});const t=(void 0).mapAuth(e);localStorage.setItem("auth_data",JSON.stringify(t)),(void 0).store.dispatch((e=>t=>t({type:Yd,data:e}))(t))};var fu=n(65173),gu=n.n(fu);function vu(){const e=Ct(Nd),t=so();return We.useEffect(()=>{e&&t(Lc.PROGRAM.MAIN,{replace:!0})},[e]),null}vu.propTypes={app:gu().object,isLoggedIn:gu().bool,baseUrl:gu().string,consoleUrl:gu().string,redirectToPath:gu().string};const xu=vu;var yu=n(70245),bu=n(56776);function ju(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ju(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const wu=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ju(e))&&(r&&(r+=" "),r+=t);return r};var _u=n(58812),Cu=n(18698);const Su=["className","component"];function Au(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=(0,Bt.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(_u.A),a=We.forwardRef(function(e,a){const s=qt(n),l=(0,Cu.A)(e),{className:c,component:d="div"}=l,u=(0,nn.A)(l,Su);return(0,Gt.jsx)(o,(0,Ft.A)({as:d,ref:a,className:wu(c,i?i(r):r),theme:t&&s[t]||s},u))});return a}var ku=n(79386),Mu=n(37344);const Ou=(0,ar.A)("MuiBox",["root"]),Tu=(0,Mu.A)(),Eu=Au({themeId:Xt.A,defaultTheme:Tu,defaultClassName:Ou.root,generateClassName:ku.A.generate});function Pu(e){return(0,sr.Ay)("MuiToolbar",e)}(0,ar.A)("MuiToolbar",["root","gutters","regular","dense"]);const Du=["className","component","disableGutters","variant"],Ru=(0,Un.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===n.variant&&{minHeight:48})},e=>{let{theme:t,ownerState:n}=e;return"regular"===n.variant&&t.mixins.toolbar}),Nu=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiToolbar"}),{className:r,component:i="div",disableGutters:o=!1,variant:a="regular"}=n,s=(0,nn.A)(n,Du),l=(0,Ft.A)({},n,{component:i,disableGutters:o,variant:a}),c=(e=>{const{classes:t,disableGutters:n,variant:r}=e,i={root:["root",!n&&"gutters",r]};return(0,ir.A)(i,Pu,t)})(l);return(0,Gt.jsx)(Ru,(0,Ft.A)({as:i,className:(0,nr.A)(c.root,r),ref:t,ownerState:l},s))}),Lu=Nu;var Iu=n(98082),Fu=n(6803),$u=n(67266);const Bu=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function zu(e){return(0,sr.Ay)("MuiPaper",e)}(0,ar.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Hu=["className","component","elevation","square","variant"],Wu=(0,Un.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})(e=>{let{theme:t,ownerState:n}=e;var r;return(0,Ft.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,Ft.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,$u.X4)("#fff",Bu(n.elevation)),", ").concat((0,$u.X4)("#fff",Bu(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))}),Vu=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=(0,nn.A)(n,Hu),c=(0,Ft.A)({},n,{component:i,elevation:o,square:a,variant:s}),d=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,ir.A)(o,zu,i)})(c);return(0,Gt.jsx)(Wu,(0,Ft.A)({as:i,ownerState:c,className:(0,nr.A)(d.root,r),ref:t},l))}),Uu=Vu;function qu(e){return(0,sr.Ay)("MuiAppBar",e)}(0,ar.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Gu=["className","color","enableColorOnDark","position"],Yu=(e,t)=>e?"".concat(null==e?void 0:e.replace(")",""),", ").concat(t,")"):t,Zu=(0,Un.Ay)(Uu,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,Fu.A)(n.position))],t["color".concat((0,Fu.A)(n.color))]]}})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return(0,Ft.A)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===n.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===n.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===n.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===n.position&&{position:"static"},"relative"===n.position&&{position:"relative"},!t.vars&&(0,Ft.A)({},"default"===n.color&&{backgroundColor:r,color:t.palette.getContrastText(r)},n.color&&"default"!==n.color&&"inherit"!==n.color&&"transparent"!==n.color&&{backgroundColor:t.palette[n.color].main,color:t.palette[n.color].contrastText},"inherit"===n.color&&{color:"inherit"},"dark"===t.palette.mode&&!n.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===n.color&&(0,Ft.A)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&(0,Ft.A)({},"default"===n.color&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette.AppBar.defaultBg:Yu(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":n.enableColorOnDark?t.vars.palette.text.primary:Yu(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},n.color&&!n.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette[n.color].main:Yu(t.vars.palette.AppBar.darkBg,t.vars.palette[n.color].main),"--AppBar-color":n.enableColorOnDark?t.vars.palette[n.color].contrastText:Yu(t.vars.palette.AppBar.darkColor,t.vars.palette[n.color].contrastText)},!["inherit","transparent"].includes(n.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===n.color?"inherit":"var(--AppBar-color)"},"transparent"===n.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),Ku=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAppBar"}),{className:r,color:i="primary",enableColorOnDark:o=!1,position:a="fixed"}=n,s=(0,nn.A)(n,Gu),l=(0,Ft.A)({},n,{color:i,position:a,enableColorOnDark:o}),c=(e=>{const{color:t,position:n,classes:r}=e,i={root:["root","color".concat((0,Fu.A)(t)),"position".concat((0,Fu.A)(n))]};return(0,ir.A)(i,qu,r)})(l);return(0,Gt.jsx)(Zu,(0,Ft.A)({square:!0,component:"header",ownerState:l,elevation:4,className:(0,nr.A)(c.root,r,"fixed"===a&&"mui-fixed"),ref:t},s))}),Xu=Ku;var Qu=n(13030),Ju=n(61475),ep=n(93319),tp=n(13574);function np(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function rp(e,t){var n=Object.create(null);return e&&We.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,We.isValidElement)(e)?t(e):e}(e)}),n}function ip(e,t,n){return null!=n[t]?n[t]:e.props[t]}function op(e,t,n){var r=rp(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach(function(o){var a=i[o];if((0,We.isValidElement)(a)){var s=o in t,l=o in r,c=t[o],d=(0,We.isValidElement)(c)&&!c.props.in;!l||s&&!d?l||!s||d?l&&s&&(0,We.isValidElement)(c)&&(i[o]=(0,We.cloneElement)(a,{onExited:n.bind(null,a),in:c.props.in,exit:ip(a,"exit",e),enter:ip(a,"enter",e)})):i[o]=(0,We.cloneElement)(a,{in:!1}):i[o]=(0,We.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:ip(a,"exit",e),enter:ip(a,"enter",e)})}}),i}var ap=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},sp=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(d(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}wn(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,rp(n.children,function(e){return(0,We.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:ip(e,"appear",n),enter:ip(e,"enter",n),exit:ip(e,"exit",n)})})):op(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=rp(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,Ft.A)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,nn.A)(e,["component","childFactory"]),i=this.state.contextValue,o=ap(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?We.createElement(Cn.Provider,{value:i},o):We.createElement(Cn.Provider,{value:i},We.createElement(t,r,o))},t}(We.Component);sp.propTypes={},sp.defaultProps={component:"div",childFactory:function(e){return e}};const lp=sp;var cp=n(83290);const dp=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:c}=e,[d,u]=We.useState(!1),p=(0,nr.A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),h={width:a,height:a,top:-a/2+o,left:-a/2+i},m=(0,nr.A)(n.child,d&&n.childLeaving,r&&n.childPulsate);return s||d||u(!0),We.useEffect(()=>{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}},[l,s,c]),(0,Gt.jsx)("span",{className:p,style:h,children:(0,Gt.jsx)("span",{className:m})})};const up=(0,ar.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var pp,hp,mp,fp;const gp=["center","classes","className"];let vp,xp,yp,bp;const jp=(0,cp.i7)(vp||(vp=pp||(pp=np(["\n  0% {\n    transform: scale(0);\n    opacity: 0.1;\n  }\n\n  100% {\n    transform: scale(1);\n    opacity: 0.3;\n  }\n"])))),wp=(0,cp.i7)(xp||(xp=hp||(hp=np(["\n  0% {\n    opacity: 1;\n  }\n\n  100% {\n    opacity: 0;\n  }\n"])))),_p=(0,cp.i7)(yp||(yp=mp||(mp=np(["\n  0% {\n    transform: scale(1);\n  }\n\n  50% {\n    transform: scale(0.92);\n  }\n\n  100% {\n    transform: scale(1);\n  }\n"])))),Cp=(0,Un.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Sp=(0,Un.Ay)(dp,{name:"MuiTouchRipple",slot:"Ripple"})(bp||(bp=fp||(fp=np(["\n  opacity: 0;\n  position: absolute;\n\n  &."," {\n    opacity: 0.3;\n    transform: scale(1);\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  &."," {\n    animation-duration: ","ms;\n  }\n\n  & ."," {\n    opacity: 1;\n    display: block;\n    width: 100%;\n    height: 100%;\n    border-radius: 50%;\n    background-color: currentColor;\n  }\n\n  & ."," {\n    opacity: 0;\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  & ."," {\n    position: absolute;\n    /* @noflip */\n    left: 0px;\n    top: 0;\n    animation-name: ",";\n    animation-duration: 2500ms;\n    animation-timing-function: ",";\n    animation-iteration-count: infinite;\n    animation-delay: 200ms;\n  }\n"]))),up.rippleVisible,jp,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},up.ripplePulsate,e=>{let{theme:t}=e;return t.transitions.duration.shorter},up.child,up.childLeaving,wp,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},up.childPulsate,_p,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),Ap=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=(0,nn.A)(n,gp),[s,l]=We.useState([]),c=We.useRef(0),d=We.useRef(null);We.useEffect(()=>{d.current&&(d.current(),d.current=null)},[s]);const u=We.useRef(!1),p=(0,rr.A)(),h=We.useRef(null),m=We.useRef(null),f=We.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l(e=>[...e,(0,Gt.jsx)(Sp,{classes:{ripple:(0,nr.A)(i.ripple,up.ripple),rippleVisible:(0,nr.A)(i.rippleVisible,up.rippleVisible),ripplePulsate:(0,nr.A)(i.ripplePulsate,up.ripplePulsate),child:(0,nr.A)(i.child,up.child),childLeaving:(0,nr.A)(i.childLeaving,up.childLeaving),childPulsate:(0,nr.A)(i.childPulsate,up.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)]),c.current+=1,d.current=a},[i]),g=We.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&u.current)return void(u.current=!1);"touchstart"===(null==e?void 0:e.type)&&(u.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,d,g;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),d=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),d=Math.round(n-l.top)}if(o)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2===0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-d),d)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{f({pulsate:i,rippleX:c,rippleY:d,rippleSize:g,cb:n})},p.start(80,()=>{h.current&&(h.current(),h.current=null)})):f({pulsate:i,rippleX:c,rippleY:d,rippleSize:g,cb:n})},[r,f,p]),v=We.useCallback(()=>{g({},{pulsate:!0})},[g]),x=We.useCallback((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void p.start(0,()=>{x(e,t)});h.current=null,l(e=>e.length>0?e.slice(1):e),d.current=t},[p]);return We.useImperativeHandle(t,()=>({pulsate:v,start:g,stop:x}),[v,g,x]),(0,Gt.jsx)(Cp,(0,Ft.A)({className:(0,nr.A)(up.root,i.root,o),ref:m},a,{children:(0,Gt.jsx)(lp,{component:null,exit:!0,children:s})}))}),kp=Ap;function Mp(e){return(0,sr.Ay)("MuiButtonBase",e)}const Op=(0,ar.A)("MuiButtonBase",["root","disabled","focusVisible"]),Tp=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Ep=(0,Un.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(Op.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Pp=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:u=!1,LinkComponent:p="a",onBlur:h,onClick:m,onContextMenu:f,onDragLeave:g,onFocus:v,onFocusVisible:x,onKeyDown:y,onKeyUp:b,onMouseDown:j,onMouseLeave:w,onMouseUp:_,onTouchEnd:C,onTouchMove:S,onTouchStart:A,tabIndex:k=0,TouchRippleProps:M,touchRippleRef:O,type:T}=n,E=(0,nn.A)(n,Tp),P=We.useRef(null),D=We.useRef(null),R=(0,Ln.A)(D,O),{isFocusVisibleRef:N,onFocus:L,onBlur:I,ref:F}=(0,tp.A)(),[$,B]=We.useState(!1);l&&$&&B(!1),We.useImperativeHandle(r,()=>({focusVisible:()=>{B(!0),P.current.focus()}}),[]);const[z,H]=We.useState(!1);We.useEffect(()=>{H(!0)},[]);const W=z&&!c&&!l;function V(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;return(0,ep.A)(r=>{t&&t(r);return!n&&D.current&&D.current[e](r),!0})}We.useEffect(()=>{$&&u&&!c&&z&&D.current.pulsate()},[c,u,$,z]);const U=V("start",j),q=V("stop",f),G=V("stop",g),Y=V("stop",_),Z=V("stop",e=>{$&&e.preventDefault(),w&&w(e)}),K=V("start",A),X=V("stop",C),Q=V("stop",S),J=V("stop",e=>{I(e),!1===N.current&&B(!1),h&&h(e)},!1),ee=(0,ep.A)(e=>{P.current||(P.current=e.currentTarget),L(e),!0===N.current&&(B(!0),x&&x(e)),v&&v(e)}),te=()=>{const e=P.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=We.useRef(!1),re=(0,ep.A)(e=>{u&&!ne.current&&$&&D.current&&" "===e.key&&(ne.current=!0,D.current.stop(e,()=>{D.current.start(e)})),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),y&&y(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))}),ie=(0,ep.A)(e=>{u&&" "===e.key&&D.current&&$&&!e.defaultPrevented&&(ne.current=!1,D.current.stop(e,()=>{D.current.pulsate(e)})),b&&b(e),m&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&m(e)});let oe=s;"button"===oe&&(E.href||E.to)&&(oe=p);const ae={};"button"===oe?(ae.type=void 0===T?"button":T,ae.disabled=l):(E.href||E.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=(0,Ln.A)(t,F,P);const le=(0,Ft.A)({},n,{centerRipple:i,component:s,disabled:l,disableRipple:c,disableTouchRipple:d,focusRipple:u,tabIndex:k,focusVisible:$}),ce=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,ir.A)(o,Mp,i);return n&&r&&(a.root+=" ".concat(r)),a})(le);return(0,Gt.jsxs)(Ep,(0,Ft.A)({as:oe,className:(0,nr.A)(ce.root,a),ownerState:le,onBlur:J,onClick:m,onContextMenu:q,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:U,onMouseLeave:Z,onMouseUp:Y,onDragLeave:G,onTouchEnd:X,onTouchMove:Q,onTouchStart:K,ref:se,tabIndex:l?-1:k,type:T},ae,E,{children:[o,W?(0,Gt.jsx)(kp,(0,Ft.A)({ref:R,center:i},M)):null]}))}),Dp=Pp;function Rp(e){return(0,sr.Ay)("MuiButton",e)}const Np=(0,ar.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const Lp=We.createContext({});const Ip=We.createContext(void 0),Fp=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],$p=e=>(0,Ft.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),Bp=(0,Un.Ay)(Dp,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,Fu.A)(n.color))],t["size".concat((0,Fu.A)(n.size))],t["".concat(n.variant,"Size").concat((0,Fu.A)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;const o="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],a="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,Ft.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,Ft.A)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:"1px solid ".concat((t.vars||t).palette[n.color].main),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,Ft.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(Np.focusVisible)]:(0,Ft.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(Np.disabled)]:(0,Ft.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.action.disabledBackground)},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?"1px solid rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):"1px solid ".concat((0,$u.X4)(t.palette[n.color].main,.5))},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:o,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})},e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(Np.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(Np.disabled)]:{boxShadow:"none"}}}),zp=(0,Un.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,Fu.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},$p(t))}),Hp=(0,Un.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,Fu.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},$p(t))}),Wp=We.forwardRef(function(e,t){const n=We.useContext(Lp),r=We.useContext(Ip),i=(0,Qu.A)(n,e),o=(0,$t.b)({props:i,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:d=!1,disableElevation:u=!1,disableFocusRipple:p=!1,endIcon:h,focusVisibleClassName:m,fullWidth:f=!1,size:g="medium",startIcon:v,type:x,variant:y="text"}=o,b=(0,nn.A)(o,Fp),j=(0,Ft.A)({},o,{color:s,component:l,disabled:d,disableElevation:u,disableFocusRipple:p,fullWidth:f,size:g,type:x,variant:y}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e,s={root:["root",o,"".concat(o).concat((0,Fu.A)(t)),"size".concat((0,Fu.A)(i)),"".concat(o,"Size").concat((0,Fu.A)(i)),"color".concat((0,Fu.A)(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat((0,Fu.A)(i))],endIcon:["icon","endIcon","iconSize".concat((0,Fu.A)(i))]},l=(0,ir.A)(s,Rp,a);return(0,Ft.A)({},a,l)})(j),_=v&&(0,Gt.jsx)(zp,{className:w.startIcon,ownerState:j,children:v}),C=h&&(0,Gt.jsx)(Hp,{className:w.endIcon,ownerState:j,children:h}),S=r||"";return(0,Gt.jsxs)(Bp,(0,Ft.A)({ownerState:j,className:(0,nr.A)(n.className,w.root,c,S),component:l,disabled:d,focusRipple:!p,focusVisibleClassName:(0,nr.A)(w.focusVisible,m),ref:t,type:x},b,{classes:w,children:[_,a,C]}))}),Vp=Wp;function Up(e){return(0,sr.Ay)("MuiIconButton",e)}const qp=(0,ar.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Gp=["edge","children","className","color","disabled","disableFocusRipple","size"],Yp=(0,Un.Ay)(Dp,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,Fu.A)(n.color))],n.edge&&t["edge".concat((0,Fu.A)(n.edge))],t["size".concat((0,Fu.A)(n.size))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})},e=>{let{theme:t,ownerState:n}=e;var r;const i=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,Ft.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,Ft.A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,Ft.A)({},i&&{backgroundColor:t.vars?"rgba(".concat(i.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(qp.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),Zp=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,d=(0,nn.A)(n,Gp),u=(0,Ft.A)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),p=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,Fu.A)(r)),i&&"edge".concat((0,Fu.A)(i)),"size".concat((0,Fu.A)(o))]};return(0,ir.A)(a,Up,t)})(u);return(0,Gt.jsx)(Yp,(0,Ft.A)({className:(0,nr.A)(p.root,o),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},d,{ownerState:u,children:i}))}),Kp=Zp;const Xp=function(e){return"string"===typeof e};const Qp=function(e,t,n){return void 0===e||Xp(e)?t:(0,Ft.A)({},t,{ownerState:(0,Ft.A)({},t.ownerState,n)})};function Jp(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Jp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const eh=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Jp(e))&&(r&&(r+=" "),r+=t);return r};const th=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n};const nh=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t])).forEach(n=>{t[n]=e[n]}),t};const rh=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=eh(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=(0,Ft.A)({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=(0,Ft.A)({},n,i,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=th((0,Ft.A)({},i,r)),s=nh(r),l=nh(i),c=t(a),d=eh(null==c?void 0:c.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),u=(0,Ft.A)({},null==c?void 0:c.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),p=(0,Ft.A)({},c,n,l,s);return d.length>0&&(p.className=d),Object.keys(u).length>0&&(p.style=u),{props:p,internalRef:c.ref}};const ih=function(e,t,n){return"function"===typeof e?e(t,n):e},oh=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];const ah=function(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=(0,nn.A)(e,oh),s=o?{}:ih(r,i),{props:l,internalRef:c}=rh((0,Ft.A)({},a,{externalSlotProps:s})),d=(0,gr.A)(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref);return Qp(n,(0,Ft.A)({},l,{ref:d}),i)};var sh=n(22427);const lh=We.createContext({});function ch(e){return(0,sr.Ay)("MuiList",e)}(0,ar.A)("MuiList",["root","padding","dense","subheader"]);const dh=["children","className","component","dense","disablePadding","subheader"],uh=(0,Un.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})}),ph=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=(0,nn.A)(n,dh),d=We.useMemo(()=>({dense:a}),[a]),u=(0,Ft.A)({},n,{component:o,dense:a,disablePadding:s}),p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e,o={root:["root",!n&&"padding",r&&"dense",i&&"subheader"]};return(0,ir.A)(o,ch,t)})(u);return(0,Gt.jsx)(lh.Provider,{value:d,children:(0,Gt.jsxs)(uh,(0,Ft.A)({as:o,className:(0,nr.A)(p.root,i),ref:t,ownerState:u},c,{children:[l,r]}))})}),hh=ph;function mh(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const fh=mh;var gh=n(55013);const vh=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function xh(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function yh(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function bh(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function jh(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&bh(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const wh=We.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:o,className:a,disabledItemsFocusable:s=!1,disableListWrap:l=!1,onKeyDown:c,variant:d="selectedMenu"}=e,u=(0,nn.A)(e,vh),p=We.useRef(null),h=We.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,gh.A)(()=>{r&&p.current.focus()},[r]),We.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&r){const t="".concat(fh((0,sh.A)(e)),"px");p.current.style["rtl"===n?"paddingLeft":"paddingRight"]=t,p.current.style.width="calc(100% + ".concat(t,")")}return p.current}}),[]);const m=(0,Ln.A)(p,t);let f=-1;We.Children.forEach(o,(e,t)=>{We.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===f)&&(f=t),f===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(f+=1,f>=o.length&&(f=-1))):f===t&&(f+=1,f>=o.length&&(f=-1))});const g=We.Children.map(o,(e,t)=>{if(t===f){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),We.cloneElement(e,t)}return e});return(0,Gt.jsx)(hh,(0,Ft.A)({role:"menu",ref:m,className:a,onKeyDown:e=>{const t=p.current,n=e.key,r=(0,sh.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),jh(t,r,l,s,xh);else if("ArrowUp"===n)e.preventDefault(),jh(t,r,l,s,yh);else if("Home"===n)e.preventDefault(),jh(t,null,l,s,xh);else if("End"===n)e.preventDefault(),jh(t,null,l,s,yh);else if(1===n.length){const i=h.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const l=r&&!i.repeating&&bh(r,i);i.previousKeyMatched&&(l||jh(t,r,!1,s,xh,i))?e.preventDefault():i.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1},u,{children:g}))}),_h=wh,Ch=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Sh(e){return"scale(".concat(e,", ").concat(e**2,")")}const Ah={entering:{opacity:1,transform:Sh(1)},entered:{opacity:1,transform:"none"}},kh="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Mh=We.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:d,onExited:u,onExiting:p,style:h,timeout:m="auto",TransitionComponent:f=Dn}=e,g=(0,nn.A)(e,Ch),v=(0,rr.A)(),x=We.useRef(),y=In(),b=We.useRef(null),j=(0,Ln.A)(b,Rn(i),t),w=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},_=w(c),C=w((e,t)=>{Fn(e);const{duration:n,delay:r,easing:i}=$n({style:h,timeout:m,easing:o},{mode:"enter"});let a;"auto"===m?(a=y.transitions.getAutoHeightDuration(e.clientHeight),x.current=a):a=n,e.style.transition=[y.transitions.create("opacity",{duration:a,delay:r}),y.transitions.create("transform",{duration:kh?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)}),S=w(l),A=w(p),k=w(e=>{const{duration:t,delay:n,easing:r}=$n({style:h,timeout:m,easing:o},{mode:"exit"});let i;"auto"===m?(i=y.transitions.getAutoHeightDuration(e.clientHeight),x.current=i):i=t,e.style.transition=[y.transitions.create("opacity",{duration:i,delay:n}),y.transitions.create("transform",{duration:kh?i:.666*i,delay:kh?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=Sh(.75),d&&d(e)}),M=w(u);return(0,Gt.jsx)(f,(0,Ft.A)({appear:r,in:a,nodeRef:b,onEnter:C,onEntered:S,onEntering:_,onExit:k,onExited:M,onExiting:A,addEndListener:e=>{"auto"===m&&v.start(x.current||0,e),n&&n(b.current,e)},timeout:"auto"===m?null:m},g,{children:(e,t)=>We.cloneElement(i,(0,Ft.A)({style:(0,Ft.A)({opacity:0,transform:Sh(.75),visibility:"exited"!==e||a?void 0:"hidden"},Ah[e],h,i.props.style),ref:j},t))}))});Mh.muiSupportAuto=!0;const Oh=Mh,Th=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Eh(e){const t=[],n=[];return Array.from(e.querySelectorAll(Th)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Ph(){return!0}const Dh=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Eh,isEnabled:a=Ph,open:s}=e,l=We.useRef(!1),c=We.useRef(null),d=We.useRef(null),u=We.useRef(null),p=We.useRef(null),h=We.useRef(!1),m=We.useRef(null),f=(0,gr.A)(Rn(t),m),g=We.useRef(null);We.useEffect(()=>{s&&m.current&&(h.current=!n)},[n,s]),We.useEffect(()=>{if(!s||!m.current)return;const e=(0,xr.A)(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{i||(u.current&&u.current.focus&&(l.current=!0,u.current.focus()),u.current=null)}},[s]),We.useEffect(()=>{if(!s||!m.current)return;const e=(0,xr.A)(m.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(l.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==d.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!h.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==d.current||(n=o(m.current)),n.length>0){var i,s;const e=Boolean((null==(i=g.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=g.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!==typeof t&&"string"!==typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,a,s,o]);const v=e=>{null===u.current&&(u.current=e.relatedTarget),h.current=!0};return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:c,"data-testid":"sentinelStart"}),We.cloneElement(t,{ref:f,onFocus:e=>{null===u.current&&(u.current=e.relatedTarget),h.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,Gt.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:d,"data-testid":"sentinelEnd"})]})};var Rh=n(26564);const Nh=We.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=We.useState(null),s=(0,gr.A)(We.isValidElement(n)?Rn(n):null,t);if((0,hn.A)(()=>{i||a(function(e){return"function"===typeof e?e():e}(r)||document.body)},[r,i]),(0,hn.A)(()=>{if(o&&!i)return(0,Rh.A)(t,o),()=>{(0,Rh.A)(t,null)}},[t,o,i]),i){if(We.isValidElement(n)){const e={ref:s};return We.cloneElement(n,e)}return(0,Gt.jsx)(We.Fragment,{children:n})}return(0,Gt.jsx)(We.Fragment,{children:o?ut.createPortal(n,o):o})}),Lh=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Ih={entering:{opacity:1},entered:{opacity:1}},Fh=We.forwardRef(function(e,t){const n=In(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:d,onEntering:u,onExit:p,onExited:h,onExiting:m,style:f,timeout:g=r,TransitionComponent:v=Dn}=e,x=(0,nn.A)(e,Lh),y=We.useRef(null),b=(0,Ln.A)(y,Rn(a),t),j=e=>t=>{if(e){const n=y.current;void 0===t?e(n):e(n,t)}},w=j(u),_=j((e,t)=>{Fn(e);const r=$n({style:f,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),C=j(d),S=j(m),A=j(e=>{const t=$n({style:f,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)}),k=j(h);return(0,Gt.jsx)(v,(0,Ft.A)({appear:o,in:l,nodeRef:y,onEnter:_,onEntered:C,onEntering:w,onExit:A,onExited:k,onExiting:S,addEndListener:e=>{i&&i(y.current,e)},timeout:g},x,{children:(e,t)=>We.cloneElement(a,(0,Ft.A)({style:(0,Ft.A)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},Ih[e],f,a.props.style),ref:b},t))}))}),$h=Fh;function Bh(e){return(0,sr.Ay)("MuiBackdrop",e)}(0,ar.A)("MuiBackdrop",["root","invisible"]);const zh=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Hh=(0,Un.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})}),Wh=We.forwardRef(function(e,t){var n,r,i;const o=(0,$t.b)({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:d={},invisible:u=!1,open:p,slotProps:h={},slots:m={},TransitionComponent:f=$h,transitionDuration:g}=o,v=(0,nn.A)(o,zh),x=(0,Ft.A)({},o,{component:l,invisible:u}),y=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,ir.A)(r,Bh,t)})(x),b=null!=(n=h.root)?n:d.root;return(0,Gt.jsx)(f,(0,Ft.A)({in:p,timeout:g},v,{children:(0,Gt.jsx)(Hh,(0,Ft.A)({"aria-hidden":!0},b,{as:null!=(r=null!=(i=m.root)?i:c.Root)?r:l,className:(0,nr.A)(y.root,s,null==b?void 0:b.className),ownerState:(0,Ft.A)({},x,null==b?void 0:b.ownerState),classes:y,ref:t,children:a}))}))}),Vh=Wh;var Uh=n(42456),qh=n(63940);function Gh(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Yh(e){return parseInt((0,qh.A)(e).getComputedStyle(e).paddingRight,10)||0}function Zh(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&Gh(e,i)})}function Kh(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Xh(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,xr.A)(e);return t.body===e?(0,qh.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=mh((0,xr.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(Yh(r)+e,"px");const t=(0,xr.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(Yh(t)+e,"px")})}let e;if(r.parentNode instanceof DocumentFragment)e=(0,xr.A)(r).body;else{const t=r.parentElement,n=(0,qh.A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)})}}const Qh=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Gh(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);Zh(t,e.mount,e.modalRef,r,!0);const i=Kh(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Kh(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=Xh(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=Kh(this.containers,t=>-1!==t.modals.indexOf(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&Gh(e.modalRef,t),Zh(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&Gh(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const Jh=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Qh,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:d,rootRef:u}=e,p=We.useRef({}),h=We.useRef(null),m=We.useRef(null),f=(0,gr.A)(m,u),[g,v]=We.useState(!d),x=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let y=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(y=!1);const b=()=>(p.current.modalRef=m.current,p.current.mount=h.current,p.current),j=()=>{i.mount(b(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},w=(0,vr.A)(()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,xr.A)(h.current).body;i.add(b(),e),m.current&&j()}),_=We.useCallback(()=>i.isTopModal(b()),[i]),C=(0,vr.A)(e=>{h.current=e,e&&(d&&_()?j():m.current&&Gh(m.current,y))}),S=We.useCallback(()=>{i.remove(b(),y)},[y,i]);We.useEffect(()=>()=>{S()},[S]),We.useEffect(()=>{d?w():x&&o||S()},[d,S,x,o,w]);const A=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&_()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},k=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=th(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,Ft.A)({},n,t);return(0,Ft.A)({role:"presentation"},r,{onKeyDown:A(r),ref:f})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,Ft.A)({"aria-hidden":!0},e,{onClick:k(e),open:d})},getTransitionProps:()=>({onEnter:(0,Uh.A)(()=>{v(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:(0,Uh.A)(()=>{v(!0),s&&s(),o&&S()},null==l?void 0:l.props.onExited)}),rootRef:f,portalRef:C,isTopModal:_,exited:g,hasTransition:x}};function em(e){return(0,sr.Ay)("MuiModal",e)}(0,ar.A)("MuiModal",["root","hidden","backdrop"]);const tm=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],nm=(0,Un.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})}),rm=(0,Un.Ay)(Vh,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),im=We.forwardRef(function(e,t){var n,r,i,o,a,s;const l=(0,$t.b)({name:"MuiModal",props:e}),{BackdropComponent:c=rm,BackdropProps:d,className:u,closeAfterTransition:p=!1,children:h,container:m,component:f,components:g={},componentsProps:v={},disableAutoFocus:x=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:b=!1,disablePortal:j=!1,disableRestoreFocus:w=!1,disableScrollLock:_=!1,hideBackdrop:C=!1,keepMounted:S=!1,onBackdropClick:A,open:k,slotProps:M,slots:O}=l,T=(0,nn.A)(l,tm),E=(0,Ft.A)({},l,{closeAfterTransition:p,disableAutoFocus:x,disableEnforceFocus:y,disableEscapeKeyDown:b,disablePortal:j,disableRestoreFocus:w,disableScrollLock:_,hideBackdrop:C,keepMounted:S}),{getRootProps:P,getBackdropProps:D,getTransitionProps:R,portalRef:N,isTopModal:L,exited:I,hasTransition:F}=Jh((0,Ft.A)({},E,{rootRef:t})),$=(0,Ft.A)({},E,{exited:I}),B=(e=>{const{open:t,exited:n,classes:r}=e,i={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,ir.A)(i,em,r)})($),z={};if(void 0===h.props.tabIndex&&(z.tabIndex="-1"),F){const{onEnter:e,onExited:t}=R();z.onEnter=e,z.onExited=t}const H=null!=(n=null!=(r=null==O?void 0:O.root)?r:g.Root)?n:nm,W=null!=(i=null!=(o=null==O?void 0:O.backdrop)?o:g.Backdrop)?i:c,V=null!=(a=null==M?void 0:M.root)?a:v.root,U=null!=(s=null==M?void 0:M.backdrop)?s:v.backdrop,q=ah({elementType:H,externalSlotProps:V,externalForwardedProps:T,getSlotProps:P,additionalProps:{ref:t,as:f},ownerState:$,className:(0,nr.A)(u,null==V?void 0:V.className,null==B?void 0:B.root,!$.open&&$.exited&&(null==B?void 0:B.hidden))}),G=ah({elementType:W,externalSlotProps:U,additionalProps:d,getSlotProps:e=>D((0,Ft.A)({},e,{onClick:t=>{A&&A(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,nr.A)(null==U?void 0:U.className,null==d?void 0:d.className,null==B?void 0:B.backdrop),ownerState:$});return S||k||F&&!I?(0,Gt.jsx)(Nh,{ref:N,container:m,disablePortal:j,children:(0,Gt.jsxs)(H,(0,Ft.A)({},q,{children:[!C&&c?(0,Gt.jsx)(W,(0,Ft.A)({},G)):null,(0,Gt.jsx)(Dh,{disableEnforceFocus:y,disableAutoFocus:x,disableRestoreFocus:w,isEnabled:L,open:k,children:We.cloneElement(h,z)})]}))}):null}),om=im;function am(e){return(0,sr.Ay)("MuiPopover",e)}(0,ar.A)("MuiPopover",["root","paper"]);const sm=["onEntering"],lm=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],cm=["slotProps"];function dm(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function um(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function pm(e){return[e.horizontal,e.vertical].map(e=>"number"===typeof e?"".concat(e,"px"):e).join(" ")}function hm(e){return"function"===typeof e?e():e}const mm=(0,Un.Ay)(om,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),fm=(0,Un.Ay)(Uu,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),gm=We.forwardRef(function(e,t){var n,r,i;const o=(0,$t.b)({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:u,className:p,container:h,elevation:m=8,marginThreshold:f=16,open:g,PaperProps:v={},slots:x,slotProps:y,transformOrigin:b={vertical:"top",horizontal:"left"},TransitionComponent:j=Oh,transitionDuration:w="auto",TransitionProps:{onEntering:_}={},disableScrollLock:C=!1}=o,S=(0,nn.A)(o.TransitionProps,sm),A=(0,nn.A)(o,lm),k=null!=(n=null==y?void 0:y.paper)?n:v,M=We.useRef(),O=(0,Ln.A)(M,k.ref),T=(0,Ft.A)({},o,{anchorOrigin:l,anchorReference:d,elevation:m,marginThreshold:f,externalPaperSlotProps:k,transformOrigin:b,TransitionComponent:j,transitionDuration:w,TransitionProps:S}),E=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],paper:["paper"]},am,t)})(T),P=We.useCallback(()=>{if("anchorPosition"===d)return c;const e=hm(s),t=(e&&1===e.nodeType?e:(0,sh.A)(M.current).body).getBoundingClientRect();return{top:t.top+dm(t,l.vertical),left:t.left+um(t,l.horizontal)}},[s,l.horizontal,l.vertical,c,d]),D=We.useCallback(e=>({vertical:dm(e,b.vertical),horizontal:um(e,b.horizontal)}),[b.horizontal,b.vertical]),R=We.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if("none"===d)return{top:null,left:null,transformOrigin:pm(n)};const r=P();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,c=(0,Bn.A)(hm(s)),u=c.innerHeight-f,p=c.innerWidth-f;if(null!==f&&i<f){const e=i-f;i-=e,n.vertical+=e}else if(null!==f&&a>u){const e=a-u;i-=e,n.vertical+=e}if(null!==f&&o<f){const e=o-f;o-=e,n.horizontal+=e}else if(l>p){const e=l-p;o-=e,n.horizontal+=e}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(o),"px"),transformOrigin:pm(n)}},[s,d,P,D,f]),[N,L]=We.useState(g),I=We.useCallback(()=>{const e=M.current;if(!e)return;const t=R(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,L(!0)},[R]);We.useEffect(()=>(C&&window.addEventListener("scroll",I),()=>window.removeEventListener("scroll",I)),[s,C,I]);We.useEffect(()=>{g&&I()}),We.useImperativeHandle(a,()=>g?{updatePosition:()=>{I()}}:null,[g,I]),We.useEffect(()=>{if(!g)return;const e=(0,Nn.A)(()=>{I()}),t=(0,Bn.A)(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,g,I]);let F=w;"auto"!==w||j.muiSupportAuto||(F=void 0);const $=h||(s?(0,sh.A)(hm(s)).body:void 0),B=null!=(r=null==x?void 0:x.root)?r:mm,z=null!=(i=null==x?void 0:x.paper)?i:fm,H=ah({elementType:z,externalSlotProps:(0,Ft.A)({},k,{style:N?k.style:(0,Ft.A)({},k.style,{opacity:0})}),additionalProps:{elevation:m,ref:O},ownerState:T,className:(0,nr.A)(E.paper,null==k?void 0:k.className)}),W=ah({elementType:B,externalSlotProps:(null==y?void 0:y.root)||{},externalForwardedProps:A,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:$,open:g},ownerState:T,className:(0,nr.A)(E.root,p)}),{slotProps:V}=W,U=(0,nn.A)(W,cm);return(0,Gt.jsx)(B,(0,Ft.A)({},U,!Xp(B)&&{slotProps:V,disableScrollLock:C},{children:(0,Gt.jsx)(j,(0,Ft.A)({appear:!0,in:g,onEntering:(e,t)=>{_&&_(e,t),I()},onExited:()=>{L(!1)},timeout:F},S,{children:(0,Gt.jsx)(z,(0,Ft.A)({},H,{children:u}))}))}))}),vm=gm;function xm(e){return(0,sr.Ay)("MuiMenu",e)}(0,ar.A)("MuiMenu",["root","paper","list"]);const ym=["onEntering"],bm=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],jm={vertical:"top",horizontal:"right"},wm={vertical:"top",horizontal:"left"},_m=(0,Un.Ay)(vm,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Cm=(0,Un.Ay)(fm,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Sm=(0,Un.Ay)(_h,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Am=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:s,disableAutoFocusItem:l=!1,MenuListProps:c={},onClose:d,open:u,PaperProps:p={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:f}={},variant:g="selectedMenu",slots:v={},slotProps:x={}}=i,y=(0,nn.A)(i.TransitionProps,ym),b=(0,nn.A)(i,bm),j=dn(),w=(0,Ft.A)({},i,{autoFocus:o,disableAutoFocusItem:l,MenuListProps:c,onEntering:f,PaperProps:p,transitionDuration:m,TransitionProps:y,variant:g}),_=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],paper:["paper"],list:["list"]},xm,t)})(w),C=o&&!l&&u,S=We.useRef(null);let A=-1;We.Children.map(a,(e,t)=>{We.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===A)&&(A=t))});const k=null!=(n=v.paper)?n:Cm,M=null!=(r=x.paper)?r:p,O=ah({elementType:v.root,externalSlotProps:x.root,ownerState:w,className:[_.root,s]}),T=ah({elementType:k,externalSlotProps:M,ownerState:w,className:_.paper});return(0,Gt.jsx)(_m,(0,Ft.A)({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:j?"right":"left"},transformOrigin:j?jm:wm,slots:{paper:k,root:v.root},slotProps:{root:O,paper:T},open:u,ref:t,transitionDuration:m,TransitionProps:(0,Ft.A)({onEntering:(e,t)=>{S.current&&S.current.adjustStyleForScrollbar(e,{direction:j?"rtl":"ltr"}),f&&f(e,t)}},y),ownerState:w},b,{classes:h,children:(0,Gt.jsx)(Sm,(0,Ft.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:S,autoFocus:o&&(-1===A||l),autoFocusItem:C,variant:g},c,{className:(0,nr.A)(_.list,c.className),children:a}))}))}),km=Am;function Mm(e){return(0,sr.Ay)("MuiDivider",e)}const Om=(0,ar.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);function Tm(e){return(0,sr.Ay)("MuiListItemIcon",e)}const Em=(0,ar.A)("MuiListItemIcon",["root","alignItemsFlexStart"]);function Pm(e){return(0,sr.Ay)("MuiListItemText",e)}const Dm=(0,ar.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Rm(e){return(0,sr.Ay)("MuiMenuItem",e)}const Nm=(0,ar.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Lm=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Im=(0,Un.Ay)(Dp,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(Nm.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(Nm.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(Nm.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(Nm.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(Nm.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(Om.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(Om.inset)]:{marginLeft:52},["& .".concat(Dm.root)]:{marginTop:0,marginBottom:0},["& .".concat(Dm.inset)]:{paddingLeft:36},["& .".concat(Em.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,Ft.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(Em.root," svg")]:{fontSize:"1.25rem"}}))}),Fm=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:o=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:d,className:u}=n,p=(0,nn.A)(n,Lm),h=We.useContext(lh),m=We.useMemo(()=>({dense:o||h.dense||!1,disableGutters:s}),[h.dense,o,s]),f=We.useRef(null);(0,gh.A)(()=>{r&&f.current&&f.current.focus()},[r]);const g=(0,Ft.A)({},n,{dense:m.dense,divider:a,disableGutters:s}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e,s={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},l=(0,ir.A)(s,Rm,a);return(0,Ft.A)({},a,l)})(n),x=(0,Ln.A)(f,t);let y;return n.disabled||(y=void 0!==d?d:-1),(0,Gt.jsx)(lh.Provider,{value:m,children:(0,Gt.jsx)(Im,(0,Ft.A)({ref:x,role:c,tabIndex:y,component:i,focusVisibleClassName:(0,nr.A)(v.focusVisible,l),className:(0,nr.A)(v.root,u)},p,{ownerState:g,classes:v}))})}),$m=Fm;const Bm=n.p+"static/media/logo_full_white.2ee39096b15f737cb017dbcd9e20d4c4.svg";const zm=function(e){let{handleDrawerToggle:t,navItems:n}=e;const[r,i]=We.useState(null),o=Boolean(r),a=()=>{i(null)},s="primary-search-account-menu-mobile",l=(0,Gt.jsx)(km,{anchorEl:r,anchorOrigin:{vertical:"top",horizontal:"right"},id:s,keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:o,onClose:a,onClick:a,children:n.map(e=>(0,Gt.jsxs)($m,{to:e.url,component:Lo,children:[e.icon," \xa0 ",e.name]},e.id))});return(0,Gt.jsxs)(Xu,{component:"nav",children:[(0,Gt.jsxs)(Lu,{sx:{alignItems:"center"},children:[!1,(0,Gt.jsx)(Eu,{component:"div",sx:{flexGrow:1,display:"flex"},children:(0,Gt.jsx)("img",{src:Bm,height:42})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",md:"none"}},children:(0,Gt.jsx)(Kp,{size:"large","aria-label":"show more","aria-controls":s,"aria-haspopup":"true",onClick:e=>{i(e.currentTarget)},color:"inherit",children:(0,Gt.jsx)(Iu.A,{})})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"none"}},children:n.map(e=>(0,Gt.jsx)(Vp,{to:e.url,component:Lo,sx:{color:"#fff"},children:e.name},e.id))})]}),l]})};function Hm(e){return(0,sr.Ay)("MuiTypography",e)}(0,ar.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Wm=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Vm=(0,Un.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,Fu.A)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})}),Um={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},qm={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Gm=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTypography"}),r=(e=>qm[e]||e)(n.color),i=(0,Cu.A)((0,Ft.A)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:d=!1,variant:u="body1",variantMapping:p=Um}=i,h=(0,nn.A)(i,Wm),m=(0,Ft.A)({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:d,variant:u,variantMapping:p}),f=s||(d?"p":p[u]||Um[u])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e,s={root:["root",o,"inherit"!==e.align&&"align".concat((0,Fu.A)(t)),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,ir.A)(s,Hm,a)})(m);return(0,Gt.jsx)(Vm,(0,Ft.A)({as:f,ref:t,ownerState:m,className:(0,nr.A)(g.root,a)},h))}),Ym=Gm;const Zm=function(){return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"h4",component:"h1",children:"Privacy Policy"}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"Introduction"}),(0,Gt.jsxs)(Ym,{children:["Sarvika Technologies is a software solutions company fully committed to protecting your personal information and your right to privacy by adopting the best protective measures. Come up with any questions or concerns about our practices and privacy policy concerning personal information. You can contact us at"," ",(0,Gt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"}),".",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"This document is an electronic record under the provisions of the Information Technology Act, 2000, and relevant Rules framed there under (as applicable or amended from time to time). This document is published in accordance with the provisions of Rule 3 (1) of the Information Technology (Intermediaries guidelines) Rules, 2011 which require publishing the rules and regulations, privacy policy, and User agreement for access or usage of the website."]})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"Your consent"}),(0,Gt.jsxs)(Ym,{children:[(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,children:["(A.)"," "]})," ","YOU ARE HEREBY PROVIDING YOUR UNCONDITIONAL CONSENT AND AGREEMENT AS REQUIRED UNDER SECTION 43A AND SECTION 72A OF THE INFORMATION TECHNOLOGY ACT, 2000.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,children:["(B.)"," "]})," ","When you access our website and use any of our services, we believe and appreciate that you trust us with your personal information that we protect and preserve with utmost professionalism. The reason behind collecting personal information is to simply deliver the best possible solution designed around your requirements that bring you to us. Our strong view on personalization expects us to use the collected information and operate on giving tailored experiences to our users.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,children:["(C.)"," "]})," ","In this privacy policy, we have given our best efforts to explain to you the personal information we collect from your side, how we process it, and what rights are associated with it. It will be appreciated if you dedicate valuable time to read the privacy policy carefully and understand the following terms and conditions. In case our privacy policy doesn\u2019t comply with your understanding, you can discontinue accessing our services immediately.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,children:["(D.)"," "]})," ","This privacy policy also covers all sorts of information obtained through our services or sales, marketing, and related practices. We also reserve the right to alter/change the policy without providing any prior notification. Although, there will be the least chance of any changes that let us use your personal information posted during information collection unless ordered by any legislative body/ law.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,children:["(E.)"," "]})," ","Keeping your personal information safe is important to us. We will share the information with your consent as per the laws to deliver services and fulfill your business obligations. We may share your information when there is a legitimate requirement as per the governing body, law, court order, or legal process. The information can get shared if we find there is a violation of our policies, fraud, and threat situation faced by any individual or as a form of evidence. We may share your data with third-party vendors, service providers, healthcare experts, or hospitals who perform services for us or on our behalf and require access to such information to do that work."]})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"About the company"}),(0,Gt.jsxs)(Ym,{children:["Sarvika Technologies Pvt Ltd is located at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015. Our phone number is +91-141-4911243, and our email address is"," ",(0,Gt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"}),". The Remote Patient Monitoring Program covers devices and services used by individuals through their physician/ medical service provider.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"We are focused on safeguarding the protection and individual data of our clients, providers, and different partners. We regard your inclinations with respect to the assortment and utilization of your own data and the accompanying strategy sets out how we gather, store, use, and uncover individual data given to RPM."]})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",sx:{mb:2.5,fontWeight:600},children:"What does this Privacy Policy Cover?"}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Information we collect"]}),(0,Gt.jsx)(Ym,{children:"The information we obtain from our users that further divided into the following categories but is not limited to the mentioned categories"}),(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Demographic information"]}),(0,Gt.jsxs)(Eu,{component:"ul",children:[(0,Gt.jsx)(Eu,{component:"li",children:"Name "}),(0,Gt.jsx)(Eu,{component:"li",children:"Birth year"}),(0,Gt.jsx)(Eu,{component:"li",children:"Gender"}),(0,Gt.jsx)(Eu,{component:"li",children:"Weight"}),(0,Gt.jsx)(Eu,{component:"li",children:"Height"}),(0,Gt.jsx)(Eu,{component:"li",children:"Contact Number"}),(0,Gt.jsx)(Eu,{component:"li",children:"Email Id "}),(0,Gt.jsx)(Eu,{component:"li",children:"Location "}),(0,Gt.jsx)(Eu,{component:"li",children:"Country"}),(0,Gt.jsx)(Eu,{component:"li",children:"Preferred language"}),(0,Gt.jsx)(Eu,{component:"li",children:"Zip Code"})]}),(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Support Data"]}),(0,Gt.jsx)(Ym,{children:"IP Address - Only in case of troubleshooting any technical issue"}),(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Health-related information"]}),(0,Gt.jsxs)(Eu,{component:"ul",children:[(0,Gt.jsx)(Eu,{component:"li",children:"Family history"}),(0,Gt.jsx)(Eu,{component:"li",children:"Addiction History"}),(0,Gt.jsx)(Eu,{component:"li",children:"Personal Medical History"})]}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","How will we access your personal information?"]}),(0,Gt.jsxs)(Ym,{children:["We assure you that your provided information will be accessed for legitimate business purposes and won\u2019t be used for any sort of activity beyond the Indian geographical territories unless it","'","s legally bounded. Your information will be accessed by our employees only on a \u201cneed-to-know basis\u201d and will be strictly treated as confidential information. The information will only be disclosed when required by law, and we will take your consent before doing the same. Below are the following purposes for which your data will be processed"]}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Eu,{component:"ul",children:[(0,Gt.jsx)(Eu,{component:"li",children:"Fulfilling our purposes as per the terms of use"}),(0,Gt.jsx)(Eu,{component:"li",children:"Establish communication regarding managing your account"}),(0,Gt.jsx)(Eu,{component:"li",children:"Store and Track your data"}),(0,Gt.jsx)(Eu,{component:"li",children:"Request made by Public and Government authorities as per laws. "}),(0,Gt.jsx)(Eu,{component:"li",children:"Judicial Proceedings and Court orders"}),(0,Gt.jsx)(Eu,{component:"li",children:"Handling technical support "}),(0,Gt.jsx)(Eu,{component:"li",children:"Managing and improving our information"}),(0,Gt.jsx)(Eu,{component:"li",children:"Payment Process "}),(0,Gt.jsx)(Eu,{component:"li",children:"Quality Check of Services provided"}),(0,Gt.jsx)(Eu,{component:"li",children:"Security "}),(0,Gt.jsx)(Eu,{component:"li",children:"Monitoring health and overall condition"})]}),(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","How long do we keep your data with us?"]}),(0,Gt.jsx)(Ym,{children:"Your information will be kept with us till our purpose mentioned in the privacy policy gets accomplished. However, the period can be extended if there are any law-related requirements. Your personal information will be deleted or anonymized post-completion of our business objectives from our database. If your information is stored in the backup archives, we will be isolating and prohibiting its access for everyone. We won\u2019t be keeping your information with us for longer than 3 years."}),(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","What measures do we incorporate to keep your information safe?"]}),(0,Gt.jsxs)(Ym,{children:["We have implemented top-notch industry standards, and technical and organizational security measures to secure any sort of personal information. In any case, despite our protections and endeavors to get your data, no electronic transmission over the Web or data stockpiling innovation can guarantee to be 100 percent secure, so we can","'","t commit or assure that programmers, cybercriminals, or other unapproved outsiders can not overcome our security, and inappropriately gather, access, take, or adjust your data. Even though we will give our all to safeguard your data, the transmission of individual data to and from our Administrations is despite the danger. You ought to just access the Administrations inside a secure climate."]}),(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","Do we collect the information from individuals below 18 years?"]}),(0,Gt.jsxs)(Ym,{children:["Our personal information collects the present age of individuals who wish to access our service. In case, you present that you are below 18 years, we need the consent of your parents/guardians to use our services. For further information regarding this, connect with us at ",(0,Gt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})]}),(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","What privacy rights do you achieve?"]}),(0,Gt.jsxs)(Ym,{children:["As a service holder, you have complete rights to alter, review, or discontinue our service at any moment. In case, you are not satisfied with our services or have any other concerns, reach out to us at"," ",(0,Gt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})]}),(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:[" ","How can you protect your personal information?"]}),(0,Gt.jsxs)(Ym,{children:["It will be fruitful if we collectively work together in securing your device and personal information. There will be no emails from our end requesting your confidential information such as bank account number, user id, password, or any other crucial information. We strictly advise you to avoid responding to such emails. If you find an email asking for personal information that appears like it","'","s sent by us, notify our team to take further action.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"You bear complete responsibility to protect your personal information from disclosure to any third party. If you experience any suspicious activity that can directly/indirectly harm your personal information and raise security concerns, notify us at"," ",(0,Gt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"}),".",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"As per the data protection laws, below are the rights you possess regarding personal data.",(0,Gt.jsx)("br",{}),(0,Gt.jsxs)(Eu,{component:"ul",children:[(0,Gt.jsx)(Eu,{component:"li",children:"Access your data"}),(0,Gt.jsx)(Eu,{component:"li",children:"Erase your data as per the laws."}),(0,Gt.jsx)(Eu,{component:"li",children:"Access communication as per the processing of your data"}),(0,Gt.jsx)(Eu,{component:"li",children:"Restrict the processing of your data as per the limit permitted by the law."}),(0,Gt.jsxs)(Eu,{component:"li",children:["To object to the further processing of your data. For example \u2013 For Marketing Purposes."," "]}),(0,Gt.jsx)(Eu,{component:"li",children:"To inquire about transferring your data to a third party. "}),(0,Gt.jsxs)(Eu,{component:"li",children:["To receive your personal information in a structured and readable format."," "]}),(0,Gt.jsx)(Eu,{component:"li",children:"For making a complaint to a supervisory body"}),(0,Gt.jsx)(Eu,{component:"li",children:"Rectifying data if inaccurate"})]})]}),(0,Gt.jsxs)(Ym,{children:["If you have any questions or concerns regarding this privacy policy, please reach our team by email at ",(0,Gt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})," or write to us at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"Contact Us and reach our team if You have any questions about this Privacy Policy. Contact Us by email at ",(0,Gt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})," or write to us at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"Please note that email communications are vulnerable to security. So don\u2019t share any sensitive or confidential information via email.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"This Privacy Policy was last updated and reviewed on October 19, 2022."]})]})]})};const Km=function(){return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"h4",component:"h1",children:"Terms and Conditions"}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"Introduction"}),(0,Gt.jsxs)(Ym,{children:["This document is an electronic record in terms of the Information Technology Act, 2000 and the rules framed thereunder. This electronic record is generated by a computer system and does not require any physical or digital signatures.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"This document is published in accordance with the provisions of Rule 3 (1) of the Information Technology (Intermediaries Guidelines) Rules, 2011, and Rule 3(1) of Information Technology (Intermediary Guideline and Digital Media Ethic Code) Rules, 2021 that require publishing the rules and regulations, privacy policy and Terms of Use for access or usage of the ",(0,Gt.jsx)("a",{href:"https://www.rpmfy.com/",children:"https://www.rpmfy.com/"}),(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"This RPM application is owned and operated by Sarvika Technologies Pvt Ltd located at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015. Our phone number is +91-141-4911243, and our email address is ",(0,Gt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"}),".",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"ACCESSING, BROWSING, OR OTHERWISE USING THE PLATFORM (DEFINED HEREINAFTER) INDICATES YOUR ACCEPTANCE OF ALL THE TERMS AND CONDITIONS IN THESE TERMS OF USE. PLEASE READ THESE TERMS OF USE CAREFULLY BEFORE PROCEEDING. YOU DECLARE YOUR WILLINGNESS TO ABIDE AND BE BOUND BY THESE TERMS OF USE THROUGH YOUR USE OF THE PLATFORM. IF YOU DO NOT AGREE WITH THE TERMS OF USE, PLEASE DO NOT USE THE PLATFORM. THESE TERMS OF USE WILL BE EFFECTIVE IMMEDIATELY UPON YOUR ACCEPTANCE OF OUR TERMS AND CONDITIONS, YOUR USE OF OUR PLATFORM BEING INDICATIVE OF SUCH ACCEPTANCE. THESE TERMS OF USE SHALL BE ENFORCEABLE AGAINST YOU IN A THE SAME MANNER AS ANY OTHER WRITTEN AGREEMENT."]})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"TERMS OF USE"}),(0,Gt.jsxs)(Ym,{children:["Please carefully read and review the terms and conditions before using the services. The Terms and Conditions specified here govern the use of the application and its associated services. Clicking on the ",(0,Gt.jsx)("strong",{children:"I Agree"})," button signifies the acceptance of the terms and associated agreements. The terms and conditions can be modified/altered from time to time and duly applied to all users. The users need to accept the revised terms and conditions to continue using the service."]})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"GENERAL USE"}),(0,Gt.jsxs)(Ym,{children:["This application is part of a service intended for end users/patients to connect with doctors and hospitals.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"We use industry-oriented technologies created by Sarvika Technologies in consultation with seasoned health personnel to assess every user. Our goal is to be the elite standard medical device integrator that integrates smart devices to enable trained medical professionals to monitor patients and their health in real time based on scientific analysis. The collected data is then analyzed using a medical algorithm coordinated with various leading physicians.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"For producing better results in our operations, we may require patient information including sensitive personal information for collection, charting and analysis purposes, however, such information will only be collected with the consent of the patients/end users themselves and will not be sold. or share it with others. However, we may share the date with our trusted third partners such as doctors, hospitals, and medical institutions for health inspection purposes only.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"The app does not provide any sort of medical advice to its users and hence should not be used as a mechanism for self medicate. We are only providing the service of data collection meant to be used by healthcare personnel."]})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"WHAT ARE THE USER REQUIREMENTS?"}),(0,Gt.jsxs)(Ym,{children:["You have given confirmation that while you are using the application, your device\u2019s current location and Bluetooth will be active, essential for the accuracy of some of the operations performed by the application. Turning your device off or keeping it in airplane mode will interrupt providing correct health conditions. Apart from this, you also allowed media access permission to download and view the health report.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"You need to create your personal profile to use the application. The profile created by you will be having certain personal information that we strive to remain confidential. We do not generate or provide any sort of information on behalf of a user.",(0,Gt.jsx)("br",{}),(0,Gt.jsx)("br",{}),"You, as a user, bear complete responsibility for the accuracy of the information shared or uploaded while creating your profile. The user shall also justify that all the details of medical instruments used by them are accurate and correctly provided to the app."]})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"APP USE"}),(0,Gt.jsx)(Ym,{children:"You confirm that you will be using the application only for health-related purposes and will not circulate or mislead people in any way with the services. You also agree that you will not be participating in any sort of activity that leads to affecting the performance of the application. Lastly, you confirm that there will be no use of the application apart from its meant use."})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"DISRUPTION"}),(0,Gt.jsx)(Ym,{children:"You also agree that you are not expecting to access the service permanently and uninterruptedly. The services are intended to be accessed from any part of India 24*7, and we have given our best efforts regarding the same. However, the possibility of downtime can occur on a temporary or permanent basis for all or some users."})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"LIABILITY"}),(0,Gt.jsx)(Ym,{children:"Our team of IT experts has given their best efforts in creating this application and ensuring it performs at par with user expectations. However, we are not liable in case of app failure or any mishappening."})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"DISCLAIMER"}),(0,Gt.jsxs)(Ym,{children:["We have implemented top-notch industry standards, and technical and organizational security measures to secure any sort of personal information. In any case, despite our protections and endeavors to get your data, no electronic transmission over the Web or data stockpiling innovation can guarantee to be 100 percent secure, so we can","'","t commit or assure that programmers, cybercriminals, or other unapproved outsiders cannot overcome our security, and inappropriately gather, access, take, or adjust your data. We do not provide any warranty in case of a data breach or compatibility of the application. Even though we will give our all to safeguard your data, the transmission of individual data to and from our Administrations is despite the danger. You ought to just access the Administrations inside a secure climate."]})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"DEFECT REPORTING"}),(0,Gt.jsxs)(Ym,{children:["If you have any questions or concerns, please reach our team by email at"," ",(0,Gt.jsx)("a",{href:"mailto:rpmsupport@sarvika.com",children:"rpmsupport@sarvika.com"})," or write to us at Ganesham Trade Centre, 4th and 5th Floor, Gopal Nagar A, Ashok Vihar Ext, Gopalpura Bypass Rd, Jaipur, Rajasthan 302015."]})]}),(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{mb:2.5},children:"GOVERNING LAW"}),(0,Gt.jsx)(Ym,{children:"The Terms and conditions are as per the laws of India."})]})]})};var Xm=n(89751);const Qm=We.createContext();function Jm(e){return(0,sr.Ay)("MuiGrid",e)}const ef=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],tf=(0,ar.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>"spacing-xs-".concat(e)),...["column-reverse","column","row-reverse","row"].map(e=>"direction-xs-".concat(e)),...["nowrap","wrap-reverse","wrap"].map(e=>"wrap-xs-".concat(e)),...ef.map(e=>"grid-xs-".concat(e)),...ef.map(e=>"grid-sm-".concat(e)),...ef.map(e=>"grid-md-".concat(e)),...ef.map(e=>"grid-lg-".concat(e)),...ef.map(e=>"grid-xl-".concat(e))]),nf=tf,rf=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function of(e){const t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function af(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach(e=>{""===r&&0!==n[e]&&(r=e)});const i=Object.keys(t).sort((e,n)=>t[e]-t[n]);return i.slice(0,i.indexOf(r))}const sf=(0,Un.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let d=[];r&&(d=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n["spacing-xs-".concat(String(e))]];const r=[];return t.forEach(t=>{const i=e[t];Number(i)>0&&r.push(n["spacing-".concat(t,"-").concat(String(i))])}),r}(a,c,t));const u=[];return c.forEach(e=>{const r=n[e];r&&u.push(t["grid-".concat(e,"-").concat(String(r))])}),[t.root,r&&t.container,o&&t.item,l&&t.zeroMinWidth,...d,"row"!==i&&t["direction-xs-".concat(String(i))],"wrap"!==s&&t["wrap-xs-".concat(String(s))],...u]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})},function(e){let{theme:t,ownerState:n}=e;const r=(0,Xm.kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,Xm.NI)({theme:t},r,e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(nf.item)]={maxWidth:"none"}),t})},function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,Xm.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=af({breakpoints:t.breakpoints.values,values:e})),o=(0,Xm.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{marginTop:"-".concat(of(o)),["& > .".concat(nf.item)]:{paddingTop:of(o)}}:null!=(i=n)&&i.includes(r)?{}:{marginTop:0,["& > .".concat(nf.item)]:{paddingTop:0}}})}return o},function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,Xm.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=af({breakpoints:t.breakpoints.values,values:e})),o=(0,Xm.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{width:"calc(100% + ".concat(of(o),")"),marginLeft:"-".concat(of(o)),["& > .".concat(nf.item)]:{paddingLeft:of(o)}}:null!=(i=n)&&i.includes(r)?{}:{width:"100%",marginLeft:0,["& > .".concat(nf.item)]:{paddingLeft:0}}})}return o},function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce((e,i)=>{let o={};if(r[i]&&(t=r[i]),!t)return e;if(!0===t)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=(0,Xm.kW)({values:r.columns,breakpoints:n.breakpoints.values}),s="object"===typeof a?a[i]:a;if(void 0===s||null===s)return e;const l="".concat(Math.round(t/s*1e8)/1e6,"%");let c={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t="calc(".concat(l," + ").concat(of(e),")");c={flexBasis:t,maxWidth:t}}}o=(0,Ft.A)({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===n.breakpoints.values[i]?Object.assign(e,o):e[n.breakpoints.up(i)]=o,e},{})});const lf=e=>{const{classes:t,container:n,direction:r,item:i,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return["spacing-xs-".concat(String(e))];const n=[];return t.forEach(t=>{const r=e[t];if(Number(r)>0){const e="spacing-".concat(t,"-").concat(String(r));n.push(e)}}),n}(o,l));const d=[];l.forEach(t=>{const n=e[t];n&&d.push("grid-".concat(t,"-").concat(String(n)))});const u={root:["root",n&&"container",i&&"item",s&&"zeroMinWidth",...c,"row"!==r&&"direction-xs-".concat(String(r)),"wrap"!==a&&"wrap-xs-".concat(String(a)),...d]};return(0,ir.A)(u,Jm,t)},cf=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiGrid"}),{breakpoints:r}=In(),i=(0,Cu.A)(n),{className:o,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:d="row",item:u=!1,rowSpacing:p,spacing:h=0,wrap:m="wrap",zeroMinWidth:f=!1}=i,g=(0,nn.A)(i,rf),v=p||h,x=s||h,y=We.useContext(Qm),b=c?a||12:y,j={},w=(0,Ft.A)({},g);r.keys.forEach(e=>{null!=g[e]&&(j[e]=g[e],delete w[e])});const _=(0,Ft.A)({},i,{columns:b,container:c,direction:d,item:u,rowSpacing:v,columnSpacing:x,wrap:m,zeroMinWidth:f,spacing:h},j,{breakpoints:r.keys}),C=lf(_);return(0,Gt.jsx)(Qm.Provider,{value:b,children:(0,Gt.jsx)(sf,(0,Ft.A)({ownerState:_,className:(0,nr.A)(C.root,o),as:l,ref:t},w))})});const df=cf;function uf(e){return(0,sr.Ay)("MuiLink",e)}const pf=(0,ar.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var hf=n(17162);const mf={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},ff=e=>{let{theme:t,ownerState:n}=e;const r=(e=>mf[e]||e)(n.color),i=(0,hf.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,hf.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,$u.X4)(i,.4)},gf=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],vf=(0,Un.Ay)(Ym,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,Fu.A)(n.underline))],"button"===n.component&&t.button]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,Ft.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:ff({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(pf.focusVisible)]:{outline:"auto"}})}),xf=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiLink"}),{className:r,color:i="primary",component:o="a",onBlur:a,onFocus:s,TypographyClasses:l,underline:c="always",variant:d="inherit",sx:u}=n,p=(0,nn.A)(n,gf),{isFocusVisibleRef:h,onBlur:m,onFocus:f,ref:g}=(0,tp.A)(),[v,x]=We.useState(!1),y=(0,Ln.A)(t,g),b=(0,Ft.A)({},n,{color:i,component:o,focusVisible:v,underline:c,variant:d}),j=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root","underline".concat((0,Fu.A)(i)),"button"===n&&"button",r&&"focusVisible"]};return(0,ir.A)(o,uf,t)})(b);return(0,Gt.jsx)(vf,(0,Ft.A)({color:i,className:(0,nr.A)(j.root,r),classes:l,component:o,onBlur:e=>{m(e),!1===h.current&&x(!1),a&&a(e)},onFocus:e=>{f(e),!0===h.current&&x(!0),s&&s(e)},ref:y,ownerState:b,variant:d,sx:[...Object.keys(mf).includes(i)?[]:[{color:i}],...Array.isArray(u)?u:[u]]},p))}),yf=xf;const bf=function(){return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,sm:!0,children:(0,Gt.jsx)(Ym,{variant:"h4",component:"h1",children:"User Manual"})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{component:yf,color:"success",variant:"contained",href:window.location.origin+"/assets/pdf/omron_hem_7156.pdf",target:"_blank",download:!0,children:"Download user manual"})})]}),(0,Gt.jsx)(Eu,{mt:4,children:(0,Gt.jsx)("iframe",{src:window.location.origin+"/assets/pdf/omron_hem_7156.pdf",width:"100%",height:"576",frameBorder:"0"})})]})};const jf=function(){return(0,Gt.jsxs)(ko,{children:[(0,Gt.jsx)(So,{path:"privacy-policy",element:(0,Gt.jsx)(Zm,{})}),(0,Gt.jsx)(So,{path:"terms-and-condition",element:(0,Gt.jsx)(Km,{})}),(0,Gt.jsx)(So,{path:"user-manual",element:(0,Gt.jsx)(bf,{})})]})},wf=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],_f=(0,Un.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,$u.X4)(t.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,Ft.A)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,Ft.A)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),Cf=(0,Un.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),Sf=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:d=("hr"!==a?"separator":void 0),textAlign:u="center",variant:p="fullWidth"}=n,h=(0,nn.A)(n,wf),m=(0,Ft.A)({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:d,textAlign:u,variant:p}),f=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e,c={root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]};return(0,ir.A)(c,Mm,r)})(m);return(0,Gt.jsx)(_f,(0,Ft.A)({as:a,className:(0,nr.A)(f.root,o),role:d,ref:t,ownerState:m},h,{children:i?(0,Gt.jsx)(Cf,{className:f.wrapper,ownerState:m,children:i}):null}))});Sf.muiSkipListHighlight=!0;const Af=Sf;function kf(e){return(0,sr.Ay)("MuiDrawer",e)}(0,ar.A)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Mf=["BackdropProps"],Of=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],Tf=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},Ef=(0,Un.Ay)(om,{name:"MuiDrawer",slot:"Root",overridesResolver:Tf})(e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}}),Pf=(0,Un.Ay)("div",{shouldForwardProp:Ju.A,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Tf})({flex:"0 0 auto"}),Df=(0,Un.Ay)(Uu,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t["paperAnchor".concat((0,Fu.A)(n.anchor))],"temporary"!==n.variant&&t["paperAnchorDocked".concat((0,Fu.A)(n.anchor))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===n.anchor&&{left:0},"top"===n.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===n.anchor&&{right:0},"bottom"===n.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===n.anchor&&"temporary"!==n.variant&&{borderRight:"1px solid ".concat((t.vars||t).palette.divider)},"top"===n.anchor&&"temporary"!==n.variant&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider)},"right"===n.anchor&&"temporary"!==n.variant&&{borderLeft:"1px solid ".concat((t.vars||t).palette.divider)},"bottom"===n.anchor&&"temporary"!==n.variant&&{borderTop:"1px solid ".concat((t.vars||t).palette.divider)})}),Rf={left:"right",right:"left",top:"down",bottom:"up"};const Nf=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDrawer"}),r=In(),i=dn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:s,children:l,className:c,elevation:d=16,hideBackdrop:u=!1,ModalProps:{BackdropProps:p}={},onClose:h,open:m=!1,PaperProps:f={},SlideProps:g,TransitionComponent:v=Vn,transitionDuration:x=o,variant:y="temporary"}=n,b=(0,nn.A)(n.ModalProps,Mf),j=(0,nn.A)(n,Of),w=We.useRef(!1);We.useEffect(()=>{w.current=!0},[]);const _=function(e,t){let{direction:n}=e;return"rtl"===n&&function(e){return-1!==["left","right"].indexOf(e)}(t)?Rf[t]:t}({direction:i?"rtl":"ltr"},a),C=a,S=(0,Ft.A)({},n,{anchor:C,elevation:d,open:m,variant:y},j),A=(e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper","paperAnchor".concat((0,Fu.A)(n)),"temporary"!==r&&"paperAnchorDocked".concat((0,Fu.A)(n))]};return(0,ir.A)(i,kf,t)})(S),k=(0,Gt.jsx)(Df,(0,Ft.A)({elevation:"temporary"===y?d:0,square:!0},f,{className:(0,nr.A)(A.paper,f.className),ownerState:S,children:l}));if("permanent"===y)return(0,Gt.jsx)(Pf,(0,Ft.A)({className:(0,nr.A)(A.root,A.docked,c),ownerState:S,ref:t},j,{children:k}));const M=(0,Gt.jsx)(v,(0,Ft.A)({in:m,direction:Rf[_],timeout:x,appear:w.current},g,{children:k}));return"persistent"===y?(0,Gt.jsx)(Pf,(0,Ft.A)({className:(0,nr.A)(A.root,A.docked,c),ownerState:S,ref:t},j,{children:M})):(0,Gt.jsx)(Ef,(0,Ft.A)({BackdropProps:(0,Ft.A)({},s,p,{transitionDuration:x}),className:(0,nr.A)(A.root,A.modal,c),open:m,ownerState:S,onClose:h,hideBackdrop:u,ref:t},j,b,{children:M}))}),Lf=Nf;var If=n(27328);function Ff(e){return(0,sr.Ay)("MuiListItem",e)}const $f=(0,ar.A)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function Bf(e){return(0,sr.Ay)("MuiListItemButton",e)}const zf=(0,ar.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Hf(e){return(0,sr.Ay)("MuiListItemSecondaryAction",e)}(0,ar.A)("MuiListItemSecondaryAction",["root","disableGutters"]);const Wf=["className"],Vf=(0,Un.Ay)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})}),Uf=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,i=(0,nn.A)(n,Wf),o=We.useContext(lh),a=(0,Ft.A)({},n,{disableGutters:o.disableGutters}),s=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return(0,ir.A)(r,Hf,n)})(a);return(0,Gt.jsx)(Vf,(0,Ft.A)({className:(0,nr.A)(s.root,r),ownerState:a,ref:t},i))});Uf.muiName="ListItemSecondaryAction";const qf=Uf,Gf=["className"],Yf=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Zf=(0,Un.Ay)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!n.disablePadding&&(0,Ft.A)({paddingTop:8,paddingBottom:8},n.dense&&{paddingTop:4,paddingBottom:4},!n.disableGutters&&{paddingLeft:16,paddingRight:16},!!n.secondaryAction&&{paddingRight:48}),!!n.secondaryAction&&{["& > .".concat(zf.root)]:{paddingRight:48}},{["&.".concat($f.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat($f.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat($f.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat($f.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"flex-start"===n.alignItems&&{alignItems:"flex-start"},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},n.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat($f.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}}},n.hasSecondaryAction&&{paddingRight:48})}),Kf=(0,Un.Ay)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Xf=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:i=!1,button:o=!1,children:a,className:s,component:l,components:c={},componentsProps:d={},ContainerComponent:u="li",ContainerProps:{className:p}={},dense:h=!1,disabled:m=!1,disableGutters:f=!1,disablePadding:g=!1,divider:v=!1,focusVisibleClassName:x,secondaryAction:y,selected:b=!1,slotProps:j={},slots:w={}}=n,_=(0,nn.A)(n.ContainerProps,Gf),C=(0,nn.A)(n,Yf),S=We.useContext(lh),A=We.useMemo(()=>({dense:h||S.dense||!1,alignItems:r,disableGutters:f}),[r,S.dense,h,f]),k=We.useRef(null);(0,gh.A)(()=>{i&&k.current&&k.current.focus()},[i]);const M=We.Children.toArray(a),O=M.length&&(0,If.A)(M[M.length-1],["ListItemSecondaryAction"]),T=(0,Ft.A)({},n,{alignItems:r,autoFocus:i,button:o,dense:A.dense,disabled:m,disableGutters:f,disablePadding:g,divider:v,hasSecondaryAction:O,selected:b}),E=(e=>{const{alignItems:t,button:n,classes:r,dense:i,disabled:o,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:d}=e,u={root:["root",i&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",o&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",d&&"selected"],container:["container"]};return(0,ir.A)(u,Ff,r)})(T),P=(0,Ln.A)(k,t),D=w.root||c.Root||Zf,R=j.root||d.root||{},N=(0,Ft.A)({className:(0,nr.A)(E.root,R.className,s),disabled:m},C);let L=l||"li";return o&&(N.component=l||"div",N.focusVisibleClassName=(0,nr.A)($f.focusVisible,x),L=Dp),O?(L=N.component||l?L:"div","li"===u&&("li"===L?L="div":"li"===N.component&&(N.component="div")),(0,Gt.jsx)(lh.Provider,{value:A,children:(0,Gt.jsxs)(Kf,(0,Ft.A)({as:u,className:(0,nr.A)(E.container,p),ref:P,ownerState:T},_,{children:[(0,Gt.jsx)(D,(0,Ft.A)({},R,!Xp(D)&&{as:L,ownerState:(0,Ft.A)({},T,R.ownerState)},N,{children:M})),M.pop()]}))})):(0,Gt.jsx)(lh.Provider,{value:A,children:(0,Gt.jsxs)(D,(0,Ft.A)({},R,{as:L,ref:P},!Xp(D)&&{ownerState:(0,Ft.A)({},T,R.ownerState)},N,{children:[M,y&&(0,Gt.jsx)(qf,{children:y})]}))})}),Qf=Xf,Jf=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],eg=(0,Un.Ay)(Dp,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(zf.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(zf.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(zf.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(zf.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(zf.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},"flex-start"===n.alignItems&&{alignItems:"flex-start"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.dense&&{paddingTop:4,paddingBottom:4})}),tg=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:d,selected:u=!1,className:p}=n,h=(0,nn.A)(n,Jf),m=We.useContext(lh),f=We.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:l}),[r,m.dense,s,l]),g=We.useRef(null);(0,gh.A)(()=>{i&&g.current&&g.current.focus()},[i]);const v=(0,Ft.A)({},n,{alignItems:r,dense:f.dense,disableGutters:l,divider:c,selected:u}),x=(e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e,l={root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},c=(0,ir.A)(l,Bf,n);return(0,Ft.A)({},n,c)})(v),y=(0,Ln.A)(g,t);return(0,Gt.jsx)(lh.Provider,{value:f,children:(0,Gt.jsx)(eg,(0,Ft.A)({ref:y,href:h.href||h.to,component:(h.href||h.to)&&"div"===o?"button":o,focusVisibleClassName:(0,nr.A)(x.focusVisible,d),ownerState:v,className:(0,nr.A)(x.root,p)},h,{classes:x,children:a}))})}),ng=tg,rg=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],ig=(0,Un.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Dm.primary)]:t.primary},{["& .".concat(Dm.secondary)]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})}),og=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:d}=n,u=(0,nn.A)(n,rg),{dense:p}=We.useContext(lh);let h=null!=s?s:r,m=c;const f=(0,Ft.A)({},n,{disableTypography:o,inset:a,primary:!!h,secondary:!!m,dense:p}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e,a={root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,ir.A)(a,Pm,t)})(f);return null==h||h.type===Ym||o||(h=(0,Gt.jsx)(Ym,(0,Ft.A)({variant:p?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:h}))),null==m||m.type===Ym||o||(m=(0,Gt.jsx)(Ym,(0,Ft.A)({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},d,{children:m}))),(0,Gt.jsxs)(ig,(0,Ft.A)({className:(0,nr.A)(g.root,i),ownerState:f,ref:t},u,{children:[h,m]}))}),ag=og;const sg=n.p+"static/media/logo_full.c89d2e4fb360a725941231da5d66fa99.svg";const lg=function(e){let{navItems:t,mobileOpen:n,handleDrawerToggle:r,container:i,drawerWidth:o}=e;const a=(0,Gt.jsxs)(Eu,{onClick:r,sx:{textAlign:"center"},children:[(0,Gt.jsx)(Ym,{variant:"h6",sx:{my:2},children:(0,Gt.jsx)("img",{src:sg,height:48})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(hh,{children:t.map(e=>(0,Gt.jsx)(Qf,{disablePadding:!0,children:(0,Gt.jsx)(ng,{sx:{textAlign:"center"},children:(0,Gt.jsx)(ag,{primary:e.name})})},e.id))})]});return(0,Gt.jsx)(Eu,{component:"nav",children:(0,Gt.jsx)(Lf,{container:i,variant:"temporary",open:n,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",sm:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:o}},children:a})})};const cg=function(e){const{window:t}=e,[n,r]=We.useState(!1),i=()=>{r(!n)},o=void 0!==t?()=>t().document.body:void 0,a=[{id:1,name:"Privacy Policy",url:"/legal/privacy-policy",icon:(0,Gt.jsx)(yu.A,{})},{id:2,name:"Term & Condition",url:"/legal/terms-and-condition",icon:(0,Gt.jsx)(bu.A,{})}];return(0,Gt.jsxs)(Eu,{sx:{display:"flex"},children:[(0,Gt.jsx)(zm,{handleDrawerToggle:i,navItems:a}),(0,Gt.jsx)(Eu,{component:"nav",children:(0,Gt.jsx)(lg,{mobileOpen:n,handleDrawerToggle:i,container:o,drawerWidth:240,navItems:a})}),(0,Gt.jsxs)(Eu,{component:"main",sx:{p:3,maxWidth:1024,mx:"auto",width:"100%"},children:[(0,Gt.jsx)(Lu,{}),(0,Gt.jsx)(jf,{})]})]})};function dg(e,t){return g(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||y(e,t)||b()}function ug(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"===typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var pg={};function hg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"===typeof t[0]&&pg[t[0]]||("string"===typeof t[0]&&(pg[t[0]]=new Date),ug.apply(void 0,t))}function mg(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{e.on("initialized",function t(){setTimeout(function(){e.off("initialized",t)},0),n()})}})}function fg(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 gg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fg(Object(n),!0).forEach(function(t){(0,f.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=(0,We.useContext)(Qe)||{},i=r.i18n,o=r.defaultNS,a=n||i||et();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Je),!a){hg("You will need to pass in an i18next instance by using initReactI18next");var s=function(e){return Array.isArray(e)?e[e.length-1]:e},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&void 0!==a.options.react.wait&&hg("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=gg(gg(gg({},Xe),a.options.react),t),d=c.useSuspense,u=c.keyPrefix,p=e||o||a.options&&a.options.defaultNS;p="string"===typeof p?[p]:p||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(p);var h=(a.isInitialized||a.initializedStoreOnce)&&p.every(function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!a(r,e)||i&&!a(o,e)))}(e,t,n):(hg("i18n.languages were undefined or empty",t.languages),!0)}(e,a,c)});function m(){return a.getFixedT(null,"fallback"===c.nsMode?p:p[0],u)}var f=dg((0,We.useState)(m),2),g=f[0],v=f[1],x=p.join(),y=function(e,t){var n=(0,We.useRef)();return(0,We.useEffect)(function(){n.current=t?n.current:e},[e,t]),n.current}(x),b=(0,We.useRef)(!0);(0,We.useEffect)(function(){var e=c.bindI18n,t=c.bindI18nStore;function n(){b.current&&v(m)}return b.current=!0,h||d||mg(a,p,function(){b.current&&v(m)}),h&&y&&y!==x&&b.current&&v(m),e&&a&&a.on(e,n),t&&a&&a.store.on(t,n),function(){b.current=!1,e&&a&&e.split(" ").forEach(function(e){return a.off(e,n)}),t&&a&&t.split(" ").forEach(function(e){return a.store.off(e,n)})}},[a,x]);var j=(0,We.useRef)(!0);(0,We.useEffect)(function(){b.current&&!j.current&&v(m),j.current=!1},[a,u]);var w=[g,a,h];if(w.t=g,w.i18n=a,w.ready=h,h)return w;if(!h&&!d)return w;throw new Promise(function(e){mg(a,p,function(){e()})})}const xg=function(){const{t:e}=vg(),t=so();return(0,Gt.jsxs)(Eu,{sx:{mt:25,textAlign:"center"},children:[(0,Gt.jsx)(Ym,{variant:"h3",component:"h3",sx:{fontWeight:600,fontSize:{xs:"h4.fontSize",md:"h3.fontSize"}},children:"404"}),(0,Gt.jsx)(Ym,{variant:"h1",component:"h1",sx:{fontSize:{xs:"h3.fontSize",md:"h2.fontSize"}},children:"Not Found"}),(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>t("/"),children:e("rpm_BackToHome")})]})},yg=function(e){if(null===(null===e||void 0===e?void 0:e.updated_at))return!1;e.updated_at=sa()(e.updated_at).format("DD MMM YYYY hh:mm A")},bg=e=>async t=>{t(na(!0));const n=(0,i.A)((0,i.A)({},e),{},{image:await ws(null===e||void 0===e?void 0:e.image)});try{const e="".concat(la.program);return await du(e,n)}finally{t(na(!1))}},jg=e=>async t=>{t(na(!0));const n={display_name:e.display_name,country:e.country,state:e.state,city:e.city,address:e.address,image:await ws(e.image),def:e.def,facility_type:null===e||void 0===e?void 0:e.facility_type};try{const t="".concat(la.program,"/").concat(e.id);return await uu(t,n)}finally{t(na(!1))}},wg=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"?&programName=").concat((null===t||void 0===t?void 0:t.programName)||"","&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||""),r=await cu(n,{});return oa()(r,"data.content",[]).forEach(e=>yg(e)),r}catch(r){return r}finally{n(na(!1))}},_g=e=>async t=>{t(na(!0));try{const t="".concat(la.program,"/").concat(e,"/download/qr"),n=await cu(t,{responseType:"arraybuffer"}),r=new Blob([null===n||void 0===n?void 0:n.data],{type:"image/png"});return(0,ra.saveAs)(r,"".concat(e,"-qr.png")),null===n||void 0===n?void 0:n.data}catch(n){return console.error(n),n}finally{t(na(!1))}},Cg=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"/").concat(e,"/rules?page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"","&dataName=").concat(t.dataName||"","&includeInactive=").concat(t.includeInactive||""),r=await cu(n,{});return oa()(r,"data.content",[]).forEach(e=>yg(e)),r}finally{n(na(!1))}},Sg=(e,t)=>async n=>{n(na(!0));const r=(0,i.A)((0,i.A)({},t),{},{data_batch_size:"BATCH"===(null===t||void 0===t?void 0:t.processing_mode)?null===t||void 0===t?void 0:t.data_batch_size:"",status:!0,default_rule:!0});try{const t="".concat(la.program,"/").concat(e,"/rules");return await du(t,r)}finally{n(na(!1))}},Ag=e=>async t=>{t(na(!0));try{const t="".concat(la.program,"/").concat(null===e||void 0===e?void 0:e.programId,"/rules/").concat(null===e||void 0===e?void 0:e.ruleId,"?rule_status=").concat(null===e||void 0===e?void 0:e.status,"&default_rule=").concat(null===e||void 0===e?void 0:e.defaultRule);return await uu(t,{})}finally{t(na(!1))}},kg=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"/").concat(e,"/rules/").concat(t);return await cu(n,{})}catch(r){return r}finally{n(na(!1))}},Mg=e=>async t=>{t(na(!0));try{const t="".concat(la.program,"/").concat(null===e||void 0===e?void 0:e.programId,"/rules?vital=").concat(null===e||void 0===e?void 0:e.data_type,"&ruleId=").concat(null===e||void 0===e?void 0:e.ruleId);return await pu(t,{})}finally{t(na(!1))}},Og=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"/").concat(e,"/notification-settings");return await du(n,t)}finally{n(na(!1))}},Tg=e=>async t=>{t(na(!0));try{const n="".concat(la.program,"/").concat(e,"/notification-settings"),r=await cu(n,{});return await t({type:Go,payload:r.data}),r}catch(n){return n}finally{t(na(!1))}},Eg=e=>async t=>{t(na(!0));const n=$o.getAccessToken();try{const t="".concat(la.program,"/list-program?tenant_id=").concat(null===n||void 0===n?void 0:n.accountId);return await du(t,e)}catch(r){return r}finally{t(na(!1))}},Pg=e=>async t=>{t(na(!0));try{const t="".concat(fa.logs,"/events/").concat(e);return await cu(t,{})}catch(n){return n}finally{t(na(!1))}},Dg=function(e){as(e)||(e.updated_at=us(e.updated_at,Wc),e.created_at=us(e.created_at,Wc))},Rg=e=>async t=>{t(na(!0));try{let t=e.kind===Gc.CUSTOM||e.kind===Gc.PREDEFINED?"".concat(ma.ROLES,"?kind=").concat(e.kind,"&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"name","&sortOrder=").concat(e.sort_order||"desc","&q=").concat(e.q||"","&include_children=false"):"".concat(ma.ROLES,"?kind=").concat(e.kind,"&include_children=false");e.programId?t+="&path=".concat(e.programId):t+="&path=/";return await cu(t,{})}finally{t(na(!1))}},Ng=(e,t)=>async n=>{n(na(!0));try{const n="".concat(ma.POLICY,"/").concat(e,"/set-grants");await uu(n,t)}finally{n(na(!1))}},Lg=e=>async t=>{t(na(!0));try{let t="".concat(ma.USERS,"?page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"name","&sortOrder=").concat(e.sort_order||"desc","&q=").concat(e.q||"","&include_children=false");e.programId?t+="&path=/RPMCORE/".concat(e.programId,"/"):t+="&path=/";return await cu(t,{})}catch(n){return n}finally{t(na(!1))}},Ig=(e,t)=>async n=>{n(na(!0));const r="".concat(ma.USERS,"/").concat(e,"/set-roles");try{return await uu(r,t)}finally{n(na(!1))}},Fg=e=>async t=>{t(na(!0));const n="".concat(ma.USERS,"/").concat(e);try{const e=await cu(n);return Hg(e.data),e}finally{t(na(!1))}},$g=e=>async t=>{t(na(!0));const n="".concat(ma.GROUP,"?&sortBy=").concat(e.sort_by||"name","&sortOrder=").concat(e.sort_order||"","&perPage=").concat(e.per_page||"","&path=").concat(e.path||"","&display_text=").concat(e.display_text||"","&include_child=").concat(e.include_child||"");try{return await cu(n)}finally{t(na(!1))}},Bg=(e,t,n)=>async(r,o)=>{var a;const s=o(),{id:l,email:c,attributes:d,first_name:u,last_name:p}=(null===(a=qd(s))||void 0===a?void 0:a.user_principal)||{},h="".concat(ma.USERS,"/").concat(l),m={first_name:u,last_name:p,email:c,attributes:(0,i.A)((0,i.A)({},d),e)};try{await uu(h,m),r(Jd()),$o.clearTourState(),"function"===typeof t&&t()}catch(f){"function"===typeof n&&n(f)}},zg=(e,t)=>async n=>{n(na(!0));let r="".concat(ma.USERS,"/").concat(e,"/groups/join?path=").concat(t);try{return await du(r)}finally{n(na(!1))}},Hg=function(e){as(e)||(as(e.attributes)?e.attributes={}:e.attributes=Object.keys(e.attributes).reduce((t,n)=>(t[n]=e.attributes[n][0],t),{}))};function Wg(e){return(0,sr.Ay)("MuiFab",e)}const Vg=(0,ar.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),Ug=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],qg=(0,Un.Ay)(Dp,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,Fu.A)(n.size))],"inherit"===n.color&&t.colorInherit,t[(0,Fu.A)(n.size)],t[n.color]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;return(0,Ft.A)({},t.typography.button,{minHeight:36,transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(t.vars||t).zIndex.fab,boxShadow:(t.vars||t).shadows[6],"&:active":{boxShadow:(t.vars||t).shadows[12]},color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],"&:hover":{backgroundColor:(t.vars||t).palette.grey.A100,"@media (hover: none)":{backgroundColor:(t.vars||t).palette.grey[300]},textDecoration:"none"},["&.".concat(Vg.focusVisible)]:{boxShadow:(t.vars||t).shadows[6]}},"small"===n.size&&{width:40,height:40},"medium"===n.size&&{width:48,height:48},"extended"===n.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===n.variant&&"small"===n.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===n.variant&&"medium"===n.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===n.color&&{color:"inherit"})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},"inherit"!==n.color&&"default"!==n.color&&null!=(t.vars||t).palette[n.color]&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}})},e=>{let{theme:t}=e;return{["&.".concat(Vg.disabled)]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),Gg=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFab"}),{children:r,className:i,color:o="default",component:a="button",disabled:s=!1,disableFocusRipple:l=!1,focusVisibleClassName:c,size:d="large",variant:u="circular"}=n,p=(0,nn.A)(n,Ug),h=(0,Ft.A)({},n,{color:o,component:a,disabled:s,disableFocusRipple:l,size:d,variant:u}),m=(e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,"size".concat((0,Fu.A)(i)),"inherit"===t?"colorInherit":t]},a=(0,ir.A)(o,Wg,r);return(0,Ft.A)({},r,a)})(h);return(0,Gt.jsx)(qg,(0,Ft.A)({className:(0,nr.A)(m.root,i),component:a,disabled:s,focusRipple:!l,focusVisibleClassName:(0,nr.A)(m.focusVisible,c),ownerState:h,ref:t},p,{classes:m,children:r}))}),Yg=Gg,Zg=(0,We.createContext)();const Kg=n.p+"static/media/logo_blue_hr.2014dcec22d3379a30014da6ba84b69e.svg";const Xg=n.p+"static/media/logo_icon.172254f5e27af4f50019a7580aba5efd.svg";var Qg=n(85473),Jg=n(21337);const ev=["className"],tv=(0,Un.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===n.alignItems&&{marginTop:8})}),nv=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=(0,nn.A)(n,ev),o=We.useContext(lh),a=(0,Ft.A)({},n,{alignItems:o.alignItems}),s=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,ir.A)(r,Tm,n)})(a);return(0,Gt.jsx)(tv,(0,Ft.A)({className:(0,nr.A)(s.root,r),ownerState:a,ref:t},i))}),rv=nv;var iv=n(92374);function ov(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function av(e){return e instanceof ov(e).Element||e instanceof Element}function sv(e){return e instanceof ov(e).HTMLElement||e instanceof HTMLElement}function lv(e){return"undefined"!==typeof ShadowRoot&&(e instanceof ov(e).ShadowRoot||e instanceof ShadowRoot)}var cv=Math.max,dv=Math.min,uv=Math.round;function pv(){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 hv(){return!/^((?!chrome|android).)*safari/i.test(pv())}function mv(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&sv(e)&&(i=e.offsetWidth>0&&uv(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&uv(r.height)/e.offsetHeight||1);var a=(av(e)?ov(e):window).visualViewport,s=!hv()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/i,c=(r.top+(s&&a?a.offsetTop:0))/o,d=r.width/i,u=r.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function fv(e){var t=ov(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function gv(e){return e?(e.nodeName||"").toLowerCase():null}function vv(e){return((av(e)?e.ownerDocument:e.document)||window.document).documentElement}function xv(e){return mv(vv(e)).left+fv(e).scrollLeft}function yv(e){return ov(e).getComputedStyle(e)}function bv(e){var t=yv(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function jv(e,t,n){void 0===n&&(n=!1);var r=sv(t),i=sv(t)&&function(e){var t=e.getBoundingClientRect(),n=uv(t.width)/e.offsetWidth||1,r=uv(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=vv(t),a=mv(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==gv(t)||bv(o))&&(s=function(e){return e!==ov(e)&&sv(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:fv(e);var t}(t)),sv(t)?((l=mv(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=xv(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function wv(e){var t=mv(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 _v(e){return"html"===gv(e)?e:e.assignedSlot||e.parentNode||(lv(e)?e.host:null)||vv(e)}function Cv(e){return["html","body","#document"].indexOf(gv(e))>=0?e.ownerDocument.body:sv(e)&&bv(e)?e:Cv(_v(e))}function Sv(e,t){var n;void 0===t&&(t=[]);var r=Cv(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=ov(r),a=i?[o].concat(o.visualViewport||[],bv(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Sv(_v(a)))}function Av(e){return["table","td","th"].indexOf(gv(e))>=0}function kv(e){return sv(e)&&"fixed"!==yv(e).position?e.offsetParent:null}function Mv(e){for(var t=ov(e),n=kv(e);n&&Av(n)&&"static"===yv(n).position;)n=kv(n);return n&&("html"===gv(n)||"body"===gv(n)&&"static"===yv(n).position)?t:n||function(e){var t=/firefox/i.test(pv());if(/Trident/i.test(pv())&&sv(e)&&"fixed"===yv(e).position)return null;var n=_v(e);for(lv(n)&&(n=n.host);sv(n)&&["html","body"].indexOf(gv(n))<0;){var r=yv(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Ov="top",Tv="bottom",Ev="right",Pv="left",Dv="auto",Rv=[Ov,Tv,Ev,Pv],Nv="start",Lv="end",Iv="viewport",Fv="popper",$v=Rv.reduce(function(e,t){return e.concat([t+"-"+Nv,t+"-"+Lv])},[]),Bv=[].concat(Rv,[Dv]).reduce(function(e,t){return e.concat([t,t+"-"+Nv,t+"-"+Lv])},[]),zv=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Hv(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 Wv(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var Vv={placement:"bottom",modifiers:[],strategy:"absolute"};function Uv(){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 qv(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?Vv:i;return function(e,t,n){void 0===n&&(n=o);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},Vv,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:i,setOptions:function(n){var s="function"===typeof n?n(i.options):n;c(),i.options=Object.assign({},o,i.options,s),i.scrollParents={reference:av(e)?Sv(e):e.contextElement?Sv(e.contextElement):[],popper:Sv(t)};var d=function(e){var t=Hv(e);return zv.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}(function(e){var t=e.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},{});return Object.keys(t).map(function(e){return t[e]})}([].concat(r,i.options.modifiers)));return i.orderedModifiers=d.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 s=o({state:i,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}}),l.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(Uv(t,n)){i.rects={reference:jv(t,Mv(n),"fixed"===i.options.strategy),popper:wv(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:l})||i)}else i.reset=!1,r=-1}}},update:Wv(function(){return new Promise(function(e){l.forceUpdate(),e(i)})}),destroy:function(){c(),s=!0}};if(!Uv(e,t))return l;function c(){a.forEach(function(e){return e()}),a=[]}return l.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}}var Gv={passive:!0};const Yv={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,s=void 0===a||a,l=ov(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,Gv)}),s&&l.addEventListener("resize",n.update,Gv),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,Gv)}),s&&l.removeEventListener("resize",n.update,Gv)}},data:{}};function Zv(e){return e.split("-")[0]}function Kv(e){return e.split("-")[1]}function Xv(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Qv(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?Zv(i):null,a=i?Kv(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Ov:t={x:s,y:n.y-r.height};break;case Tv:t={x:s,y:n.y+n.height};break;case Ev:t={x:n.x+n.width,y:l};break;case Pv:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?Xv(o):null;if(null!=c){var d="y"===c?"height":"width";switch(a){case Nv:t[c]=t[c]-(n[d]/2-r[d]/2);break;case Lv:t[c]=t[c]+(n[d]/2-r[d]/2)}}return t}var Jv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ex(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,p=a.x,h=void 0===p?0:p,m=a.y,f=void 0===m?0:m,g="function"===typeof d?d({x:h,y:f}):{x:h,y:f};h=g.x,f=g.y;var v=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),y=Pv,b=Ov,j=window;if(c){var w=Mv(n),_="clientHeight",C="clientWidth";if(w===ov(n)&&"static"!==yv(w=vv(n)).position&&"absolute"===s&&(_="scrollHeight",C="scrollWidth"),i===Ov||(i===Pv||i===Ev)&&o===Lv)b=Tv,f-=(u&&w===j&&j.visualViewport?j.visualViewport.height:w[_])-r.height,f*=l?1:-1;if(i===Pv||(i===Ov||i===Tv)&&o===Lv)y=Ev,h-=(u&&w===j&&j.visualViewport?j.visualViewport.width:w[C])-r.width,h*=l?1:-1}var S,A=Object.assign({position:s},c&&Jv),k=!0===d?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:uv(n*i)/i||0,y:uv(r*i)/i||0}}({x:h,y:f},ov(n)):{x:h,y:f};return h=k.x,f=k.y,l?Object.assign({},A,((S={})[b]=x?"0":"",S[y]=v?"0":"",S.transform=(j.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",S)):Object.assign({},A,((t={})[b]=x?f+"px":"",t[y]=v?h+"px":"",t.transform="",t))}const tx={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];sv(i)&&gv(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},{});sv(r)&&gv(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};const nx={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=Bv.reduce(function(e,n){return e[n]=function(e,t,n){var r=Zv(e),i=[Pv,Ov].indexOf(r)>=0?-1:1,o="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Pv,Ev].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var rx={left:"right",right:"left",bottom:"top",top:"bottom"};function ix(e){return e.replace(/left|right|bottom|top/g,function(e){return rx[e]})}var ox={start:"end",end:"start"};function ax(e){return e.replace(/start|end/g,function(e){return ox[e]})}function sx(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&lv(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function lx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function cx(e,t,n){return t===Iv?lx(function(e,t){var n=ov(e),r=vv(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=hv();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+xv(e),y:l}}(e,n)):av(t)?function(e,t){var n=mv(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):lx(function(e){var t,n=vv(e),r=fv(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=cv(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=cv(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+xv(e),l=-r.scrollTop;return"rtl"===yv(i||n).direction&&(s+=cv(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(vv(e)))}function dx(e,t,n,r){var i="clippingParents"===t?function(e){var t=Sv(_v(e)),n=["absolute","fixed"].indexOf(yv(e).position)>=0&&sv(e)?Mv(e):e;return av(n)?t.filter(function(e){return av(e)&&sx(e,n)&&"body"!==gv(e)}):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(t,n){var i=cx(e,n,r);return t.top=cv(i.top,t.top),t.right=dv(i.right,t.right),t.bottom=dv(i.bottom,t.bottom),t.left=cv(i.left,t.left),t},cx(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ux(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function px(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function hx(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,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,d=void 0===c?Iv:c,u=n.elementContext,p=void 0===u?Fv:u,h=n.altBoundary,m=void 0!==h&&h,f=n.padding,g=void 0===f?0:f,v=ux("number"!==typeof g?g:px(g,Rv)),x=p===Fv?"reference":Fv,y=e.rects.popper,b=e.elements[m?x:p],j=dx(av(b)?b:b.contextElement||vv(e.elements.popper),l,d,a),w=mv(e.elements.reference),_=Qv({reference:w,element:y,strategy:"absolute",placement:i}),C=lx(Object.assign({},y,_)),S=p===Fv?C:w,A={top:j.top-S.top+v.top,bottom:S.bottom-j.bottom+v.bottom,left:j.left-S.left+v.left,right:S.right-j.right+v.right},k=e.modifiersData.offset;if(p===Fv&&k){var M=k[i];Object.keys(A).forEach(function(e){var t=[Ev,Tv].indexOf(e)>=0?1:-1,n=[Ov,Tv].indexOf(e)>=0?"y":"x";A[e]+=M[n]*t})}return A}const mx={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,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,d=n.boundary,u=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,m=void 0===h||h,f=n.allowedAutoPlacements,g=t.options.placement,v=Zv(g),x=l||(v===g||!m?[ix(g)]:function(e){if(Zv(e)===Dv)return[];var t=ix(e);return[ax(e),t,ax(t)]}(g)),y=[g].concat(x).reduce(function(e,n){return e.concat(Zv(n)===Dv?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Bv:l,d=Kv(r),u=d?s?$v:$v.filter(function(e){return Kv(e)===d}):Rv,p=u.filter(function(e){return c.indexOf(e)>=0});0===p.length&&(p=u);var h=p.reduce(function(t,n){return t[n]=hx(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[Zv(n)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}(t,{placement:n,boundary:d,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:f}):n)},[]),b=t.rects.reference,j=t.rects.popper,w=new Map,_=!0,C=y[0],S=0;S<y.length;S++){var A=y[S],k=Zv(A),M=Kv(A)===Nv,O=[Ov,Tv].indexOf(k)>=0,T=O?"width":"height",E=hx(t,{placement:A,boundary:d,rootBoundary:u,altBoundary:p,padding:c}),P=O?M?Ev:Pv:M?Tv:Ov;b[T]>j[T]&&(P=ix(P));var D=ix(P),R=[];if(o&&R.push(E[k]<=0),s&&R.push(E[P]<=0,E[D]<=0),R.every(function(e){return e})){C=A,_=!1;break}w.set(A,R)}if(_)for(var N=function(e){var t=y.find(function(t){var n=w.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return C=t,"break"},L=m?3:1;L>0;L--){if("break"===N(L))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function fx(e,t,n){return cv(e,dv(t,n))}const gx={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,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,u=n.padding,p=n.tether,h=void 0===p||p,m=n.tetherOffset,f=void 0===m?0:m,g=hx(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=Zv(t.placement),x=Kv(t.placement),y=!x,b=Xv(v),j="x"===b?"y":"x",w=t.modifiersData.popperOffsets,_=t.rects.reference,C=t.rects.popper,S="function"===typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,A="number"===typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(w){if(o){var O,T="y"===b?Ov:Pv,E="y"===b?Tv:Ev,P="y"===b?"height":"width",D=w[b],R=D+g[T],N=D-g[E],L=h?-C[P]/2:0,I=x===Nv?_[P]:C[P],F=x===Nv?-C[P]:-_[P],$=t.elements.arrow,B=h&&$?wv($):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=z[T],W=z[E],V=fx(0,_[P],B[P]),U=y?_[P]/2-L-V-H-A.mainAxis:I-V-H-A.mainAxis,q=y?-_[P]/2+L+V+W+A.mainAxis:F+V+W+A.mainAxis,G=t.elements.arrow&&Mv(t.elements.arrow),Y=G?"y"===b?G.clientTop||0:G.clientLeft||0:0,Z=null!=(O=null==k?void 0:k[b])?O:0,K=D+q-Z,X=fx(h?dv(R,D+U-Z-Y):R,D,h?cv(N,K):N);w[b]=X,M[b]=X-D}if(s){var Q,J="x"===b?Ov:Pv,ee="x"===b?Tv:Ev,te=w[j],ne="y"===j?"height":"width",re=te+g[J],ie=te-g[ee],oe=-1!==[Ov,Pv].indexOf(v),ae=null!=(Q=null==k?void 0:k[j])?Q:0,se=oe?re:te-_[ne]-C[ne]-ae+A.altAxis,le=oe?te+_[ne]+C[ne]-ae-A.altAxis:ie,ce=h&&oe?function(e,t,n){var r=fx(e,t,n);return r>n?n:r}(se,te,le):fx(h?se:re,te,h?le:ie);w[j]=ce,M[j]=ce-te}t.modifiersData[r]=M}},requiresIfExists:["offset"]};const vx={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,s=Zv(n.placement),l=Xv(s),c=[Pv,Ev].indexOf(s)>=0?"height":"width";if(o&&a){var d=function(e,t){return ux("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:px(e,Rv))}(i.padding,n),u=wv(o),p="y"===l?Ov:Pv,h="y"===l?Tv:Ev,m=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],f=a[l]-n.rects.reference[l],g=Mv(o),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,x=m/2-f/2,y=d[p],b=v-u[c]-d[h],j=v/2-u[c]/2+x,w=fx(y,j,b),_=l;n.modifiersData[r]=((t={})[_]=w,t.centerOffset=w-j,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)))&&sx(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xx(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 yx(e){return[Ov,Ev,Tv,Pv].some(function(t){return e[t]>=0})}var bx=qv({defaultModifiers:[Yv,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Qv({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,c={placement:Zv(t.placement),variation:Kv(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,ex(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ex(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},tx,nx,mx,gx,vx,{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=hx(t,{elementContext:"reference"}),s=hx(t,{altBoundary:!0}),l=xx(a,r),c=xx(s,i,o),d=yx(l),u=yx(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]});function jx(e){return(0,sr.Ay)("MuiPopper",e)}(0,ar.A)("MuiPopper",["root"]);const wx=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],_x=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Cx(e){return"function"===typeof e?e():e}function Sx(e){return void 0!==e.nodeType}const Ax={},kx=We.forwardRef(function(e,t){var n;const{anchorEl:r,children:i,direction:o,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:d,popperRef:u,slotProps:p={},slots:h={},TransitionProps:m}=e,f=(0,nn.A)(e,wx),g=We.useRef(null),v=(0,gr.A)(g,t),x=We.useRef(null),y=(0,gr.A)(x,u),b=We.useRef(y);(0,hn.A)(()=>{b.current=y},[y]),We.useImperativeHandle(u,()=>x.current,[]);const j=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(c,o),[w,_]=We.useState(j),[C,S]=We.useState(Cx(r));We.useEffect(()=>{x.current&&x.current.forceUpdate()}),We.useEffect(()=>{r&&S(Cx(r))},[r]),(0,hn.A)(()=>{if(!C||!l)return;let e=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;(e=>{_(e.placement)})(t)}}];null!=s&&(e=e.concat(s)),d&&null!=d.modifiers&&(e=e.concat(d.modifiers));const t=bx(C,g.current,(0,Ft.A)({placement:j},d,{modifiers:e}));return b.current(t),()=>{t.destroy(),b.current(null)}},[C,a,s,l,d,j]);const A={placement:w};null!==m&&(A.TransitionProps=m);const k=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},jx,t)})(e),M=null!=(n=h.root)?n:"div",O=ah({elementType:M,externalSlotProps:p.root,externalForwardedProps:f,additionalProps:{role:"tooltip",ref:v},ownerState:e,className:k.root});return(0,Gt.jsx)(M,(0,Ft.A)({},O,{children:"function"===typeof i?i(A):i}))}),Mx=We.forwardRef(function(e,t){const{anchorEl:n,children:r,container:i,direction:o="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:l,open:c,placement:d="bottom",popperOptions:u=Ax,popperRef:p,style:h,transition:m=!1,slotProps:f={},slots:g={}}=e,v=(0,nn.A)(e,_x),[x,y]=We.useState(!0);if(!s&&!c&&(!m||x))return null;let b;if(i)b=i;else if(n){const e=Cx(n);b=e&&Sx(e)?(0,xr.A)(e).body:(0,xr.A)(null).body}const j=c||!s||m&&!x?void 0:"none",w=m?{in:c,onEnter:()=>{y(!1)},onExited:()=>{y(!0)}}:void 0;return(0,Gt.jsx)(Nh,{disablePortal:a,container:b,children:(0,Gt.jsx)(kx,(0,Ft.A)({anchorEl:n,direction:o,disablePortal:a,modifiers:l,ref:t,open:m?!x:c,placement:d,popperOptions:u,popperRef:p,slotProps:f,slots:g},v,{style:(0,Ft.A)({position:"fixed",top:0,left:0,display:j},h),TransitionProps:w,children:r}))})}),Ox=Mx,Tx=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Ex=(0,Un.Ay)(Ox,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Px=We.forwardRef(function(e,t){var n;const r=(0,iv.A)(),i=(0,$t.b)({props:e,name:"MuiPopper"}),{anchorEl:o,component:a,components:s,componentsProps:l,container:c,disablePortal:d,keepMounted:u,modifiers:p,open:h,placement:m,popperOptions:f,popperRef:g,transition:v,slots:x,slotProps:y}=i,b=(0,nn.A)(i,Tx),j=null!=(n=null==x?void 0:x.root)?n:null==s?void 0:s.Root,w=(0,Ft.A)({anchorEl:o,container:c,disablePortal:d,keepMounted:u,modifiers:p,open:h,placement:m,popperOptions:f,popperRef:g,transition:v},b);return(0,Gt.jsx)(Ex,(0,Ft.A)({as:a,direction:null==r?void 0:r.direction,slots:{root:j},slotProps:null!=y?y:l},w,{ref:t}))}),Dx=Px;var Rx=n(45879),Nx=n(54516);function Lx(e){return(0,sr.Ay)("MuiTooltip",e)}const Ix=(0,ar.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Fx=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function $x(e){return Math.round(1e5*e)/1e5}const Bx=(0,Un.Ay)(Dx,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(e=>{let{theme:t,ownerState:n,open:r}=e;return(0,Ft.A)({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!n.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},n.arrow&&{['&[data-popper-placement*="bottom"] .'.concat(Ix.arrow)]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},['&[data-popper-placement*="top"] .'.concat(Ix.arrow)]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},['&[data-popper-placement*="right"] .'.concat(Ix.arrow)]:(0,Ft.A)({},n.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),['&[data-popper-placement*="left"] .'.concat(Ix.arrow)]:(0,Ft.A)({},n.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})}),zx=(0,Un.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t["tooltipPlacement".concat((0,Fu.A)(n.placement.split("-")[0]))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:(0,$u.X4)(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},n.arrow&&{position:"relative",margin:0},n.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:"".concat($x(16/14),"em"),fontWeight:t.typography.fontWeightRegular},{[".".concat(Ix.popper,'[data-popper-placement*="left"] &')]:(0,Ft.A)({transformOrigin:"right center"},n.isRtl?(0,Ft.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"}):(0,Ft.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"})),[".".concat(Ix.popper,'[data-popper-placement*="right"] &')]:(0,Ft.A)({transformOrigin:"left center"},n.isRtl?(0,Ft.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"}):(0,Ft.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"})),[".".concat(Ix.popper,'[data-popper-placement*="top"] &')]:(0,Ft.A)({transformOrigin:"center bottom",marginBottom:"14px"},n.touch&&{marginBottom:"24px"}),[".".concat(Ix.popper,'[data-popper-placement*="bottom"] &')]:(0,Ft.A)({transformOrigin:"center top",marginTop:"14px"},n.touch&&{marginTop:"24px"})})}),Hx=(0,Un.Ay)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(e=>{let{theme:t}=e;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:(0,$u.X4)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}});let Wx=!1;const Vx=new rr.E;let Ux={x:0,y:0};function qx(e,t){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];t&&t(n,...i),e(n,...i)}}const Gx=We.forwardRef(function(e,t){var n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b;const j=(0,$t.b)({props:e,name:"MuiTooltip"}),{arrow:w=!1,children:_,components:C={},componentsProps:S={},describeChild:A=!1,disableFocusListener:k=!1,disableHoverListener:M=!1,disableInteractive:O=!1,disableTouchListener:T=!1,enterDelay:E=100,enterNextDelay:P=0,enterTouchDelay:D=700,followCursor:R=!1,id:N,leaveDelay:L=0,leaveTouchDelay:I=1500,onClose:F,onOpen:$,open:B,placement:z="bottom",PopperComponent:H,PopperProps:W={},slotProps:V={},slots:U={},title:q,TransitionComponent:G=Oh,TransitionProps:Y}=j,Z=(0,nn.A)(j,Fx),K=We.isValidElement(_)?_:(0,Gt.jsx)("span",{children:_}),X=In(),Q=dn(),[J,ee]=We.useState(),[te,ne]=We.useState(null),re=We.useRef(!1),ie=O||R,oe=(0,rr.A)(),ae=(0,rr.A)(),se=(0,rr.A)(),le=(0,rr.A)(),[ce,de]=(0,Nx.A)({controlled:B,default:!1,name:"Tooltip",state:"open"});let ue=ce;const pe=(0,Rx.A)(N),he=We.useRef(),me=(0,ep.A)(()=>{void 0!==he.current&&(document.body.style.WebkitUserSelect=he.current,he.current=void 0),le.clear()});We.useEffect(()=>me,[me]);const fe=e=>{Vx.clear(),Wx=!0,de(!0),$&&!ue&&$(e)},ge=(0,ep.A)(e=>{Vx.start(800+L,()=>{Wx=!1}),de(!1),F&&ue&&F(e),oe.start(X.transitions.duration.shortest,()=>{re.current=!1})}),ve=e=>{re.current&&"touchstart"!==e.type||(J&&J.removeAttribute("title"),ae.clear(),se.clear(),E||Wx&&P?ae.start(Wx?P:E,()=>{fe(e)}):fe(e))},xe=e=>{ae.clear(),se.start(L,()=>{ge(e)})},{isFocusVisibleRef:ye,onBlur:be,onFocus:je,ref:we}=(0,tp.A)(),[,_e]=We.useState(!1),Ce=e=>{be(e),!1===ye.current&&(_e(!1),xe(e))},Se=e=>{J||ee(e.currentTarget),je(e),!0===ye.current&&(_e(!0),ve(e))},Ae=e=>{re.current=!0;const t=K.props;t.onTouchStart&&t.onTouchStart(e)},ke=e=>{Ae(e),se.clear(),oe.clear(),me(),he.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",le.start(D,()=>{document.body.style.WebkitUserSelect=he.current,ve(e)})},Me=e=>{K.props.onTouchEnd&&K.props.onTouchEnd(e),me(),se.start(I,()=>{ge(e)})};We.useEffect(()=>{if(ue)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||ge(e)}},[ge,ue]);const Oe=(0,Ln.A)(Rn(K),we,ee,t);q||0===q||(ue=!1);const Te=We.useRef(),Ee={},Pe="string"===typeof q;A?(Ee.title=ue||!Pe||M?null:q,Ee["aria-describedby"]=ue?pe:null):(Ee["aria-label"]=Pe?q:null,Ee["aria-labelledby"]=ue&&!Pe?pe:null);const De=(0,Ft.A)({},Ee,Z,K.props,{className:(0,nr.A)(Z.className,K.props.className),onTouchStart:Ae,ref:Oe},R?{onMouseMove:e=>{const t=K.props;t.onMouseMove&&t.onMouseMove(e),Ux={x:e.clientX,y:e.clientY},Te.current&&Te.current.update()}}:{});const Re={};T||(De.onTouchStart=ke,De.onTouchEnd=Me),M||(De.onMouseOver=qx(ve,De.onMouseOver),De.onMouseLeave=qx(xe,De.onMouseLeave),ie||(Re.onMouseOver=ve,Re.onMouseLeave=xe)),k||(De.onFocus=qx(Se,De.onFocus),De.onBlur=qx(Ce,De.onBlur),ie||(Re.onFocus=Se,Re.onBlur=Ce));const Ne=We.useMemo(()=>{var e;let t=[{name:"arrow",enabled:Boolean(te),options:{element:te,padding:4}}];return null!=(e=W.popperOptions)&&e.modifiers&&(t=t.concat(W.popperOptions.modifiers)),(0,Ft.A)({},W.popperOptions,{modifiers:t})},[te,W]),Le=(0,Ft.A)({},j,{isRtl:Q,arrow:w,disableInteractive:ie,placement:z,PopperComponentProp:H,touch:re.current}),Ie=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch","tooltipPlacement".concat((0,Fu.A)(o.split("-")[0]))],arrow:["arrow"]};return(0,ir.A)(a,Lx,t)})(Le),Fe=null!=(n=null!=(r=U.popper)?r:C.Popper)?n:Bx,$e=null!=(i=null!=(o=null!=(a=U.transition)?a:C.Transition)?o:G)?i:Oh,Be=null!=(s=null!=(l=U.tooltip)?l:C.Tooltip)?s:zx,ze=null!=(c=null!=(d=U.arrow)?d:C.Arrow)?c:Hx,He=Qp(Fe,(0,Ft.A)({},W,null!=(u=V.popper)?u:S.popper,{className:(0,nr.A)(Ie.popper,null==W?void 0:W.className,null==(p=null!=(h=V.popper)?h:S.popper)?void 0:p.className)}),Le),Ve=Qp($e,(0,Ft.A)({},Y,null!=(m=V.transition)?m:S.transition),Le),Ue=Qp(Be,(0,Ft.A)({},null!=(f=V.tooltip)?f:S.tooltip,{className:(0,nr.A)(Ie.tooltip,null==(g=null!=(v=V.tooltip)?v:S.tooltip)?void 0:g.className)}),Le),qe=Qp(ze,(0,Ft.A)({},null!=(x=V.arrow)?x:S.arrow,{className:(0,nr.A)(Ie.arrow,null==(y=null!=(b=V.arrow)?b:S.arrow)?void 0:y.className)}),Le);return(0,Gt.jsxs)(We.Fragment,{children:[We.cloneElement(K,De),(0,Gt.jsx)(Fe,(0,Ft.A)({as:null!=H?H:Dx,placement:z,anchorEl:R?{getBoundingClientRect:()=>({top:Ux.y,left:Ux.x,right:Ux.x,bottom:Ux.y,width:0,height:0})}:J,popperRef:Te,open:!!J&&ue,id:pe,transition:!0},Re,He,{popperOptions:Ne,children:e=>{let{TransitionProps:t}=e;return(0,Gt.jsx)($e,(0,Ft.A)({timeout:X.transitions.duration.shorter},t,Ve,{children:(0,Gt.jsxs)(Be,(0,Ft.A)({},Ue,{children:[q,w?(0,Gt.jsx)(ze,(0,Ft.A)({},qe,{ref:ne})):null]}))}))}}))]})}),Yx=Gx;let Zx={id:""},Kx=null;const Xx=e=>{let{children:t,title:n,placement:r}=e;return!Kx&&n?(0,Gt.jsx)(Yx,{title:n,placement:r,children:t}):t},Qx=e=>{let{list:t,onOpen:n}=e;return(0,Gt.jsx)(Gt.Fragment,{children:null===t||void 0===t?void 0:t.map(e=>(0,Gt.jsx)(Jx,{item:e,onOpen:n},null===e||void 0===e?void 0:e.id))})},Jx=e=>{var t,n;let{item:r,onOpen:i}=e;const o=(null===r||void 0===r?void 0:r.data)&&(null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.length)>0;const a=(0,Gt.jsx)(Gt.Fragment,{children:o?(0,Gt.jsx)(Qf,{disablePadding:!0,sx:{display:"block"},className:"listSpacing buttonSpaceRemove",children:(0,Gt.jsxs)(ng,{sx:{minHeight:48,justifyContent:Kx?"initial":"center",px:2.5},component:"div",onClick:function(){i(null===r||void 0===r?void 0:r.id)},className:null===r||void 0===r?void 0:r.className,children:[(0,Gt.jsx)(rv,{sx:{minWidth:0,mr:Kx?3:"auto",justifyContent:"center"},children:null===r||void 0===r?void 0:r.icon}),(0,Gt.jsx)(ag,{disableTypography:!0,primary:null===r||void 0===r?void 0:r.name,sx:{opacity:Kx?1:0,fontWeight:500}}),o&&!(null!==r&&void 0!==r&&r.open)&&Kx&&(0,Gt.jsx)(Jg.A,{}),o&&(null===r||void 0===r?void 0:r.open)&&Kx&&(0,Gt.jsx)(Qg.A,{})]},null===r||void 0===r?void 0:r.id)},null===r||void 0===r?void 0:r.id):(0,Gt.jsx)(Xx,{title:null===r||void 0===r?void 0:r.name,placement:"right",children:(0,Gt.jsx)(Qf,{"data-bind":null===r||void 0===r?void 0:r.id,disablePadding:!0,sx:{display:"block"},className:"listSpacing",children:(0,Gt.jsxs)(ng,{component:Lo,className:Zx.id===(null===r||void 0===r?void 0:r.id)?"Mui-selected ".concat(null===r||void 0===r?void 0:r.className):null===r||void 0===r?void 0:r.className,to:null!==r&&void 0!==r&&r.clickable?"":"".concat(null===r||void 0===r?void 0:r.url).concat((null===r||void 0===r?void 0:r.query)||""),onClick:null!==r&&void 0!==r&&r.clickable?null===r||void 0===r?void 0:r.onClick:()=>{},sx:{minHeight:48,justifyContent:Kx?"initial":"center",px:2.5},children:[(0,Gt.jsx)(rv,{sx:{minWidth:0,mr:Kx?3:"auto",justifyContent:"center"},children:null===r||void 0===r?void 0:r.icon}),(0,Gt.jsx)(ag,{disableTypography:!0,primary:null===r||void 0===r?void 0:r.name,sx:{opacity:Kx?1:0,fontWeight:500}})]})},null===r||void 0===r?void 0:r.id)})}),s=o?(0,Gt.jsx)(mr,{in:!(null===r||void 0===r||!r.open),timeout:"auto",unmountOnExit:!0,children:null===r||void 0===r||null===(n=r.data)||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(Jx,{item:e,onOpen:i},null===e||void 0===e?void 0:e.id))}):null;return(0,Gt.jsxs)(Gt.Fragment,{children:[a,s]})};const ey=function(e){let{headerData:t,listItems:n,openDrawer:r}=e;Zx.id=t.activeMenuItem,Kx=r;const[o,a]=We.useState(n),s=e=>{a(o.map(t=>{var n;return(0,i.A)((0,i.A)({},t),{},{data:null===t||void 0===t||null===(n=t.data)||void 0===n?void 0:n.map(t=>{var n;return(0,i.A)((0,i.A)({},t),{},{data:null===t||void 0===t||null===(n=t.data)||void 0===n?void 0:n.map(e=>(0,i.A)((0,i.A)({},e),{},{list_level:"3"})),list_level:"2",open:t.id===e&&!t.open})}),list_level:"1"})}))};return We.useEffect(()=>{a(n.map(e=>{var t;return(0,i.A)((0,i.A)({},e),{},{data:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map(e=>{var t,n;return(0,i.A)((0,i.A)({},e),{},{data:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map(e=>(0,i.A)((0,i.A)({},e),{},{list_level:"3"})),list_level:"2",open:null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.find(e=>e.id===Zx.id)})}),list_level:"1"})}))},[n]),(0,Gt.jsx)(hh,{sx:{p:0},className:"theme_scroll height_scroll",children:null===o||void 0===o?void 0:o.map(e=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(Qx,{list:null===e||void 0===e?void 0:e.data,onOpen:s})},null===e||void 0===e?void 0:e.id))})};function ty(e){let{headerData:t,openDrawer:n,handleDrawerClose:r,handleUserTour:i}=e;const{userData:o}=(0,We.useContext)(Zg);return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(v_,{className:n?"drawer-docked-small":"drawer-docked-slide",variant:"permanent",open:n,children:[(0,Gt.jsxs)(f_,{sx:{justifyContent:"space-between"},children:[n?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{marginLeft:2,lineHeight:1},className:"logo_hidden",children:(0,Gt.jsx)("img",{src:Kg,height:45})}),(0,Gt.jsx)(Eu,{sx:{marginLeft:1,lineHeight:1},className:"logo_show",children:(0,Gt.jsx)("img",{src:Xg,height:32})})]}):(0,Gt.jsx)(Eu,{sx:{marginLeft:1,lineHeight:1},children:(0,Gt.jsx)("img",{src:Xg,height:32})}),!1]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(ey,{headerData:t,listItems:t.listItems,openDrawer:n}),n&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{py:3,children:[(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",minHeight:"auto",marginRight:"10px"},size:"small",color:"primary",onClick:()=>{var e;return window.open("".concat(Ic,"?email=").concat(null===o||void 0===o||null===(e=o.user_principal)||void 0===e?void 0:e.email),"_blank")},className:"feedbackIcon",children:(0,Gt.jsx)(xc,{fontSize:"small",sx:{width:16,height:16}})}),(0,Gt.jsx)(Vp,{size:"small",type:"reset",variant:"contained",color:"primary",style:{left:"10px"},onClick:()=>{var e;return window.open("".concat(Ic,"?email=").concat(null===o||void 0===o||null===(e=o.user_principal)||void 0===e?void 0:e.email),"_blank")},className:"user-tour-button hiddenfeedback",children:"Feedback"}),(0,Gt.jsx)(Vp,{variant:"text",size:"small",type:"reset",color:"primary",onClick:i,sx:{bgcolor:"primary.theme.50"},className:"user-tour-button",children:"Start User Tour"})]})})]})})}ty.defaultProps={handleDrawerClose:()=>{},handleUserTour:()=>{},openDrawer:!1};const ny=ty;var ry=n(39089),iy=n(70569),oy=n(84445),ay=n(1702),sy=n(99466),ly=n(89611),cy=n(52177),dy=n(66734);const uy=(0,dy.A)((0,Gt.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function py(e){return(0,sr.Ay)("MuiAvatar",e)}(0,ar.A)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const hy=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],my=["component","slots","slotProps"],fy=["component"];function gy(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=(0,nn.A)(t,hy),{component:c,slots:d={[e]:void 0},slotProps:u={[e]:void 0}}=o,p=(0,nn.A)(o,my),h=d[e]||r,m=ih(u[e],i),f=rh((0,Ft.A)({className:n},l,{externalForwardedProps:"root"===e?p:void 0,externalSlotProps:m})),{props:{component:g},internalRef:v}=f,x=(0,nn.A)(f.props,fy),y=(0,gr.A)(v,null==m?void 0:m.ref,t.ref),b=a?a(x):{},j=(0,Ft.A)({},i,b),w="root"===e?g||c:g,_=Qp(h,(0,Ft.A)({},"root"===e&&!c&&!d[e]&&s,"root"!==e&&!d[e]&&s,x,w&&{as:w},{ref:y}),j);return Object.keys(b).forEach(e=>{delete _[e]}),[h,_]}const vy=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],xy=(0,Un.Ay)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(e=>{let{theme:t}=e;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,Ft.A)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:(0,Ft.A)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}}),yy=(0,Un.Ay)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),by=(0,Un.Ay)(uy,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});const jy=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAvatar"}),{alt:r,children:i,className:o,component:a="div",slots:s={},slotProps:l={},imgProps:c,sizes:d,src:u,srcSet:p,variant:h="circular"}=n,m=(0,nn.A)(n,vy);let f=null;const g=function(e){let{crossOrigin:t,referrerPolicy:n,src:r,srcSet:i}=e;const[o,a]=We.useState(!1);return We.useEffect(()=>{if(!r&&!i)return;a(!1);let e=!0;const o=new Image;return o.onload=()=>{e&&a("loaded")},o.onerror=()=>{e&&a("error")},o.crossOrigin=t,o.referrerPolicy=n,o.src=r,i&&(o.srcset=i),()=>{e=!1}},[t,n,r,i]),o}((0,Ft.A)({},c,{src:u,srcSet:p})),v=u||p,x=v&&"error"!==g,y=(0,Ft.A)({},n,{colorDefault:!x,component:a,variant:h}),b=(e=>{const{classes:t,variant:n,colorDefault:r}=e,i={root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,ir.A)(i,py,t)})(y),[j,w]=gy("img",{className:b.img,elementType:yy,externalForwardedProps:{slots:s,slotProps:{img:(0,Ft.A)({},c,l.img)}},additionalProps:{alt:r,src:u,srcSet:p,sizes:d},ownerState:y});return f=x?(0,Gt.jsx)(j,(0,Ft.A)({},w)):i||0===i?i:v&&r?r[0]:(0,Gt.jsx)(by,{ownerState:y,className:b.fallback}),(0,Gt.jsx)(xy,(0,Ft.A)({as:a,ownerState:y,className:(0,nr.A)(b.root,o),ref:t},m,{children:f}))}),wy=jy;function _y(e){return(0,sr.Ay)("MuiLinearProgress",e)}(0,ar.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var Cy,Sy,Ay,ky,My,Oy;const Ty=["className","color","value","valueBuffer","variant"];let Ey,Py,Dy,Ry,Ny,Ly;const Iy=(0,cp.i7)(Ey||(Ey=Cy||(Cy=np(["\n  0% {\n    left: -35%;\n    right: 100%;\n  }\n\n  60% {\n    left: 100%;\n    right: -90%;\n  }\n\n  100% {\n    left: 100%;\n    right: -90%;\n  }\n"])))),Fy=(0,cp.i7)(Py||(Py=Sy||(Sy=np(["\n  0% {\n    left: -200%;\n    right: 100%;\n  }\n\n  60% {\n    left: 107%;\n    right: -8%;\n  }\n\n  100% {\n    left: 107%;\n    right: -8%;\n  }\n"])))),$y=(0,cp.i7)(Dy||(Dy=Ay||(Ay=np(["\n  0% {\n    opacity: 1;\n    background-position: 0 -23px;\n  }\n\n  60% {\n    opacity: 0;\n    background-position: 0 -23px;\n  }\n\n  100% {\n    opacity: 1;\n    background-position: -200px -23px;\n  }\n"])))),By=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress["".concat(t,"Bg")]:"light"===e.palette.mode?(0,$u.a)(e.palette[t].main,.62):(0,$u.e$)(e.palette[t].main,.5),zy=(0,Un.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["color".concat((0,Fu.A)(n.color))],t[n.variant]]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:By(n,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})}),Hy=(0,Un.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t["dashedColor".concat((0,Fu.A)(n.color))]]}})(e=>{let{ownerState:t,theme:n}=e;const r=By(n,t.color);return(0,Ft.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},(0,cp.AH)(Ry||(Ry=ky||(ky=np(["\n    animation: "," 3s infinite linear;\n  "]))),$y)),Wy=(0,Un.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t["barColor".concat((0,Fu.A)(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .".concat(4,"s linear")},"buffer"===t.variant&&{zIndex:1,transition:"transform .".concat(4,"s linear")})},e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,cp.AH)(Ny||(Ny=My||(My=np(["\n      width: auto;\n      animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n    "]))),Iy)}),Vy=(0,Un.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t["barColor".concat((0,Fu.A)(n.color))],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:By(n,t.color),transition:"transform .".concat(4,"s linear")})},e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,cp.AH)(Ly||(Ly=Oy||(Oy=np(["\n      width: auto;\n      animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n    "]))),Fy)}),Uy=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiLinearProgress"}),{className:r,color:i="primary",value:o,valueBuffer:a,variant:s="indeterminate"}=n,l=(0,nn.A)(n,Ty),c=(0,Ft.A)({},n,{color:i,variant:s}),d=(e=>{const{classes:t,variant:n,color:r}=e,i={root:["root","color".concat((0,Fu.A)(r)),n],dashed:["dashed","dashedColor".concat((0,Fu.A)(r))],bar1:["bar","barColor".concat((0,Fu.A)(r)),("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&"barColor".concat((0,Fu.A)(r)),"buffer"===n&&"color".concat((0,Fu.A)(r)),("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,ir.A)(i,_y,t)})(c),u=dn(),p={},h={bar1:{},bar2:{}};if("determinate"===s||"buffer"===s)if(void 0!==o){p["aria-valuenow"]=Math.round(o),p["aria-valuemin"]=0,p["aria-valuemax"]=100;let e=o-100;u&&(e=-e),h.bar1.transform="translateX(".concat(e,"%)")}else 0;if("buffer"===s)if(void 0!==a){let e=(a||0)-100;u&&(e=-e),h.bar2.transform="translateX(".concat(e,"%)")}else 0;return(0,Gt.jsxs)(zy,(0,Ft.A)({className:(0,nr.A)(d.root,r),ownerState:c,role:"progressbar"},p,{ref:t},l,{children:["buffer"===s?(0,Gt.jsx)(Hy,{className:d.dashed,ownerState:c}):null,(0,Gt.jsx)(Wy,{className:d.bar1,ownerState:c,style:h.bar1}),"determinate"===s?null:(0,Gt.jsx)(Vy,{className:d.bar2,ownerState:c,style:h.bar2})]}))}),qy=Uy;var Gy=n(54536),Yy=n(51052);const Zy=e=>{const t=We.useRef({});return We.useEffect(()=>{t.current=e}),t.current};function Ky(e){return"undefined"!==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Xy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:o,trim:a=!1}=e;return(e,s)=>{let{inputValue:l,getOptionLabel:c}=s,d=a?l.trim():l;n&&(d=d.toLowerCase()),t&&(d=Ky(d));const u=d?e.filter(e=>{let r=(o||c)(e);return n&&(r=r.toLowerCase()),t&&(r=Ky(r)),"start"===i?0===r.indexOf(d):r.indexOf(d)>-1}):e;return"number"===typeof r?u.slice(0,r):u}}function Qy(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}const Jy=Xy(),eb=e=>{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))},tb=[];const nb=function(e){const{unstable_isActiveElementInListbox:t=eb,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:o=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:d=(e.multiple?tb:null),disableClearable:u=!1,disableCloseOnSelect:p=!1,disabled:h,disabledItemsFocusable:m=!1,disableListWrap:f=!1,filterOptions:g=Jy,filterSelectedOptions:v=!1,freeSolo:x=!1,getOptionDisabled:y,getOptionKey:b,getOptionLabel:j=e=>{var t;return null!=(t=e.label)?t:e},groupBy:w,handleHomeEndKeys:_=!e.freeSolo,id:C,includeInputInList:S=!1,inputValue:A,isOptionEqualToValue:k=(e,t)=>e===t,multiple:M=!1,onChange:O,onClose:T,onHighlightChange:E,onInputChange:P,onOpen:D,open:R,openOnFocus:N=!1,options:L,readOnly:I=!1,selectOnFocus:F=!e.freeSolo,value:$}=e,B=(0,mn.A)(C);let z=j;z=e=>{const t=j(e);return"string"!==typeof t?String(t):t};const H=We.useRef(!1),W=We.useRef(!0),V=We.useRef(null),U=We.useRef(null),[q,G]=We.useState(null),[Y,Z]=We.useState(-1),K=i?0:-1,X=We.useRef(K),[Q,J]=(0,Yy.A)({controlled:$,default:d,name:c}),[ee,te]=(0,Yy.A)({controlled:A,default:"",name:c,state:"inputValue"}),[ne,re]=We.useState(!1),ie=We.useCallback((e,t)=>{if(!(M?Q.length<t.length:null!==t)&&!s)return;let n;if(M)n="";else if(null==t)n="";else{const e=z(t);n="string"===typeof e?e:""}ee!==n&&(te(n),P&&P(e,n,"reset"))},[z,ee,M,P,te,s,Q]),[oe,ae]=(0,Yy.A)({controlled:R,default:!1,name:c,state:"open"}),[se,le]=We.useState(!0),ce=!M&&null!=Q&&ee===z(Q),de=oe&&!I,ue=de?g(L.filter(e=>!v||!(M?Q:[Q]).some(t=>null!==t&&k(e,t))),{inputValue:ce&&se?"":ee,getOptionLabel:z}):[],pe=Zy({filteredOptions:ue,value:Q,inputValue:ee});We.useEffect(()=>{const e=Q!==pe.value;ne&&!e||x&&!e||ie(null,Q)},[Q,ie,ne,pe.value,x]);const he=oe&&ue.length>0&&!I,me=(0,vr.A)(e=>{-1===e?V.current.focus():q.querySelector('[data-tag-index="'.concat(e,'"]')).focus()});We.useEffect(()=>{M&&Y>Q.length-1&&(Z(-1),me(-1))},[Q,M,Y,me]);const fe=(0,vr.A)(e=>{let{event:t,index:r,reason:i="auto"}=e;if(X.current=r,-1===r?V.current.removeAttribute("aria-activedescendant"):V.current.setAttribute("aria-activedescendant","".concat(B,"-option-").concat(r)),E&&E(t,-1===r?null:ue[r],i),!U.current)return;const o=U.current.querySelector('[role="option"].'.concat(n,"-focused"));o&&(o.classList.remove("".concat(n,"-focused")),o.classList.remove("".concat(n,"-focusVisible")));let a=U.current;if("listbox"!==U.current.getAttribute("role")&&(a=U.current.parentElement.querySelector('[role="listbox"]')),!a)return;if(-1===r)return void(a.scrollTop=0);const s=U.current.querySelector('[data-option-index="'.concat(r,'"]'));if(s&&(s.classList.add("".concat(n,"-focused")),"keyboard"===i&&s.classList.add("".concat(n,"-focusVisible")),a.scrollHeight>a.clientHeight&&"mouse"!==i&&"touch"!==i)){const e=s,t=a.clientHeight+a.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?a.scrollTop=n-a.clientHeight:e.offsetTop-e.offsetHeight*(w?1.3:0)<a.scrollTop&&(a.scrollTop=e.offsetTop-e.offsetHeight*(w?1.3:0))}}),ge=(0,vr.A)(e=>{let{event:t,diff:n,direction:i="next",reason:o="auto"}=e;if(!de)return;const a=function(e,t){if(!U.current||e<0||e>=ue.length)return-1;let n=e;for(;;){const r=U.current.querySelector('[data-option-index="'.concat(n,'"]')),i=!m&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!i)return n;if(n="next"===t?(n+1)%ue.length:(n-1+ue.length)%ue.length,n===e)return-1}}((()=>{const e=ue.length-1;if("reset"===n)return K;if("start"===n)return 0;if("end"===n)return e;const t=X.current+n;return t<0?-1===t&&S?-1:f&&-1!==X.current||Math.abs(n)>1?0:e:t>e?t===e+1&&S?-1:f||Math.abs(n)>1?e:0:t})(),i);if(fe({index:a,reason:o,event:t}),r&&"reset"!==n)if(-1===a)V.current.value=ee;else{const e=z(ue[a]);V.current.value=e;0===e.toLowerCase().indexOf(ee.toLowerCase())&&ee.length>0&&V.current.setSelectionRange(ee.length,e.length)}}),ve=We.useCallback(()=>{if(!de)return;const e=(()=>{if(-1!==X.current&&pe.filteredOptions&&pe.filteredOptions.length!==ue.length&&pe.inputValue===ee&&(M?Q.length===pe.value.length&&pe.value.every((e,t)=>z(Q[t])===z(e)):(e=pe.value,t=Q,(e?z(e):"")===(t?z(t):"")))){const e=pe.filteredOptions[X.current];if(e)return Qy(ue,t=>z(t)===z(e))}var e,t;return-1})();if(-1!==e)return void(X.current=e);const t=M?Q[0]:Q;if(0!==ue.length&&null!=t){if(U.current){if(null!=t){const e=ue[X.current];if(M&&e&&-1!==Qy(Q,t=>k(e,t)))return;const n=Qy(ue,e=>k(e,t));return void(-1===n?ge({diff:"reset"}):fe({index:n}))}X.current>=ue.length-1?fe({index:ue.length-1}):fe({index:X.current})}}else ge({diff:"reset"})},[ue.length,!M&&Q,v,ge,fe,de,ee,M]),xe=(0,vr.A)(e=>{(0,Rh.A)(U,e),e&&ve()});We.useEffect(()=>{ve()},[ve]);const ye=e=>{oe||(ae(!0),le(!0),D&&D(e))},be=(e,t)=>{oe&&(ae(!1),T&&T(e,t))},je=(e,t,n,r)=>{if(M){if(Q.length===t.length&&Q.every((e,n)=>e===t[n]))return}else if(Q===t)return;O&&O(e,t,n,r),J(t)},we=We.useRef(!1),_e=function(e,t){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"selectOption",i=t;if(M){i=Array.isArray(Q)?Q.slice():[];const e=Qy(i,e=>k(t,e));-1===e?i.push(t):"freeSolo"!==n&&(i.splice(e,1),r="removeOption")}ie(e,i),je(e,i,r,{option:t}),p||e&&(e.ctrlKey||e.metaKey)||be(e,r),(!0===a||"touch"===a&&we.current||"mouse"===a&&!we.current)&&V.current.blur()},Ce=(e,t)=>{if(!M)return;""===ee&&be(e,"toggleInput");let n=Y;-1===Y?""===ee&&"previous"===t&&(n=Q.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===Q.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===Q.length||"previous"===t&&-1===n)return-1;const e=q.querySelector('[data-tag-index="'.concat(n,'"]'));if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),Z(n),me(n)},Se=e=>{H.current=!0,te(""),P&&P(e,"","clear"),je(e,M?[]:null,"clear")},Ae=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==Y&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(Z(-1),me(-1)),229!==t.which))switch(t.key){case"Home":de&&_&&(t.preventDefault(),ge({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":de&&_&&(t.preventDefault(),ge({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),ge({diff:-5,direction:"previous",reason:"keyboard",event:t}),ye(t);break;case"PageDown":t.preventDefault(),ge({diff:5,direction:"next",reason:"keyboard",event:t}),ye(t);break;case"ArrowDown":t.preventDefault(),ge({diff:1,direction:"next",reason:"keyboard",event:t}),ye(t);break;case"ArrowUp":t.preventDefault(),ge({diff:-1,direction:"previous",reason:"keyboard",event:t}),ye(t);break;case"ArrowLeft":Ce(t,"previous");break;case"ArrowRight":Ce(t,"next");break;case"Enter":if(-1!==X.current&&de){const e=ue[X.current],n=!!y&&y(e);if(t.preventDefault(),n)return;_e(t,e,"selectOption"),r&&V.current.setSelectionRange(V.current.value.length,V.current.value.length)}else x&&""!==ee&&!1===ce&&(M&&t.preventDefault(),_e(t,ee,"createOption","freeSolo"));break;case"Escape":de?(t.preventDefault(),t.stopPropagation(),be(t,"escape")):l&&(""!==ee||M&&Q.length>0)&&(t.preventDefault(),t.stopPropagation(),Se(t));break;case"Backspace":if(M&&!I&&""===ee&&Q.length>0){const e=-1===Y?Q.length-1:Y,n=Q.slice();n.splice(e,1),je(t,n,"removeOption",{option:Q[e]})}break;case"Delete":if(M&&!I&&""===ee&&Q.length>0&&-1!==Y){const e=Y,n=Q.slice();n.splice(e,1),je(t,n,"removeOption",{option:Q[e]})}}},ke=e=>{re(!0),N&&!H.current&&ye(e)},Me=e=>{t(U)?V.current.focus():(re(!1),W.current=!0,H.current=!1,o&&-1!==X.current&&de?_e(e,ue[X.current],"blur"):o&&x&&""!==ee?_e(e,ee,"blur","freeSolo"):s&&ie(e,Q),be(e,"blur"))},Oe=e=>{const t=e.target.value;ee!==t&&(te(t),le(!1),P&&P(e,t,"input")),""===t?u||M||je(e,null,"clear"):ye(e)},Te=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));X.current!==t&&fe({event:e,index:t,reason:"mouse"})},Ee=e=>{fe({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),we.current=!0},Pe=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));_e(e,ue[t],"selectOption"),we.current=!1},De=e=>t=>{const n=Q.slice();n.splice(e,1),je(t,n,"removeOption",{option:Q[e]})},Re=e=>{oe?be(e,"toggleInput"):ye(e)},Ne=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==B&&e.preventDefault()},Le=e=>{e.currentTarget.contains(e.target)&&(V.current.focus(),F&&W.current&&V.current.selectionEnd-V.current.selectionStart===0&&V.current.select(),W.current=!1)},Ie=e=>{h||""!==ee&&oe||Re(e)};let Fe=x&&ee.length>0;Fe=Fe||(M?Q.length>0:null!==Q);let $e=ue;if(w){new Map;$e=ue.reduce((e,t,n)=>{const r=w(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])}return h&&ne&&Me(),{getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,Ft.A)({"aria-owns":he?"".concat(B,"-listbox"):null},e,{onKeyDown:Ae(e),onMouseDown:Ne,onClick:Le})},getInputLabelProps:()=>({id:"".concat(B,"-label"),htmlFor:B}),getInputProps:()=>({id:B,value:ee,onBlur:Me,onFocus:ke,onChange:Oe,onMouseDown:Ie,"aria-activedescendant":de?"":null,"aria-autocomplete":r?"both":"list","aria-controls":he?"".concat(B,"-listbox"):void 0,"aria-expanded":he,autoComplete:"off",ref:V,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:h}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Se}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Re}),getTagProps:e=>{let{index:t}=e;return(0,Ft.A)({key:t,"data-tag-index":t,tabIndex:-1},!I&&{onDelete:De(t)})},getListboxProps:()=>({role:"listbox",id:"".concat(B,"-listbox"),"aria-labelledby":"".concat(B,"-label"),ref:xe,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:e=>{let{index:t,option:n}=e;var r;const i=(M?Q:[Q]).some(e=>null!=e&&k(n,e)),o=!!y&&y(n);return{key:null!=(r=null==b?void 0:b(n))?r:z(n),tabIndex:-1,role:"option",id:"".concat(B,"-option-").concat(t),onMouseMove:Te,onClick:Pe,onTouchStart:Ee,"data-option-index":t,"aria-disabled":o,"aria-selected":i}},id:B,inputValue:ee,value:Q,dirty:Fe,expanded:de&&q,popupOpen:de,focused:ne||-1!==Y,anchorEl:q,setAnchorEl:G,focusedTag:Y,groupedOptions:$e}};function rb(e){return(0,sr.Ay)("MuiListSubheader",e)}(0,ar.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const ib=["className","color","component","disableGutters","disableSticky","inset"],ob=(0,Un.Ay)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,Fu.A)(n.color))],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},"primary"===n.color&&{color:(t.vars||t).palette.primary.main},"inherit"===n.color&&{color:"inherit"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.inset&&{paddingLeft:72},!n.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})}),ab=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiListSubheader"}),{className:r,color:i="default",component:o="li",disableGutters:a=!1,disableSticky:s=!1,inset:l=!1}=n,c=(0,nn.A)(n,ib),d=(0,Ft.A)({},n,{color:i,component:o,disableGutters:a,disableSticky:s,inset:l}),u=(e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,a={root:["root","default"!==n&&"color".concat((0,Fu.A)(n)),!r&&"gutters",i&&"inset",!o&&"sticky"]};return(0,ir.A)(a,rb,t)})(d);return(0,Gt.jsx)(ob,(0,Ft.A)({as:o,className:(0,nr.A)(u.root,r),ref:t,ownerState:d},c))});ab.muiSkipListHighlight=!0;const sb=ab,lb=(0,dy.A)((0,Gt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function cb(e){return(0,sr.Ay)("MuiChip",e)}const db=(0,ar.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),ub=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],pb=(0,Un.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:a,size:s,variant:l}=n;return[{["& .".concat(db.avatar)]:t.avatar},{["& .".concat(db.avatar)]:t["avatar".concat((0,Fu.A)(s))]},{["& .".concat(db.avatar)]:t["avatarColor".concat((0,Fu.A)(r))]},{["& .".concat(db.icon)]:t.icon},{["& .".concat(db.icon)]:t["icon".concat((0,Fu.A)(s))]},{["& .".concat(db.icon)]:t["iconColor".concat((0,Fu.A)(i))]},{["& .".concat(db.deleteIcon)]:t.deleteIcon},{["& .".concat(db.deleteIcon)]:t["deleteIcon".concat((0,Fu.A)(s))]},{["& .".concat(db.deleteIcon)]:t["deleteIconColor".concat((0,Fu.A)(r))]},{["& .".concat(db.deleteIcon)]:t["deleteIcon".concat((0,Fu.A)(l),"Color").concat((0,Fu.A)(r))]},t.root,t["size".concat((0,Fu.A)(s))],t["color".concat((0,Fu.A)(r))],o&&t.clickable,o&&"default"!==r&&t["clickableColor".concat((0,Fu.A)(r),")")],a&&t.deletable,a&&"default"!==r&&t["deletableColor".concat((0,Fu.A)(r))],t[l],t["".concat(l).concat((0,Fu.A)(r))]]}})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,Ft.A)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",["&.".concat(db.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["& .".concat(db.avatar)]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:r,fontSize:t.typography.pxToRem(12)},["& .".concat(db.avatarColorPrimary)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},["& .".concat(db.avatarColorSecondary)]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},["& .".concat(db.avatarSmall)]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},["& .".concat(db.icon)]:(0,Ft.A)({marginLeft:5,marginRight:-6},"small"===n.size&&{fontSize:18,marginLeft:4,marginRight:-4},n.iconColor===n.color&&(0,Ft.A)({color:t.vars?t.vars.palette.Chip.defaultIconColor:r},"default"!==n.color&&{color:"inherit"})),["& .".concat(db.deleteIcon)]:(0,Ft.A)({WebkitTapHighlightColor:"transparent",color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.26)"):(0,$u.X4)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.4)"):(0,$u.X4)(t.palette.text.primary,.4)}},"small"===n.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==n.color&&{color:t.vars?"rgba(".concat(t.vars.palette[n.color].contrastTextChannel," / 0.7)"):(0,$u.X4)(t.palette[n.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].contrastText}})},"small"===n.size&&{height:24},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},n.onDelete&&{["&.".concat(db.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,$u.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},n.onDelete&&"default"!==n.color&&{["&.".concat(db.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},n.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,$u.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},["&.".concat(db.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,$u.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},n.clickable&&"default"!==n.color&&{["&:hover, &.".concat(db.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},"outlined"===n.variant&&{backgroundColor:"transparent",border:t.vars?"1px solid ".concat(t.vars.palette.Chip.defaultBorder):"1px solid ".concat("light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]),["&.".concat(db.clickable,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(db.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["& .".concat(db.avatar)]:{marginLeft:4},["& .".concat(db.avatarSmall)]:{marginLeft:2},["& .".concat(db.icon)]:{marginLeft:4},["& .".concat(db.iconSmall)]:{marginLeft:2},["& .".concat(db.deleteIcon)]:{marginRight:5},["& .".concat(db.deleteIconSmall)]:{marginRight:3}},"outlined"===n.variant&&"default"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,$u.X4)(t.palette[n.color].main,.7)),["&.".concat(db.clickable,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity)},["&.".concat(db.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,$u.X4)(t.palette[n.color].main,t.palette.action.focusOpacity)},["& .".concat(db.deleteIcon)]:{color:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,$u.X4)(t.palette[n.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].main}}})}),hb=(0,Un.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t["label".concat((0,Fu.A)(r))]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===t.variant&&{paddingLeft:11,paddingRight:11},"small"===t.size&&{paddingLeft:8,paddingRight:8},"small"===t.size&&"outlined"===t.variant&&{paddingLeft:7,paddingRight:7})});function mb(e){return"Backspace"===e.key||"Delete"===e.key}const fb=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiChip"}),{avatar:r,className:i,clickable:o,color:a="default",component:s,deleteIcon:l,disabled:c=!1,icon:d,label:u,onClick:p,onDelete:h,onKeyDown:m,onKeyUp:f,size:g="medium",variant:v="filled",tabIndex:x,skipFocusWhenDisabled:y=!1}=n,b=(0,nn.A)(n,ub),j=We.useRef(null),w=(0,Ln.A)(j,t),_=e=>{e.stopPropagation(),h&&h(e)},C=!(!1===o||!p)||o,S=C||h?Dp:s||"div",A=(0,Ft.A)({},n,{component:S,disabled:c,size:g,color:a,iconColor:We.isValidElement(d)&&d.props.color||a,onDelete:!!h,clickable:C,variant:v}),k=(e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled","size".concat((0,Fu.A)(r)),"color".concat((0,Fu.A)(i)),s&&"clickable",s&&"clickableColor".concat((0,Fu.A)(i)),a&&"deletable",a&&"deletableColor".concat((0,Fu.A)(i)),"".concat(l).concat((0,Fu.A)(i))],label:["label","label".concat((0,Fu.A)(r))],avatar:["avatar","avatar".concat((0,Fu.A)(r)),"avatarColor".concat((0,Fu.A)(i))],icon:["icon","icon".concat((0,Fu.A)(r)),"iconColor".concat((0,Fu.A)(o))],deleteIcon:["deleteIcon","deleteIcon".concat((0,Fu.A)(r)),"deleteIconColor".concat((0,Fu.A)(i)),"deleteIcon".concat((0,Fu.A)(l),"Color").concat((0,Fu.A)(i))]};return(0,ir.A)(c,cb,t)})(A),M=S===Dp?(0,Ft.A)({component:s||"div",focusVisibleClassName:k.focusVisible},h&&{disableRipple:!0}):{};let O=null;h&&(O=l&&We.isValidElement(l)?We.cloneElement(l,{className:(0,nr.A)(l.props.className,k.deleteIcon),onClick:_}):(0,Gt.jsx)(lb,{className:(0,nr.A)(k.deleteIcon),onClick:_}));let T=null;r&&We.isValidElement(r)&&(T=We.cloneElement(r,{className:(0,nr.A)(k.avatar,r.props.className)}));let E=null;return d&&We.isValidElement(d)&&(E=We.cloneElement(d,{className:(0,nr.A)(k.icon,d.props.className)})),(0,Gt.jsxs)(pb,(0,Ft.A)({as:S,className:(0,nr.A)(k.root,i),disabled:!(!C||!c)||void 0,onClick:p,onKeyDown:e=>{e.currentTarget===e.target&&mb(e)&&e.preventDefault(),m&&m(e)},onKeyUp:e=>{e.currentTarget===e.target&&(h&&mb(e)?h(e):"Escape"===e.key&&j.current&&j.current.blur()),f&&f(e)},ref:w,tabIndex:y&&c?-1:x,ownerState:A},M,b,{children:[T||E,(0,Gt.jsx)(hb,{className:(0,nr.A)(k.label),ownerState:A,children:u}),O]}))}),gb=fb;function vb(e){return(0,sr.Ay)("MuiInputBase",e)}const xb=(0,ar.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);function yb(e){return(0,sr.Ay)("MuiInput",e)}const bb=(0,Ft.A)({},xb,(0,ar.A)("MuiInput",["root","underline","input"]));function jb(e){return(0,sr.Ay)("MuiOutlinedInput",e)}const wb=(0,Ft.A)({},xb,(0,ar.A)("MuiOutlinedInput",["root","notchedOutline","input"]));function _b(e){return(0,sr.Ay)("MuiFilledInput",e)}const Cb=(0,Ft.A)({},xb,(0,ar.A)("MuiFilledInput",["root","underline","input"])),Sb=(0,dy.A)((0,Gt.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Ab=(0,dy.A)((0,Gt.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function kb(e){return(0,sr.Ay)("MuiAutocomplete",e)}const Mb=(0,ar.A)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var Ob,Tb;const Eb=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Pb=["ref"],Db=["key"],Rb=["key"],Nb=(0,Un.Ay)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:o,inputFocused:a,size:s}=n;return[{["& .".concat(Mb.tag)]:t.tag},{["& .".concat(Mb.tag)]:t["tagSize".concat((0,Fu.A)(s))]},{["& .".concat(Mb.inputRoot)]:t.inputRoot},{["& .".concat(Mb.input)]:t.input},{["& .".concat(Mb.input)]:a&&t.inputFocused},t.root,r&&t.fullWidth,o&&t.hasPopupIcon,i&&t.hasClearIcon]}})({["&.".concat(Mb.focused," .").concat(Mb.clearIndicator)]:{visibility:"visible"},"@media (pointer: fine)":{["&:hover .".concat(Mb.clearIndicator)]:{visibility:"visible"}},["& .".concat(Mb.tag)]:{margin:3,maxWidth:"calc(100% - 6px)"},["& .".concat(Mb.inputRoot)]:{[".".concat(Mb.hasPopupIcon,"&, .").concat(Mb.hasClearIcon,"&")]:{paddingRight:30},[".".concat(Mb.hasPopupIcon,".").concat(Mb.hasClearIcon,"&")]:{paddingRight:56},["& .".concat(Mb.input)]:{width:0,minWidth:30}},["& .".concat(bb.root)]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},["& .".concat(bb.root,".").concat(xb.sizeSmall)]:{["& .".concat(bb.input)]:{padding:"2px 4px 3px 0"}},["& .".concat(wb.root)]:{padding:9,[".".concat(Mb.hasPopupIcon,"&, .").concat(Mb.hasClearIcon,"&")]:{paddingRight:39},[".".concat(Mb.hasPopupIcon,".").concat(Mb.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(Mb.input)]:{padding:"7.5px 4px 7.5px 5px"},["& .".concat(Mb.endAdornment)]:{right:9}},["& .".concat(wb.root,".").concat(xb.sizeSmall)]:{paddingTop:6,paddingBottom:6,paddingLeft:6,["& .".concat(Mb.input)]:{padding:"2.5px 4px 2.5px 8px"}},["& .".concat(Cb.root)]:{paddingTop:19,paddingLeft:8,[".".concat(Mb.hasPopupIcon,"&, .").concat(Mb.hasClearIcon,"&")]:{paddingRight:39},[".".concat(Mb.hasPopupIcon,".").concat(Mb.hasClearIcon,"&")]:{paddingRight:65},["& .".concat(Cb.input)]:{padding:"7px 4px"},["& .".concat(Mb.endAdornment)]:{right:9}},["& .".concat(Cb.root,".").concat(xb.sizeSmall)]:{paddingBottom:1,["& .".concat(Cb.input)]:{padding:"2.5px 4px"}},["& .".concat(xb.hiddenLabel)]:{paddingTop:8},["& .".concat(Cb.root,".").concat(xb.hiddenLabel)]:{paddingTop:0,paddingBottom:0,["& .".concat(Mb.input)]:{paddingTop:16,paddingBottom:17}},["& .".concat(Cb.root,".").concat(xb.hiddenLabel,".").concat(xb.sizeSmall)]:{["& .".concat(Mb.input)]:{paddingTop:8,paddingBottom:9}},["& .".concat(Mb.input)]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{["& .".concat(Mb.tag)]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{["& .".concat(Mb.input)]:{opacity:1}}},{props:{multiple:!0},style:{["& .".concat(Mb.inputRoot)]:{flexWrap:"wrap"}}}]}),Lb=(0,Un.Ay)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Ib=(0,Un.Ay)(Kp,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Fb=(0,Un.Ay)(Kp,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Ft.A)({},t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen)}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),$b=(0,Un.Ay)(Dx,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Mb.option)]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}}),Bb=(0,Un.Ay)(Uu,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(e=>{let{theme:t}=e;return(0,Ft.A)({},t.typography.body1,{overflow:"auto"})}),zb=(0,Un.Ay)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}}),Hb=(0,Un.Ay)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(e=>{let{theme:t}=e;return{color:(t.vars||t).palette.text.secondary,padding:"14px 16px"}}),Wb=(0,Un.Ay)("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(e=>{let{theme:t}=e;return{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",["& .".concat(Mb.option)]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},["&.".concat(Mb.focused)]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["&.".concat(Mb.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(Mb.focused)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(Mb.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}}}),Vb=(0,Un.Ay)(sb,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,top:-8}}),Ub=(0,Un.Ay)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,["& .".concat(Mb.option)]:{paddingLeft:24}}),qb=We.forwardRef(function(e,t){var n,r,i,o;const a=(0,$t.b)({props:e,name:"MuiAutocomplete"}),{autoComplete:s=!1,autoHighlight:l=!1,autoSelect:c=!1,blurOnSelect:d=!1,ChipProps:u,className:p,clearIcon:h=Ob||(Ob=(0,Gt.jsx)(Sb,{fontSize:"small"})),clearOnBlur:m=!a.freeSolo,clearOnEscape:f=!1,clearText:g="Clear",closeText:v="Close",componentsProps:x={},defaultValue:y=(a.multiple?[]:null),disableClearable:b=!1,disableCloseOnSelect:j=!1,disabled:w=!1,disabledItemsFocusable:_=!1,disableListWrap:C=!1,disablePortal:S=!1,filterSelectedOptions:A=!1,forcePopupIcon:k="auto",freeSolo:M=!1,fullWidth:O=!1,getLimitTagsText:T=e=>"+".concat(e),getOptionLabel:E,groupBy:P,handleHomeEndKeys:D=!a.freeSolo,includeInputInList:R=!1,limitTags:N=-1,ListboxComponent:L="ul",ListboxProps:I,loading:F=!1,loadingText:$="Loading\u2026",multiple:B=!1,noOptionsText:z="No options",openOnFocus:H=!1,openText:W="Open",PaperComponent:V=Uu,PopperComponent:U=Dx,popupIcon:q=Tb||(Tb=(0,Gt.jsx)(Ab,{})),readOnly:G=!1,renderGroup:Y,renderInput:Z,renderOption:K,renderTags:X,selectOnFocus:Q=!a.freeSolo,size:J="medium",slotProps:ee={}}=a,te=(0,nn.A)(a,Eb),{getRootProps:ne,getInputProps:re,getInputLabelProps:ie,getPopupIndicatorProps:oe,getClearProps:ae,getTagProps:se,getListboxProps:le,getOptionProps:ce,value:de,dirty:ue,expanded:pe,id:he,popupOpen:me,focused:fe,focusedTag:ge,anchorEl:ve,setAnchorEl:xe,inputValue:ye,groupedOptions:be}=nb((0,Ft.A)({},a,{componentName:"Autocomplete"})),je=!b&&!w&&ue&&!G,we=(!M||!0===k)&&!1!==k,{onMouseDown:_e}=re(),{ref:Ce}=null!=I?I:{},Se=le(),{ref:Ae}=Se,ke=(0,nn.A)(Se,Pb),Me=(0,Ln.A)(Ae,Ce),Oe=E||(e=>{var t;return null!=(t=e.label)?t:e}),Te=(0,Ft.A)({},a,{disablePortal:S,expanded:pe,focused:fe,fullWidth:O,getOptionLabel:Oe,hasClearIcon:je,hasPopupIcon:we,inputFocused:-1===ge,popupOpen:me,size:J}),Ee=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:o,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:d}=e,u={root:["root",r&&"expanded",i&&"focused",o&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag","tagSize".concat((0,Fu.A)(d))],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,ir.A)(u,kb,t)})(Te);let Pe;if(B&&de.length>0){const e=e=>(0,Ft.A)({className:Ee.tag,disabled:w},se(e));Pe=X?X(de,e,Te):de.map((t,n)=>{const r=e({index:n}),{key:i}=r,o=(0,nn.A)(r,Db);return(0,Gt.jsx)(gb,(0,Ft.A)({label:Oe(t),size:J},o,u),i)})}if(N>-1&&Array.isArray(Pe)){const e=Pe.length-N;!fe&&e>0&&(Pe=Pe.splice(0,N),Pe.push((0,Gt.jsx)("span",{className:Ee.tag,children:T(e)},Pe.length)))}const De=Y||(e=>(0,Gt.jsxs)("li",{children:[(0,Gt.jsx)(Vb,{className:Ee.groupLabel,ownerState:Te,component:"div",children:e.group}),(0,Gt.jsx)(Ub,{className:Ee.groupUl,ownerState:Te,children:e.children})]},e.key)),Re=K||((e,t)=>{const{key:n}=e,r=(0,nn.A)(e,Rb);return(0,Gt.jsx)("li",(0,Ft.A)({},r,{children:Oe(t)}),n)}),Ne=(e,t)=>{const n=ce({option:e,index:t});return Re((0,Ft.A)({},n,{className:Ee.option}),e,{selected:n["aria-selected"],index:t,inputValue:ye},Te)},Le=null!=(n=ee.clearIndicator)?n:x.clearIndicator,Ie=null!=(r=ee.paper)?r:x.paper,Fe=null!=(i=ee.popper)?i:x.popper,$e=null!=(o=ee.popupIndicator)?o:x.popupIndicator;return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)(Nb,(0,Ft.A)({ref:t,className:(0,nr.A)(Ee.root,p),ownerState:Te},ne(te),{children:Z({id:he,disabled:w,fullWidth:!0,size:"small"===J?"small":void 0,InputLabelProps:ie(),InputProps:(0,Ft.A)({ref:xe,className:Ee.inputRoot,startAdornment:Pe,onClick:e=>{e.target===e.currentTarget&&_e(e)}},(je||we)&&{endAdornment:(0,Gt.jsxs)(Lb,{className:Ee.endAdornment,ownerState:Te,children:[je?(0,Gt.jsx)(Ib,(0,Ft.A)({},ae(),{"aria-label":g,title:g,ownerState:Te},Le,{className:(0,nr.A)(Ee.clearIndicator,null==Le?void 0:Le.className),children:h})):null,we?(0,Gt.jsx)(Fb,(0,Ft.A)({},oe(),{disabled:w,"aria-label":me?v:W,title:me?v:W,ownerState:Te},$e,{className:(0,nr.A)(Ee.popupIndicator,null==$e?void 0:$e.className),children:q})):null]})}),inputProps:(0,Ft.A)({className:Ee.input,disabled:w,readOnly:G},re())})})),ve?(0,Gt.jsx)($b,(0,Ft.A)({as:U,disablePortal:S,style:{width:ve?ve.clientWidth:null},ownerState:Te,role:"presentation",anchorEl:ve,open:me},Fe,{className:(0,nr.A)(Ee.popper,null==Fe?void 0:Fe.className),children:(0,Gt.jsxs)(Bb,(0,Ft.A)({ownerState:Te,as:V},Ie,{className:(0,nr.A)(Ee.paper,null==Ie?void 0:Ie.className),children:[F&&0===be.length?(0,Gt.jsx)(zb,{className:Ee.loading,ownerState:Te,children:$}):null,0!==be.length||M||F?null:(0,Gt.jsx)(Hb,{className:Ee.noOptions,ownerState:Te,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:z}),be.length>0?(0,Gt.jsx)(Wb,(0,Ft.A)({as:L,className:Ee.listbox,ownerState:Te},ke,I,{ref:Me,children:be.map((e,t)=>P?De({key:e.key,group:e.group,children:e.options.map((t,n)=>Ne(t,e.index+n))}):Ne(e,t))})):null]}))})):null]})}),Gb=qb;var Yb=n(19172),Zb=n(83468);const Kb=["onChange","maxRows","minRows","style","value"];function Xb(e){return parseInt(e,10)||0}const Qb={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Jb(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const ej=We.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:o,value:a}=e,s=(0,nn.A)(e,Kb),{current:l}=We.useRef(null!=a),c=We.useRef(null),d=(0,gr.A)(t,c),u=We.useRef(null),p=We.useRef(null),h=We.useCallback(()=>{const t=c.current,n=p.current;if(!t||!n)return;const o=(0,qh.A)(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=Xb(o.paddingBottom)+Xb(o.paddingTop),l=Xb(o.borderBottomWidth)+Xb(o.borderTopWidth),d=n.scrollHeight;n.value="x";const u=n.scrollHeight;let h=d;i&&(h=Math.max(Number(i)*u,h)),r&&(h=Math.min(Number(r)*u,h)),h=Math.max(h,u);return{outerHeightStyle:h+("border-box"===a?s+l:0),overflowing:Math.abs(h-d)<=1}},[r,i,e.placeholder]),m=(0,vr.A)(()=>{const e=c.current,t=h();if(!e||!t||Jb(t))return!1;const n=t.outerHeightStyle;return null!=u.current&&u.current!==n}),f=We.useCallback(()=>{const e=c.current,t=h();if(!e||!t||Jb(t))return;const n=t.outerHeightStyle;u.current!==n&&(u.current=n,e.style.height="".concat(n,"px")),e.style.overflow=t.overflowing?"hidden":""},[h]),g=We.useRef(-1);(0,hn.A)(()=>{const e=(0,Zb.A)(f),t=null==c?void 0:c.current;if(!t)return;const n=(0,qh.A)(t);let r;return n.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),f(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,f,m]),(0,hn.A)(()=>{f()});return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)("textarea",(0,Ft.A)({value:a,onChange:e=>{l||f(),n&&n(e)},ref:d,rows:i,style:o},s)),(0,Gt.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:(0,Ft.A)({},Qb,o,{paddingTop:0,paddingBottom:0})})]})}),tj=ej;function nj(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e),{})}const rj=We.createContext(void 0);function ij(){return We.useContext(rj)}function oj(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function aj(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(oj(e.value)&&""!==e.value||t&&oj(e.defaultValue)&&""!==e.defaultValue)}const sj=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],lj=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat((0,Fu.A)(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},cj=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},dj=(0,Un.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:lj})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",["&.".concat(xb.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,Ft.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})}),uj=(0,Un.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:cj})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,i=(0,Ft.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),o={opacity:"0 !important"},a=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,Ft.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(xb.formControl," &")]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},["&.".concat(xb.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})}),pj=(0,Gt.jsx)(Qt,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),hj=We.forwardRef(function(e,t){var n;const r=(0,$t.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,components:l={},componentsProps:c={},defaultValue:d,disabled:u,disableInjectingGlobalStyles:p,endAdornment:h,fullWidth:m=!1,id:f,inputComponent:g="input",inputProps:v={},inputRef:x,maxRows:y,minRows:b,multiline:j=!1,name:w,onBlur:_,onChange:C,onClick:S,onFocus:A,onKeyDown:k,onKeyUp:M,placeholder:O,readOnly:T,renderSuffix:E,rows:P,slotProps:D={},slots:R={},startAdornment:N,type:L="text",value:I}=r,F=(0,nn.A)(r,sj),$=null!=v.value?v.value:I,{current:B}=We.useRef(null!=$),z=We.useRef(),H=We.useCallback(e=>{0},[]),W=(0,Ln.A)(z,x,v.ref,H),[V,U]=We.useState(!1),q=ij();const G=nj({props:r,muiFormControl:q,states:["color","disabled","error","hiddenLabel","size","required","filled"]});G.focused=q?q.focused:V,We.useEffect(()=>{!q&&u&&V&&(U(!1),_&&_())},[q,u,V,_]);const Y=q&&q.onFilled,Z=q&&q.onEmpty,K=We.useCallback(e=>{aj(e)?Y&&Y():Z&&Z()},[Y,Z]);(0,gh.A)(()=>{B&&K({value:$})},[$,K,B]);We.useEffect(()=>{K(z.current)},[]);let X=g,Q=v;j&&"input"===X&&(Q=P?(0,Ft.A)({type:void 0,minRows:P,maxRows:P},Q):(0,Ft.A)({type:void 0,maxRows:y,minRows:b},Q),X=tj);We.useEffect(()=>{q&&q.setAdornedStart(Boolean(N))},[q,N]);const J=(0,Ft.A)({},r,{color:G.color||"primary",disabled:G.disabled,endAdornment:h,error:G.error,focused:G.focused,formControl:q,fullWidth:m,hiddenLabel:G.hiddenLabel,multiline:j,size:G.size,startAdornment:N,type:L}),ee=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:d,readOnly:u,size:p,startAdornment:h,type:m}=e,f={root:["root","color".concat((0,Fu.A)(n)),r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&"size".concat((0,Fu.A)(p)),d&&"multiline",h&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",u&&"readOnly"],input:["input",r&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",h&&"inputAdornedStart",o&&"inputAdornedEnd",u&&"readOnly"]};return(0,ir.A)(f,vb,t)})(J),te=R.root||l.Root||dj,ne=D.root||c.root||{},re=R.input||l.Input||uj;return Q=(0,Ft.A)({},Q,null!=(n=D.input)?n:c.input),(0,Gt.jsxs)(We.Fragment,{children:[!p&&pj,(0,Gt.jsxs)(te,(0,Ft.A)({},ne,!Xp(te)&&{ownerState:(0,Ft.A)({},J,ne.ownerState)},{ref:t,onClick:e=>{z.current&&e.currentTarget===e.target&&z.current.focus(),S&&S(e)}},F,{className:(0,nr.A)(ee.root,ne.className,s,T&&"MuiInputBase-readOnly"),children:[N,(0,Gt.jsx)(rj.Provider,{value:null,children:(0,Gt.jsx)(re,(0,Ft.A)({ownerState:J,"aria-invalid":G.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:d,disabled:G.disabled,id:f,onAnimationStart:e=>{K("mui-auto-fill-cancel"===e.animationName?z.current:{value:"x"})},name:w,placeholder:O,readOnly:T,required:G.required,rows:P,value:$,onKeyDown:k,onKeyUp:M,type:L},Q,!Xp(re)&&{as:X,ownerState:(0,Ft.A)({},J,Q.ownerState)},{ref:W,className:(0,nr.A)(ee.input,Q.className,T&&"MuiInputBase-readOnly"),onBlur:e=>{_&&_(e),v.onBlur&&v.onBlur(e),q&&q.onBlur?q.onBlur(e):U(!1)},onChange:function(e){if(!B){const t=e.target||z.current;if(null==t)throw new Error((0,qn.A)(1));K({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];v.onChange&&v.onChange(e,...n),C&&C(e,...n)},onFocus:e=>{G.disabled?e.stopPropagation():(A&&A(e),v.onFocus&&v.onFocus(e),q&&q.onFocus?q.onFocus(e):U(!0))}}))}),h,E?E((0,Ft.A)({},G,{startAdornment:N})):null]}))]})}),mj=hj,fj=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],gj=(0,Un.Ay)(dj,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...lj(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,Ft.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[n.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(bb.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(bb.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(bb.disabled,", .").concat(bb.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},["&.".concat(bb.disabled,":before")]:{borderBottomStyle:"dotted"}})}),vj=(0,Un.Ay)(uj,{name:"MuiInput",slot:"Input",overridesResolver:cj})({}),xj=We.forwardRef(function(e,t){var n,r,i,o;const a=(0,$t.b)({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:d=!1,inputComponent:u="input",multiline:p=!1,slotProps:h,slots:m={},type:f="text"}=a,g=(0,nn.A)(a,fj),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,ir.A)(r,yb,t);return(0,Ft.A)({},t,i)})(a),x={root:{ownerState:{disableUnderline:s}}},y=(null!=h?h:c)?(0,Yb.A)(null!=h?h:c,x):x,b=null!=(n=null!=(r=m.root)?r:l.Root)?n:gj,j=null!=(i=null!=(o=m.input)?o:l.Input)?i:vj;return(0,Gt.jsx)(mj,(0,Ft.A)({slots:{root:b,input:j},slotProps:y,fullWidth:d,inputComponent:u,multiline:p,ref:t,type:f},g,{classes:v}))});xj.muiName="Input";const yj=xj,bj=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],jj=(0,Un.Ay)(dj,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...lj(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;var r;const i="light"===t.palette.mode,o=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,Ft.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a}},["&.".concat(Cb.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},["&.".concat(Cb.disabled)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(Cb.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(Cb.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")"):o),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(Cb.disabled,", .").concat(Cb.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(Cb.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,Ft.A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))}),wj=(0,Un.Ay)(uj,{name:"MuiFilledInput",slot:"Input",overridesResolver:cj})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})}),_j=We.forwardRef(function(e,t){var n,r,i,o;const a=(0,$t.b)({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:d="input",multiline:u=!1,slotProps:p,slots:h={},type:m="text"}=a,f=(0,nn.A)(a,bj),g=(0,Ft.A)({},a,{fullWidth:c,inputComponent:d,multiline:u,type:m}),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,ir.A)(r,_b,t);return(0,Ft.A)({},t,i)})(a),x={root:{ownerState:g},input:{ownerState:g}},y=(null!=p?p:l)?(0,Yb.A)(x,null!=p?p:l):x,b=null!=(n=null!=(r=h.root)?r:s.Root)?n:jj,j=null!=(i=null!=(o=h.input)?o:s.Input)?i:wj;return(0,Gt.jsx)(mj,(0,Ft.A)({slots:{root:b,input:j},componentsProps:y,fullWidth:c,inputComponent:d,multiline:u,ref:t,type:m},f,{classes:v}))});_j.muiName="Input";const Cj=_j;var Sj;const Aj=["children","classes","className","label","notched"],kj=(0,Un.Ay)("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ju.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Mj=(0,Un.Ay)("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ju.A})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,Ft.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))});const Oj=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Tj=(0,Un.Ay)(dj,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:lj})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,Ft.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(wb.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(wb.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):r}},["&.".concat(wb.focused," .").concat(wb.notchedOutline)]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},["&.".concat(wb.error," .").concat(wb.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(wb.disabled," .").concat(wb.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,Ft.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))}),Ej=(0,Un.Ay)(function(e){const{className:t,label:n,notched:r}=e,i=(0,nn.A)(e,Aj),o=null!=n&&""!==n,a=(0,Ft.A)({},e,{notched:r,withLabel:o});return(0,Gt.jsx)(kj,(0,Ft.A)({"aria-hidden":!0,className:t,ownerState:a},i,{children:(0,Gt.jsx)(Mj,{ownerState:a,children:o?(0,Gt.jsx)("span",{children:n}):Sj||(Sj=(0,Gt.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}}),Pj=(0,Un.Ay)(uj,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:cj})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})}),Dj=We.forwardRef(function(e,t){var n,r,i,o,a;const s=(0,$t.b)({props:e,name:"MuiOutlinedInput"}),{components:l={},fullWidth:c=!1,inputComponent:d="input",label:u,multiline:p=!1,notched:h,slots:m={},type:f="text"}=s,g=(0,nn.A)(s,Oj),v=(e=>{const{classes:t}=e,n=(0,ir.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},jb,t);return(0,Ft.A)({},t,n)})(s),x=ij(),y=nj({props:s,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b=(0,Ft.A)({},s,{color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:x,fullWidth:c,hiddenLabel:y.hiddenLabel,multiline:p,size:y.size,type:f}),j=null!=(n=null!=(r=m.root)?r:l.Root)?n:Tj,w=null!=(i=null!=(o=m.input)?o:l.Input)?i:Pj;return(0,Gt.jsx)(mj,(0,Ft.A)({slots:{root:j,input:w},renderSuffix:e=>(0,Gt.jsx)(Ej,{ownerState:b,className:v.notchedOutline,label:null!=u&&""!==u&&y.required?a||(a=(0,Gt.jsxs)(We.Fragment,{children:[u,"\u2009","*"]})):u,notched:"undefined"!==typeof h?h:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:c,inputComponent:d,multiline:p,ref:t,type:f},g,{classes:(0,Ft.A)({},v,{notchedOutline:null})}))});Dj.muiName="Input";const Rj=Dj;function Nj(e){return(0,sr.Ay)("MuiFormLabel",e)}const Lj=(0,ar.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Ij=["children","className","color","component","disabled","error","filled","focused","required"],Fj=(0,Un.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Ft.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(Lj.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(Lj.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Lj.error)]:{color:(t.vars||t).palette.error.main}})}),$j=(0,Un.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(Lj.error)]:{color:(t.vars||t).palette.error.main}}}),Bj=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFormLabel"}),{children:r,className:i,component:o="label"}=n,a=(0,nn.A)(n,Ij),s=nj({props:n,muiFormControl:ij(),states:["color","required","focused","disabled","error","filled"]}),l=(0,Ft.A)({},n,{color:s.color||"primary",component:o,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:a,required:s}=e,l={root:["root","color".concat((0,Fu.A)(n)),i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return(0,ir.A)(l,Nj,t)})(l);return(0,Gt.jsxs)(Fj,(0,Ft.A)({as:o,ownerState:l,className:(0,nr.A)(c.root,i),ref:t},a,{children:[r,s.required&&(0,Gt.jsxs)($j,{ownerState:l,"aria-hidden":!0,className:c.asterisk,children:["\u2009","*"]})]}))}),zj=Bj;function Hj(e){return(0,sr.Ay)("MuiInputLabel",e)}(0,ar.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Wj=["disableAnimation","margin","shrink","variant","className"],Vj=(0,Un.Ay)(zj,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Lj.asterisk)]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,Ft.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,Ft.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,Ft.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))}),Uj=We.forwardRef(function(e,t){const n=(0,$t.b)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:i,className:o}=n,a=(0,nn.A)(n,Wj),s=ij();let l=i;"undefined"===typeof l&&s&&(l=s.filled||s.focused||s.adornedStart);const c=nj({props:n,muiFormControl:s,states:["size","variant","required","focused"]}),d=(0,Ft.A)({},n,{disableAnimation:r,formControl:s,shrink:l,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),u=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:a,required:s}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&"normal"!==r&&"size".concat((0,Fu.A)(r)),a],asterisk:[s&&"asterisk"]},c=(0,ir.A)(l,Hj,t);return(0,Ft.A)({},t,c)})(d);return(0,Gt.jsx)(Vj,(0,Ft.A)({"data-shrink":l,ownerState:d,ref:t,className:(0,nr.A)(u.root,o)},a,{classes:u}))}),qj=Uj;function Gj(e){return(0,sr.Ay)("MuiFormControl",e)}(0,ar.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Yj=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Zj=(0,Un.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,Ft.A)({},t.root,t["margin".concat((0,Fu.A)(n.margin))],n.fullWidth&&t.fullWidth)}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})}),Kj=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFormControl"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,error:l=!1,focused:c,fullWidth:d=!1,hiddenLabel:u=!1,margin:p="none",required:h=!1,size:m="medium",variant:f="outlined"}=n,g=(0,nn.A)(n,Yj),v=(0,Ft.A)({},n,{color:o,component:a,disabled:s,error:l,fullWidth:d,hiddenLabel:u,margin:p,required:h,size:m,variant:f}),x=(e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root","none"!==n&&"margin".concat((0,Fu.A)(n)),r&&"fullWidth"]};return(0,ir.A)(i,Gj,t)})(v),[y,b]=We.useState(()=>{let e=!1;return r&&We.Children.forEach(r,t=>{if(!(0,If.A)(t,["Input","Select"]))return;const n=(0,If.A)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[j,w]=We.useState(()=>{let e=!1;return r&&We.Children.forEach(r,t=>{(0,If.A)(t,["Input","Select"])&&(aj(t.props,!0)||aj(t.props.inputProps,!0))&&(e=!0)}),e}),[_,C]=We.useState(!1);s&&_&&C(!1);const S=void 0===c||s?_:c;let A;const k=We.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:o,disabled:s,error:l,filled:j,focused:S,fullWidth:d,hiddenLabel:u,size:m,onBlur:()=>{C(!1)},onEmpty:()=>{w(!1)},onFilled:()=>{w(!0)},onFocus:()=>{C(!0)},registerEffect:A,required:h,variant:f}),[y,o,s,l,j,S,d,u,A,h,m,f]);return(0,Gt.jsx)(rj.Provider,{value:k,children:(0,Gt.jsx)(Zj,(0,Ft.A)({as:a,ownerState:v,className:(0,nr.A)(x.root,i),ref:t},g,{children:r}))})}),Xj=Kj;function Qj(e){return(0,sr.Ay)("MuiFormHelperText",e)}const Jj=(0,ar.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var ew;const tw=["children","className","component","disabled","error","filled","focused","margin","required","variant"],nw=(0,Un.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t["size".concat((0,Fu.A)(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(Jj.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Jj.error)]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})}),rw=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFormHelperText"}),{children:r,className:i,component:o="p"}=n,a=(0,nn.A)(n,tw),s=nj({props:n,muiFormControl:ij(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,Ft.A)({},n,{component:o,contained:"filled"===s.variant||"outlined"===s.variant,variant:s.variant,size:s.size,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:a,focused:s,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&"size".concat((0,Fu.A)(r)),n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return(0,ir.A)(c,Qj,t)})(l);return(0,Gt.jsx)(nw,(0,Ft.A)({as:o,ownerState:l,className:(0,nr.A)(c.root,i),ref:t},a,{children:" "===r?ew||(ew=(0,Gt.jsx)("span",{className:"notranslate",children:"\u200b"})):r}))}),iw=rw;function ow(e){return(0,sr.Ay)("MuiNativeSelect",e)}const aw=(0,ar.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),sw=["className","disabled","error","IconComponent","inputRef","variant"],lw=e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,Ft.A)({},n.vars?{backgroundColor:"rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(aw.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},cw=(0,Un.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ju.A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{["&.".concat(aw.multiple)]:t.multiple}]}})(lw),dw=e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,["&.".concat(aw.disabled)]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},uw=(0,Un.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,Fu.A)(n.variant))],n.open&&t.iconOpen]}})(dw),pw=We.forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:o,inputRef:a,variant:s="standard"}=e,l=(0,nn.A)(e,sw),c=(0,Ft.A)({},e,{disabled:r,variant:s,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon","icon".concat((0,Fu.A)(n)),o&&"iconOpen",r&&"disabled"]};return(0,ir.A)(s,ow,t)})(c);return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)(cw,(0,Ft.A)({ownerState:c,className:(0,nr.A)(d.select,n),disabled:r,ref:a||t},l)),e.multiple?null:(0,Gt.jsx)(uw,{as:o,ownerState:c,className:d.icon})]})}),hw=pw;var mw=n(47123);function fw(e){return(0,sr.Ay)("MuiSelect",e)}const gw=(0,ar.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var vw;const xw=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],yw=(0,Un.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["&.".concat(gw.select)]:t.select},{["&.".concat(gw.select)]:t[n.variant]},{["&.".concat(gw.error)]:t.error},{["&.".concat(gw.multiple)]:t.multiple}]}})(lw,{["&.".concat(gw.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),bw=(0,Un.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,Fu.A)(n.variant))],n.open&&t.iconOpen]}})(dw),jw=(0,Un.Ay)("input",{shouldForwardProp:e=>(0,mw.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function ww(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function _w(e){return null==e||"string"===typeof e&&!e.trim()}const Cw=We.forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:d,disabled:u,displayEmpty:p,error:h=!1,IconComponent:m,inputRef:f,labelId:g,MenuProps:v={},multiple:x,name:y,onBlur:b,onChange:j,onClose:w,onFocus:_,onOpen:C,open:S,readOnly:A,renderValue:k,SelectDisplayProps:M={},tabIndex:O,value:T,variant:E="standard"}=e,P=(0,nn.A)(e,xw),[D,R]=(0,Nx.A)({controlled:T,default:d,name:"Select"}),[N,L]=(0,Nx.A)({controlled:S,default:c,name:"Select"}),I=We.useRef(null),F=We.useRef(null),[$,B]=We.useState(null),{current:z}=We.useRef(null!=S),[H,W]=We.useState(),V=(0,Ln.A)(t,f),U=We.useCallback(e=>{F.current=e,e&&B(e)},[]),q=null==$?void 0:$.parentNode;We.useImperativeHandle(V,()=>({focus:()=>{F.current.focus()},node:I.current,value:D}),[D]),We.useEffect(()=>{c&&N&&$&&!z&&(W(a?null:q.clientWidth),F.current.focus())},[$,a]),We.useEffect(()=>{o&&F.current.focus()},[o]),We.useEffect(()=>{if(!g)return;const e=(0,sh.A)(F.current).getElementById(g);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[g]);const G=(e,t)=>{e?C&&C(t):w&&w(t),z||(W(a?null:q.clientWidth),L(e))},Y=We.Children.toArray(s),Z=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(x){n=Array.isArray(D)?D.slice():[];const t=D.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),D!==n&&(R(n),j)){const r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:y}}),j(i,e)}x||G(!1,t)}},K=null!==$&&N;let X,Q;delete P["aria-invalid"];const J=[];let ee=!1,te=!1;(aj({value:D})||p)&&(k?X=k(D):ee=!0);const ne=Y.map(e=>{if(!We.isValidElement(e))return null;let t;if(x){if(!Array.isArray(D))throw new Error((0,qn.A)(2));t=D.some(t=>ww(t,e.props.value)),t&&ee&&J.push(e.props.children)}else t=ww(D,e.props.value),t&&ee&&(Q=e.props.children);return t&&(te=!0),We.cloneElement(e,{"aria-selected":t?"true":"false",onClick:Z(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});ee&&(X=x?0===J.length?null:J.reduce((e,t,n)=>(e.push(t),n<J.length-1&&e.push(", "),e),[]):Q);let re,ie=H;!a&&z&&$&&(ie=q.clientWidth),re="undefined"!==typeof O?O:u?null:0;const oe=M.id||(y?"mui-component-select-".concat(y):void 0),ae=(0,Ft.A)({},e,{variant:E,value:D,open:K,error:h}),se=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon","icon".concat((0,Fu.A)(n)),o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,ir.A)(s,fw,t)})(ae),le=(0,Ft.A)({},v.PaperProps,null==(n=v.slotProps)?void 0:n.paper),ce=(0,mn.A)();return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)(yw,(0,Ft.A)({ref:U,tabIndex:re,role:"combobox","aria-controls":ce,"aria-disabled":u?"true":void 0,"aria-expanded":K?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[g,oe].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!A){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),G(!0,e))}},onMouseDown:u||A?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),G(!0,e))},onBlur:e=>{!K&&b&&(Object.defineProperty(e,"target",{writable:!0,value:{value:D,name:y}}),b(e))},onFocus:_},M,{ownerState:ae,className:(0,nr.A)(M.className,se.select,l),id:oe,children:_w(X)?vw||(vw=(0,Gt.jsx)("span",{className:"notranslate",children:"\u200b"})):X})),(0,Gt.jsx)(jw,(0,Ft.A)({"aria-invalid":h,value:Array.isArray(D)?D.join(","):D,name:y,ref:I,"aria-hidden":!0,onChange:e=>{const t=Y.find(t=>t.props.value===e.target.value);void 0!==t&&(R(t.props.value),j&&j(e,t))},tabIndex:-1,disabled:u,className:se.nativeInput,autoFocus:o,ownerState:ae},P)),(0,Gt.jsx)(bw,{as:m,className:se.icon,ownerState:ae}),(0,Gt.jsx)(km,(0,Ft.A)({id:"menu-".concat(y||""),anchorEl:q,open:K,onClose:e=>{G(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},v,{MenuListProps:(0,Ft.A)({"aria-labelledby":g,role:"listbox","aria-multiselectable":x?"true":void 0,disableListWrap:!0,id:ce},v.MenuListProps),slotProps:(0,Ft.A)({},v.slotProps,{paper:(0,Ft.A)({},le,{style:(0,Ft.A)({minWidth:ie},null!=le?le.style:null)})}),children:ne}))]})}),Sw=Cw,Aw=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],kw=["root"],Mw={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,Ju.A)(e)&&"variant"!==e,slot:"Root"},Ow=(0,Un.Ay)(yj,Mw)(""),Tw=(0,Un.Ay)(Rj,Mw)(""),Ew=(0,Un.Ay)(Cj,Mw)(""),Pw=We.forwardRef(function(e,t){const n=(0,$t.b)({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:o={},className:a,defaultOpen:s=!1,displayEmpty:l=!1,IconComponent:c=Ab,id:d,input:u,inputProps:p,label:h,labelId:m,MenuProps:f,multiple:g=!1,native:v=!1,onClose:x,onOpen:y,open:b,renderValue:j,SelectDisplayProps:w,variant:_="outlined"}=n,C=(0,nn.A)(n,Aw),S=v?hw:Sw,A=nj({props:n,muiFormControl:ij(),states:["variant","error"]}),k=A.variant||_,M=(0,Ft.A)({},n,{variant:k,classes:o}),O=(e=>{const{classes:t}=e;return t})(M),T=(0,nn.A)(O,kw),E=u||{standard:(0,Gt.jsx)(Ow,{ownerState:M}),outlined:(0,Gt.jsx)(Tw,{label:h,ownerState:M}),filled:(0,Gt.jsx)(Ew,{ownerState:M})}[k],P=(0,Ln.A)(t,Rn(E));return(0,Gt.jsx)(We.Fragment,{children:We.cloneElement(E,(0,Ft.A)({inputComponent:S,inputProps:(0,Ft.A)({children:i,error:A.error,IconComponent:c,variant:k,type:void 0,multiple:g},v?{id:d}:{autoWidth:r,defaultOpen:s,displayEmpty:l,labelId:m,MenuProps:f,onClose:x,onOpen:y,open:b,renderValue:j,SelectDisplayProps:(0,Ft.A)({id:d},w)},p,{classes:p?(0,Yb.A)(T,p.classes):T},u?u.props.inputProps:{})},(g&&v||l)&&"outlined"===k?{notched:!0}:{},{ref:P,className:(0,nr.A)(E.props.className,a,O.root)},!u&&{variant:k},C))})});Pw.muiName="Select";const Dw=Pw;function Rw(e){return(0,sr.Ay)("MuiTextField",e)}(0,ar.A)("MuiTextField",["root"]);const Nw=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Lw={standard:yj,filled:Cj,outlined:Rj},Iw=(0,Un.Ay)(Xj,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Fw=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:o,className:a,color:s="primary",defaultValue:l,disabled:c=!1,error:d=!1,FormHelperTextProps:u,fullWidth:p=!1,helperText:h,id:m,InputLabelProps:f,inputProps:g,InputProps:v,inputRef:x,label:y,maxRows:b,minRows:j,multiline:w=!1,name:_,onBlur:C,onChange:S,onFocus:A,placeholder:k,required:M=!1,rows:O,select:T=!1,SelectProps:E,type:P,value:D,variant:R="outlined"}=n,N=(0,nn.A)(n,Nw),L=(0,Ft.A)({},n,{autoFocus:i,color:s,disabled:c,error:d,fullWidth:p,multiline:w,required:M,select:T,variant:R}),I=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},Rw,t)})(L);const F={};"outlined"===R&&(f&&"undefined"!==typeof f.shrink&&(F.notched=f.shrink),F.label=y),T&&(E&&E.native||(F.id=void 0),F["aria-describedby"]=void 0);const $=(0,mn.A)(m),B=h&&$?"".concat($,"-helper-text"):void 0,z=y&&$?"".concat($,"-label"):void 0,H=Lw[R],W=(0,Gt.jsx)(H,(0,Ft.A)({"aria-describedby":B,autoComplete:r,autoFocus:i,defaultValue:l,fullWidth:p,multiline:w,name:_,rows:O,maxRows:b,minRows:j,type:P,value:D,id:$,inputRef:x,onBlur:C,onChange:S,onFocus:A,placeholder:k,inputProps:g},F,v));return(0,Gt.jsxs)(Iw,(0,Ft.A)({className:(0,nr.A)(I.root,a),disabled:c,error:d,fullWidth:p,ref:t,required:M,color:s,variant:R,ownerState:L},N,{children:[null!=y&&""!==y&&(0,Gt.jsx)(qj,(0,Ft.A)({htmlFor:$,id:z},f,{children:y})),T?(0,Gt.jsx)(Dw,(0,Ft.A)({"aria-describedby":B,id:$,labelId:z,value:D,input:W},E,{children:o})):W,h&&(0,Gt.jsx)(iw,(0,Ft.A)({id:B},u,{children:h}))]}))}),$w=Fw;var Bw=n(74802);function zw(e){return(0,sr.Ay)("MuiDialog",e)}const Hw=(0,ar.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);const Ww=We.createContext({}),Vw=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Uw=(0,Un.Ay)(Vh,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),qw=(0,Un.Ay)(om,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Gw=(0,Un.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t["scroll".concat((0,Fu.A)(n.scroll))]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})}),Yw=(0,Un.Ay)(Uu,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t["scrollPaper".concat((0,Fu.A)(n.scroll))],t["paperWidth".concat((0,Fu.A)(String(n.maxWidth)))],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):"max(".concat(t.breakpoints.values.xs).concat(t.breakpoints.unit,", 444px)"),["&.".concat(Hw.paperScrollBody)]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},n.maxWidth&&"xs"!==n.maxWidth&&{maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit),["&.".concat(Hw.paperScrollBody)]:{[t.breakpoints.down(t.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,["&.".concat(Hw.paperScrollBody)]:{margin:0,maxWidth:"100%"}})}),Zw=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDialog"}),r=In(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":a,BackdropComponent:s,BackdropProps:l,children:c,className:d,disableEscapeKeyDown:u=!1,fullScreen:p=!1,fullWidth:h=!1,maxWidth:m="sm",onBackdropClick:f,onClick:g,onClose:v,open:x,PaperComponent:y=Uu,PaperProps:b={},scroll:j="paper",TransitionComponent:w=$h,transitionDuration:_=i,TransitionProps:C}=n,S=(0,nn.A)(n,Vw),A=(0,Ft.A)({},n,{disableEscapeKeyDown:u,fullScreen:p,fullWidth:h,maxWidth:m,scroll:j}),k=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,a={root:["root"],container:["container","scroll".concat((0,Fu.A)(n))],paper:["paper","paperScroll".concat((0,Fu.A)(n)),"paperWidth".concat((0,Fu.A)(String(r))),i&&"paperFullWidth",o&&"paperFullScreen"]};return(0,ir.A)(a,zw,t)})(A),M=We.useRef(),O=(0,mn.A)(a),T=We.useMemo(()=>({titleId:O}),[O]);return(0,Gt.jsx)(qw,(0,Ft.A)({className:(0,nr.A)(k.root,d),closeAfterTransition:!0,components:{Backdrop:Uw},componentsProps:{backdrop:(0,Ft.A)({transitionDuration:_,as:s},l)},disableEscapeKeyDown:u,onClose:v,open:x,ref:t,onClick:e=>{g&&g(e),M.current&&(M.current=null,f&&f(e),v&&v(e,"backdropClick"))},ownerState:A},S,{children:(0,Gt.jsx)(w,(0,Ft.A)({appear:!0,in:x,timeout:_,role:"presentation"},C,{children:(0,Gt.jsx)(Gw,{className:(0,nr.A)(k.container),onMouseDown:e=>{M.current=e.target===e.currentTarget},ownerState:A,children:(0,Gt.jsx)(Yw,(0,Ft.A)({as:y,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":O},b,{className:(0,nr.A)(k.paper,b.className),ownerState:A,children:(0,Gt.jsx)(Ww.Provider,{value:T,children:c})}))})}))}))}),Kw=Zw;function Xw(e){return(0,sr.Ay)("MuiDialogTitle",e)}const Qw=(0,ar.A)("MuiDialogTitle",["root"]),Jw=["className","id"],e_=(0,Un.Ay)(Ym,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),t_=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDialogTitle"}),{className:r,id:i}=n,o=(0,nn.A)(n,Jw),a=n,s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},Xw,t)})(a),{titleId:l=i}=We.useContext(Ww);return(0,Gt.jsx)(e_,(0,Ft.A)({component:"h2",className:(0,nr.A)(s.root,r),ownerState:a,ref:t,variant:"h6",id:null!=i?i:l},o))}),n_=t_;function r_(e){return(0,sr.Ay)("MuiDialogContent",e)}(0,ar.A)("MuiDialogContent",["root","dividers"]);const i_=["className","dividers"],o_=(0,Un.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat((t.vars||t).palette.divider),borderBottom:"1px solid ".concat((t.vars||t).palette.divider)}:{[".".concat(Qw.root," + &")]:{paddingTop:0}})}),a_=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDialogContent"}),{className:r,dividers:i=!1}=n,o=(0,nn.A)(n,i_),a=(0,Ft.A)({},n,{dividers:i}),s=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,ir.A)(r,r_,t)})(a);return(0,Gt.jsx)(o_,(0,Ft.A)({className:(0,nr.A)(s.root,r),ownerState:a,ref:t},o))}),s_=a_,l_=e=>{let{open:t,imageUrl:n,onClose:r,programCode:i,downloadImage:o,downloadButton:a=!1,imageWidthHeight:s,programName:l,customWidth:c,customMarginTop:d}=e;const{t:u}=vg();return(0,Gt.jsxs)(Kw,{open:t,onClose:r,children:[(0,Gt.jsx)(n_,{sx:{m:0,p:2},children:r?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null}),(0,Gt.jsx)(s_,{children:(0,Gt.jsxs)(Eu,{width:c||"unset",pb:1.5,display:"flex",flexDirection:"column",alignItems:"center",children:[i&&(0,Gt.jsx)(Eu,{whiteSpace:"nowrap",mb:.4,fontSize:{xs:"18px",md:"24px"},fontWeight:600,children:u("rpm_Program_qr")}),(0,Gt.jsx)(Eu,{marginTop:d||"12px",children:(0,Gt.jsx)("img",{src:n,width:null===s||void 0===s?void 0:s.width,height:null===s||void 0===s?void 0:s.height})}),i&&(0,Gt.jsxs)(Eu,{whiteSpace:"nowrap",color:"#4B5563",fontSize:"16px",fontWeight:500,marginTop:"-12px",children:["Program Code: ",i]}),l&&(0,Gt.jsxs)(Eu,{textAlign:"center",width:{xs:"unset",md:"360px"},mt:1.5,fontSize:"16px",color:"#4B5563",fontWeight:500,children:[u("rpm_ProgramName")+":-"," ",l]}),a&&(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",sx:{marginLeft:"0px",marginTop:"16px",width:"171px"},onClick:o,fullWidths:!0,children:[(0,Gt.jsx)(Eu,{display:"flex",marginRight:"4px",children:(0,Gt.jsx)(Pc,{})}),(0,Gt.jsx)(Ym,{component:"span",children:u("rpm_Download")})]})]})})]})};l_.defaultProps={open:!1,downloadButton:!1,imageUrl:"",programCode:"",onClose:()=>{},downloadImage:()=>{},imageWidthHeight:{},programName:"",customWidth:"",customMarginTop:{}};const c_=l_;function d_(e){var t,n,r,o,a,s,l,c,d;let{open:u,handleDrawerOpen:p,handleDrawerClose:h,headerData:m}=e;const f=Nt(),{t:g}=vg(),v=so(),{userData:x}=(0,We.useContext)(Zg),y=Ct(Gd),b=Ct(Id),j=Ct(e=>e.auth.userName),[w,_]=We.useState(null),[C,S]=We.useState(null),[A,k]=We.useState(null),M=Boolean(w),O=Boolean(A),T=Boolean(C),[E,P]=We.useState(""),[D,R]=We.useState(!1),N=()=>{R(!D)},L=()=>{S(null)},I=e=>{_(e.currentTarget)},F=()=>{k(null)},$=()=>{_(null),F()};We.useEffect(()=>{ta()(null===m||void 0===m?void 0:m.activeProgram)||(()=>{var e;if(null===m||void 0===m||null===(e=m.activeProgram)||void 0===e||!e.qr_code)return;const t="data:image/png;base64,".concat(null===m||void 0===m?void 0:m.activeProgram.qr_code);P(t)})()},[null===m||void 0===m?void 0:m.activeProgram]);const B=(0,Gt.jsxs)(km,{anchorEl:w,id:"account-menu",open:M,onClose:$,onClick:$,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5,"& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,bgcolor:"background.paper",transform:"translateY(-50%) rotate(45deg)",zIndex:0}}},transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:[(0,Gt.jsxs)($m,{component:Lo,to:Lc.DOCTOR.PROFILE,children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(cy.A,{fontSize:"small"})}),"My account"]}),(0,Gt.jsxs)($m,{component:Lo,to:Lc.DOCTOR.CHANGEPASSWORD,children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(oy.A,{fontSize:"small"})}),"Change Password"]}),(0,Gt.jsxs)($m,{component:Lo,to:Lc.USERMANUAL,target:"_blank",children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(iy.A,{fontSize:"small"})}),"User Manual"]}),null!==x&&void 0!==x&&x.isAdmin?(0,Gt.jsxs)($m,{component:Lo,to:Lc.DOCTOR.LOGS,children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(yc,{fontSize:"small"})}),"Audit Logs"]}):null,(0,Gt.jsxs)($m,{onClick:()=>f(Qd()),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(ay.A,{fontSize:"small"})}),"Logout"]})]}),z="primary-search-account-menu-mobile",H=(0,Gt.jsxs)(km,{anchorEl:A,anchorOrigin:{vertical:"top",horizontal:"right"},id:z,keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:O,onClose:F,children:[(null===m||void 0===m||null===(t=m.heading)||void 0===t?void 0:t.name)&&(0,Gt.jsxs)($m,{onClick:N,children:[(0,Gt.jsx)(Kp,{size:"large","aria-label":"show 17 new notifications",color:"inherit",children:(0,Gt.jsx)(sy.A,{fontSize:"small"})}),(0,Gt.jsx)("p",{children:g("rpm_ShowProgramQr")})]}),(0,Gt.jsxs)($m,{onClick:I,children:[(0,Gt.jsx)(Kp,{size:"large","aria-label":"account of current user","aria-controls":"primary-search-account-menu","aria-haspopup":"true",color:"inherit",children:(0,Gt.jsx)(ry.A,{})}),(0,Gt.jsx)("p",{children:"Profile"})]})]});return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(g_,{position:"fixed",open:u&&m.sideBar,children:[(0,Gt.jsxs)(Lu,{children:[(0,Gt.jsx)(Eu,{sx:{marginLeft:1,lineHeight:1},className:"mobile-logo",children:(0,Gt.jsx)("img",{src:Xg,height:32})}),m.sideBar&&(0,Gt.jsx)(Kp,{size:"small",color:"inherit",className:"toggle-button",onClick:u?h:p,sx:{bgcolor:"primary.theme.50",position:"absolute",left:-16},children:u?(0,Gt.jsx)(ly.A,{}):(0,Gt.jsx)(ly.A,{fontSize:"small"})}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flex:1},children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Ym,{variant:"h6",component:"div",sx:{textTransform:"capitalize"},children:[null===x||void 0===x||null===(n=x.user_principal)||void 0===n?void 0:n.first_name,"\xa0",null===x||void 0===x||null===(r=x.user_principal)||void 0===r?void 0:r.last_name]}),(null===m||void 0===m||null===(o=m.heading)||void 0===o?void 0:o.name)&&(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",flexWrap:"wrap",pb:{xs:1,sm:0},children:[(0,Gt.jsxs)(Ym,{noWrap:!0,variant:"body1",component:"div",fontWeight:"h6.fontWeight",sx:{display:{xs:"block",sm:"block"}},children:[null===m||void 0===m||null===(a=m.activeProgram)||void 0===a?void 0:a.display_name,(0,Gt.jsxs)(Ym,{component:"span",fontSize:"16px",children:["\xa0(",null===m||void 0===m||null===(s=m.activeProgram)||void 0===s?void 0:s.city,")"]})]}),(0,Gt.jsx)(Eu,{bgcolor:(e=>"fitnessCenter"===e?"#FED7AA":"wellnessCenter"===e?"#BBF7D0":"hospital"===e?" #BFDBFE":"clinic"===e?"#c4eff1":void 0)(m.activeProgram.facility_type),component:"span",fontSize:"13px",padding:"2px 8px 2px 8px",borderRadius:"16px",marginLeft:{xs:"0px",sm:"8px"},fontWeight:500,alignItems:"center",children:g("".concat(m.activeProgram.facility_type))})]})]}),(0,Gt.jsxs)(Eu,{sx:{display:{xs:"none",md:"flex"},alignItems:"center"},children:[(null===m||void 0===m||null===(l=m.heading)||void 0===l?void 0:l.name)&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Yx,{title:g("rpm_Program_qr"),children:(0,Gt.jsx)(Kp,{size:"large","aria-label":"show 4 new mails",color:"inherit",onClick:N,sx:{backgroundColor:"#E0F2FE",padding:"8px",border:"1px solid rgba(0, 0, 0, 0.12)","&:hover":{backgroundColor:"#3f51b5",color:"#ffff"}},children:(0,Gt.jsx)(sy.A,{fontSize:"medium"})})})}),(null===y||void 0===y?void 0:y.length)>1&&(0,Gt.jsx)(Eu,{sx:{width:"100%"},mr:1.5,ml:1.5,children:(0,Gt.jsx)(Gb,{fullWidth:!0,disableClearable:!0,size:"small",margin:"dense",id:"course",name:"course",options:y,sx:{minWidth:"200px"},getOptionLabel:e=>(null===e||void 0===e?void 0:e.display_name)||"",renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{t&&"selectOption"===n&&(v("".concat(Lc.DOCTOR.PROGRAM,"/").concat(t.code,"/patients")),window.location.reload())},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:g("rpm_SelectProgram")+"...",sx:{minWidth:"200px"},className:"program-tour-step5"}))})}),null!==x&&void 0!==x&&x.showStaffMenu||null!==x&&void 0!==x&&x.showRoleMenu?(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Xj,{fullWidth:!0,size:"small",className:"manageUserDropdown",children:[(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",id:"basic-button","aria-controls":T?"demo-customized-menu":void 0,"aria-haspopup":"true","aria-expanded":T?"true":void 0,disableElevation:!0,onClick:e=>{S(e.currentTarget)},endIcon:(0,Gt.jsx)(Gy.A,{}),sx:{minWidth:"160px",marginRight:"10px"},className:"program-tour-step6",children:"Manage Users"}),(0,Gt.jsxs)(km,{id:"basic-menu",anchorEl:C,open:T,onClose:L,MenuListProps:{"aria-labelledby":"basic-button"},className:"test",children:[null!==x&&void 0!==x&&x.showStaffMenu?(0,Gt.jsx)($m,{sx:{minWidth:"160px"},onClick:()=>{L(),v(Lc.DOCTOR.USERS)},children:g("rpm_Staff")}):null,null!==x&&void 0!==x&&x.showRoleMenu?(0,Gt.jsx)($m,{sx:{minWidth:"160px"},onClick:()=>{L(),v(Lc.DOCTOR.ROLES)},children:g("rpm_Roles")}):null]})]})}):null,(0,Gt.jsx)(Yx,{title:g("rpm_Account_Menu"),children:(0,Gt.jsx)(Kp,{size:"large",edge:"end","aria-label":"account of current user","aria-controls":"account-menu","aria-haspopup":"true",onClick:I,color:"inherit",sx:{p:0,mx:.5},className:"program-tour-step4",children:(0,Gt.jsx)(wy,{sx:{bgcolor:"secondary.main"},sizes:"small",children:null===j||void 0===j?void 0:j.charAt(0).toLocaleUpperCase()})})})]}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"flex",md:"none"}},children:(0,Gt.jsx)(Kp,{size:"large","aria-label":"show more","aria-controls":z,"aria-haspopup":"true",onClick:e=>{k(e.currentTarget)},color:"inherit",children:(0,Gt.jsx)(Iu.A,{})})})]})]}),(0,Gt.jsx)(Af,{}),b&&(0,Gt.jsx)(qy,{})]}),H,B,(0,Gt.jsx)(c_,{open:D,imageUrl:E,onClose:N,programCode:null===m||void 0===m||null===(c=m.activeProgram)||void 0===c?void 0:c.program_code,downloadImage:async()=>{try{var e;await f(_g(null===m||void 0===m||null===(e=m.activeProgram)||void 0===e?void 0:e.program_code)),N(),f(Zo({subTitle:"message:rpm_QrDownloadedSuccessfully",severity:Bc}))}catch(t){console.log(t),N(),f(Zo({subTitle:"error:rpm_QrDownloadedFailed",severity:$c}))}},downloadButton:!0,imageWidthHeight:{width:"225",height:"225"},programName:null===m||void 0===m||null===(d=m.activeProgram)||void 0===d?void 0:d.display_name,customWidth:"375px",customMarginTop:{xs:"0px",md:"-8px"}})]})}d_.defaultProps={handleDrawerOpen:()=>{},handleDrawerClose:()=>{},authUser:{},open:!1,headerData:{},allPrograms:[],onProgramChange:()=>{},onResetFilter:()=>{},filterByProgram:"",assignProgramList:[],fetchUserPrograms:()=>{},isGroupRootAccess:{}};const u_=d_,p_=280,h_=e=>({width:p_,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),m_=e=>({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)"),[e.breakpoints.up("sm")]:{width:"calc(".concat(e.spacing(8)," + 1px)")}}),f_=(0,Un.Ay)("div")(e=>{var t;let{theme:n}=e;return(0,i.A)((0,i.A)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:n.spacing(0,1)},n.mixins.toolbar),{},{[null===n||void 0===n||null===(t=n.breakpoints)||void 0===t?void 0:t.up("md")]:{minHeight:80}})}),g_=(0,Un.Ay)(Xu,{shouldForwardProp:e=>"open"!==e})(e=>{let{theme:t,open:n}=e;return(0,i.A)({zIndex:t.zIndex.drawer+1,width:"calc(100% - ".concat(65,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},n&&{marginLeft:p_,width:"calc(100% - ".concat(p_,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})}),v_=(0,Un.Ay)(Lf,{shouldForwardProp:e=>"open"!==e})(e=>{let{theme:t,open:n}=e;return(0,i.A)((0,i.A)({width:p_,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},n&&(0,i.A)((0,i.A)({},h_(t)),{},{"& .MuiDrawer-paper":h_(t)})),!n&&(0,i.A)((0,i.A)({},m_(t)),{},{"& .MuiDrawer-paper":m_(t)}))});function x_(e){let{headerData:t}=e;const[n,r]=We.useState(window.innerWidth>768),i=Nt(),o=()=>{r(!1)};return(0,Gt.jsxs)(Gt.Fragment,{children:[t.headerBar&&(0,Gt.jsx)(u_,{open:n,headerData:t,handleDrawerOpen:()=>{r(!0)},handleDrawerClose:o}),t.sideBar&&(0,Gt.jsx)(ny,{headerData:t,openDrawer:n,handleDrawerClose:o,handleUserTour:async()=>{await i(Bg({skip_tour:["false"]})),window.location.reload()}})]})}const y_=e=>{let{open:t,link:n,onClose:r}=e;return(0,Gt.jsxs)(Kw,{open:t,onClose:r,fullWidth:!0,children:[(0,Gt.jsx)(n_,{sx:{m:0,p:2},children:r?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null}),(0,Gt.jsx)(s_,{children:(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsx)("iframe",{title:"External Link",src:n,width:"100%",style:{height:"calc(100vh - 140px)",border:"none"}})})})]})};y_.defaultProps={open:!1,link:"",onClose:()=>{}};const b_=y_,j_=(0,We.createContext)(),w_=e=>t=>t({type:zo,payload:e});const __=function(){return(0,Gt.jsx)("h1",{children:"Access Denied"})};var C_=n(69120);const S_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=window.location.pathname.split("/");let i=!1;i="program"!=r[r.length-1];return[{id:"doc_pages",name:"docMenu",data:[{url:"/rpm/program",type:"LINK",name:i?"Home":"Program",id:"programs",icon:(0,Gt.jsx)(Nl,{}),className:"menuLink",query:n,searchParams:t},null!==e&&void 0!==e&&e.isAdmin?{url:"/rpm/allusers",type:"LINK",name:"All Users",id:"allusers",icon:(0,Gt.jsx)(Yl,{}),className:"menuLink",query:n,searchParams:t}:{id:"allusers",name:"All Users",className:"d-none"},(null===e||void 0===e?void 0:e.isAdmin)&&{url:"/rpm/wellness",type:"LINK",name:"Wellness Goals",id:"wellnessGoals",icon:(0,Gt.jsx)(Yl,{}),className:"menuLink",query:n,searchParams:t},(null===e||void 0===e?void 0:e.isAdmin)&&{url:"/rpm/exercise",type:"LINK",name:"Exercise",id:"exerciseGoals",icon:(0,Gt.jsx)(Yl,{}),className:"menuLink",query:n,searchParams:t}]}]},A_=function(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return[{id:"patient_pages",name:"patientMenu",data:[{id:"patient_header",icon:(0,Gt.jsx)(wy,{src:null===i||void 0===i||null===(e=i.profile)||void 0===e?void 0:e.profileImage,sx:{bgcolor:"primary.theme.200",color:"grey.800",fontWeight:700},children:null===i||void 0===i||null===(t=i.first_name)||void 0===t||null===(n=t.charAt(0))||void 0===n?void 0:n.toLocaleUpperCase()}),className:"patientHeader",name:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Ym,{fontWeight:600,noWrap:!0,children:[null===i||void 0===i?void 0:i.first_name,null!==i&&void 0!==i&&i.last_name?" "+(null===i||void 0===i?void 0:i.last_name):null]}),(0,Gt.jsx)(Ym,{variant:"body2",noWrap:!0,sx:{display:"none"},children:null===i||void 0===i?void 0:i.id})]}),data:[null!==s&&void 0!==s&&s.is_hospital?{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/dashboard"),type:"LINK",name:"Medical Chart",id:"dashboard",icon:(0,Gt.jsx)($l,{}),className:"menuLink",query:a,searchParams:o}:{id:"dashboard",name:"Medical Chart",className:"d-none"},{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/history"),type:"LINK",name:"Medical History",id:"patient_history",icon:(0,Gt.jsx)(Bl,{}),className:"menuLink",query:a,searchParams:o},{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/courses"),type:"LINK",name:"Patient Courses",id:"schedule",icon:(0,Gt.jsx)(Il,{}),className:"menuLink",query:a,searchParams:o},null!==s&&void 0!==s&&s.is_hospital?{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/rules"),type:"LINK",name:"Patient Rules",id:"rules",icon:(0,Gt.jsx)(Wl,{}),className:"menuLink",query:a,searchParams:o}:{id:"rules",name:"Rules",className:"d-none"},null!==r&&void 0!==r&&r.showConsultationList&&null!==s&&void 0!==s&&s.is_hospital?{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/consultations"),type:"LINK",name:"Consultations",id:"consultations",icon:(0,Gt.jsx)(Vl,{}),className:"menuLink",query:a,searchParams:o}:{id:"consultations",name:"Consultations",className:"d-none"},null!==s&&void 0!==s&&s.is_hospital?{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/notes/doctor-note"),type:"LINK",name:"Notes",id:"notes",icon:(0,Gt.jsx)(Hl,{}),className:"menuLink",query:a,searchParams:o}:{id:"notes",name:"Notes",className:"d-none"},{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/adherence-report"),type:"LINK",name:"Adherence Report",id:"adherence-report",icon:(0,Gt.jsx)(kc,{}),className:"menuLink",query:a,searchParams:o},{url:"/rpm/program/".concat(o.programId,"/patients/").concat(o.patientId,"/details"),type:"LINK",name:"Personal Details",id:"personal_detail",icon:(0,Gt.jsx)(zl,{}),className:"menuLink",query:a,searchParams:o},{url:"/rpm/program/".concat(o.programId,"/patients"),type:"LINK",name:"Back",id:"back",icon:(0,Gt.jsx)(C_.A,{}),className:"menuLink",query:a,searchParams:o}]}]}]},k_=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return[{id:"program_pages",name:"programMenu",data:[{url:"",id:"program_header",icon:(0,Gt.jsx)(wy,{sx:{bgcolor:"primary.theme.200",color:"grey.800",fontWeight:700},children:null===r||void 0===r||null===(e=r.display_name)||void 0===e||null===(t=e.charAt(0))||void 0===t?void 0:t.toLocaleUpperCase()}),className:"patientHeader",name:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{fontWeight:600,noWrap:!0,children:null===r||void 0===r?void 0:r.display_name}),(0,Gt.jsx)(Ym,{variant:"body2",noWrap:!0,children:null===r||void 0===r?void 0:r.location})]}),data:[{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/dashboard"),type:"LINK",name:"Dashboard",id:"prog_dashboard",icon:(0,Gt.jsx)(Ll,{}),className:"menuLink",query:o,searchParams:i},{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/patients"),type:"LINK",name:"All Patients",id:"all_patients",icon:(0,Gt.jsx)(Yl,{}),className:"menuLink",query:o,searchParams:i},null!==n&&void 0!==n&&n.isAdmin?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/assignments"),type:"LINK",name:"Assignments",id:"assignments",icon:(0,Gt.jsx)(Rc,{}),className:"menuLink",query:o,searchParams:i}:{id:"programSettings",name:"Assignments",className:"d-none"},null!==n&&void 0!==n&&n.showCourseList?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/course"),type:"LINK",name:"Courses",id:"schedule_program",icon:(0,Gt.jsx)(Il,{}),className:"menuLink",query:o,searchParams:i}:{id:"schedule_program",name:"Course",className:"d-none"},null!==n&&void 0!==n&&n.showRuleList&&null!==r&&void 0!==r&&r.is_hospital?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/rules"),type:"LINK",name:"Rules",id:"rules_program",icon:(0,Gt.jsx)(Fl,{}),className:"menuLink",query:o,searchParams:i}:{id:"rules_program",name:"Rules",className:"d-none"},null!==n&&void 0!==n&&n.showTemplateList&&null!==r&&void 0!==r&&r.is_hospital?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/templates"),type:"LINK",name:"Rx Templates",id:"prescription_template",icon:(0,Gt.jsx)(Vl,{}),className:"menuLink",query:o,searchParams:i}:{id:"prescription_template",name:"Rx Template",className:"d-none"},null!==n&&void 0!==n&&n.showTemplateList&&null!==r&&void 0!==r&&r.is_hospital?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/followups"),type:"LINK",name:"Follow-up",id:"followup",icon:(0,Gt.jsx)(wc,{}),className:"menuLink",query:o,searchParams:i}:{id:"followup",name:"Follow Up",className:"d-none"},null!==n&&void 0!==n&&n.isAdmin?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/programsettings"),type:"LINK",name:"Program Settings",id:"programSettings",icon:(0,Gt.jsx)(Sc,{}),className:"menuLink",query:o,searchParams:i}:{id:"programSettings",name:"Programe Settings",className:"d-none"},null!==n&&void 0!==n&&n.showDismissAlertPatientBtn?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/notifications"),type:"LINK",name:"Notifications",id:"notifications",icon:(0,Gt.jsx)(bc,{}),className:"menuLink",query:o,searchParams:i}:{id:"notifications",name:"Email",className:"d-none"},null!==n&&void 0!==n&&n.isAdmin&&null!==r&&void 0!==r&&r.is_hospital?{url:"/rpm/program/".concat(null===r||void 0===r?void 0:r.code,"/consultation-templates"),type:"LINK",name:"Templates",id:"templates",icon:(0,Gt.jsx)(Ac,{}),className:"menuLink",query:o,searchParams:i}:{id:"templates",name:"Email",className:"d-none"}]}]}]};function M_(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,Qu.A)(t.components[n].defaultProps,r):r}function O_(e,t,n,r,i){const[o,a]=We.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return(0,hn.A)(()=>{let t=!0;if(!n)return;const r=n(e),i=()=>{t&&a(r.matches)};return i(),r.addListener(i),()=>{t=!1,r.removeListener(i)}},[e,n]),o}const T_=Ve.useSyncExternalStore;function E_(e,t,n,r,i){const o=We.useCallback(()=>t,[t]),a=We.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(null!==r){const{matches:t}=r(e);return()=>t}return o},[o,e,r,i,n]),[s,l]=We.useMemo(()=>{if(null===n)return[o,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]},[o,n,e]);return T_(l,s,a)}function P_(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Vt(),r="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,{defaultMatches:i=!1,matchMedia:o=(r?window.matchMedia:null),ssrMatchMedia:a=null,noSsr:s=!1}=M_({name:"MuiUseMediaQuery",props:t,theme:n});let l="function"===typeof e?e(n):e;l=l.replace(/^@media( ?)/m,"");return(void 0!==T_?E_:O_)(l,i,o,a,s)}const D_=n.p+"static/media/es_no_data_image.ffa5587e42ffdd0f3d2c.png";var R_=n(66360),N_=n(92577);function L_(e){return(0,sr.Ay)("MuiInputAdornment",e)}const I_=(0,ar.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var F_;const $_=["children","className","component","disablePointerEvents","disableTypography","position","variant"],B_=(0,Un.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,Fu.A)(n.position))],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{["&.".concat(I_.positionStart,"&:not(.").concat(I_.hiddenLabel,")")]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})}),z_=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiInputAdornment"}),{children:r,className:i,component:o="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:l,variant:c}=n,d=(0,nn.A)(n,$_),u=ij()||{};let p=c;c&&u.variant,u&&!p&&(p=u.variant);const h=(0,Ft.A)({},n,{hiddenLabel:u.hiddenLabel,size:u.size,disablePointerEvents:a,position:l,variant:p}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:o,variant:a}=e,s={root:["root",n&&"disablePointerEvents",i&&"position".concat((0,Fu.A)(i)),a,r&&"hiddenLabel",o&&"size".concat((0,Fu.A)(o))]};return(0,ir.A)(s,L_,t)})(h);return(0,Gt.jsx)(rj.Provider,{value:null,children:(0,Gt.jsx)(B_,(0,Ft.A)({as:o,ownerState:h,className:(0,nr.A)(m.root,i),ref:t},d,{children:"string"!==typeof r||s?(0,Gt.jsxs)(We.Fragment,{children:["start"===l?F_||(F_=(0,Gt.jsx)("span",{className:"notranslate",children:"\u200b"})):null,r]}):(0,Gt.jsx)(Ym,{color:"text.secondary",children:r})}))})}),H_=z_;const W_=We.createContext();function V_(e){return(0,sr.Ay)("MuiTableRow",e)}const U_=(0,ar.A)("MuiTableRow",["root","selected","hover","head","footer"]),q_=["className","component","hover","selected"],G_=(0,Un.Ay)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,["&.".concat(U_.hover,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(U_.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,$u.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}}),Y_="tr",Z_=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableRow"}),{className:r,component:i=Y_,hover:o=!1,selected:a=!1}=n,s=(0,nn.A)(n,q_),l=We.useContext(W_),c=(0,Ft.A)({},n,{component:i,hover:o,selected:a,head:l&&"head"===l.variant,footer:l&&"footer"===l.variant}),d=(e=>{const{classes:t,selected:n,hover:r,head:i,footer:o}=e,a={root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]};return(0,ir.A)(a,V_,t)})(c);return(0,Gt.jsx)(G_,(0,Ft.A)({as:i,ref:t,className:(0,nr.A)(d.root,r),role:i===Y_?null:"row",ownerState:c},s))}),K_=Z_;const X_=We.createContext();function Q_(e){return(0,sr.Ay)("MuiTableCell",e)}const J_=(0,ar.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),eC=["align","className","component","padding","scope","size","sortDirection","variant"],tC=(0,Un.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,Fu.A)(n.size))],"normal"!==n.padding&&t["padding".concat((0,Fu.A)(n.padding))],"inherit"!==n.align&&t["align".concat((0,Fu.A)(n.align))],n.stickyHeader&&t.stickyHeader]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?"1px solid ".concat(t.vars.palette.TableCell.border):"1px solid\n    ".concat("light"===t.palette.mode?(0,$u.a)((0,$u.X4)(t.palette.divider,1),.88):(0,$u.e$)((0,$u.X4)(t.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&{padding:"6px 16px",["&.".concat(J_.paddingCheckbox)]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})}),nC=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableCell"}),{align:r="inherit",className:i,component:o,padding:a,scope:s,size:l,sortDirection:c,variant:d}=n,u=(0,nn.A)(n,eC),p=We.useContext(X_),h=We.useContext(W_),m=h&&"head"===h.variant;let f;f=o||(m?"th":"td");let g=s;"td"===f?g=void 0:!g&&m&&(g="col");const v=d||h&&h.variant,x=(0,Ft.A)({},n,{align:r,component:f,padding:a||(p&&p.padding?p.padding:"normal"),size:l||(p&&p.size?p.size:"medium"),sortDirection:c,stickyHeader:"head"===v&&p&&p.stickyHeader,variant:v}),y=(e=>{const{classes:t,variant:n,align:r,padding:i,size:o,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader","inherit"!==r&&"align".concat((0,Fu.A)(r)),"normal"!==i&&"padding".concat((0,Fu.A)(i)),"size".concat((0,Fu.A)(o))]};return(0,ir.A)(s,Q_,t)})(x);let b=null;return c&&(b="asc"===c?"ascending":"descending"),(0,Gt.jsx)(tC,(0,Ft.A)({as:f,ref:t,className:(0,nr.A)(y.root,i),"aria-sort":b,scope:g,ownerState:x},u))}),rC=nC;function iC(e){return(0,sr.Ay)("PrivateSwitchBase",e)}(0,ar.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const oC=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],aC=(0,Un.Ay)(Dp,{name:"MuiSwitchBase"})(e=>{let{ownerState:t}=e;return(0,Ft.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})}),sC=(0,Un.Ay)("input",{name:"MuiSwitchBase",shouldForwardProp:Ju.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),lC=We.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:i,className:o,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:d,id:u,inputProps:p,inputRef:h,name:m,onBlur:f,onChange:g,onFocus:v,readOnly:x,required:y=!1,tabIndex:b,type:j,value:w}=e,_=(0,nn.A)(e,oC),[C,S]=(0,Nx.A)({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),A=ij();let k=s;A&&"undefined"===typeof k&&(k=A.disabled);const M="checkbox"===j||"radio"===j,O=(0,Ft.A)({},e,{checked:C,disabled:k,disableFocusRipple:l,edge:c}),T=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&"edge".concat((0,Fu.A)(i))],input:["input"]};return(0,ir.A)(o,iC,t)})(O);return(0,Gt.jsxs)(aC,(0,Ft.A)({component:"span",className:(0,nr.A)(T.root,o),centerRipple:!0,focusRipple:!l,disabled:k,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),A&&A.onFocus&&A.onFocus(e)},onBlur:e=>{f&&f(e),A&&A.onBlur&&A.onBlur(e)},ownerState:O,ref:t},_,{children:[(0,Gt.jsx)(sC,(0,Ft.A)({autoFocus:n,checked:r,defaultChecked:a,className:T.input,disabled:k,id:M?u:void 0,name:m,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;S(t),g&&g(e,t)},readOnly:x,ref:h,required:y,ownerState:O,tabIndex:b,type:j},"checkbox"===j&&void 0===w?{}:{value:w},p)),C?i:d]}))}),cC=lC,dC=(0,dy.A)((0,Gt.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),uC=(0,dy.A)((0,Gt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),pC=(0,dy.A)((0,Gt.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function hC(e){return(0,sr.Ay)("MuiCheckbox",e)}const mC=(0,ar.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),fC=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],gC=(0,Un.Ay)(cC,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t["size".concat((0,Fu.A)(n.size))],"default"!==n.color&&t["color".concat((0,Fu.A)(n.color))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(mC.checked,", &.").concat(mC.indeterminate)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(mC.disabled)]:{color:(t.vars||t).palette.action.disabled}})}),vC=(0,Gt.jsx)(uC,{}),xC=(0,Gt.jsx)(dC,{}),yC=(0,Gt.jsx)(pC,{}),bC=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:o=vC,color:a="primary",icon:s=xC,indeterminate:l=!1,indeterminateIcon:c=yC,inputProps:d,size:u="medium",className:p}=i,h=(0,nn.A)(i,fC),m=l?c:s,f=l?c:o,g=(0,Ft.A)({},i,{color:a,indeterminate:l,size:u}),v=(e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate","color".concat((0,Fu.A)(r)),"size".concat((0,Fu.A)(i))]},a=(0,ir.A)(o,hC,t);return(0,Ft.A)({},t,a)})(g);return(0,Gt.jsx)(gC,(0,Ft.A)({type:"checkbox",inputProps:(0,Ft.A)({"data-indeterminate":l},d),icon:We.cloneElement(m,{fontSize:null!=(n=m.props.fontSize)?n:u}),checkedIcon:We.cloneElement(f,{fontSize:null!=(r=f.props.fontSize)?r:u}),ownerState:g,ref:t,className:(0,nr.A)(v.root,p)},h,{classes:v}))}),jC=bC;function wC(e){return(0,sr.Ay)("MuiTable",e)}(0,ar.A)("MuiTable",["root","stickyHeader"]);const _C=["className","component","padding","size","stickyHeader"],CC=(0,Un.Ay)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,Ft.A)({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})}),SC="table",AC=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTable"}),{className:r,component:i=SC,padding:o="normal",size:a="medium",stickyHeader:s=!1}=n,l=(0,nn.A)(n,_C),c=(0,Ft.A)({},n,{component:i,padding:o,size:a,stickyHeader:s}),d=(e=>{const{classes:t,stickyHeader:n}=e,r={root:["root",n&&"stickyHeader"]};return(0,ir.A)(r,wC,t)})(c),u=We.useMemo(()=>({padding:o,size:a,stickyHeader:s}),[o,a,s]);return(0,Gt.jsx)(X_.Provider,{value:u,children:(0,Gt.jsx)(CC,(0,Ft.A)({as:i,role:i===SC?null:"table",ref:t,className:(0,nr.A)(d.root,r),ownerState:c},l))})}),kC=AC;function MC(e){return(0,sr.Ay)("MuiTableContainer",e)}(0,ar.A)("MuiTableContainer",["root"]);const OC=["className","component"],TC=(0,Un.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),EC=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableContainer"}),{className:r,component:i="div"}=n,o=(0,nn.A)(n,OC),a=(0,Ft.A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},MC,t)})(a);return(0,Gt.jsx)(TC,(0,Ft.A)({ref:t,as:i,className:(0,nr.A)(s.root,r),ownerState:a},o))}),PC=EC;function DC(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function RC(e){return parseFloat(e)}function NC(e){return(0,sr.Ay)("MuiSkeleton",e)}(0,ar.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var LC,IC,FC,$C;const BC=["animation","className","component","height","style","variant","width"];let zC,HC,WC,VC;const UC=(0,cp.i7)(zC||(zC=LC||(LC=np(["\n  0% {\n    opacity: 1;\n  }\n\n  50% {\n    opacity: 0.4;\n  }\n\n  100% {\n    opacity: 1;\n  }\n"])))),qC=(0,cp.i7)(HC||(HC=IC||(IC=np(["\n  0% {\n    transform: translateX(-100%);\n  }\n\n  50% {\n    /* +0.5s of delay between each loop */\n    transform: translateX(100%);\n  }\n\n  100% {\n    transform: translateX(100%);\n  }\n"])))),GC=(0,Un.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(e=>{let{theme:t,ownerState:n}=e;const r=DC(t.shape.borderRadius)||"px",i=RC(t.shape.borderRadius);return(0,Ft.A)({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:Qn(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(i).concat(r,"/").concat(Math.round(i/.6*10)/10).concat(r),"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},"rounded"===n.variant&&{borderRadius:(t.vars||t).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})},e=>{let{ownerState:t}=e;return"pulse"===t.animation&&(0,cp.AH)(WC||(WC=FC||(FC=np(["\n      animation: "," 2s ease-in-out 0.5s infinite;\n    "]))),UC)},e=>{let{ownerState:t,theme:n}=e;return"wave"===t.animation&&(0,cp.AH)(VC||(VC=$C||($C=np(["\n      position: relative;\n      overflow: hidden;\n\n      /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n      -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n      &::after {\n        animation: "," 2s linear 0.5s infinite;\n        background: linear-gradient(\n          90deg,\n          transparent,\n          ",",\n          transparent\n        );\n        content: '';\n        position: absolute;\n        transform: translateX(-100%); /* Avoid flash during server-side hydration */\n        bottom: 0;\n        left: 0;\n        right: 0;\n        top: 0;\n      }\n    "]))),qC,(n.vars||n).palette.action.hover)}),YC=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:i,component:o="span",height:a,style:s,variant:l="text",width:c}=n,d=(0,nn.A)(n,BC),u=(0,Ft.A)({},n,{animation:r,component:o,variant:l,hasChildren:Boolean(d.children)}),p=(e=>{const{classes:t,variant:n,animation:r,hasChildren:i,width:o,height:a}=e,s={root:["root",n,r,i&&"withChildren",i&&!o&&"fitContent",i&&!a&&"heightAuto"]};return(0,ir.A)(s,NC,t)})(u);return(0,Gt.jsx)(GC,(0,Ft.A)({as:o,ref:t,className:(0,nr.A)(p.root,i),ownerState:u},d,{style:(0,Ft.A)({width:c,height:a},s)}))}),ZC=YC;function KC(e){return(0,sr.Ay)("MuiTableBody",e)}(0,ar.A)("MuiTableBody",["root"]);const XC=["className","component"],QC=(0,Un.Ay)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),JC={variant:"body"},eS="tbody",tS=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableBody"}),{className:r,component:i=eS}=n,o=(0,nn.A)(n,XC),a=(0,Ft.A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},KC,t)})(a);return(0,Gt.jsx)(W_.Provider,{value:JC,children:(0,Gt.jsx)(QC,(0,Ft.A)({className:(0,nr.A)(s.root,r),as:i,ref:t,role:i===eS?null:"rowgroup",ownerState:a},o))})}),nS=tS;function rS(e){return(0,sr.Ay)("MuiTableHead",e)}(0,ar.A)("MuiTableHead",["root"]);const iS=["className","component"],oS=(0,Un.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),aS={variant:"head"},sS="thead",lS=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableHead"}),{className:r,component:i=sS}=n,o=(0,nn.A)(n,iS),a=(0,Ft.A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},rS,t)})(a);return(0,Gt.jsx)(W_.Provider,{value:aS,children:(0,Gt.jsx)(oS,(0,Ft.A)({as:i,className:(0,nr.A)(s.root,r),ref:t,role:i===sS?null:"rowgroup",ownerState:a},o))})}),cS=lS;var dS=n(96604),uS=n.n(dS);function pS(e){let{headCells:t,skeletonVrows:n=3}=e,r=uS()(n);return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(PC,{component:Uu,variant:"outlined",children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsx)(cS,{sx:{bgcolor:"primary.theme.50",height:"4rem"},children:(0,Gt.jsx)(K_,{children:null===t||void 0===t?void 0:t.map(e=>(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(ZC,{variant:"text",height:10,width:50})},e.id))})}),(0,Gt.jsx)(nS,{children:r.map(e=>(0,Gt.jsx)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:null===t||void 0===t?void 0:t.map(e=>(0,Gt.jsx)(rC,{component:"th",scope:"row",children:(0,Gt.jsx)(ZC,{variant:"text",height:10})},e.id))},e))})]})})})}const hS=function(e){const{children:t,data:n,headCells:r,noDataImage:i}=e;return n.length?(0,Gt.jsx)(nS,{children:t}):(0,Gt.jsx)(nS,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:r.length+1,children:(0,Gt.jsx)(Eu,{py:6,children:(0,Gt.jsx)("img",{src:i,alt:"No Data Found",style:{display:"block",margin:"auto",maxWidth:"300px",width:"100%",height:"auto"}})})})})})};hS.defaultProps={children:null,data:[],headCells:[],service:"",isCallInitialization:!0,noDataImage:D_};const mS=hS;var fS=n(10763);const gS=(0,dy.A)((0,Gt.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function vS(e){return(0,sr.Ay)("MuiTableSortLabel",e)}const xS=(0,ar.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),yS=["active","children","className","direction","hideSortIcon","IconComponent"],bS=(0,Un.Ay)(Dp,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(e=>{let{theme:t}=e;return{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(t.vars||t).palette.text.secondary},"&:hover":{color:(t.vars||t).palette.text.secondary,["& .".concat(xS.icon)]:{opacity:.5}},["&.".concat(xS.active)]:{color:(t.vars||t).palette.text.primary,["& .".concat(xS.icon)]:{opacity:1,color:(t.vars||t).palette.text.secondary}}}}),jS=(0,Un.Ay)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t["iconDirection".concat((0,Fu.A)(n.direction))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},"desc"===n.direction&&{transform:"rotate(0deg)"},"asc"===n.direction&&{transform:"rotate(180deg)"})}),wS=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:i,className:o,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=gS}=n,c=(0,nn.A)(n,yS),d=(0,Ft.A)({},n,{active:r,direction:a,hideSortIcon:s,IconComponent:l}),u=(e=>{const{classes:t,direction:n,active:r}=e,i={root:["root",r&&"active"],icon:["icon","iconDirection".concat((0,Fu.A)(n))]};return(0,ir.A)(i,vS,t)})(d);return(0,Gt.jsxs)(bS,(0,Ft.A)({className:(0,nr.A)(u.root,o),component:"span",disableRipple:!0,ownerState:d,ref:t},c,{children:[i,s&&!r?null:(0,Gt.jsx)(jS,{as:l,className:(0,nr.A)(u.icon),ownerState:d})]}))}),_S=wS;var CS="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const SS="object"===("undefined"===typeof window?"undefined":CS(window))&&"object"===("undefined"===typeof document?"undefined":CS(document))&&9===document.nodeType;var AS={}.constructor;function kS(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(kS);if(e.constructor!==AS)return e;var t={};for(var n in e)t[n]=kS(e[n]);return t}function MS(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=kS(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var OS=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},TS=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=OS(e[n]," ");else t=OS(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function ES(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function PS(e,t){for(var n="",r=0;r<t;r++)n+="  ";return n+e}function DS(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=ES(n),l=s.linebreak,c=s.space;if(e&&o++,a)if(Array.isArray(a))for(var d=0;d<a.length;d++){var u=a[d];for(var p in u){var h=u[p];null!=h&&(r&&(r+=l),r+=PS(p+":"+c+TS(h)+";",o))}}else for(var m in a){var f=a[m];null!=f&&(r&&(r+=l),r+=PS(m+":"+c+TS(f)+";",o))}for(var g in t){var v=t[g];null!=v&&"fallbacks"!==g&&(r&&(r+=l),r+=PS(g+":"+c+TS(v)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),PS(""+e+c+"{"+r,--o)+PS("}",o)):r}var RS=/([[\].#*$><+~=|^:(),"'`\s])/g,NS="undefined"!==typeof CSS&&CSS.escape,LS=function(e){return NS?NS(e):e.replace(RS,"\\$1")},IS=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),FS=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(d(d(i)),s),i.selectorText="."+LS(i.id)),i}wn(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=TS(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,Ft.A)({},e,{allowEmpty:!0}):e;return DS(this.selectorText,this.style,n)},c(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(IS),$S={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new FS(e,t,n)}},BS={indent:1,children:!0},zS=/@([\w-]+)/,HS=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(zS);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new pA((0,Ft.A)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=BS);var t=ES(e).linebreak;if(null==e.indent&&(e.indent=BS.indent),null==e.children&&(e.children=BS.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),WS=/@container|@media|@supports\s+/,VS={onCreateRule:function(e,t,n){return WS.test(e)?new HS(e,t,n):null}},US={indent:1,children:!0},qS=/@keyframes\s+([\w-]+)/,GS=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(qS);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:LS(a(this,o)),this.rules=new pA((0,Ft.A)({},n,{parent:this})),t)this.rules.add(s,t[s],(0,Ft.A)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=US);var t=ES(e).linebreak;if(null==e.indent&&(e.indent=US.indent),null==e.children&&(e.children=US.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),YS=/@keyframes\s+/,ZS=/\$([\w-]+)/g,KS=function(e,t){return"string"===typeof e?e.replace(ZS,function(e,n){return n in t?t[n]:e}):e},XS=function(e,t,n){var r=e[t],i=KS(r,n);i!==r&&(e[t]=i)},QS={onCreateRule:function(e,t,n){return"string"===typeof e&&YS.test(e)?new GS(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&XS(e,"animation-name",n.keyframes),"animation"in e&&XS(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return KS(e,r.keyframes);default:return e}}},JS=function(e){function t(){return e.apply(this,arguments)||this}return wn(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,Ft.A)({},e,{allowEmpty:!0}):e;return DS(this.key,this.style,n)},t}(IS),eA={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new JS(e,t,n):null}},tA=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=ES(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=DS(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return DS(this.at,this.style,e)},e}(),nA=/@font-face/,rA={onCreateRule:function(e,t,n){return nA.test(e)?new tA(e,t,n):null}},iA=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return DS(this.key,this.style,e)},e}(),oA={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new iA(e,t,n):null}},aA=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),sA={"@charset":!0,"@import":!0,"@namespace":!0},lA={onCreateRule:function(e,t,n){return e in sA?new aA(e,t,n):null}},cA=[$S,VS,QS,eA,rA,oA,lA],dA={process:!0},uA={force:!0,process:!0},pA=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,c=r.scoped,d=(0,Ft.A)({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:l,scoped:c,name:e,keyframes:this.keyframes,selector:void 0},n),u=e;e in this.raw&&(u=e+"-d"+this.counter++),this.raw[u]=t,u in this.classes&&(d.selector="."+LS(this.classes[u]));var p=MS(u,t,d);if(!p)return null;this.register(p);var h=void 0===d.index?this.index.length:d.index;return this.index.splice(h,0,p),p},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=(0,Ft.A)({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof FS?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof GS&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof FS?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof GS&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=dA);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var c=t.style[l];c!==s[l]&&t.prop(l,c,uA)}for(var d in s){var u=t.style[d],p=s[d];null==u&&u!==p&&t.prop(d,null,uA)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=ES(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),hA=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=(0,Ft.A)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new pA(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),mA=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),fA=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,nn.A)(t,["attached"]),i=ES(r).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+=i),o+=s.toString(r))}return o},c(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),gA=new fA,vA="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof self&&self.Math===Math?self:Function("return this")(),xA="2f1acc6c3a606b082e5eef5e54414ffb";null==vA[xA]&&(vA[xA]=0);var yA=vA[xA]++,bA=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+yA+i+t:o+n.key+"-"+yA+(i?"-"+i:"")+"-"+t}},jA=function(e){var t;return function(){return t||(t=e()),t}},wA=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}},_A=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=TS(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(a){return!1}return!0},CA=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}},SA=function(e,t){return e.selectorText=t,e.selectorText===t},AA=jA(function(){return document.querySelector("head")});function kA(e){var t=gA.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=AA(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var MA=jA(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),OA=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(r){return!1}return e.cssRules[n]},TA=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},EA=function(){function e(e){this.getPropertyValue=wA,this.setProperty=_A,this.removeProperty=CA,this.setSelector=SA,this.hasInsertedRules=!1,this.cssRules=[],e&&gA.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=MA();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=kA(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else AA().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=TA(n,t);if(!1===(i=OA(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=TA(n,t),l=OA(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof hA&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),PA=0,DA=function(){function e(e){this.id=PA++,this.version="10.10.0",this.plugins=new mA,this.options={id:{minify:!1},createGenerateId:bA,Renderer:SS?EA:null,plugins:[]},this.generateId=bA({minify:!1});for(var t=0;t<cA.length;t++)this.plugins.use(cA[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=(0,Ft.A)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===gA.index?0:gA.index+1);var r=new hA(e,(0,Ft.A)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),gA.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var r=(0,Ft.A)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=MS(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.plugins.use(t)}),this},e}(),RA=function(e){return new DA(e)},NA="object"===typeof CSS&&null!=CSS&&"number"in CSS;function LA(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=LA(r);o&&(t||(t={}),t[n]=o)}}return t}RA();function IA(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const i=(0,Ft.A)({},t);return Object.keys(n).forEach(e=>{n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))}),i}const FA={set:(e,t,n,r)=>{let i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}},$A=FA;function BA(){var e;const t=on();return null!=(e=null==t?void 0:t.$$material)?e:t}const zA=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var HA=Date.now(),WA="fnValues"+HA,VA="fnStyle"+ ++HA;const UA=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=MS(e,{},n);return r[VA]=t,r},onProcessStyle:function(e,t){if(WA in t||VA in t)return e;var n={};for(var r in e){var i=e[r];"function"===typeof i&&(delete e[r],n[r]=i)}return t[WA]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[VA];o&&(i.style=o(e)||{});var a=i[WA];if(a)for(var s in a)i.prop(s,a[s](e),r)}}};var qA="@global",GA="@global ",YA=function(){function e(e,t,n){for(var r in this.type="global",this.at=qA,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new pA((0,Ft.A)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),ZA=function(){function e(e,t,n){this.type="global",this.at=qA,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(8);this.rule=n.jss.createRule(r,t,(0,Ft.A)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),KA=/\s*,\s*/g;function XA(e,t){for(var n=e.split(KA),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}const QA=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===qA)return new YA(e,t,n);if("@"===e[0]&&e.substr(0,8)===GA)return new ZA(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[qA]:null;if(i){for(var o in i)t.addRule(o,i[o],(0,Ft.A)({},n,{selector:XA(o,e.selector)}));delete r[qA]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,7)===qA){var o=XA(i.substr(7),e.selector);t.addRule(o,r[i],(0,Ft.A)({},n,{selector:o})),delete r[i]}}(e,t))}}};var JA=/\s*,\s*/g,ek=/&/g,tk=/\$([\w-]+)/g;const nk=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(JA),r=e.split(JA),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(ek,a):a+" "+l}return i}function n(e,t,n){if(n)return(0,Ft.A)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=(0,Ft.A)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,l=i,c=l.options.parent;for(var d in r){var u=-1!==d.indexOf("&"),p="@"===d[0];if(u||p){if(a=n(l,c,a),u){var h=t(d,l.selector);s||(s=e(c,o)),h=h.replace(tk,s);var m=l.key+"-"+d;"replaceRule"in c?c.replaceRule(m,r[d],(0,Ft.A)({},a,{selector:h})):c.addRule(m,r[d],(0,Ft.A)({},a,{selector:h}))}else p&&c.addRule(d,{},a).addRule(l.key,r[d],{selector:l.selector});delete r[d]}}return r}}};var rk=/[A-Z]/g,ik=/^ms-/,ok={};function ak(e){return"-"+e.toLowerCase()}const sk=function(e){if(ok.hasOwnProperty(e))return ok[e];var t=e.replace(rk,ak);return ok[e]=ik.test(t)?"-"+t:t};function lk(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:sk(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(lk):t.fallbacks=lk(e.fallbacks)),t}const ck=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=lk(e[t]);return e}return lk(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=sk(t);return t===r?e:(n.prop(r,e),null)}}};var dk=NA&&CSS?CSS.px:"px",uk=NA&&CSS?CSS.ms:"ms",pk=NA&&CSS?CSS.percent:"%";function hk(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var mk=hk({"animation-delay":uk,"animation-duration":uk,"background-position":dk,"background-position-x":dk,"background-position-y":dk,"background-size":dk,border:dk,"border-bottom":dk,"border-bottom-left-radius":dk,"border-bottom-right-radius":dk,"border-bottom-width":dk,"border-left":dk,"border-left-width":dk,"border-radius":dk,"border-right":dk,"border-right-width":dk,"border-top":dk,"border-top-left-radius":dk,"border-top-right-radius":dk,"border-top-width":dk,"border-width":dk,"border-block":dk,"border-block-end":dk,"border-block-end-width":dk,"border-block-start":dk,"border-block-start-width":dk,"border-block-width":dk,"border-inline":dk,"border-inline-end":dk,"border-inline-end-width":dk,"border-inline-start":dk,"border-inline-start-width":dk,"border-inline-width":dk,"border-start-start-radius":dk,"border-start-end-radius":dk,"border-end-start-radius":dk,"border-end-end-radius":dk,margin:dk,"margin-bottom":dk,"margin-left":dk,"margin-right":dk,"margin-top":dk,"margin-block":dk,"margin-block-end":dk,"margin-block-start":dk,"margin-inline":dk,"margin-inline-end":dk,"margin-inline-start":dk,padding:dk,"padding-bottom":dk,"padding-left":dk,"padding-right":dk,"padding-top":dk,"padding-block":dk,"padding-block-end":dk,"padding-block-start":dk,"padding-inline":dk,"padding-inline-end":dk,"padding-inline-start":dk,"mask-position-x":dk,"mask-position-y":dk,"mask-size":dk,height:dk,width:dk,"min-height":dk,"max-height":dk,"min-width":dk,"max-width":dk,bottom:dk,left:dk,top:dk,right:dk,inset:dk,"inset-block":dk,"inset-block-end":dk,"inset-block-start":dk,"inset-inline":dk,"inset-inline-end":dk,"inset-inline-start":dk,"box-shadow":dk,"text-shadow":dk,"column-gap":dk,"column-rule":dk,"column-rule-width":dk,"column-width":dk,"font-size":dk,"font-size-delta":dk,"letter-spacing":dk,"text-decoration-thickness":dk,"text-indent":dk,"text-stroke":dk,"text-stroke-width":dk,"word-spacing":dk,motion:dk,"motion-offset":dk,outline:dk,"outline-offset":dk,"outline-width":dk,perspective:dk,"perspective-origin-x":pk,"perspective-origin-y":pk,"transform-origin":pk,"transform-origin-x":pk,"transform-origin-y":pk,"transform-origin-z":pk,"transition-delay":uk,"transition-duration":uk,"vertical-align":dk,"flex-basis":dk,"shape-margin":dk,size:dk,gap:dk,grid:dk,"grid-gap":dk,"row-gap":dk,"grid-row-gap":dk,"grid-column-gap":dk,"grid-template-rows":dk,"grid-template-columns":dk,"grid-auto-rows":dk,"grid-auto-columns":dk,"box-shadow-x":dk,"box-shadow-y":dk,"box-shadow-blur":dk,"box-shadow-spread":dk,"font-line-height":dk,"text-shadow-x":dk,"text-shadow-y":dk,"text-shadow-blur":dk});function fk(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=fk(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=fk(i,t[i],n);else for(var o in t)t[o]=fk(e+"-"+o,t[o],n);else if("number"===typeof t&&!1===isNaN(t)){var a=n[e]||mk[e];return!a||0===t&&a===dk?t.toString():"function"===typeof a?a(t).toString():""+t+a}return t}const gk=function(e){void 0===e&&(e={});var t=hk(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=fk(r,e[r],t);return e},onChangeValue:function(e,n){return fk(n,e,t)}}};function vk(e){return function(e){if(Array.isArray(e))return x(e)}(e)||v(e)||y(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.")}()}var xk="",yk="",bk="",jk="",wk=SS&&"ontouchstart"in document.documentElement;if(SS){var _k={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Ck=document.createElement("p").style;for(var Sk in _k)if(Sk+"Transform"in Ck){xk=Sk,yk=_k[Sk];break}"Webkit"===xk&&"msHyphens"in Ck&&(xk="ms",yk=_k.ms,jk="edge"),"Webkit"===xk&&"-apple-trailing-word"in Ck&&(bk="apple")}var Ak=xk,kk=yk,Mk=bk,Ok=jk,Tk=wk;var Ek={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Ak?"-webkit-"+e:kk+e)}},Pk={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Ak?kk+"print-"+e:e)}},Dk=/[-\s]+(.)?/g;function Rk(e,t){return t?t.toUpperCase():""}function Nk(e){return e.replace(Dk,Rk)}function Lk(e){return Nk("-"+e)}var Ik,Fk={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Ak){var n="mask-image";if(Nk(n)in t)return e;if(Ak+Lk(n)in t)return kk+e}return e}},$k={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Mk||Tk?e:kk+e)}},Bk={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:kk+e)}},zk={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:kk+e)}},Hk={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Ak||"ms"===Ak&&"edge"!==Ok?kk+e:e)}},Wk={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Ak||"ms"===Ak||"apple"===Mk?kk+e:e)}},Vk={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Ak?"WebkitColumn"+Lk(e)in t&&kk+"column-"+e:"Moz"===Ak&&("page"+Lk(e)in t&&"page-"+e))}},Uk={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Ak)return e;var n=e.replace("-inline","");return Ak+Lk(n)in t&&kk+n}},qk={supportedProperty:function(e,t){return Nk(e)in t&&e}},Gk={supportedProperty:function(e,t){var n=Lk(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Ak+n in t?kk+e:"Webkit"!==Ak&&"Webkit"+n in t&&"-webkit-"+e}},Yk={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Ak?""+kk+e:e)}},Zk={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Ak?kk+"scroll-chaining":e)}},Kk={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Xk={supportedProperty:function(e,t){var n=Kk[e];return!!n&&(Ak+Lk(n)in t&&kk+n)}},Qk={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Jk=Object.keys(Qk),eM=function(e){return kk+e},tM={supportedProperty:function(e,t,n){var r=n.multiple;if(Jk.indexOf(e)>-1){var i=Qk[e];if(!Array.isArray(i))return Ak+Lk(i)in t&&kk+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(Ak+Lk(i[0])in t))return!1;return i.map(eM)}return!1}},nM=[Ek,Pk,Fk,$k,Bk,zk,Hk,Wk,Vk,Uk,qk,Gk,Yk,Zk,Xk,tM],rM=nM.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),iM=nM.filter(function(e){return e.noPrefill}).reduce(function(e,t){return e.push.apply(e,vk(t.noPrefill)),e},[]),oM={};if(SS){Ik=document.createElement("p");var aM=window.getComputedStyle(document.documentElement,"");for(var sM in aM)isNaN(sM)||(oM[aM[sM]]=aM[sM]);iM.forEach(function(e){return delete oM[e]})}function lM(e,t){if(void 0===t&&(t={}),!Ik)return e;if(null!=oM[e])return oM[e];"transition"!==e&&"transform"!==e||(t[e]=e in Ik.style);for(var n=0;n<rM.length&&(oM[e]=rM[n](e,Ik.style,t),!oM[e]);n++);try{Ik.style[e]=""}catch(r){return!1}return oM[e]}var cM,dM={},uM={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},pM=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function hM(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?lM(t):", "+lM(n);return r||(t||n)}function mM(e,t){var n=t;if(!cM||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=dM[r])return dM[r];try{cM.style[e]=n}catch(i){return dM[r]=!1,!1}if(uM[e])n=n.replace(pM,hM);else if(""===cM.style[e]&&("-ms-flex"===(n=kk+n)&&(cM.style[e]="-ms-flexbox"),cM.style[e]=n,""===cM.style[e]))return dM[r]=!1,!1;return cM.style[e]="",dM[r]=n,dM[r]}SS&&(cM=document.createElement("p"));const fM=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=lM(n);o&&o!==n&&(i=!0);var a=!1,s=mM(o,TS(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Ak?e:"@"+kk+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return mM(t,TS(e))||e}}};const gM=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}};const vM=RA({plugins:[UA(),QA(),nk(),ck(),gk(),"undefined"===typeof window?null:fM(),gM()]}),xM={disableGeneration:!1,generateClassName:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,i=""===r?"":"".concat(r,"-");let o=0;const a=()=>(o+=1,o);return(e,o)=>{const s=o.options.name;if(s&&0===s.indexOf("Mui")&&!o.options.link&&!t){if(-1!==zA.indexOf(e.key))return"Mui-".concat(e.key);const t="".concat(i).concat(s,"-").concat(e.key);return o.options.theme[an]&&""===r?"".concat(t,"-").concat(a()):t}return"".concat(i).concat(n).concat(a())}}(),jss:vM,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},yM=We.createContext(xM);let bM=-1e9;var jM=n(67598);const wM=["variant"];function _M(e){return 0===e.length}function CM(e){const t="function"===typeof e;return{create:(n,r)=>{let i;try{i=t?e(n):e}catch(l){throw l}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return i;const o=n.components[r].styleOverrides||{},a=n.components[r].variants||[],s=(0,Ft.A)({},i);return Object.keys(o).forEach(e=>{s[e]=(0,Yb.A)(s[e]||{},o[e])}),a.forEach(e=>{const t=function(e){const{variant:t}=e,n=(0,nn.A)(e,wM);let r=t||"";return Object.keys(n).sort().forEach(t=>{r+="color"===t?_M(r)?e[t]:(0,jM.A)(e[t]):"".concat(_M(r)?t:(0,jM.A)(t)).concat((0,jM.A)(e[t].toString()))}),r}(e.props);s[t]=(0,Yb.A)(s[t]||{},e.style)}),s},options:{}}}const SM={},AM=["name","classNamePrefix","Component","defaultTheme"];function kM(e,t){let{state:n,theme:r,stylesOptions:i,stylesCreator:o,name:a}=e;if(i.disableGeneration)return;let s=$A.get(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},$A.set(i.sheetsManager,o,r,s));const l=(0,Ft.A)({},o.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;const c=i.sheetsRegistry;if(0===s.refs){let e;i.sheetsCache&&(e=$A.get(i.sheetsCache,o,r));const t=o.create(r,a);e||(e=i.jss.createStyleSheet(t,(0,Ft.A)({link:!1},l)),e.attach(),i.sheetsCache&&$A.set(i.sheetsCache,o,r,e)),c&&c.add(e),s.staticSheet=e,s.dynamicStyles=LA(t)}if(s.dynamicStyles){const e=i.jss.createStyleSheet(s.dynamicStyles,(0,Ft.A)({link:!0},l));e.update(t),e.attach(),n.dynamicSheet=e,n.classes=IA({baseClasses:s.staticSheet.classes,newClasses:e.classes}),c&&c.add(e)}else n.classes=s.staticSheet.classes;s.refs+=1}function MM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{name:n,classNamePrefix:r,Component:i,defaultTheme:o=SM}=t,a=(0,nn.A)(t,AM),s=CM(e),l=n||r||"makeStyles";s.options={index:(bM+=1,bM),name:n,meta:l,classNamePrefix:l};return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=BA()||o,r=(0,Ft.A)({},We.useContext(yM),a),l=We.useRef(),c=We.useRef();!function(e,t){const n=We.useRef([]);let r;const i=We.useMemo(()=>({}),t);n.current!==i&&(n.current=i,r=e()),We.useEffect(()=>()=>{r&&r()},[i])}(()=>{const i={name:n,state:{},stylesCreator:s,stylesOptions:r,theme:t};return kM(i,e),c.current=!1,l.current=i,()=>{!function(e){let{state:t,theme:n,stylesOptions:r,stylesCreator:i}=e;if(r.disableGeneration)return;const o=$A.get(r.sheetsManager,i,n);o.refs-=1;const a=r.sheetsRegistry;0===o.refs&&($A.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}(i)}},[t,s]),We.useEffect(()=>{c.current&&function(e,t){let{state:n}=e;n.dynamicSheet&&n.dynamicSheet.update(t)}(l.current,e),c.current=!0});const d=function(e,t,n){let{state:r,stylesOptions:i}=e;if(i.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=IA({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(l.current,e.classes,i);return d}}const OM=MM(e=>({thead:{backgroundColor:e.palette.primary.theme[30],color:e.palette.primary.theme[300],"& th":{fontWeight:"600",backgroundColor:e.palette.primary.theme[30],color:e.palette.primary.theme[300],paddingTop:"10px",paddingBottom:"10px"}},visuallyHidden:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1},tableSortTitle:{"& .sortIcon":{position:"absolute",right:"-26px"}},isHelpicon:{"& .sortIcon":{position:"relative",right:"auto"}}}));function TM(e){const t=OM(),{order:n,setOrder:r,orderBy:i,setOrderBy:o,selected:a,setSelected:s,data:l,headCells:c,dataParameter:d,isSelection:u,showEllipsis:p,isHelpicon:h}=e,m=e=>t=>{((e,t)=>{r(i===t&&"desc"===n?"asc":"desc"),o(t)})(0,e)};return(0,Gt.jsx)(Gt.Fragment,{children:(0,Jo.isEmpty)(l)?null:(0,Gt.jsx)(cS,{className:t.thead,children:(0,Gt.jsxs)(K_,{children:[u?(0,Gt.jsx)(rC,{padding:"checkbox",className:t.th,children:(0,Gt.jsx)(jC,{indeterminate:a.length>0&&a.length<l.length,checked:a.length===l.length&&0!==a.length,onChange:e=>{if(e.target.checked){const e=l.map(e=>e[d]);return void s(e)}s([])},inputProps:{"aria-label":"select all desserts"},color:"primary"})}):null,c.map(e=>{const r=e.sortProperty?e.sortProperty:e.id,o=!!e.isSort&&e.isSort;return(0,Gt.jsx)(rC,{align:e.actionsCellStyle,sortDirection:i===r&&n,className:jn(t.th,h&&t.isHelpicon),width:e.width,children:o?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(_S,{className:t.tableSortTitle,active:i===r,direction:i===r?n:"asc",onClick:m(r),classes:{icon:"sortIcon"},IconComponent:Gy.A,children:[(0,Gt.jsx)(Yx,{title:e.label,children:(0,Gt.jsx)("span",{className:jn({"ellipsis-row":p}),children:e.label})}),i===r?(0,Gt.jsx)("span",{className:t.visuallyHidden,children:"desc"===n?"sorted descending":"sorted ascending"}):null]}),h&&(0,Gt.jsx)(Yx,{title:e.helpText,placement:"top",children:(0,Gt.jsx)(Kp,{edge:"end",size:"small",children:(0,Gt.jsx)(fS.A,{fontSize:"small"})})})]}):(0,Gt.jsxs)(Gt.Fragment,{children:[e.label,h&&(0,Gt.jsx)(Yx,{title:e.helpText,placement:"top",children:(0,Gt.jsx)(Kp,{edge:"end",size:"small",children:(0,Gt.jsx)(fS.A,{fontSize:"small"})})})]})},e.id)})]})})})}function EM(e){const{data:t,headCells:n,children:r,isHelpicon:o,noDataImage:a,pageDetails:s,fetchList:l,skeletonVrows:c,stickyHeader:d,scrollHeight:u,className:p}=e;return We.useEffect(()=>{if(s&&(0,Jo.isEmpty)(t)&&s.current_page>1)return s.current_page-=1,l()},[t]),null===t?(0,Gt.jsx)(pS,{headCells:n,skeletonVrows:c}):(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(PC,{component:Uu,variant:"outlined",className:jn(p&&p),sx:{maxHeight:d&&u},children:(0,Gt.jsxs)(kC,{stickyHeader:d,"aria-label":d&&"sticky table",children:[(0,Gt.jsx)(TM,(0,i.A)({},e)),(0,Gt.jsx)(mS,{headCells:n,data:t,isHelpicon:o,naDataImage:a,children:r})]})})})}TM.defaultProps={order:"",setOrder:()=>{},orderBy:"",setOrderBy:()=>{},selected:[],setSelected:()=>{},data:[],headCells:[],dataParameter:"",isSelection:!1,showEllipsis:!1,isHelpicon:!1};const PM=["ownerState"],DM=["variants"],RM=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function NM(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function LM(e,t){return t&&e&&"object"===typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles="@layer ".concat(t,"{").concat(String(e.styles),"}")),e}const IM=(0,Ht.A)(),FM=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function $M(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function BM(e){return e?(t,n)=>n[e]:null}function zM(e,t,n){let{ownerState:r}=t,i=(0,nn.A)(t,PM);const o="function"===typeof e?e((0,Ft.A)({ownerState:r},i)):e;if(Array.isArray(o))return o.flatMap(e=>zM(e,(0,Ft.A)({ownerState:r},i),n));if(o&&"object"===typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,nn.A)(o,DM);return e.forEach(e=>{let o=!0;if("function"===typeof e.props?o=e.props((0,Ft.A)({ownerState:r},i,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&i[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"===typeof e.style?e.style((0,Ft.A)({ownerState:r},i,r)):e.style;t.push(n?LM((0,Bt.internal_serializeStyles)(o),n):o)}}),t}return n?LM((0,Bt.internal_serializeStyles)(o),n):o}const HM=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=IM,rootShouldForwardProp:r=NM,slotShouldForwardProp:i=NM}=e,o=e=>(0,_u.A)((0,Ft.A)({},e,{theme:$M((0,Ft.A)({},e,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,Bt.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:s,slot:l,skipVariantsResolver:c,skipSx:d,overridesResolver:u=BM(FM(l))}=a,p=(0,nn.A)(a,RM),h=s&&s.startsWith("Mui")||l?"components":"custom",m=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,f=d||!1;let g=NM;"Root"===l||"root"===l?g=r:l?g=i:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(g=void 0);const v=(0,Bt.default)(e,(0,Ft.A)({shouldForwardProp:g,label:undefined},p)),x=e=>"function"===typeof e&&e.__emotion_real!==e||(0,Yb.Q)(e)?r=>{const i=$M({theme:r.theme,defaultTheme:n,themeId:t});return zM(e,(0,Ft.A)({},r,{theme:i}),i.modularCssLayers?h:void 0)}:e,y=function(r){let i=x(r);for(var a=arguments.length,l=new Array(a>1?a-1:0),c=1;c<a;c++)l[c-1]=arguments[c];const d=l?l.map(x):[];s&&u&&d.push(e=>{const r=$M((0,Ft.A)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const i=r.components[s].styleOverrides,o={};return Object.entries(i).forEach(t=>{let[n,i]=t;o[n]=zM(i,(0,Ft.A)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),u(e,o)}),s&&!m&&d.push(e=>{var r;const i=$M((0,Ft.A)({},e,{defaultTheme:n,themeId:t}));return zM({variants:null==i||null==(r=i.components)||null==(r=r[s])?void 0:r.variants},(0,Ft.A)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),f||d.push(o);const p=d.length-l.length;if(Array.isArray(r)&&p>0){const e=new Array(p).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const h=v(i,...d);return e.muiName&&(h.muiName=e.muiName),h};return v.withConfig&&(y.withConfig=v.withConfig),y}}(),WM=HM;function VM(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,o=qt(r);i&&(o=o[i]||o);return M_({theme:o,name:n,props:t})}var UM=n(28604);const qM=["component","direction","spacing","divider","children","className","useFlexGap"],GM=(0,Ht.A)(),YM=WM("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function ZM(e){return VM({props:e,name:"MuiStack",defaultTheme:GM})}function KM(e,t){const n=We.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(We.cloneElement(t,{key:"separator-".concat(i)})),e),[])}const XM=e=>{let{ownerState:t,theme:n}=e,r=(0,Ft.A)({display:"flex",flexDirection:"column"},(0,Xm.NI)({theme:n},(0,Xm.kW)({values:t.direction,breakpoints:n.breakpoints.values}),e=>({flexDirection:e})));if(t.spacing){const e=(0,UM.LX)(n),i=Object.keys(n.breakpoints.values).reduce((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e),{}),o=(0,Xm.kW)({values:t.direction,base:i}),a=(0,Xm.kW)({values:t.spacing,base:i});"object"===typeof o&&Object.keys(o).forEach((e,t,n)=>{if(!o[e]){const r=t>0?o[n[t-1]]:"column";o[e]=r}});const s=(n,r)=>{return t.useFlexGap?{gap:(0,UM._W)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{["margin".concat((i=r?o[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]))]:(0,UM._W)(e,n)}};var i};r=(0,Yb.A)(r,(0,Xm.NI)({theme:n},a,s))}return r=(0,Xm.iZ)(n.breakpoints,r),r};const QM=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=YM,useThemeProps:n=ZM,componentName:r="MuiStack"}=e,i=t(XM),o=We.forwardRef(function(e,t){const o=n(e),a=(0,Cu.A)(o),{component:s="div",direction:l="column",spacing:c=0,divider:d,children:u,className:p,useFlexGap:h=!1}=a,m=(0,nn.A)(a,qM),f={direction:l,spacing:c,useFlexGap:h},g=(0,ir.A)({root:["root"]},e=>(0,sr.Ay)(r,e),{});return(0,Gt.jsx)(i,(0,Ft.A)({as:s,ownerState:f,ref:t,className:wu(g.root,p)},m,{children:d?KM(u,d):u}))});return o}({createStyledComponent:(0,Un.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,$t.b)({props:e,name:"MuiStack"})}),JM=QM;function eO(e){return(0,sr.Ay)("MuiDialogActions",e)}(0,ar.A)("MuiDialogActions",["root","spacing"]);const tO=["className","disableSpacing"],nO=(0,Un.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})}),rO=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:i=!1}=n,o=(0,nn.A)(n,tO),a=(0,Ft.A)({},n,{disableSpacing:i}),s=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,ir.A)(r,eO,t)})(a);return(0,Gt.jsx)(nO,(0,Ft.A)({className:(0,nr.A)(s.root,r),ownerState:a,ref:t},o))}),iO=rO;function oO(e){return(0,sr.Ay)("MuiFormControlLabel",e)}const aO=(0,ar.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),sO=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],lO=(0,Un.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(aO.label)]:t.label},t.root,t["labelPlacement".concat((0,Fu.A)(n.labelPlacement))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(aO.disabled)]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(aO.label)]:{["&.".concat(aO.disabled)]:{color:(t.vars||t).palette.text.disabled}}})}),cO=(0,Un.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(aO.error)]:{color:(t.vars||t).palette.error.main}}}),dO=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiFormControlLabel"}),{className:o,componentsProps:a={},control:s,disabled:l,disableTypography:c,label:d,labelPlacement:u="end",required:p,slotProps:h={}}=i,m=(0,nn.A)(i,sO),f=ij(),g=null!=(n=null!=l?l:s.props.disabled)?n:null==f?void 0:f.disabled,v=null!=p?p:s.props.required,x={disabled:g,required:v};["checked","name","onChange","value","inputRef"].forEach(e=>{"undefined"===typeof s.props[e]&&"undefined"!==typeof i[e]&&(x[e]=i[e])});const y=nj({props:i,muiFormControl:f,states:["error"]}),b=(0,Ft.A)({},i,{disabled:g,labelPlacement:u,required:v,error:y.error}),j=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,a={root:["root",n&&"disabled","labelPlacement".concat((0,Fu.A)(r)),i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return(0,ir.A)(a,oO,t)})(b),w=null!=(r=h.typography)?r:a.typography;let _=d;return null==_||_.type===Ym||c||(_=(0,Gt.jsx)(Ym,(0,Ft.A)({component:"span"},w,{className:(0,nr.A)(j.label,null==w?void 0:w.className),children:_}))),(0,Gt.jsxs)(lO,(0,Ft.A)({className:(0,nr.A)(j.root,o),ownerState:b,ref:t},m,{children:[We.cloneElement(s,x),v?(0,Gt.jsxs)(JM,{display:"block",children:[_,(0,Gt.jsxs)(cO,{ownerState:b,"aria-hidden":!0,className:j.asterisk,children:["\u2009","*"]})]}):_]}))}),uO=dO,pO=["children","onClose"],hO=e=>{const{children:t,onClose:n}=e,r=Ko(e,pO);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};function mO(e){let{open:t,onClose:n,allHeadCells:r,initialHeadcells:i,setHeadcells:o,disabledIndex:a,disableLastItem:s}=e;const{t:l}=vg(),[c,d]=(0,We.useState)(i||[]),[u,p]=(0,We.useState)(!0);let h=[];0===a.length&&s&&(h=[0,r.length-1]);const m=function(e){const t=e.currentTarget.id;c.includes(t)?(d(c.filter(e=>e!==t)),p(!(c.filter(e=>e!==t).length<r.length))):(d(e=>[...e,t]),p([...c,t].length===r.length))},f=function(){d(i),n()};return(0,We.useEffect)(()=>{i.length<r.length&&p(!1)},[]),(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"sm",open:t,onClose:f,children:[(0,Gt.jsxs)(hO,{sx:{px:4},onClose:f,children:[(0,Gt.jsx)(Ym,{component:"p",variant:"h6",children:l("rpm_TableSetting")}),(0,Gt.jsx)(Ym,{component:"p",variant:"subtitle2",children:l("rpm_TableSettingInfo")})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(s_,{sx:{p:4},children:(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",children:[(0,Gt.jsx)(Xj,{component:"div",children:(0,Gt.jsx)(uO,{value:"end",control:(0,Gt.jsx)(jC,{color:"primary",checked:u,id:"selectAll",onChange:function(){var e;u?(d([null===(e=r[s?r.length-1:r.length])||void 0===e?void 0:e.id,r[0].id]),p(!1)):(d(r.map(e=>e.id)),p(!0))}}),label:(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:l("rpm_SelectAll")}),labelPlacement:"end"})}),(0,Gt.jsx)(Xj,{component:"div",children:(0,Gt.jsx)(df,{container:!0,children:r.map((e,t)=>(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsx)(uO,{value:"end",control:(0,Gt.jsx)(jC,{inputProps:{"aria-label":"Keep Active"},color:"primary",checked:c.includes(e.id),disabled:h.includes(t),onChange:m,id:e.id}),label:e.label,labelPlacement:"end"})},e.id))})})]})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(iO,{sx:{p:2},children:(0,Gt.jsxs)(JM,{direction:"row",spacing:2,children:[(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:f,children:l("rpm_Cancel")}),(0,Gt.jsx)(Vp,{variant:"contained",onClick:function(){o(c),n()},color:"primary",disableElevation:!0,children:l("rpm_Submit")})]})})]})}mO.defaultProps={open:!1,onClose:()=>{},initialHeadcells:[],allHeadCells:[],setHeadcells:()=>{},disabledIndex:[],disableLastItem:!0};const fO=mO;function gO(e){return(0,sr.Ay)("MuiPagination",e)}(0,ar.A)("MuiPagination",["root","ul","outlined","text"]);const vO=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function xO(e){return(0,sr.Ay)("MuiPaginationItem",e)}const yO=(0,ar.A)("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),bO=(0,dy.A)((0,Gt.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),jO=(0,dy.A)((0,Gt.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),wO=(0,dy.A)((0,Gt.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),_O=(0,dy.A)((0,Gt.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),CO=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],SO=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,Fu.A)(n.size))],"text"===n.variant&&t["text".concat((0,Fu.A)(n.color))],"outlined"===n.variant&&t["outlined".concat((0,Fu.A)(n.color))],"rounded"===n.shape&&t.rounded,"page"===n.type&&t.page,("start-ellipsis"===n.type||"end-ellipsis"===n.type)&&t.ellipsis,("previous"===n.type||"next"===n.type)&&t.previousNext,("first"===n.type||"last"===n.type)&&t.firstLast]},AO=(0,Un.Ay)("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:SO})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,height:"auto",["&.".concat(yO.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"small"===n.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)})}),kO=(0,Un.Ay)(Dp,{name:"MuiPaginationItem",slot:"Root",overridesResolver:SO})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,["&.".concat(yO.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(yO.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},transition:t.transitions.create(["color","background-color"],{duration:t.transitions.duration.short}),"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(yO.selected)]:{backgroundColor:(t.vars||t).palette.action.selected,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,$u.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(yO.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,$u.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},["&.".concat(yO.disabled)]:{opacity:1,color:(t.vars||t).palette.action.disabled,backgroundColor:(t.vars||t).palette.action.selected}}},"small"===n.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)},"rounded"===n.shape&&{borderRadius:(t.vars||t).shape.borderRadius})},e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},"text"===n.variant&&{["&.".concat(yO.selected)]:(0,Ft.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}},["&.".concat(yO.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}},{["&.".concat(yO.disabled)]:{color:(t.vars||t).palette.action.disabled}})},"outlined"===n.variant&&{border:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(yO.selected)]:(0,Ft.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):(0,$u.X4)(t.palette[n.color].main,.5)),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.activatedOpacity,")"):(0,$u.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,$u.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(yO.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,$u.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity)}},{["&.".concat(yO.disabled)]:{borderColor:(t.vars||t).palette.action.disabledBackground,color:(t.vars||t).palette.action.disabled}})})}),MO=(0,Un.Ay)("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({fontSize:t.typography.pxToRem(20),margin:"0 -8px"},"small"===n.size&&{fontSize:t.typography.pxToRem(18)},"large"===n.size&&{fontSize:t.typography.pxToRem(22)})}),OO=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiPaginationItem"}),{className:r,color:i="standard",component:o,components:a={},disabled:s=!1,page:l,selected:c=!1,shape:d="circular",size:u="medium",slots:p={},type:h="page",variant:m="text"}=n,f=(0,nn.A)(n,CO),g=(0,Ft.A)({},n,{color:i,disabled:s,selected:c,shape:d,size:u,type:h,variant:m}),v=dn(),x=(e=>{const{classes:t,color:n,disabled:r,selected:i,size:o,shape:a,type:s,variant:l}=e,c={root:["root","size".concat((0,Fu.A)(o)),l,a,"standard"!==n&&"color".concat((0,Fu.A)(n)),"standard"!==n&&"".concat(l).concat((0,Fu.A)(n)),r&&"disabled",i&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return(0,ir.A)(c,xO,t)})(g),y=(v?{previous:p.next||a.next||_O,next:p.previous||a.previous||wO,last:p.first||a.first||bO,first:p.last||a.last||jO}:{previous:p.previous||a.previous||wO,next:p.next||a.next||_O,first:p.first||a.first||bO,last:p.last||a.last||jO})[h];return"start-ellipsis"===h||"end-ellipsis"===h?(0,Gt.jsx)(AO,{ref:t,ownerState:g,className:(0,nr.A)(x.root,r),children:"\u2026"}):(0,Gt.jsxs)(kO,(0,Ft.A)({ref:t,ownerState:g,component:o,disabled:s,className:(0,nr.A)(x.root,r)},f,{children:["page"===h&&l,y?(0,Gt.jsx)(MO,{as:y,ownerState:g,className:x.icon}):null]}))}),TO=OO,EO=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],PO=(0,Un.Ay)("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),DO=(0,Un.Ay)("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function RO(e,t,n){return"page"===e?"".concat(n?"":"Go to ","page ").concat(t):"Go to ".concat(e," page")}const NO=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiPagination"}),{boundaryCount:r=1,className:i,color:o="standard",count:a=1,defaultPage:s=1,disabled:l=!1,getItemAriaLabel:c=RO,hideNextButton:d=!1,hidePrevButton:u=!1,renderItem:p=e=>(0,Gt.jsx)(TO,(0,Ft.A)({},e)),shape:h="circular",showFirstButton:m=!1,showLastButton:f=!1,siblingCount:g=1,size:v="medium",variant:x="text"}=n,y=(0,nn.A)(n,EO),{items:b}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:i=1,disabled:o=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:d=!1,showLastButton:u=!1,siblingCount:p=1}=e,h=(0,nn.A)(e,vO),[m,f]=(0,Yy.A)({controlled:c,default:i,name:n,state:"page"}),g=(e,t)=>{c||f(t),l&&l(e,t)},v=(e,t)=>{const n=t-e+1;return Array.from({length:n},(t,n)=>e+n)},x=v(1,Math.min(t,r)),y=v(Math.max(r-t+1,t+1),r),b=Math.max(Math.min(m-p,r-t-2*p-1),t+2),j=Math.min(Math.max(m+p,t+2*p+2),y.length>0?y[0]-2:r-1),w=[...d?["first"]:[],...s?[]:["previous"],...x,...b>t+2?["start-ellipsis"]:t+1<r-t?[t+1]:[],...v(b,j),...j<r-t-1?["end-ellipsis"]:r-t>t?[r-t]:[],...y,...a?[]:["next"],...u?["last"]:[]],_=e=>{switch(e){case"first":return 1;case"previous":return m-1;case"next":return m+1;case"last":return r;default:return null}},C=w.map(e=>"number"===typeof e?{onClick:t=>{g(t,e)},type:"page",page:e,selected:e===m,disabled:o,"aria-current":e===m?"true":void 0}:{onClick:t=>{g(t,_(e))},type:e,page:_(e),selected:!1,disabled:o||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?m>=r:m<=1)});return(0,Ft.A)({items:C},h)}((0,Ft.A)({},n,{componentName:"Pagination"})),j=(0,Ft.A)({},n,{boundaryCount:r,color:o,count:a,defaultPage:s,disabled:l,getItemAriaLabel:c,hideNextButton:d,hidePrevButton:u,renderItem:p,shape:h,showFirstButton:m,showLastButton:f,siblingCount:g,size:v,variant:x}),w=(e=>{const{classes:t,variant:n}=e,r={root:["root",n],ul:["ul"]};return(0,ir.A)(r,gO,t)})(j);return(0,Gt.jsx)(PO,(0,Ft.A)({"aria-label":"pagination navigation",className:(0,nr.A)(w.root,i),ownerState:j,ref:t},y,{children:(0,Gt.jsx)(DO,{className:w.ul,ownerState:j,children:b.map((e,t)=>(0,Gt.jsx)("li",{children:p((0,Ft.A)({},e,{color:o,"aria-label":c(e.type,e.page,e.selected),shape:h,size:v,variant:x}))},t))})}))}),LO=NO;function IO(e){let{pageDetails:t,fetchListFunction:n}=e;return(0,Gt.jsx)(Gt.Fragment,{children:t.total>0?(0,Gt.jsx)(Eu,{py:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,Gt.jsx)(df,{item:!0,sm:!0,children:(0,Gt.jsx)(LO,{count:t.last_page,page:t.current_page,shape:"rounded",color:"primary",onChange:function(e,r){!function(e,t,n,r){n.current_page=t,r()}(0,r,t,n)}})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Ym,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,Gt.jsx)(Xj,{margin:"dense",children:(0,Gt.jsx)(Dw,{variant:"outlined",size:"small",value:t.per_page,onChange:function(e){!function(e,t,n){t.per_page=parseInt(e.target.value,10),t.current_page=1,n()}(e,t,n)},children:t.per_page_options.map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))})})]})})]})}):null})}function FO(e){return(0,sr.Ay)("MuiAlert",e)}const $O=(0,ar.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),BO=(0,dy.A)((0,Gt.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),zO=(0,dy.A)((0,Gt.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),HO=(0,dy.A)((0,Gt.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),WO=(0,dy.A)((0,Gt.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),VO=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],UO=(0,Un.Ay)(Uu,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,Fu.A)(n.color||n.severity))]]}})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?$u.e$:$u.a,r="light"===t.palette.mode?$u.a:$u.e$;return(0,Ft.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[i]=e;return{props:{colorSeverity:i,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert["".concat(i,"Color")]:n(t.palette[i].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(i,"StandardBg")]:r(t.palette[i].light,.9),["& .".concat($O.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(i,"IconColor")]}:{color:t.palette[i].main}}}}),...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[r]=e;return{props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert["".concat(r,"Color")]:n(t.palette[r].light,.6),border:"1px solid ".concat((t.vars||t).palette[r].light),["& .".concat($O.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(r,"IconColor")]}:{color:t.palette[r].main}}}}),...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.dark}).map(e=>{let[n]=e;return{props:{colorSeverity:n,variant:"filled"},style:(0,Ft.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(n,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(n,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[n].dark:t.palette[n].main,color:t.palette.getContrastText(t.palette[n].main)})}})]})}),qO=(0,Un.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),GO=(0,Un.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),YO=(0,Un.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),ZO={success:(0,Gt.jsx)(BO,{fontSize:"inherit"}),warning:(0,Gt.jsx)(zO,{fontSize:"inherit"}),error:(0,Gt.jsx)(HO,{fontSize:"inherit"}),info:(0,Gt.jsx)(WO,{fontSize:"inherit"})},KO=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:a="Close",color:s,components:l={},componentsProps:c={},icon:d,iconMapping:u=ZO,onClose:p,role:h="alert",severity:m="success",slotProps:f={},slots:g={},variant:v="standard"}=n,x=(0,nn.A)(n,VO),y=(0,Ft.A)({},n,{color:s,severity:m,variant:v,colorSeverity:s||m}),b=(e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root","color".concat((0,Fu.A)(n||r)),"".concat(t).concat((0,Fu.A)(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,ir.A)(o,FO,i)})(y),j={slots:(0,Ft.A)({closeButton:l.CloseButton,closeIcon:l.CloseIcon},g),slotProps:(0,Ft.A)({},c,f)},[w,_]=gy("closeButton",{elementType:Kp,externalForwardedProps:j,ownerState:y}),[C,S]=gy("closeIcon",{elementType:Sb,externalForwardedProps:j,ownerState:y});return(0,Gt.jsxs)(UO,(0,Ft.A)({role:h,elevation:0,ownerState:y,className:(0,nr.A)(b.root,o),ref:t},x,{children:[!1!==d?(0,Gt.jsx)(qO,{ownerState:y,className:b.icon,children:d||u[m]||ZO[m]}):null,(0,Gt.jsx)(GO,{ownerState:y,className:b.message,children:i}),null!=r?(0,Gt.jsx)(YO,{ownerState:y,className:b.action,children:r}):null,null==r&&p?(0,Gt.jsx)(YO,{ownerState:y,className:b.action,children:(0,Gt.jsx)(w,(0,Ft.A)({size:"small","aria-label":a,title:a,color:"inherit",onClick:p},_,{children:(0,Gt.jsx)(C,(0,Ft.A)({fontSize:"small"},S))}))}):null]}))}),XO=KO,QO=e=>{var t;let{open:n,setDetailsTab:r,logDetails:i,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,onCheck:d,isSelection:u,checkState:p,nodata:h,logHeads:m,setDetailedLog:f}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Lf,{open:n,onClose:()=>{r(!1),f({})},anchor:"right",className:"DrawerAuditLog",PaperProps:{sx:{width:"40%"}},children:(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Eu,{sx:{mb:2.5},children:[(0,Gt.jsxs)(Eu,{p:2,sx:{backgroundColor:"#E3E5EF"},children:[(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:()=>{r(!1),f({})},sx:{position:"absolute",right:8,top:12,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}),(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Ym,{variant:"h6",fontWeight:600,children:[we("rpm_LogDetails")," ",(null===i||void 0===i?void 0:i.description)&&"(".concat(i.description,")")]})})}),(0,Gt.jsx)(df,{container:!0,spacing:2,mt:.05,children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:we("rpm_UserPrincipal")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",wordBreak:"break-word",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null===i||void 0===i?void 0:i.principal})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:we("rpm_EventCode")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:null===i||void 0===i?void 0:i.event_id})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:we("rpm_Service")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:null===i||void 0===i?void 0:i.service_code})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:we("rpm_EventTime")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:sa()(null===i||void 0===i?void 0:i.event_time).format("DD-MM-YYYY hh:mm:ss a")||"NA"})})]})})]})})})]}),!as(null===i||void 0===i?void 0:i.attributes)&&(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Eu,{p:2,children:[(0,Gt.jsx)(Eu,{sx:{px:.5,mb:2,mt:2},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"p",fontWeight:600,children:we("rpm_Event_Information")})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsx)(Gt.Fragment,{children:Object.entries(null===i||void 0===i?void 0:i.attributes).map((e,t)=>{let[n,r]=e;const i=sa()(r,["ddd MMM DD HH:mm:ss [UTC] YYYY"],!0);return i.isValid()&&(r=i.format("DD/MM/YYYY")),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,wordBreak:"break-word"},children:n}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:r})})]})},t)})})})]})})})]}),(0,Gt.jsx)(Af,{sx:{margin:"10px 0"}}),!as(null===i||void 0===i?void 0:i.logs)&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Eu,{p:2,children:[(0,Gt.jsx)(Eu,{sx:{px:.5,mb:2},children:(0,Gt.jsx)(Ym,{variant:"h6",fontWeight:600,children:we("rpm_Logs")})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:o,orderBy:a,setOrder:s,setOrderBy:l,data:as(null===i||void 0===i?void 0:i.logs)?[]:null===i||void 0===i?void 0:i.logs,headCells:m,dataParameter:c,selected:p,setSelected:d,isSelection:!1,noDataImage:h,fetchList:()=>{},pageDetails:{},skeletonVrows:6,className:"theme_scroll",children:null===i||void 0===i||null===(t=i.logs)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsxs)(K_,{selected:p.includes(null===e||void 0===e?void 0:e.id),sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:d,checked:p.includes(null===e||void 0===e?void 0:e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,Gt.jsx)(rC,{children:sa()(null===e||void 0===e?void 0:e.timestamp).format("DD-MM-YYYY hh:mm:ss a")||"NA"}),(0,Gt.jsx)(rC,{minWidth:"300px",sx:{whiteSpace:"normal",wordBreak:"break-word"},children:(null===e||void 0===e?void 0:e.message)||"NA"}),(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.error)||"NA"}),(0,Gt.jsx)(rC,{children:as(null===e||void 0===e?void 0:e.attributes)?(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:"NA"}):e.attributes["exception.message"]?(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:e.attributes["exception.message"]}):Object.entries(e.attributes).map((e,t)=>{let[n,r]=e;return(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",children:[n,": ",r]},t)})})]},t))})})]})})})}),!as(null===i||void 0===i?void 0:i.children)&&(0,Gt.jsx)(Eu,{p:2,children:(0,Gt.jsx)(Vp,{type:"button",variant:"contained",color:"primary",onClick:()=>window.open("/rpm/logs/".concat(null===i||void 0===i?void 0:i.event_id),"_blank"),children:"View Child Logs"})})]})})})})})};var JO=n(45465);function eT(e){return(0,sr.Ay)("MuiCircularProgress",e)}(0,ar.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var tT,nT,rT,iT;const oT=["className","color","disableShrink","size","style","thickness","value","variant"];let aT,sT,lT,cT;const dT=44,uT=(0,cp.i7)(aT||(aT=tT||(tT=np(["\n  0% {\n    transform: rotate(0deg);\n  }\n\n  100% {\n    transform: rotate(360deg);\n  }\n"])))),pT=(0,cp.i7)(sT||(sT=nT||(nT=np(["\n  0% {\n    stroke-dasharray: 1px, 200px;\n    stroke-dashoffset: 0;\n  }\n\n  50% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -15px;\n  }\n\n  100% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -125px;\n  }\n"])))),hT=(0,Un.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,Fu.A)(n.color))]]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,cp.AH)(lT||(lT=rT||(rT=np(["\n      animation: "," 1.4s linear infinite;\n    "]))),uT)}),mT=(0,Un.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),fT=(0,Un.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,Fu.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,cp.AH)(cT||(cT=iT||(iT=np(["\n      animation: "," 1.4s ease-in-out infinite;\n    "]))),pT)}),gT=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:d="indeterminate"}=n,u=(0,nn.A)(n,oT),p=(0,Ft.A)({},n,{color:i,disableShrink:o,size:a,thickness:l,value:c,variant:d}),h=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,"color".concat((0,Fu.A)(r))],svg:["svg"],circle:["circle","circle".concat((0,Fu.A)(n)),i&&"circleDisableShrink"]};return(0,ir.A)(o,eT,t)})(p),m={},f={},g={};if("determinate"===d){const e=2*Math.PI*((dT-l)/2);m.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),m.strokeDashoffset="".concat(((100-c)/100*e).toFixed(3),"px"),f.transform="rotate(-90deg)"}return(0,Gt.jsx)(hT,(0,Ft.A)({className:(0,nr.A)(h.root,r),style:(0,Ft.A)({width:a,height:a},f,s),ownerState:p,ref:t,role:"progressbar"},g,u,{children:(0,Gt.jsx)(mT,{className:h.svg,ownerState:p,viewBox:"".concat(22," ").concat(22," ").concat(dT," ").concat(dT),children:(0,Gt.jsx)(fT,{className:h.circle,style:m,ownerState:p,cx:dT,cy:dT,r:(dT-l)/2,fill:"none",strokeWidth:l})})}))}),vT=gT;function xT(e){return(0,sr.Ay)("MuiLoadingButton",e)}const yT=(0,ar.A)("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),bT=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],jT=(0,Un.Ay)(Vp,{shouldForwardProp:e=>(e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e)(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& .".concat(yT.startIconLoadingStart)]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& .".concat(yT.endIconLoadingEnd)]:t.endIconLoadingEnd}]})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({["& .".concat(yT.startIconLoadingStart,", & .").concat(yT.endIconLoadingEnd)]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0}},"center"===t.loadingPosition&&{transition:n.transitions.create(["background-color","box-shadow","border-color"],{duration:n.transitions.duration.short}),["&.".concat(yT.loading)]:{color:"transparent"}},"start"===t.loadingPosition&&t.fullWidth&&{["& .".concat(yT.startIconLoadingStart,", & .").concat(yT.endIconLoadingEnd)]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===t.loadingPosition&&t.fullWidth&&{["& .".concat(yT.startIconLoadingStart,", & .").concat(yT.endIconLoadingEnd)]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginLeft:-8}})}),wT=(0,Un.Ay)("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t["loadingIndicator".concat((0,Fu.A)(n.loadingPosition))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({position:"absolute",visibility:"visible",display:"flex"},"start"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{left:"small"===n.size?10:14},"start"===n.loadingPosition&&"text"===n.variant&&{left:6},"center"===n.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled},"end"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{right:"small"===n.size?10:14},"end"===n.loadingPosition&&"text"===n.variant&&{right:6},"start"===n.loadingPosition&&n.fullWidth&&{position:"relative",left:-10},"end"===n.loadingPosition&&n.fullWidth&&{position:"relative",right:-10})}),_T=We.forwardRef(function(e,t){const n=We.useContext(Lp),r=(0,Qu.A)(n,e),i=(0,$t.b)({props:r,name:"MuiLoadingButton"}),{children:o,disabled:a=!1,id:s,loading:l=!1,loadingIndicator:c,loadingPosition:d="center",variant:u="text"}=i,p=(0,nn.A)(i,bT),h=(0,Rx.A)(s),m=null!=c?c:(0,Gt.jsx)(vT,{"aria-labelledby":h,color:"inherit",size:16}),f=(0,Ft.A)({},i,{disabled:a,loading:l,loadingIndicator:m,loadingPosition:d,variant:u}),g=(e=>{const{loading:t,loadingPosition:n,classes:r}=e,i={root:["root",t&&"loading"],startIcon:[t&&"startIconLoading".concat((0,Fu.A)(n))],endIcon:[t&&"endIconLoading".concat((0,Fu.A)(n))],loadingIndicator:["loadingIndicator",t&&"loadingIndicator".concat((0,Fu.A)(n))]},o=(0,ir.A)(i,xT,r);return(0,Ft.A)({},r,o)})(f),v=l?(0,Gt.jsx)(wT,{className:g.loadingIndicator,ownerState:f,children:m}):null;return(0,Gt.jsxs)(jT,(0,Ft.A)({disabled:a||l,id:h,ref:t},p,{variant:u,classes:g,ownerState:f,children:["end"===f.loadingPosition?o:v,"end"===f.loadingPosition?v:o]}))}),CT=_T;function ST(e){let{props:t,name:n}=e;return VM({props:t,name:n,defaultTheme:Kt.A,themeId:Xt.A})}const AT={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",inputModeToggleButtonAriaLabel:(e,t)=>e?"text input view is open, go to ".concat(t," view"):"".concat(t," view is open, go to text input view"),start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerDefaultToolbarTitle:"Select date",dateTimePickerDefaultToolbarTitle:"Select date & time",timePickerDefaultToolbarTitle:"Select time",dateRangePickerDefaultToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>"Select ".concat(e,". ").concat(null===t?"No time selected":"Selected time is ".concat(n.format(t,"fullTime"))),hoursClockNumberText:e=>"".concat(e," hours"),minutesClockNumberText:e=>"".concat(e," minutes"),secondsClockNumberText:e=>"".concat(e," seconds"),openDatePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?"Choose date, selected date is ".concat(t.format(t.date(e),"fullDate")):"Choose date",openTimePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?"Choose time, selected time is ".concat(t.format(t.date(e),"fullTime")):"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date"},kT=AT;MT=AT,(0,Ft.A)({},MT);var MT;const OT=We.createContext(null);function TT(e){const t=ST({props:e,name:"MuiLocalizationProvider"}),{children:n,dateAdapter:r,dateFormats:i,dateLibInstance:o,locale:a,adapterLocale:s,localeText:l}=t;const c=We.useMemo(()=>new r({locale:null!=s?s:a,formats:i,instance:o}),[r,a,s,i,o]),d=We.useMemo(()=>({minDate:c.date("1900-01-01T00:00:00.000"),maxDate:c.date("2099-12-31T00:00:00.000")}),[c]),u=We.useMemo(()=>({utils:c,defaultDates:d,localeText:(0,Ft.A)({},kT,null!=l?l:{})}),[d,c,l]);return(0,Gt.jsx)(OT.Provider,{value:u,children:n})}const ET=()=>{const e=We.useContext(OT);if(null===e)throw new Error("MUI: Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.");return e},PT=()=>ET().utils,DT=()=>ET().defaultDates,RT=()=>ET().localeText,NT=()=>{const e=PT();return We.useRef(e.date()).current},LT=e=>{let{date:t,disableFuture:n,disablePast:r,maxDate:i,minDate:o,isDateDisabled:a,utils:s}=e;const l=s.startOfDay(s.date());r&&s.isBefore(o,l)&&(o=l),n&&s.isAfter(i,l)&&(i=l);let c=t,d=t;for(s.isBefore(t,o)&&(c=s.date(o),d=null),s.isAfter(t,i)&&(d&&(d=s.date(i)),c=null);c||d;){if(c&&s.isAfter(c,i)&&(c=null),d&&s.isBefore(d,o)&&(d=null),c){if(!a(c))return c;c=s.addDays(c,1)}if(d){if(!a(d))return d;d=s.addDays(d,-1)}}return null},IT=(e,t)=>{const n=e.date(t);return e.isValid(n)?n:null},FT=(e,t,n)=>{if(null==t)return n;const r=e.date(t);return e.isValid(r)?r:n},$T=e=>1===e.length&&"year"===e[0],BT=e=>2===e.length&&-1!==e.indexOf("month")&&-1!==e.indexOf("year");function zT(e,t){var n;const r=PT(),i=DT(),o=ST({props:e,name:t}),a=null!=(n=o.views)?n:["year","day"];return(0,Ft.A)({openTo:"day",disableFuture:!1,disablePast:!1},((e,t)=>$T(e)?{inputFormat:t.formats.year}:BT(e)?{disableMaskedInput:!0,inputFormat:t.formats.monthAndYear}:{inputFormat:t.formats.keyboardDate})(a,r),o,{views:a,minDate:FT(r,o.minDate,i.minDate),maxDate:FT(r,o.maxDate,i.maxDate)})}const HT={emptyValue:null,getTodayValue:e=>e.date(),parseInput:IT,areValuesEqual:(e,t,n)=>e.isEqual(t,n)},WT=(0,dy.A)((0,Gt.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),VT=(0,dy.A)((0,Gt.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),UT=(0,dy.A)((0,Gt.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),qT=(0,dy.A)((0,Gt.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),GT=(0,dy.A)((0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,Gt.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),YT=((0,dy.A)((0,Gt.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),(0,dy.A)((0,Gt.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Pen"));(0,dy.A)((0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,Gt.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");function ZT(e){return(0,sr.Ay)("MuiPickersToolbar",e)}const KT=(0,ar.A)("MuiPickersToolbar",["root","content","penIconButton","penIconButtonLandscape"]),XT=(0,Un.Ay)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3)},n.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})}),QT=(0,Un.Ay)(df,{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})(e=>{let{ownerState:t}=e;return(0,Ft.A)({flex:1},!t.isLandscape&&{alignItems:"center"})}),JT=(0,Un.Ay)(Kp,{name:"MuiPickersToolbar",slot:"PenIconButton",overridesResolver:(e,t)=>[{["&.".concat(KT.penIconButtonLandscape)]:t.penIconButtonLandscape},t.penIconButton]})({}),eE=e=>"clock"===e?(0,Gt.jsx)(GT,{color:"inherit"}):(0,Gt.jsx)(qT,{color:"inherit"}),tE=We.forwardRef(function(e,t){const n=ST({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,getMobileKeyboardInputViewButtonText:o,isLandscape:a,isMobileKeyboardViewOpen:s,landscapeDirection:l="column",toggleMobileKeyboardView:c,toolbarTitle:d,viewType:u="calendar"}=n,p=n,h=RT(),m=(e=>{const{classes:t,isLandscape:n}=e,r={root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]};return(0,ir.A)(r,ZT,t)})(p);return(0,Gt.jsxs)(XT,{ref:t,className:jn(m.root,i),ownerState:p,children:[(0,Gt.jsx)(Ym,{color:"text.secondary",variant:"overline",children:d}),(0,Gt.jsxs)(QT,{container:!0,justifyContent:"space-between",className:m.content,ownerState:p,direction:a?l:"row",alignItems:a?"flex-start":"flex-end",children:[r,(0,Gt.jsx)(JT,{onClick:c,className:m.penIconButton,ownerState:p,color:"inherit","aria-label":o?o(s,u):h.inputModeToggleButtonAriaLabel(s,u),children:s?eE(u):(0,Gt.jsx)(YT,{color:"inherit"})})]})]})});function nE(e){return(0,sr.Ay)("MuiDatePickerToolbar",e)}(0,ar.A)("MuiDatePickerToolbar",["root","title"]);const rE=["parsedValue","isLandscape","isMobileKeyboardViewOpen","onChange","toggleMobileKeyboardView","toolbarFormat","toolbarPlaceholder","toolbarTitle","views"],iE=(0,Un.Ay)(tE,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),oE=(0,Un.Ay)(Ym,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})(e=>{let{ownerState:t}=e;return(0,Ft.A)({},t.isLandscape&&{margin:"auto 16px auto auto"})}),aE=We.forwardRef(function(e,t){const n=ST({props:e,name:"MuiDatePickerToolbar"}),{parsedValue:r,isLandscape:i,isMobileKeyboardViewOpen:o,toggleMobileKeyboardView:a,toolbarFormat:s,toolbarPlaceholder:l="\u2013\u2013",toolbarTitle:c,views:d}=n,u=(0,nn.A)(n,rE),p=PT(),h=RT(),m=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],title:["title"]},nE,t)})(n),f=null!=c?c:h.datePickerDefaultToolbarTitle,g=We.useMemo(()=>r?s?p.formatByString(r,s):$T(d)?p.format(r,"year"):BT(d)?p.format(r,"month"):/en/.test(p.getCurrentLocaleCode())?p.format(r,"normalDateWithWeekday"):p.format(r,"normalDate"):l,[r,s,l,p,d]),v=n;return(0,Gt.jsx)(iE,(0,Ft.A)({ref:t,toolbarTitle:f,isMobileKeyboardViewOpen:o,toggleMobileKeyboardView:a,isLandscape:i,className:m.root},u,{children:(0,Gt.jsx)(oE,{variant:"h4",align:i?"left":"center",ownerState:v,className:m.title,children:g})}))}),sE=We.createContext(null),lE=["onAccept","onClear","onCancel","onSetToday","actions"],cE=e=>{const{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:o}=e,a=(0,nn.A)(e,lE),s=We.useContext(sE),l=RT(),c="function"===typeof o?o(s):o;if(null==c||0===c.length)return null;const d=null==c?void 0:c.map(e=>{switch(e){case"clear":return(0,Gt.jsx)(Vp,{onClick:n,children:l.clearButtonLabel},e);case"cancel":return(0,Gt.jsx)(Vp,{onClick:r,children:l.cancelButtonLabel},e);case"accept":return(0,Gt.jsx)(Vp,{onClick:t,children:l.okButtonLabel},e);case"today":return(0,Gt.jsx)(Vp,{onClick:i,children:l.todayButtonLabel},e);default:return null}});return(0,Gt.jsx)(iO,(0,Ft.A)({},a,{children:d}))};function dE(e){return(0,sr.Ay)("MuiPickersPopper",e)}(0,ar.A)("MuiPickersPopper",["root","paper"]);function uE(e,t){return Array.isArray(t)?t.every(t=>-1!==e.indexOf(t)):-1!==e.indexOf(t)}const pE=(e,t)=>n=>{"Enter"!==n.key&&" "!==n.key||(e(n),n.preventDefault(),n.stopPropagation()),t&&t(n)},hE=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).activeElement;return e?e.shadowRoot?hE(e.shadowRoot):e:null},mE=["onClick","onTouchStart"],fE=(0,Un.Ay)(Dx,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal}}),gE=(0,Un.Ay)(Uu,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})(e=>{let{ownerState:t}=e;return(0,Ft.A)({transformOrigin:"top center",outline:0},"top"===t.placement&&{transformOrigin:"bottom center"})});function vE(e){var t;const n=ST({props:e,name:"MuiPickersPopper"}),{anchorEl:r,children:i,containerRef:o=null,onBlur:a,onClose:s,onClear:l,onAccept:c,onCancel:d,onSetToday:u,open:p,PopperProps:h,role:m,TransitionComponent:f=Oh,TrapFocusProps:g,PaperProps:v={},components:x,componentsProps:y}=n;We.useEffect(()=>{function e(e){!p||"Escape"!==e.key&&"Esc"!==e.key||s()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,p]);const b=We.useRef(null);We.useEffect(()=>{"tooltip"!==m&&(p?b.current=hE(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[p,m]);const[j,w,_]=function(e,t){const n=We.useRef(!1),r=We.useRef(!1),i=We.useRef(null),o=We.useRef(!1);We.useEffect(()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),o.current=!1};function t(){o.current=!0}},[e]);const a=(0,ep.A)(e=>{if(!o.current)return;const a=r.current;r.current=!1;const s=(0,sh.A)(i.current);if(!i.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s))return;if(n.current)return void(n.current=!1);let l;l=e.composedPath?e.composedPath().indexOf(i.current)>-1:!s.documentElement.contains(e.target)||i.current.contains(e.target),l||a||t(e)}),s=()=>{r.current=!0};return We.useEffect(()=>{if(e){const e=(0,sh.A)(i.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",a),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",t)}}},[e,a]),We.useEffect(()=>{if(e){const e=(0,sh.A)(i.current);return e.addEventListener("click",a),()=>{e.removeEventListener("click",a),r.current=!1}}},[e,a]),[i,s,s]}(p,null!=a?a:s),C=We.useRef(null),S=(0,Ln.A)(C,o),A=(0,Ln.A)(S,j),k=n,M=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],paper:["paper"]},dE,t)})(k),{onClick:O,onTouchStart:T}=v,E=(0,nn.A)(v,mE),P=null!=(t=null==x?void 0:x.ActionBar)?t:cE,D=(null==x?void 0:x.PaperContent)||We.Fragment;return(0,Gt.jsx)(fE,(0,Ft.A)({transition:!0,role:m,open:p,anchorEl:r,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),s())},className:M.root},h,{children:e=>{let{TransitionProps:t,placement:n}=e;return(0,Gt.jsx)(Dh,(0,Ft.A)({open:p,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===m,isEnabled:()=>!0},g,{children:(0,Gt.jsx)(f,(0,Ft.A)({},t,{children:(0,Gt.jsx)(gE,(0,Ft.A)({tabIndex:-1,elevation:8,ref:A,onClick:e=>{w(e),O&&O(e)},onTouchStart:e=>{_(e),T&&T(e)},ownerState:(0,Ft.A)({},k,{placement:n}),className:M.paper},E,{children:(0,Gt.jsxs)(D,(0,Ft.A)({},null==y?void 0:y.paperContent,{children:[i,(0,Gt.jsx)(P,(0,Ft.A)({onAccept:c,onClear:l,onCancel:d,onSetToday:u,actions:[]},null==y?void 0:y.actionBar))]}))}))}))}))}}))}function xE(e){const{children:t,DateInputProps:n,KeyboardDateInputComponent:r,onClear:i,onDismiss:o,onCancel:a,onAccept:s,onSetToday:l,open:c,PopperProps:d,PaperProps:u,TransitionComponent:p,components:h,componentsProps:m}=e,f=We.useRef(null),g=(0,Ln.A)(n.inputRef,f);return(0,Gt.jsxs)(sE.Provider,{value:"desktop",children:[(0,Gt.jsx)(r,(0,Ft.A)({},n,{inputRef:g})),(0,Gt.jsx)(vE,{role:"dialog",open:c,anchorEl:f.current,TransitionComponent:p,PopperProps:d,PaperProps:u,onClose:o,onCancel:a,onClear:i,onAccept:s,onSetToday:l,components:h,componentsProps:m,children:t})]})}function yE(e){let{onChange:t,onViewChange:n,openTo:r,view:i,views:o}=e;var a,s;const[l,c]=(0,Nx.A)({name:"Picker",state:"view",controlled:i,default:r&&uE(o,r)?r:o[0]}),d=null!=(a=o[o.indexOf(l)-1])?a:null,u=null!=(s=o[o.indexOf(l)+1])?s:null,p=We.useCallback(e=>{c(e),n&&n(e)},[c,n]),h=We.useCallback(()=>{u&&p(u)},[u,p]),m=We.useCallback((e,n)=>{const r="finish"===n,i=r&&Boolean(u)?"partial":n;t(e,i),r&&h()},[u,t,h]);return{handleChangeAndOpenNext:m,nextView:u,previousView:d,openNext:h,openView:l,setOpenView:p}}const bE=220,jE=36,wE={x:110,y:110},_E=wE.x-wE.x,CE=0-wE.y,SE=(e,t,n)=>{const r=t-wE.x,i=n-wE.y,o=Math.atan2(_E,CE)-Math.atan2(r,i);let a=o*(180/Math.PI);a=Math.round(a/e)*e,a%=360;const s=r**2+i**2;return{value:Math.floor(a/e)||0,distance:Math.sqrt(s)}};function AE(e){return(0,sr.Ay)("MuiClockPointer",e)}(0,ar.A)("MuiClockPointer",["root","thumb"]);const kE=["className","hasSelected","isInner","type","value"],ME=(0,Un.Ay)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({width:2,backgroundColor:t.palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},n.shouldAnimate&&{transition:t.transitions.create(["transform","height"])})}),OE=(0,Un.Ay)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({width:4,height:4,backgroundColor:t.palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - ".concat(18,"px)"),border:"".concat(16,"px solid ").concat(t.palette.primary.main),boxSizing:"content-box"},n.hasSelected&&{backgroundColor:t.palette.primary.main})});function TE(e){const t=ST({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:i,value:o}=t,a=(0,nn.A)(t,kE),s=We.useRef(i);We.useEffect(()=>{s.current=i},[i]);const l=(0,Ft.A)({},t,{shouldAnimate:s.current!==i}),c=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],thumb:["thumb"]},AE,t)})(l);return(0,Gt.jsx)(ME,(0,Ft.A)({style:(()=>{let e=360/("hours"===i?12:60)*o;return"hours"===i&&o>12&&(e-=360),{height:Math.round((r?.26:.4)*bE),transform:"rotateZ(".concat(e,"deg)")}})(),className:jn(n,c.root),ownerState:l},a,{children:(0,Gt.jsx)(OE,{ownerState:l,className:c.thumb})}))}function EE(e){return(0,sr.Ay)("MuiClock",e)}(0,ar.A)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton"]);const PE=(0,Un.Ay)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",alignItems:"center",margin:t.spacing(2)}}),DE=(0,Un.Ay)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),RE=(0,Un.Ay)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),NE=(0,Un.Ay)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})(e=>{let{ownerState:t}=e;return(0,Ft.A)({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},t.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}})}),LE=(0,Un.Ay)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(e=>{let{theme:t}=e;return{width:6,height:6,borderRadius:"50%",backgroundColor:t.palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),IE=(0,Un.Ay)(Kp,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({zIndex:1,position:"absolute",bottom:n.ampmInClock?64:8,left:8},"am"===n.meridiemMode&&{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:t.palette.primary.light}})}),FE=(0,Un.Ay)(Kp,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({zIndex:1,position:"absolute",bottom:n.ampmInClock?64:8,right:8},"pm"===n.meridiemMode&&{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:t.palette.primary.light}})});function $E(e){const t=ST({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:i,children:o,date:a,getClockLabelText:s,handleMeridiemChange:l,isTimeDisabled:c,meridiemMode:d,minutesStep:u=1,onChange:p,selectedId:h,type:m,value:f,disabled:g,readOnly:v,className:x}=t,y=t,b=PT(),j=We.useContext(sE),w=We.useRef(!1),_=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton"],pmButton:["pmButton"]},EE,t)})(y),C=c(f,m),S=!n&&"hours"===m&&(f<1||f>12),A=(e,t)=>{g||v||c(e,m)||p(e,t)},k=(e,t)=>{let{offsetX:r,offsetY:i}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,i=e.changedTouches[0].clientY-t.top}const o="seconds"===m||"minutes"===m?function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=6*n;let{value:i}=SE(r,e,t);return i=i*n%60,i}(r,i,u):((e,t,n)=>{const{value:r,distance:i}=SE(30,e,t);let o=r||12;return n?o%=12:i<74&&(o+=12,o%=24),o})(r,i,Boolean(n));A(o,t)},M=We.useMemo(()=>"hours"===m||f%5===0,[m,f]),O="minutes"===m?u:1,T=We.useRef(null);(0,hn.A)(()=>{i&&T.current.focus()},[i]);return(0,Gt.jsxs)(PE,{className:jn(x,_.root),children:[(0,Gt.jsxs)(DE,{className:_.clock,children:[(0,Gt.jsx)(NE,{onTouchMove:e=>{w.current=!0,k(e,"shallow")},onTouchEnd:e=>{w.current&&(k(e,"finish"),w.current=!1)},onMouseUp:e=>{w.current&&(w.current=!1),k(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&k(e.nativeEvent,"shallow")},ownerState:{disabled:g},className:_.squareMask}),!C&&(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)(LE,{className:_.pin}),a&&(0,Gt.jsx)(TE,{type:m,value:f,isInner:S,hasSelected:M})]}),(0,Gt.jsx)(RE,{"aria-activedescendant":h,"aria-label":s(m,a,b),ref:T,role:"listbox",onKeyDown:e=>{if(!w.current)switch(e.key){case"Home":A(0,"partial"),e.preventDefault();break;case"End":A("minutes"===m?59:23,"partial"),e.preventDefault();break;case"ArrowUp":A(f+O,"partial"),e.preventDefault();break;case"ArrowDown":A(f-O,"partial"),e.preventDefault()}},tabIndex:0,className:_.wrapper,children:o})]}),n&&("desktop"===j||r)&&(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)(IE,{onClick:v?void 0:()=>l("am"),disabled:g||null===d,ownerState:y,className:_.amButton,children:(0,Gt.jsx)(Ym,{variant:"caption",children:"AM"})}),(0,Gt.jsx)(FE,{disabled:g||null===d,onClick:v?void 0:()=>l("pm"),ownerState:y,className:_.pmButton,children:(0,Gt.jsx)(Ym,{variant:"caption",children:"PM"})})]})]})}function BE(e){return(0,sr.Ay)("MuiClockNumber",e)}const zE=(0,ar.A)("MuiClockNumber",["root","selected","disabled"]),HE=["className","disabled","index","inner","label","selected"],WE=(0,Un.Ay)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&.".concat(zE.disabled)]:t.disabled},{["&.".concat(zE.selected)]:t.selected}]})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({height:jE,width:jE,position:"absolute",left:"calc((100% - ".concat(jE,"px) / 2)"),display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:t.palette.text.primary,fontFamily:t.typography.fontFamily,"&:focused":{backgroundColor:t.palette.background.paper},["&.".concat(zE.selected)]:{color:t.palette.primary.contrastText},["&.".concat(zE.disabled)]:{pointerEvents:"none",color:t.palette.text.disabled}},n.inner&&(0,Ft.A)({},t.typography.body2,{color:t.palette.text.secondary}))});function VE(e){const t=ST({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:i,inner:o,label:a,selected:s}=t,l=(0,nn.A)(t,HE),c=t,d=(e=>{const{classes:t,selected:n,disabled:r}=e,i={root:["root",n&&"selected",r&&"disabled"]};return(0,ir.A)(i,BE,t)})(c),u=i%12/12*Math.PI*2-Math.PI/2,p=91*(o?.65:1),h=Math.round(Math.cos(u)*p),m=Math.round(Math.sin(u)*p);return(0,Gt.jsx)(WE,(0,Ft.A)({className:jn(n,d.root),"aria-disabled":!!r||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:"translate(".concat(h,"px, ").concat(m+92,"px")},ownerState:c},l,{children:a}))}const UE=e=>{let{ampm:t,date:n,getClockNumberText:r,isDisabled:i,selectedId:o,utils:a}=e;const s=n?a.getHours(n):null,l=[],c=t?12:23,d=e=>null!==s&&(t?12===e?12===s||0===s:s===e||s-12===e:s===e);for(let u=t?1:0;u<=c;u+=1){let e=u.toString();0===u&&(e="00");const n=!t&&(0===u||u>12);e=a.formatNumber(e);const s=d(u);l.push((0,Gt.jsx)(VE,{id:s?o:void 0,index:u,inner:n,selected:s,disabled:i(u),label:e,"aria-label":r(e)},u))}return l},qE=e=>{let{utils:t,value:n,isDisabled:r,getClockNumberText:i,selectedId:o}=e;const a=t.formatNumber;return[[5,a("05")],[10,a("10")],[15,a("15")],[20,a("20")],[25,a("25")],[30,a("30")],[35,a("35")],[40,a("40")],[45,a("45")],[50,a("50")],[55,a("55")],[0,a("00")]].map((e,t)=>{let[a,s]=e;const l=a===n;return(0,Gt.jsx)(VE,{label:s,id:l?o:void 0,index:t+1,inner:!1,disabled:r(a),selected:l,"aria-label":i(s)},a)})};function GE(e){return(0,sr.Ay)("MuiPickersArrowSwitcher",e)}(0,ar.A)("MuiPickersArrowSwitcher",["root","spacer","button"]);const YE=["children","className","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText"],ZE=(0,Un.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),KE=(0,Un.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(e=>{let{theme:t}=e;return{width:t.spacing(3)}}),XE=(0,Un.Ay)(Kp,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(e=>{let{ownerState:t}=e;return(0,Ft.A)({},t.hidden&&{visibility:"hidden"})}),QE=We.forwardRef(function(e,t){const n=ST({props:e,name:"MuiPickersArrowSwitcher"}),{children:r,className:i,components:o,componentsProps:a,isLeftDisabled:s,isLeftHidden:l,isRightDisabled:c,isRightHidden:d,leftArrowButtonText:u,onLeftClick:p,onRightClick:h,rightArrowButtonText:m}=n,f=(0,nn.A)(n,YE),g="rtl"===In().direction,v=(null==a?void 0:a.leftArrowButton)||{},x=(null==o?void 0:o.LeftArrowIcon)||VT,y=(null==a?void 0:a.rightArrowButton)||{},b=(null==o?void 0:o.RightArrowIcon)||UT,j=n,w=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],spacer:["spacer"],button:["button"]},GE,t)})(j);return(0,Gt.jsxs)(ZE,(0,Ft.A)({ref:t,className:jn(w.root,i),ownerState:j},f,{children:[(0,Gt.jsx)(XE,(0,Ft.A)({as:null==o?void 0:o.LeftArrowButton,size:"small","aria-label":u,title:u,disabled:s,edge:"end",onClick:p},v,{className:jn(w.button,v.className),ownerState:(0,Ft.A)({},j,v,{hidden:l}),children:g?(0,Gt.jsx)(b,{}):(0,Gt.jsx)(x,{})})),r?(0,Gt.jsx)(Ym,{variant:"subtitle1",component:"span",children:r}):(0,Gt.jsx)(KE,{className:w.spacer,ownerState:j}),(0,Gt.jsx)(XE,(0,Ft.A)({as:null==o?void 0:o.RightArrowButton,size:"small","aria-label":m,title:m,edge:"start",disabled:c,onClick:h},y,{className:jn(w.button,y.className),ownerState:(0,Ft.A)({},j,y,{hidden:d}),children:g?(0,Gt.jsx)(x,{}):(0,Gt.jsx)(b,{})}))]}))}),JE=(e,t,n)=>{if(n){if((e>=12?"pm":"am")!==t)return"am"===t?e-12:e+12}return e},eP=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),tP=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return(n,r)=>e?t.isAfter(n,r):eP(n,t)>eP(r,t)};function nP(e,t,n){const r=PT(),i=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(e,r),o=We.useCallback(i=>{const o=null==e?null:((e,t,n,r)=>{const i=JE(r.getHours(e),t,n);return r.setHours(e,i)})(e,i,Boolean(t),r);n(o,"partial")},[t,e,n,r]);return{meridiemMode:i,handleMeridiemChange:o}}function rP(e){return(0,sr.Ay)("MuiClockPicker",e)}(0,ar.A)("MuiClockPicker",["root","arrowSwitcher"]);const iP=(0,Un.Ay)("div")({overflowX:"hidden",width:320,maxHeight:358,display:"flex",flexDirection:"column",margin:"0 auto"}),oP=(0,Un.Ay)(iP,{name:"MuiClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),aP=(0,Un.Ay)(QE,{name:"MuiClockPicker",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),sP=()=>{},lP=We.forwardRef(function(e,t){const n=ST({props:e,name:"MuiClockPicker"}),{ampm:r=!1,ampmInClock:i=!1,autoFocus:o,components:a,componentsProps:s,date:l,disableIgnoringDatePartForTimeValidation:c,getClockLabelText:d,getHoursClockNumberText:u,getMinutesClockNumberText:p,getSecondsClockNumberText:h,leftArrowButtonText:m,maxTime:f,minTime:g,minutesStep:v=1,rightArrowButtonText:x,shouldDisableTime:y,showViewSwitcher:b,onChange:j,view:w,views:_=["hours","minutes"],openTo:C,onViewChange:S,className:A,disabled:k,readOnly:M}=n;sP({leftArrowButtonText:m,rightArrowButtonText:x,getClockLabelText:d,getHoursClockNumberText:u,getMinutesClockNumberText:p,getSecondsClockNumberText:h});const O=RT(),T=null!=m?m:O.openPreviousView,E=null!=x?x:O.openNextView,P=null!=d?d:O.clockLabelText,D=null!=u?u:O.hoursClockNumberText,R=null!=p?p:O.minutesClockNumberText,N=null!=h?h:O.secondsClockNumberText,{openView:L,setOpenView:I,nextView:F,previousView:$,handleChangeAndOpenNext:B}=yE({view:w,views:_,openTo:C,onViewChange:S,onChange:j}),z=NT(),H=PT(),W=We.useMemo(()=>l||H.setSeconds(H.setMinutes(H.setHours(z,0),0),0),[l,z,H]),{meridiemMode:V,handleMeridiemChange:U}=nP(W,r,B),q=We.useCallback((e,t)=>{const n=tP(c,H),i=e=>{let{start:t,end:r}=e;return(!g||!n(g,r))&&(!f||!n(t,f))},o=function(e){return e%(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)===0&&(!y||!y(e,t))};switch(t){case"hours":{const t=JE(e,V,r),n=H.setHours(W,t);return!i({start:H.setSeconds(H.setMinutes(n,0),0),end:H.setSeconds(H.setMinutes(n,59),59)})||!o(t)}case"minutes":{const t=H.setMinutes(W,e);return!i({start:H.setSeconds(t,0),end:H.setSeconds(t,59)})||!o(e,v)}case"seconds":{const t=H.setSeconds(W,e);return!i({start:t,end:t})||!o(e)}default:throw new Error("not supported")}},[r,W,c,f,V,g,v,y,H]),G=(0,Rx.A)(),Y=We.useMemo(()=>{switch(L){case"hours":{const e=(e,t)=>{const n=JE(e,V,r);B(H.setHours(W,n),t)};return{onChange:e,value:H.getHours(W),children:UE({date:l,utils:H,ampm:r,onChange:e,getClockNumberText:D,isDisabled:e=>k||q(e,"hours"),selectedId:G})}}case"minutes":{const e=H.getMinutes(W),t=(e,t)=>{B(H.setMinutes(W,e),t)};return{value:e,onChange:t,children:qE({utils:H,value:e,onChange:t,getClockNumberText:R,isDisabled:e=>k||q(e,"minutes"),selectedId:G})}}case"seconds":{const e=H.getSeconds(W),t=(e,t)=>{B(H.setSeconds(W,e),t)};return{value:e,onChange:t,children:qE({utils:H,value:e,onChange:t,getClockNumberText:N,isDisabled:e=>k||q(e,"seconds"),selectedId:G})}}default:throw new Error("You must provide the type for ClockView")}},[L,H,l,r,D,R,N,V,B,W,q,G,k]),Z=n,K=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],arrowSwitcher:["arrowSwitcher"]},rP,t)})(Z);return(0,Gt.jsxs)(oP,{ref:t,className:jn(K.root,A),ownerState:Z,children:[b&&(0,Gt.jsx)(aP,{className:K.arrowSwitcher,leftArrowButtonText:T,rightArrowButtonText:E,components:a,componentsProps:s,onLeftClick:()=>I($),onRightClick:()=>I(F),isLeftDisabled:!$,isRightDisabled:!F,ownerState:Z}),(0,Gt.jsx)($E,(0,Ft.A)({autoFocus:o,date:l,ampmInClock:i,type:L,ampm:r,getClockLabelText:P,minutesStep:v,isTimeDisabled:q,meridiemMode:V,handleMeridiemChange:U,selectedId:G,disabled:k,readOnly:M},Y))]})});function cP(e){return(0,sr.Ay)("PrivatePickersMonth",e)}const dP=(0,ar.A)("PrivatePickersMonth",["root","selected"]),uP=["disabled","onSelect","selected","value","tabIndex","hasFocus","onFocus","onBlur"],pP=(0,Un.Ay)(Ym,{name:"PrivatePickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&.".concat(dP.selected)]:t.selected}]})(e=>{let{theme:t}=e;return(0,Ft.A)({flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:Qn(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{pointerEvents:"none",color:t.palette.text.secondary},["&.".concat(dP.selected)]:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:focus, &:hover":{backgroundColor:t.palette.primary.dark}}})}),hP=()=>{},mP=e=>{const{disabled:t,onSelect:n,selected:r,value:i,tabIndex:o,hasFocus:a,onFocus:s=hP,onBlur:l=hP}=e,c=(0,nn.A)(e,uP),d=(e=>{const{classes:t,selected:n}=e,r={root:["root",n&&"selected"]};return(0,ir.A)(r,cP,t)})(e),u=()=>{n(i)},p=We.useRef(null);return(0,gh.A)(()=>{var e;a&&(null==(e=p.current)||e.focus())},[a]),(0,Gt.jsx)(pP,(0,Ft.A)({ref:p,component:"button",type:"button",className:d.root,tabIndex:o,onClick:u,onKeyDown:pE(u),color:r?"primary":void 0,variant:r?"h5":"subtitle1",disabled:t,onFocus:e=>s(e,i),onBlur:e=>l(e,i)},c))};function fP(e){return(0,sr.Ay)("MuiMonthPicker",e)}(0,ar.A)("MuiMonthPicker",["root"]);const gP=["className","date","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange"];const vP=(0,Un.Ay)("div",{name:"MuiMonthPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch",margin:"0 4px"}),xP=We.forwardRef(function(e,t){const n=PT(),r=NT(),i=function(e,t){const n=PT(),r=DT(),i=ST({props:e,name:t});return(0,Ft.A)({disableFuture:!1,disablePast:!1},i,{minDate:FT(n,i.minDate,r.minDate),maxDate:FT(n,i.maxDate,r.maxDate)})}(e,"MuiMonthPicker"),{className:o,date:a,disabled:s,disableFuture:l,disablePast:c,maxDate:d,minDate:u,onChange:p,shouldDisableMonth:h,readOnly:m,disableHighlightToday:f,autoFocus:g=!1,onMonthFocus:v,hasFocus:x,onFocusedViewChange:y}=i,b=(0,nn.A)(i,gP),j=i,w=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},fP,t)})(j),_=qt(),C=We.useMemo(()=>null!=a?a:n.startOfMonth(r),[r,n,a]),S=We.useMemo(()=>null!=a?n.getMonth(a):f?null:n.getMonth(r),[r,a,n,f]),[A,k]=We.useState(()=>S||n.getMonth(r)),M=We.useCallback(e=>{const t=n.startOfMonth(c&&n.isAfter(r,u)?r:u),i=n.startOfMonth(l&&n.isBefore(r,d)?r:d);return!!n.isBefore(e,t)||(!!n.isAfter(e,i)||!!h&&h(e))},[l,c,d,u,r,h,n]),O=e=>{if(m)return;const t=n.setMonth(C,e);p(t,"finish")},[T,E]=(0,Nx.A)({name:"MonthPicker",state:"hasFocus",controlled:x,default:g}),P=We.useCallback(e=>{E(e),y&&y(e)},[E,y]),D=We.useCallback(e=>{M(n.setMonth(C,e))||(k(e),P(!0),v&&v(e))},[M,n,C,P,v]);We.useEffect(()=>{k(e=>null!==S&&e!==S?S:e)},[S]);const R=(0,ep.A)(e=>{const t=12;switch(e.key){case"ArrowUp":D((t+A-3)%t),e.preventDefault();break;case"ArrowDown":D((t+A+3)%t),e.preventDefault();break;case"ArrowLeft":D((t+A+("ltr"===_.direction?-1:1))%t),e.preventDefault();break;case"ArrowRight":D((t+A+("ltr"===_.direction?1:-1))%t),e.preventDefault()}}),N=We.useCallback((e,t)=>{D(t)},[D]),L=We.useCallback(()=>{P(!1)},[P]),I=n.getMonth(r);return(0,Gt.jsx)(vP,(0,Ft.A)({ref:t,className:jn(w.root,o),ownerState:j,onKeyDown:R},b,{children:n.getMonthArray(C).map(e=>{const t=n.getMonth(e),r=n.format(e,"monthShort"),i=s||M(e);return(0,Gt.jsx)(mP,{value:t,selected:t===S,tabIndex:t!==A||i?-1:0,hasFocus:T&&t===A,onSelect:O,onFocus:N,onBlur:L,disabled:i,"aria-current":I===t?"date":void 0,children:r},r)})}))});function yP(e,t,n){const{value:r,onError:i}=e,o=ET(),a=We.useRef(null),s=t({adapter:o,value:r,props:e});return We.useEffect(()=>{i&&!n(s,a.current)&&i(s,r),a.current=s},[n,i,a,s,r]),s}const bP=e=>{let{props:t,value:n,adapter:r}=e;const i=r.utils.date(),o=r.utils.date(n),a=FT(r.utils,t.minDate,r.defaultDates.minDate),s=FT(r.utils,t.maxDate,r.defaultDates.maxDate);if(null===o)return null;switch(!0){case!r.utils.isValid(n):return"invalidDate";case Boolean(t.shouldDisableDate&&t.shouldDisableDate(o)):return"shouldDisableDate";case Boolean(t.disableFuture&&r.utils.isAfterDay(o,i)):return"disableFuture";case Boolean(t.disablePast&&r.utils.isBeforeDay(o,i)):return"disablePast";case Boolean(a&&r.utils.isBeforeDay(o,a)):return"minDate";case Boolean(s&&r.utils.isAfterDay(o,s)):return"maxDate";default:return null}},jP=e=>{let{shouldDisableDate:t,minDate:n,maxDate:r,disableFuture:i,disablePast:o}=e;const a=ET();return We.useCallback(e=>null!==bP({adapter:a,value:e,props:{shouldDisableDate:t,minDate:n,maxDate:r,disableFuture:i,disablePast:o}}),[a,t,n,r,i,o])},wP=(e,t)=>e===t,_P=e=>yP(e,bP,wP),CP=e=>{let{date:t,defaultCalendarMonth:n,disableFuture:r,disablePast:i,disableSwitchToMonthOnDayFocus:o=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:c,shouldDisableDate:d}=e;var u;const p=NT(),h=PT(),m=We.useRef(((e,t,n)=>(r,i)=>{switch(i.type){case"changeMonth":return(0,Ft.A)({},r,{slideDirection:i.direction,currentMonth:i.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return(0,Ft.A)({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=i.focusedDay&&n.isSameDay(i.focusedDay,r.focusedDay))return r;const o=null!=i.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,i.focusedDay);return(0,Ft.A)({},r,{focusedDay:i.focusedDay,isMonthSwitchingAnimating:o&&!e&&!i.withoutMonthSwitchingAnimation,currentMonth:o?n.startOfMonth(i.focusedDay):r.currentMonth,slideDirection:null!=i.focusedDay&&n.isAfterDay(i.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(c),o,h)).current,[f,g]=We.useReducer(m,{isMonthSwitchingAnimating:!1,focusedDay:t||p,currentMonth:h.startOfMonth(null!=(u=null!=t?t:n)?u:p),slideDirection:"left"}),v=We.useCallback(e=>{g((0,Ft.A)({type:"changeMonth"},e)),l&&l(e.newMonth)},[l]),x=We.useCallback(e=>{const t=null!=e?e:p;h.isSameMonth(t,f.currentMonth)||v({newMonth:h.startOfMonth(t),direction:h.isAfterDay(t,f.currentMonth)?"left":"right"})},[f.currentMonth,v,p,h]),y=jP({shouldDisableDate:d,minDate:s,maxDate:a,disableFuture:r,disablePast:i}),b=We.useCallback(()=>{g({type:"finishMonthSwitchingAnimation"})},[]),j=We.useCallback((e,t)=>{y(e)||g({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})},[y]);return{calendarState:f,changeMonth:x,changeFocusedDay:j,isDateDisabled:y,onMonthSwitchingAnimationEnd:b,handleChangeMonth:v}},SP=e=>(0,sr.Ay)("MuiPickersFadeTransitionGroup",e),AP=((0,ar.A)("MuiPickersFadeTransitionGroup",["root"]),(0,Un.Ay)(lp,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function kP(e){const t=ST({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},SP,t)})(t);return i?n:(0,Gt.jsx)(AP,{className:jn(a.root,r),children:(0,Gt.jsx)($h,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:500,enter:250,exit:0},children:n},o)})}function MP(e){return(0,sr.Ay)("MuiPickersDay",e)}const OP=(0,ar.A)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),TP=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today"],EP=e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:t.palette.background.paper,color:t.palette.text.primary,"&:hover":{backgroundColor:Qn(t.palette.action.active,t.palette.action.hoverOpacity)},"&:focus":{backgroundColor:Qn(t.palette.action.active,t.palette.action.hoverOpacity),["&.".concat(OP.selected)]:{willChange:"background-color",backgroundColor:t.palette.primary.dark}},["&.".concat(OP.selected)]:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,fontWeight:t.typography.fontWeightMedium,transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:t.palette.primary.dark}},["&.".concat(OP.disabled)]:{color:t.palette.text.disabled}},!n.disableMargin&&{margin:"0 ".concat(2,"px")},n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&{color:t.palette.text.secondary},!n.disableHighlightToday&&n.today&&{["&:not(.".concat(OP.selected,")")]:{border:"1px solid ".concat(t.palette.text.secondary)}})},PP=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},DP=(0,Un.Ay)(Dp,{name:"MuiPickersDay",slot:"Root",overridesResolver:PP})(EP),RP=(0,Un.Ay)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:PP})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},EP({theme:t,ownerState:n}),{opacity:0,pointerEvents:"none"})}),NP=()=>{},LP=We.forwardRef(function(e,t){const n=ST({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:o,disabled:a=!1,disableHighlightToday:s=!1,disableMargin:l=!1,isAnimating:c,onClick:d,onDaySelect:u,onFocus:p=NP,onBlur:h=NP,onKeyDown:m=NP,onMouseDown:f,outsideCurrentMonth:g,selected:v=!1,showDaysOutsideCurrentMonth:x=!1,children:y,today:b=!1}=n,j=(0,nn.A)(n,TP),w=(0,Ft.A)({},n,{autoFocus:r,disabled:a,disableHighlightToday:s,disableMargin:l,selected:v,showDaysOutsideCurrentMonth:x,today:b}),_=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:i,disabled:o,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,c={root:["root",t&&"selected",o&&"disabled",!n&&"dayWithMargin",!r&&i&&"today",a&&s&&"dayOutsideMonth",a&&!s&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]};return(0,ir.A)(c,MP,l)})(w),C=PT(),S=We.useRef(null),A=(0,Ln.A)(S,t);(0,hn.A)(()=>{!r||a||c||g||S.current.focus()},[r,a,c,g]);return g&&!x?(0,Gt.jsx)(RP,{className:jn(_.root,_.hiddenDaySpacingFiller,i),ownerState:w,role:j.role}):(0,Gt.jsx)(DP,(0,Ft.A)({className:jn(_.root,i),ownerState:w,ref:A,centerRipple:!0,disabled:a,tabIndex:v?0:-1,onKeyDown:e=>m(e,o),onFocus:e=>p(e,o),onBlur:e=>h(e,o),onClick:e=>{a||u(o,"finish"),g&&e.currentTarget.focus(),d&&d(e)},onMouseDown:e=>{f&&f(e),g&&e.preventDefault()}},j,{children:y||C.format(o,"dayOfMonth")}))}),IP=(e,t)=>e.autoFocus===t.autoFocus&&e.isAnimating===t.isAnimating&&e.today===t.today&&e.disabled===t.disabled&&e.selected===t.selected&&e.disableMargin===t.disableMargin&&e.showDaysOutsideCurrentMonth===t.showDaysOutsideCurrentMonth&&e.disableHighlightToday===t.disableHighlightToday&&e.className===t.className&&e.sx===t.sx&&e.outsideCurrentMonth===t.outsideCurrentMonth&&e.onFocus===t.onFocus&&e.onBlur===t.onBlur&&e.onDaySelect===t.onDaySelect,FP=We.memo(LP,IP);function $P(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var BP=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"===typeof n.className?n.className=$P(n.className,r):n.setAttribute("class",$P(n.className&&n.className.baseVal||"",r)));var n,r})},zP=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,i=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}wn(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&Sn(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"===typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&BP(e,r),i&&BP(e,i),o&&BP(e,o)},n.render=function(){var e=this.props,t=(e.classNames,(0,nn.A)(e,["classNames"]));return We.createElement(Dn,(0,Ft.A)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(We.Component);zP.defaultProps={classNames:""},zP.propTypes={};const HP=zP,WP=e=>(0,sr.Ay)("PrivatePickersSlideTransition",e),VP=(0,ar.A)("PrivatePickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),UP=["children","className","reduceAnimations","slideDirection","transKey"],qP=(0,Un.Ay)(lp,{name:"PrivatePickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[".".concat(VP["slideEnter-left"])]:t["slideEnter-left"]},{[".".concat(VP["slideEnter-right"])]:t["slideEnter-right"]},{[".".concat(VP.slideEnterActive)]:t.slideEnterActive},{[".".concat(VP.slideExit)]:t.slideExit},{[".".concat(VP["slideExitActiveLeft-left"])]:t["slideExitActiveLeft-left"]},{[".".concat(VP["slideExitActiveLeft-right"])]:t["slideExitActiveLeft-right"]}]})(e=>{let{theme:t}=e;const n=t.transitions.create("transform",{duration:350,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},["& .".concat(VP["slideEnter-left"])]:{willChange:"transform",transform:"translate(100%)",zIndex:1},["& .".concat(VP["slideEnter-right"])]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},["& .".concat(VP.slideEnterActive)]:{transform:"translate(0%)",transition:n},["& .".concat(VP.slideExit)]:{transform:"translate(0%)"},["& .".concat(VP["slideExitActiveLeft-left"])]:{willChange:"transform",transform:"translate(-100%)",transition:n,zIndex:0},["& .".concat(VP["slideExitActiveLeft-right"])]:{willChange:"transform",transform:"translate(100%)",transition:n,zIndex:0}}}),GP=e=>(0,sr.Ay)("MuiDayPicker",e),YP=((0,ar.A)("MuiDayPicker",["header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer"]),e=>e.charAt(0).toUpperCase()),ZP=(0,Un.Ay)("div",{name:"MuiDayPicker",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),KP=(0,Un.Ay)(Ym,{name:"MuiDayPicker",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.secondary}}),XP=(0,Un.Ay)("div",{name:"MuiDayPicker",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),QP=(0,Un.Ay)(e=>{const{children:t,className:n,reduceAnimations:r,slideDirection:i,transKey:o}=e,a=(0,nn.A)(e,UP),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},WP,t)})(e);if(r)return(0,Gt.jsx)("div",{className:jn(s.root,n),children:t});const l={exit:VP.slideExit,enterActive:VP.slideEnterActive,enter:VP["slideEnter-".concat(i)],exitActive:VP["slideExitActiveLeft-".concat(i)]};return(0,Gt.jsx)(qP,{className:jn(s.root,n),childFactory:e=>We.cloneElement(e,{classNames:l}),role:"presentation",children:(0,Gt.jsx)(HP,(0,Ft.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:350,classNames:l},a,{children:t}),o)})},{name:"MuiDayPicker",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),JP=(0,Un.Ay)("div",{name:"MuiDayPicker",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),eD=(0,Un.Ay)("div",{name:"MuiDayPicker",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"".concat(2,"px 0"),display:"flex",justifyContent:"center"});function tD(e){const t=NT(),n=PT(),r=ST({props:e,name:"MuiDayPicker"}),i=(e=>{const{classes:t}=e;return(0,ir.A)({header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"]},GP,t)})(r),{onFocusedDayChange:o,className:a,currentMonth:s,selectedDays:l,disabled:c,disableHighlightToday:d,focusedDay:u,isMonthSwitchingAnimating:p,loading:h,onSelectedDaysChange:m,onMonthSwitchingAnimationEnd:f,readOnly:g,reduceAnimations:v,renderDay:x,renderLoading:y=()=>(0,Gt.jsx)("span",{children:"..."}),showDaysOutsideCurrentMonth:b,slideDirection:j,TransitionProps:w,disablePast:_,disableFuture:C,minDate:S,maxDate:A,shouldDisableDate:k,dayOfWeekFormatter:M=YP,hasFocus:O,onFocusedViewChange:T,gridLabelId:E}=r,P=jP({shouldDisableDate:k,minDate:S,maxDate:A,disablePast:_,disableFuture:C}),[D,R]=We.useState(()=>u||t),N=We.useCallback(e=>{T&&T(e)},[T]),L=We.useCallback(function(e){g||m(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"finish")},[m,g]),I=We.useCallback(e=>{P(e)||(o(e),R(e),N(!0))},[P,o,N]),F=In();function $(e,t){switch(e.key){case"ArrowUp":I(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":I(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,"ltr"===F.direction?-1:1),i="ltr"===F.direction?n.getPreviousMonth(t):n.getNextMonth(t),o=LT({utils:n,date:r,minDate:"ltr"===F.direction?n.startOfMonth(i):r,maxDate:"ltr"===F.direction?r:n.endOfMonth(i),isDateDisabled:P});I(o||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,"ltr"===F.direction?1:-1),i="ltr"===F.direction?n.getNextMonth(t):n.getPreviousMonth(t),o=LT({utils:n,date:r,minDate:"ltr"===F.direction?r:n.startOfMonth(i),maxDate:"ltr"===F.direction?n.endOfMonth(i):r,isDateDisabled:P});I(o||r),e.preventDefault();break}case"Home":I(n.startOfWeek(t)),e.preventDefault();break;case"End":I(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":I(n.getNextMonth(t)),e.preventDefault();break;case"PageDown":I(n.getPreviousMonth(t)),e.preventDefault()}}function B(e,t){I(t)}function z(e,t){O&&n.isSameDay(D,t)&&N(!1)}const H=n.getMonth(s),W=l.filter(e=>!!e).map(e=>n.startOfDay(e)),V=H,U=We.useMemo(()=>We.createRef(),[V]),q=n.startOfWeek(t),G=We.useMemo(()=>{const e=n.startOfMonth(s),t=n.endOfMonth(s);return P(D)||n.isAfterDay(D,t)||n.isBeforeDay(D,e)?LT({utils:n,date:D,minDate:e,maxDate:t,disablePast:_,disableFuture:C,isDateDisabled:P}):D},[s,C,_,D,P,n]);return(0,Gt.jsxs)("div",{role:"grid","aria-labelledby":E,children:[(0,Gt.jsx)(ZP,{role:"row",className:i.header,children:n.getWeekdays().map((e,t)=>{var r;return(0,Gt.jsx)(KP,{variant:"caption",role:"columnheader","aria-label":n.format(n.addDays(q,t),"weekday"),className:i.weekDayLabel,children:null!=(r=null==M?void 0:M(e))?r:e},e+t.toString())})}),h?(0,Gt.jsx)(XP,{className:i.loadingContainer,children:y()}):(0,Gt.jsx)(QP,(0,Ft.A)({transKey:V,onExited:f,reduceAnimations:v,slideDirection:j,className:jn(a,i.slideTransition)},w,{nodeRef:U,children:(0,Gt.jsx)(JP,{ref:U,role:"rowgroup",className:i.monthContainer,children:n.getWeekArray(s).map(e=>(0,Gt.jsx)(eD,{role:"row",className:i.weekContainer,children:e.map(e=>{const r=null!==G&&n.isSameDay(e,G),i=W.some(t=>n.isSameDay(t,e)),o=n.isSameDay(e,t),a={key:null==e?void 0:e.toString(),day:e,isAnimating:p,disabled:c||P(e),autoFocus:O&&r,today:o,outsideCurrentMonth:n.getMonth(e)!==H,selected:i,disableHighlightToday:d,showDaysOutsideCurrentMonth:b,onKeyDown:$,onFocus:B,onBlur:z,onDaySelect:L,tabIndex:r?0:-1,role:"gridcell","aria-selected":i};return o&&(a["aria-current"]="date"),x?x(e,W,a):(0,We.createElement)(FP,(0,Ft.A)({},a,{key:a.key}))})},"week-".concat(e[0])))})}))]})}const nD=e=>(0,sr.Ay)("MuiPickersCalendarHeader",e),rD=((0,ar.A)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),(0,Un.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30})),iD=(0,Un.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(e=>{let{theme:t}=e;return(0,Ft.A)({display:"flex",maxHeight:30,overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})}),oD=(0,Un.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),aD=(0,Un.Ay)(Kp,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto"}),sD=(0,Un.Ay)(WT,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"},"year"===n.openView&&{transform:"rotate(180deg)"})}),lD=()=>{};function cD(e){const t=ST({props:e,name:"MuiPickersCalendarHeader"}),{components:n={},componentsProps:r={},currentMonth:i,disabled:o,disableFuture:a,disablePast:s,getViewSwitchingButtonText:l,leftArrowButtonText:c,maxDate:d,minDate:u,onMonthChange:p,onViewChange:h,openView:m,reduceAnimations:f,rightArrowButtonText:g,views:v,labelId:x}=t;lD({leftArrowButtonText:c,rightArrowButtonText:g,getViewSwitchingButtonText:l});const y=RT(),b=null!=c?c:y.previousMonth,j=null!=g?g:y.nextMonth,w=null!=l?l:y.calendarViewSwitchingButtonAriaLabel,_=PT(),C=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},nD,t)})(t),S=r.switchViewButton||{},A=function(e,t){let{disableFuture:n,maxDate:r}=t;const i=PT();return We.useMemo(()=>{const t=i.date(),o=i.startOfMonth(n&&i.isBefore(t,r)?t:r);return!i.isAfter(o,e)},[n,r,e,i])}(i,{disableFuture:a,maxDate:d}),k=function(e,t){let{disablePast:n,minDate:r}=t;const i=PT();return We.useMemo(()=>{const t=i.date(),o=i.startOfMonth(n&&i.isAfter(t,r)?t:r);return!i.isBefore(o,e)},[n,r,e,i])}(i,{disablePast:s,minDate:u});if(1===v.length&&"year"===v[0])return null;const M=t;return(0,Gt.jsxs)(rD,{ownerState:M,className:C.root,children:[(0,Gt.jsxs)(iD,{role:"presentation",onClick:()=>{if(1!==v.length&&h&&!o)if(2===v.length)h(v.find(e=>e!==m)||v[0]);else{const e=0!==v.indexOf(m)?0:1;h(v[e])}},ownerState:M,"aria-live":"polite",className:C.labelContainer,children:[(0,Gt.jsx)(kP,{reduceAnimations:f,transKey:_.format(i,"monthAndYear"),children:(0,Gt.jsx)(oD,{id:x,ownerState:M,className:C.label,children:_.format(i,"monthAndYear")})}),v.length>1&&!o&&(0,Gt.jsx)(aD,(0,Ft.A)({size:"small",as:n.SwitchViewButton,"aria-label":w(m),className:C.switchViewButton},S,{children:(0,Gt.jsx)(sD,{as:n.SwitchViewIcon,ownerState:M,className:C.switchViewIcon})}))]}),(0,Gt.jsx)($h,{in:"day"===m,children:(0,Gt.jsx)(QE,{leftArrowButtonText:b,rightArrowButtonText:j,components:n,componentsProps:r,onLeftClick:()=>p(_.getPreviousMonth(i),"right"),onRightClick:()=>p(_.getNextMonth(i),"left"),isLeftDisabled:k,isRightDisabled:A})})]})}function dD(e){return(0,sr.Ay)("PrivatePickersYear",e)}const uD=(0,ar.A)("PrivatePickersYear",["root","modeDesktop","modeMobile","yearButton","selected","disabled"]),pD=["autoFocus","className","children","disabled","onClick","onKeyDown","value","tabIndex","onFocus","onBlur"],hD=(0,Un.Ay)("div",{name:"PrivatePickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&.".concat(uD.modeDesktop)]:t.modeDesktop},{["&.".concat(uD.modeMobile)]:t.modeMobile}]})(e=>{let{ownerState:t}=e;return(0,Ft.A)({flexBasis:"33.3%",display:"flex",alignItems:"center",justifyContent:"center"},"desktop"===(null==t?void 0:t.wrapperVariant)&&{flexBasis:"25%"})}),mD=(0,Un.Ay)("button",{name:"PrivatePickersYear",slot:"Button",overridesResolver:(e,t)=>[t.button,{["&.".concat(uD.disabled)]:t.disabled},{["&.".concat(uD.selected)]:t.selected}]})(e=>{let{theme:t}=e;return(0,Ft.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:Qn(t.palette.action.active,t.palette.action.hoverOpacity)},["&.".concat(uD.disabled)]:{color:t.palette.text.secondary},["&.".concat(uD.selected)]:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:focus, &:hover":{backgroundColor:t.palette.primary.dark}}})}),fD=()=>{},gD=We.forwardRef(function(e,t){const{autoFocus:n,className:r,children:i,disabled:o,onClick:a,onKeyDown:s,value:l,tabIndex:c,onFocus:d=fD,onBlur:u=fD}=e,p=(0,nn.A)(e,pD),h=We.useRef(null),m=(0,Ln.A)(h,t),f=We.useContext(sE),g=(0,Ft.A)({},e,{wrapperVariant:f}),v=(e=>{const{wrapperVariant:t,disabled:n,selected:r,classes:i}=e,o={root:["root",t&&"mode".concat((0,Fu.A)(t))],yearButton:["yearButton",n&&"disabled",r&&"selected"]};return(0,ir.A)(o,dD,i)})(g);return We.useEffect(()=>{n&&h.current.focus()},[n]),(0,Gt.jsx)(hD,{className:jn(v.root,r),ownerState:g,children:(0,Gt.jsx)(mD,(0,Ft.A)({ref:m,disabled:o,type:"button",tabIndex:o?-1:c,onClick:e=>a(e,l),onKeyDown:e=>s(e,l),onFocus:e=>d(e,l),onBlur:e=>u(e,l),className:v.yearButton,ownerState:g},p,{children:i}))})});function vD(e){return(0,sr.Ay)("MuiYearPicker",e)}(0,ar.A)("MuiYearPicker",["root"]);const xD=(0,Un.Ay)("div",{name:"MuiYearPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",maxHeight:"304px"}),yD=We.forwardRef(function(e,t){const n=NT(),r=In(),i=PT(),o=function(e,t){const n=PT(),r=DT(),i=ST({props:e,name:t});return(0,Ft.A)({disablePast:!1,disableFuture:!1},i,{minDate:FT(n,i.minDate,r.minDate),maxDate:FT(n,i.maxDate,r.maxDate)})}(e,"MuiYearPicker"),{autoFocus:a,className:s,date:l,disabled:c,disableFuture:d,disablePast:u,maxDate:p,minDate:h,onChange:m,readOnly:f,shouldDisableYear:g,disableHighlightToday:v,onYearFocus:x,hasFocus:y,onFocusedViewChange:b}=o,j=o,w=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},vD,t)})(j),_=We.useMemo(()=>null!=l?l:i.startOfYear(n),[n,i,l]),C=We.useMemo(()=>null!=l?i.getYear(l):v?null:i.getYear(n),[n,l,i,v]),S=We.useContext(sE),A=We.useRef(null),[k,M]=We.useState(()=>C||i.getYear(n)),[O,T]=(0,Yy.A)({name:"YearPicker",state:"hasFocus",controlled:y,default:a}),E=We.useCallback(e=>{T(e),b&&b(e)},[T,b]),P=We.useCallback(e=>!(!u||!i.isBeforeYear(e,n))||(!(!d||!i.isAfterYear(e,n))||(!(!h||!i.isBeforeYear(e,h))||(!(!p||!i.isAfterYear(e,p))||!(!g||!g(e))))),[d,u,p,h,n,g,i]),D=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"finish";if(f)return;const r=i.setYear(_,t);m(r,n)},R=We.useCallback(e=>{P(i.setYear(_,e))||(M(e),E(!0),null==x||x(e))},[P,i,_,E,x]);We.useEffect(()=>{M(e=>null!==C&&e!==C?C:e)},[C]);const N="desktop"===S?4:3,L=We.useCallback((e,t)=>{switch(e.key){case"ArrowUp":R(t-N),e.preventDefault();break;case"ArrowDown":R(t+N),e.preventDefault();break;case"ArrowLeft":R(t+("ltr"===r.direction?-1:1)),e.preventDefault();break;case"ArrowRight":R(t+("ltr"===r.direction?1:-1)),e.preventDefault()}},[R,r.direction,N]),I=We.useCallback((e,t)=>{R(t)},[R]),F=We.useCallback((e,t)=>{k===t&&E(!1)},[k,E]),$=i.getYear(n),B=We.useRef(null),z=(0,Ln.A)(t,B);return We.useEffect(()=>{if(a||null===B.current)return;const e=B.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,r=B.current.clientHeight,i=B.current.scrollTop,o=n+t;t>r||n<i||(B.current.scrollTop=o-r/2-t/2)},[a]),(0,Gt.jsx)(xD,{ref:z,className:jn(w.root,s),ownerState:j,children:i.getYearRange(h,p).map(e=>{const t=i.getYear(e),n=t===C;return(0,Gt.jsx)(gD,{selected:n,value:t,onClick:D,onKeyDown:L,autoFocus:O&&t===k,ref:n?A:void 0,disabled:c||P(e),tabIndex:t===k?0:-1,onFocus:I,onBlur:F,"aria-current":$===t?"date":void 0,children:i.format(e,"year")},i.format(e,"year"))})})}),bD="undefined"!==typeof navigator&&/(android)/i.test(navigator.userAgent),jD=e=>(0,sr.Ay)("MuiCalendarPicker",e),wD=((0,ar.A)("MuiCalendarPicker",["root","viewTransitionContainer"]),["autoFocus","onViewChange","date","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","classes"]);const _D=(0,Un.Ay)(iP,{name:"MuiCalendarPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),CD=(0,Un.Ay)(kP,{name:"MuiCalendarPicker",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),SD=We.forwardRef(function(e,t){const n=PT(),r=(0,Rx.A)(),i=function(e,t){const n=PT(),r=DT(),i=ST({props:e,name:t});return(0,Ft.A)({loading:!1,disablePast:!1,disableFuture:!1,openTo:"day",views:["year","day"],reduceAnimations:bD,renderLoading:()=>(0,Gt.jsx)("span",{children:"..."})},i,{minDate:FT(n,i.minDate,r.minDate),maxDate:FT(n,i.maxDate,r.maxDate)})}(e,"MuiCalendarPicker"),{autoFocus:o,onViewChange:a,date:s,disableFuture:l,disablePast:c,defaultCalendarMonth:d,onChange:u,onYearChange:p,onMonthChange:h,reduceAnimations:m,shouldDisableDate:f,shouldDisableMonth:g,shouldDisableYear:v,view:x,views:y,openTo:b,className:j,disabled:w,readOnly:_,minDate:C,maxDate:S,disableHighlightToday:A,focusedView:k,onFocusedViewChange:M}=i,O=(0,nn.A)(i,wD),{openView:T,setOpenView:E,openNext:P}=yE({view:x,views:y,openTo:b,onChange:u,onViewChange:a}),{calendarState:D,changeFocusedDay:R,changeMonth:N,handleChangeMonth:L,isDateDisabled:I,onMonthSwitchingAnimationEnd:F}=CP({date:s,defaultCalendarMonth:d,reduceAnimations:m,onMonthChange:h,minDate:C,maxDate:S,shouldDisableDate:f,disablePast:c,disableFuture:l}),$=We.useCallback((e,t)=>{const r=n.startOfMonth(e),i=n.endOfMonth(e),o=I(e)?LT({utils:n,date:e,minDate:n.isBefore(C,r)?r:C,maxDate:n.isAfter(S,i)?i:S,disablePast:c,disableFuture:l,isDateDisabled:I}):e;o?(u(o,t),null==h||h(r)):(P(),N(r)),R(o,!0)},[R,l,c,I,S,C,u,h,N,P,n]),B=We.useCallback((e,t)=>{const r=n.startOfYear(e),i=n.endOfYear(e),o=I(e)?LT({utils:n,date:e,minDate:n.isBefore(C,r)?r:C,maxDate:n.isAfter(S,i)?i:S,disablePast:c,disableFuture:l,isDateDisabled:I}):e;o?(u(o,t),null==p||p(o)):(P(),N(r)),R(o,!0)},[R,l,c,I,S,C,u,p,P,n,N]),z=We.useCallback((e,t)=>u(s&&e?n.mergeDateAndTime(e,s):e,t),[n,s,u]);We.useEffect(()=>{s&&N(s)},[s]);const H=i,W=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},jD,t)})(H),V={disablePast:c,disableFuture:l,maxDate:S,minDate:C},U=w&&s||C,q=w&&s||S,G={disableHighlightToday:A,readOnly:_,disabled:w},Y="".concat(r,"-grid-label"),[Z,K]=(0,Nx.A)({name:"DayPicker",state:"focusedView",controlled:k,default:o?T:null}),X=null!==Z,Q=(0,ep.A)(e=>t=>{M?M(e)(t):K(t?e:t=>t===e?null:t)}),J=We.useRef(T);return We.useEffect(()=>{J.current!==T&&(J.current=T,Q(T)(!0))},[T,Q]),(0,Gt.jsxs)(_D,{ref:t,className:jn(W.root,j),ownerState:H,children:[(0,Gt.jsx)(cD,(0,Ft.A)({},O,{views:y,openView:T,currentMonth:D.currentMonth,onViewChange:E,onMonthChange:(e,t)=>L({newMonth:e,direction:t}),minDate:U,maxDate:q,disabled:w,disablePast:c,disableFuture:l,reduceAnimations:m,labelId:Y})),(0,Gt.jsx)(CD,{reduceAnimations:m,className:W.viewTransitionContainer,transKey:T,ownerState:H,children:(0,Gt.jsxs)("div",{children:["year"===T&&(0,Gt.jsx)(yD,(0,Ft.A)({},O,V,G,{autoFocus:o,date:s,onChange:B,shouldDisableYear:v,hasFocus:X,onFocusedViewChange:Q("year")})),"month"===T&&(0,Gt.jsx)(xP,(0,Ft.A)({},V,G,{autoFocus:o,hasFocus:X,className:j,date:s,onChange:$,shouldDisableMonth:g,onFocusedViewChange:Q("month")})),"day"===T&&(0,Gt.jsx)(tD,(0,Ft.A)({},O,D,V,G,{autoFocus:o,onMonthSwitchingAnimationEnd:F,onFocusedDayChange:R,reduceAnimations:m,selectedDays:[s],onSelectedDaysChange:z,shouldDisableDate:f,hasFocus:X,onFocusedViewChange:Q("day"),gridLabelId:Y}))]})})]})}),AD=e=>{const[,t]=(0,We.useReducer)(e=>e+1,0),n=(0,We.useRef)(null),{replace:r,append:i}=e,o=r?r(e.format(e.value)):e.format(e.value),a=(0,We.useRef)(!1);return(0,We.useLayoutEffect)(()=>{if(null==n.current)return;let[a,s,l,c,d]=n.current;n.current=null;const u=c&&d,p=a.slice(s.selectionStart).search(e.accept||/\d/g),h=-1!==p?p:0,m=t=>(t.match(e.accept||/\d/g)||[]).join(""),f=m(a.substr(0,s.selectionStart)),g=e=>{let t=0,n=0;for(let r=0;r!==f.length;++r){let i=e.indexOf(f[r],t)+1,o=m(e).indexOf(f[r],n)+1;o-n>1&&(i=t,o=n),n=Math.max(o,n),t=Math.max(t,i)}return t};if(!0===e.mask&&l&&!d){let e=g(a);const t=m(a.substr(e))[0];e=a.indexOf(t,e),a="".concat(a.substr(0,e)).concat(a.substr(e+1))}let v=e.format(a);null==i||s.selectionStart!==a.length||d||(l?v=i(v):""===m(v.slice(-1))&&(v=v.slice(0,-1)));const x=r?r(v):v;return o===x?t():e.onChange(x),()=>{let t=g(v);if(null!=e.mask&&(l||c&&!u))for(;v[t]&&""===m(v[t]);)t+=1;s.selectionStart=s.selectionEnd=t+(u?1+h:0)}}),(0,We.useEffect)(()=>{const e=e=>{"Delete"===e.code&&(a.current=!0)},t=e=>{"Delete"===e.code&&(a.current=!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),{value:null!=n.current?n.current[0]:o,onChange:r=>{const i=r.target.value;n.current=[i,r.target,i.length>o.length,a.current,o===e.format(i)],t()}}},kD=(e,t,n)=>{const r=e.date(t);return null===t?"":e.isValid(r)?e.formatByString(r,n):""},MD="_",OD="2019-11-21T22:30:00.000",TD="2019-01-01T09:00:00.000";function ED(e,t,n,r){if(!e)return!1;const i=r.formatByString(r.date(TD),t).replace(n,MD),o=r.formatByString(r.date(OD),t).replace(n,"_"),a=o===i&&e===o;return!a&&r.lib,a}const PD=e=>{let{acceptRegex:t=/[\d]/gi,disabled:n,disableMaskedInput:r,ignoreInvalidInputs:i,inputFormat:o,inputProps:a,label:s,mask:l,onChange:c,rawValue:d,readOnly:u,rifmFormatter:p,TextFieldProps:h,validationError:m}=e;const f=PT(),g=f.getFormatHelperText(o),{shouldUseMaskedInput:v,maskToUse:x}=We.useMemo(()=>{if(r)return{shouldUseMaskedInput:!1,maskToUse:""};const e=function(e,t,n,r){if(e)return e;const i=r.formatByString(r.date(TD),t).replace(n,MD);return i===r.formatByString(r.date(OD),t).replace(n,"_")?i:""}(l,o,t,f);return{shouldUseMaskedInput:ED(e,o,t,f),maskToUse:e}},[t,r,o,l,f]),y=We.useMemo(()=>v&&x?((e,t)=>n=>{let r=0;return n.split("").map((i,o)=>{if(t.lastIndex=0,r>e.length-1)return"";const a=e[r],s=e[r+1],l=t.test(i)?i:"",c=a===MD?l:a+l;return r+=c.length,o===n.length-1&&s&&s!==MD?c?c+s:"":c}).join("")})(x,t):e=>e,[t,x,v]),b=null===d?null:f.date(d),[j,w]=We.useState(b),[_,C]=We.useState(kD(f,d,o)),S=We.useRef(),A=We.useRef(f.locale),k=We.useRef(o);We.useEffect(()=>{const e=d!==S.current,t=f.locale!==A.current,n=o!==k.current;if(S.current=d,A.current=f.locale,k.current=o,!e&&!t&&!n)return;const r=null===d?null:f.date(d),i=null===d||f.isValid(r);let a=null===j&&null===r;if(null!==j&&null!==r){const e=f.isEqual(j,r);if(e)a=!0;else{const t=Math.abs(f.getDiff(j,r));a=0===t?e:t<1e3}}if(!t&&!n&&(!i||a))return;const s=kD(f,d,o);w(r),C(s)},[f,d,o,j]);const M=e=>{const t=""===e||e===l?"":e;C(t);const n=null===t?null:f.parse(t,o);i&&!f.isValid(n)||(w(n),c(n,t||void 0))},O=AD({value:_,onChange:M,format:p||y}),T=v?O:{value:_,onChange:e=>{M(e.currentTarget.value)}};return(0,Ft.A)({label:s,disabled:n,error:m,inputProps:(0,Ft.A)({},T,{disabled:n,placeholder:g,readOnly:u,type:v?"tel":"text"},a)},h)},DD=["className","components","disableOpenPicker","getOpenDialogAriaText","InputAdornmentProps","InputProps","inputRef","openPicker","OpenPickerButtonProps","renderInput"],RD=We.forwardRef(function(e,t){const{className:n,components:r={},disableOpenPicker:i,getOpenDialogAriaText:o,InputAdornmentProps:a,InputProps:s,inputRef:l,openPicker:c,OpenPickerButtonProps:d,renderInput:u}=e,p=(0,nn.A)(e,DD),h=RT(),m=null!=o?o:h.openDatePickerDialogue,f=PT(),g=PD(p),v=(null==a?void 0:a.position)||"end",x=r.OpenPickerIcon||qT;return u((0,Ft.A)({ref:t,inputRef:l,className:n},g,{InputProps:(0,Ft.A)({},s,{["".concat(v,"Adornment")]:i?void 0:(0,Gt.jsx)(H_,(0,Ft.A)({position:v},a,{children:(0,Gt.jsx)(Kp,(0,Ft.A)({edge:v,disabled:p.disabled||p.readOnly,"aria-label":m(p.rawValue,f)},d,{onClick:c,children:(0,Gt.jsx)(x,{})}))}))})}))});function ND(){return"undefined"===typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}function LD(e){return(0,sr.Ay)("MuiCalendarOrClockPicker",e)}(0,ar.A)("MuiCalendarOrClockPicker",["root","mobileKeyboardInputView"]);const ID=["autoFocus","className","parsedValue","DateInputProps","isMobileKeyboardViewOpen","onDateChange","onViewChange","openTo","orientation","showToolbar","toggleMobileKeyboardView","ToolbarComponent","toolbarFormat","toolbarPlaceholder","toolbarTitle","views","dateRangeIcon","timeIcon","hideTabs","classes"],FD=(0,Un.Ay)("div",{name:"MuiCalendarOrClockPicker",slot:"MobileKeyboardInputView",overridesResolver:(e,t)=>t.mobileKeyboardInputView})({padding:"16px 24px"}),$D=(0,Un.Ay)("div",{name:"MuiCalendarOrClockPicker",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",flexDirection:"column"},t.isLandscape&&{flexDirection:"row"})}),BD={fullWidth:!0},zD=e=>"year"===e||"month"===e||"day"===e,HD=e=>"hours"===e||"minutes"===e||"seconds"===e;function WD(e){var t,n;const r=ST({props:e,name:"MuiCalendarOrClockPicker"}),{autoFocus:i,parsedValue:o,DateInputProps:a,isMobileKeyboardViewOpen:s,onDateChange:l,onViewChange:c,openTo:d,orientation:u,showToolbar:p,toggleMobileKeyboardView:h,ToolbarComponent:m=()=>null,toolbarFormat:f,toolbarPlaceholder:g,toolbarTitle:v,views:x,dateRangeIcon:y,timeIcon:b,hideTabs:j}=r,w=(0,nn.A)(r,ID),_=null==(t=w.components)?void 0:t.Tabs,C=((e,t)=>{const[n,r]=We.useState(ND);return(0,hn.A)(()=>{const e=()=>{r(ND())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),!uE(e,["hours","minutes","seconds"])&&"landscape"===(t||n)})(x,u),S=We.useContext(sE),A=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],mobileKeyboardInputView:["mobileKeyboardInputView"]},LD,t)})(r),k=null!=p?p:"desktop"!==S,M=!j&&"undefined"!==typeof window&&window.innerHeight>667,O=We.useCallback((e,t)=>{l(e,S,t)},[l,S]),T=We.useCallback(e=>{s&&h(),c&&c(e)},[s,c,h]);const{openView:E,setOpenView:P,handleChangeAndOpenNext:D}=yE({view:void 0,views:x,openTo:d,onChange:O,onViewChange:T}),{focusedView:R,setFocusedView:N}=(e=>{let{autoFocus:t,openView:n}=e;const[r,i]=We.useState(t?n:null);return{focusedView:r,setFocusedView:We.useCallback(e=>t=>{i(t?e:t=>e===t?null:t)},[])}})({autoFocus:i,openView:E});return(0,Gt.jsxs)($D,{ownerState:{isLandscape:C},className:A.root,children:[k&&(0,Gt.jsx)(m,(0,Ft.A)({},w,{views:x,isLandscape:C,parsedValue:o,onChange:O,setOpenView:P,openView:E,toolbarTitle:v,toolbarFormat:f,toolbarPlaceholder:g,isMobileKeyboardViewOpen:s,toggleMobileKeyboardView:h})),M&&!!_&&(0,Gt.jsx)(_,(0,Ft.A)({dateRangeIcon:y,timeIcon:b,view:E,onChange:P},null==(n=w.componentsProps)?void 0:n.tabs)),(0,Gt.jsx)(iP,{children:s?(0,Gt.jsx)(FD,{className:A.mobileKeyboardInputView,children:(0,Gt.jsx)(RD,(0,Ft.A)({},a,{ignoreInvalidInputs:!0,disableOpenPicker:!0,TextFieldProps:BD}))}):(0,Gt.jsxs)(We.Fragment,{children:[zD(E)&&(0,Gt.jsx)(SD,(0,Ft.A)({autoFocus:i,date:o,onViewChange:P,onChange:D,view:E,views:x.filter(zD),focusedView:R,onFocusedViewChange:N},w)),HD(E)&&(0,Gt.jsx)(lP,(0,Ft.A)({},w,{autoFocus:i,date:o,view:E,views:x.filter(HD),onChange:D,onViewChange:P,showViewSwitcher:"desktop"===S}))]})})]})}const VD=(e,t)=>{const{onAccept:n,onChange:r,value:i,closeOnSelect:o}=e,a=PT(),{isOpen:s,setIsOpen:l}=(e=>{let{open:t,onOpen:n,onClose:r}=e;const i=We.useRef("boolean"===typeof t).current,[o,a]=We.useState(!1);return We.useEffect(()=>{if(i){if("boolean"!==typeof t)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(t)}},[i,t]),{isOpen:o,setIsOpen:We.useCallback(e=>{i||a(e),e&&n&&n(),!e&&r&&r()},[i,n,r])}})(e),c=We.useMemo(()=>t.parseInput(a,i),[t,a,i]),[d,u]=We.useState(c),[p,h]=We.useState(()=>({committed:c,draft:c,resetFallback:c})),m=We.useCallback(e=>{h(t=>{switch(e.action){case"setAll":case"acceptAndClose":return{draft:e.value,committed:e.value,resetFallback:e.value};case"setCommitted":return(0,Ft.A)({},t,{draft:e.value,committed:e.value});case"setDraft":return(0,Ft.A)({},t,{draft:e.value});default:return t}}),(e.forceOnChangeCall||!e.skipOnChangeCall&&!t.areValuesEqual(a,p.committed,e.value))&&r(e.value),"acceptAndClose"===e.action&&(l(!1),n&&!t.areValuesEqual(a,p.resetFallback,e.value)&&n(e.value))},[n,r,l,p,a,t]);We.useEffect(()=>{a.isValid(c)&&u(c)},[a,c]),We.useEffect(()=>{s&&m({action:"setAll",value:c,skipOnChangeCall:!0})},[s]),t.areValuesEqual(a,p.committed,c)||m({action:"setCommitted",value:c,skipOnChangeCall:!0});const f=We.useMemo(()=>({open:s,onClear:()=>{m({value:t.emptyValue,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(a,i,t.emptyValue)})},onAccept:()=>{m({value:p.draft,action:"acceptAndClose",forceOnChangeCall:!t.areValuesEqual(a,i,c)})},onDismiss:()=>{m({value:p.committed,action:"acceptAndClose"})},onCancel:()=>{m({value:p.resetFallback,action:"acceptAndClose"})},onSetToday:()=>{m({value:t.getTodayValue(a),action:"acceptAndClose"})}}),[m,s,a,p,t,i,c]),[g,v]=We.useState(!1),x=We.useMemo(()=>({parsedValue:p.draft,isMobileKeyboardViewOpen:g,toggleMobileKeyboardView:()=>v(!g),onDateChange:function(e,t){switch(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"partial"){case"shallow":return m({action:"setDraft",value:e,skipOnChangeCall:!0});case"partial":return m({action:"setDraft",value:e});case"finish":return m((null!=o?o:"desktop"===t)?{value:e,action:"acceptAndClose"}:{value:e,action:"setCommitted"});default:throw new Error("MUI: Invalid selectionState passed to `onDateChange`")}}}),[m,g,p.draft,o]),y=We.useCallback((e,n)=>{const i=t.valueReducer?t.valueReducer(a,d,e):e;r(i,n)},[r,t,d,a]),b={pickerProps:x,inputProps:We.useMemo(()=>({onChange:y,open:s,rawValue:i,openPicker:()=>l(!0)}),[y,s,i,l]),wrapperProps:f};return We.useDebugValue(b,()=>({MuiPickerState:{dateState:p,other:b}})),b},UD=["onChange","PopperProps","PaperProps","ToolbarComponent","TransitionComponent","value","components","componentsProps"],qD=We.forwardRef(function(e,t){const n=zT(e,"MuiDesktopDatePicker"),r=null!==_P(n),{pickerProps:i,inputProps:o,wrapperProps:a}=VD(n,HT),{PopperProps:s,PaperProps:l,ToolbarComponent:c=aE,TransitionComponent:d,components:u,componentsProps:p}=n,h=(0,nn.A)(n,UD),m=(0,Ft.A)({},o,h,{components:u,componentsProps:p,ref:t,validationError:r});return(0,Gt.jsx)(xE,(0,Ft.A)({},a,{DateInputProps:m,KeyboardDateInputComponent:RD,PopperProps:s,PaperProps:l,TransitionComponent:d,components:u,componentsProps:p,children:(0,Gt.jsx)(WD,(0,Ft.A)({},i,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:c,DateInputProps:m,components:u,componentsProps:p},h))}))}),GD=(0,Un.Ay)(Kw)({["& .".concat(Hw.container)]:{outline:0},["& .".concat(Hw.paper)]:{outline:0,minWidth:320}}),YD=(0,Un.Ay)(s_)({"&:first-of-type":{padding:0}}),ZD=e=>{var t;const{children:n,DialogProps:r={},onAccept:i,onClear:o,onDismiss:a,onCancel:s,onSetToday:l,open:c,components:d,componentsProps:u}=e,p=null!=(t=null==d?void 0:d.ActionBar)?t:cE;return(0,Gt.jsxs)(GD,(0,Ft.A)({open:c,onClose:a},r,{children:[(0,Gt.jsx)(YD,{children:n}),(0,Gt.jsx)(p,(0,Ft.A)({onAccept:i,onClear:o,onCancel:s,onSetToday:l,actions:["cancel","accept"]},null==u?void 0:u.actionBar))]}))},KD=["children","DateInputProps","DialogProps","onAccept","onClear","onDismiss","onCancel","onSetToday","open","PureDateInputComponent","components","componentsProps"];function XD(e){const{children:t,DateInputProps:n,DialogProps:r,onAccept:i,onClear:o,onDismiss:a,onCancel:s,onSetToday:l,open:c,PureDateInputComponent:d,components:u,componentsProps:p}=e,h=(0,nn.A)(e,KD);return(0,Gt.jsxs)(sE.Provider,{value:"mobile",children:[(0,Gt.jsx)(d,(0,Ft.A)({components:u},h,n)),(0,Gt.jsx)(ZD,{DialogProps:r,onAccept:i,onClear:o,onDismiss:a,onCancel:s,onSetToday:l,open:c,components:u,componentsProps:p,children:t})]})}const QD=We.forwardRef(function(e,t){const{disabled:n,getOpenDialogAriaText:r,inputFormat:i,InputProps:o,inputRef:a,label:s,openPicker:l,rawValue:c,renderInput:d,TextFieldProps:u={},validationError:p,className:h}=e,m=RT(),f=null!=r?r:m.openDatePickerDialogue,g=PT(),v=We.useMemo(()=>(0,Ft.A)({},o,{readOnly:!0}),[o]),x=kD(g,c,i),y=(0,ep.A)(e=>{e.stopPropagation(),l()});return d((0,Ft.A)({label:s,disabled:n,ref:t,inputRef:a,error:p,InputProps:v,className:h},!e.readOnly&&!e.disabled&&{onClick:y},{inputProps:(0,Ft.A)({disabled:n,readOnly:!0,"aria-readonly":!0,"aria-label":f(c,g),value:x},!e.readOnly&&{onClick:y},{onKeyDown:pE(l)})},u))}),JD=["ToolbarComponent","value","onChange","components","componentsProps"],eR=We.forwardRef(function(e,t){const n=zT(e,"MuiMobileDatePicker"),r=null!==_P(n),{pickerProps:i,inputProps:o,wrapperProps:a}=VD(n,HT),{ToolbarComponent:s=aE,components:l,componentsProps:c}=n,d=(0,nn.A)(n,JD),u=(0,Ft.A)({},o,d,{components:l,componentsProps:c,ref:t,validationError:r});return(0,Gt.jsx)(XD,(0,Ft.A)({},d,a,{DateInputProps:u,PureDateInputComponent:QD,components:l,componentsProps:c,children:(0,Gt.jsx)(WD,(0,Ft.A)({},i,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:s,DateInputProps:u,components:l,componentsProps:c},d))}))}),tR=["desktopModeMediaQuery","DialogProps","PopperProps","TransitionComponent"],nR=We.forwardRef(function(e,t){const n=ST({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:r="@media (pointer: fine)",DialogProps:i,PopperProps:o,TransitionComponent:a}=n,s=(0,nn.A)(n,tR);return P_(r,{defaultMatches:!0})?(0,Gt.jsx)(qD,(0,Ft.A)({ref:t,PopperProps:o,TransitionComponent:a},s)):(0,Gt.jsx)(eR,(0,Ft.A)({ref:t,DialogProps:i},s))});function rR(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function iR(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function oR(e){iR(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,o.A)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function aR(e,t){iR(2,arguments);var n=oR(e),r=rR(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function sR(e,t){iR(2,arguments);var n=oR(e).getTime(),r=rR(t);return new Date(n+r)}function lR(e,t){iR(2,arguments);var n=oR(e),r=rR(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());return o.setMonth(n.getMonth()+r+1,0),i>=o.getDate()?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function cR(e,t){return iR(2,arguments),lR(e,12*rR(t))}function dR(e,t){iR(2,arguments);var n=oR(e),r=oR(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function uR(e,t){iR(2,arguments);var n=oR(e),r=oR(t),i=dR(n,r),o=Math.abs(function(e,t){iR(2,arguments);var n=oR(e),r=oR(t);return n.getFullYear()-r.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);var a=dR(n,r)===-i,s=i*(o-Number(a));return 0===s?0:s}function pR(e){iR(1,arguments);var t=oR(e);return t.setHours(23,59,59,999),t}function hR(e){iR(1,arguments);var t=oR(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function mR(e,t){iR(2,arguments);var n,r=oR(e),i=oR(t),o=dR(r,i),a=Math.abs(function(e,t){iR(2,arguments);var n=oR(e),r=oR(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(r,i));if(a<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-o*a);var s=dR(r,i)===-o;(function(e){iR(1,arguments);var t=oR(e);return pR(t).getTime()===hR(t).getTime()})(oR(e))&&1===a&&1===dR(e,i)&&(s=!1),n=o*(a-Number(s))}return 0===n?0:n}var fR={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function gR(e){return e?fR[e]:fR.trunc}function vR(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function xR(e){iR(1,arguments);var t=oR(e);return t.setHours(0,0,0,0),t}function yR(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function bR(e,t){iR(2,arguments);var n=oR(e),r=oR(t),i=yR(n,r),o=Math.abs(function(e,t){iR(2,arguments);var n=xR(e),r=xR(t),i=n.getTime()-vR(n),o=r.getTime()-vR(r);return Math.round((i-o)/864e5)}(n,r));n.setDate(n.getDate()-i*o);var a=i*(o-Number(yR(n,r)===-i));return 0===a?0:a}Math.pow(10,8);var jR=6e4,wR=36e5;function _R(e,t){return iR(2,arguments),oR(e).getTime()-oR(t).getTime()}var CR={};function SR(){return CR}function AR(e,t){var n,r,i,o,a,s,l,c;iR(1,arguments);var d=SR(),u=rR(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:d.weekStartsOn)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=oR(e),h=p.getDay(),m=6+(h<u?-7:0)-(h-u);return p.setDate(p.getDate()+m),p.setHours(23,59,59,999),p}function kR(e){iR(1,arguments);var t=oR(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function MR(e){if(iR(1,arguments),!function(e){return iR(1,arguments),e instanceof Date||"object"===(0,o.A)(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!==typeof e)return!1;var t=oR(e);return!isNaN(Number(t))}function OR(e,t){return iR(2,arguments),sR(e,-rR(t))}function TR(e){iR(1,arguments);var t=oR(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function ER(e){iR(1,arguments);var t=oR(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=TR(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=TR(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function PR(e){iR(1,arguments);var t=oR(e),n=TR(t).getTime()-function(e){iR(1,arguments);var t=ER(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),TR(n)}(t).getTime();return Math.round(n/6048e5)+1}function DR(e,t){var n,r,i,o,a,s,l,c;iR(1,arguments);var d=SR(),u=rR(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:d.weekStartsOn)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=oR(e),h=p.getUTCDay(),m=(h<u?7:0)+h-u;return p.setUTCDate(p.getUTCDate()-m),p.setUTCHours(0,0,0,0),p}function RR(e,t){var n,r,i,o,a,s,l,c;iR(1,arguments);var d=oR(e),u=d.getUTCFullYear(),p=SR(),h=rR(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:p.firstWeekContainsDate)&&void 0!==r?r:null===(l=p.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(u+1,0,h),m.setUTCHours(0,0,0,0);var f=DR(m,t),g=new Date(0);g.setUTCFullYear(u,0,h),g.setUTCHours(0,0,0,0);var v=DR(g,t);return d.getTime()>=f.getTime()?u+1:d.getTime()>=v.getTime()?u:u-1}function NR(e,t){iR(1,arguments);var n=oR(e),r=DR(n,t).getTime()-function(e,t){var n,r,i,o,a,s,l,c;iR(1,arguments);var d=SR(),u=rR(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:d.firstWeekContainsDate)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),p=RR(e,t),h=new Date(0);return h.setUTCFullYear(p,0,u),h.setUTCHours(0,0,0,0),DR(h,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function LR(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var IR={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return LR("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):LR(n+1,2)},d:function(e,t){return LR(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return LR(e.getUTCHours()%12||12,t.length)},H:function(e,t){return LR(e.getUTCHours(),t.length)},m:function(e,t){return LR(e.getUTCMinutes(),t.length)},s:function(e,t){return LR(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return LR(Math.floor(r*Math.pow(10,n-3)),t.length)}};const FR=IR;var $R="midnight",BR="noon",zR="morning",HR="afternoon",WR="evening",VR="night",UR={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return FR.y(e,t)},Y:function(e,t,n,r){var i=RR(e,r),o=i>0?i:1-i;return"YY"===t?LR(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):LR(o,t.length)},R:function(e,t){return LR(ER(e),t.length)},u:function(e,t){return LR(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return LR(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return LR(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return FR.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return LR(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=NR(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):LR(i,t.length)},I:function(e,t,n){var r=PR(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):LR(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):FR.d(e,t)},D:function(e,t,n){var r=function(e){iR(1,arguments);var t=oR(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):LR(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return LR(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return LR(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return LR(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?BR:0===i?$R:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?WR:i>=12?HR:i>=4?zR:VR,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return FR.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):FR.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):LR(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):LR(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):FR.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):FR.s(e,t)},S:function(e,t){return FR.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return GR(i);case"XXXX":case"XX":return YR(i);default:return YR(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return GR(i);case"xxxx":case"xx":return YR(i);default:return YR(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+qR(i,":");default:return"GMT"+YR(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+qR(i,":");default:return"GMT"+YR(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return LR(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return LR((r._originalDate||e).getTime(),t.length)}};function qR(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+LR(o,2)}function GR(e,t){return e%60===0?(e>0?"-":"+")+LR(Math.abs(e)/60,2):YR(e,t)}function YR(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+LR(Math.floor(i/60),2)+n+LR(i%60,2)}const ZR=UR;var KR=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},XR=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},QR={p:XR,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return KR(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",KR(i,t)).replace("{{time}}",XR(o,t))}};const JR=QR;var eN=["D","DD"],tN=["YY","YYYY"];function nN(e){return-1!==eN.indexOf(e)}function rN(e){return-1!==tN.indexOf(e)}function iN(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var oN={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const aN=function(e,t,n){var r,i=oN[e];return r="string"===typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function sN(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const lN={date:sN({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:sN({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:sN({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var cN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const dN=function(e,t,n,r){return cN[e]};function uN(e){return function(t,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!==n&&void 0!==n&&n.width?String(n.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const pN={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:uN({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:uN({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:uN({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:uN({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:uN({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function hN(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,s=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,function(e){return e.test(s)}):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,function(e){return e.test(s)});return a=e.valueCallback?e.valueCallback(c):c,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var mN,fN={ordinalNumber:(mN={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(mN.matchPattern);if(!n)return null;var r=n[0],i=e.match(mN.parsePattern);if(!i)return null;var o=mN.valueCallback?mN.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:hN({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:hN({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:hN({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:hN({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:hN({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const gN={code:"en-US",formatDistance:aN,formatLong:lN,formatRelative:dN,localize:pN,match:fN,options:{weekStartsOn:0,firstWeekContainsDate:1}},vN=gN;var xN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bN=/^'([^]*?)'?$/,jN=/''/g,wN=/[a-zA-Z]/;function _N(e,t,n){var r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b;iR(2,arguments);var j=String(t),w=SR(),_=null!==(r=null!==(i=null===n||void 0===n?void 0:n.locale)&&void 0!==i?i:w.locale)&&void 0!==r?r:vN,C=rR(null!==(o=null!==(a=null!==(s=null!==(l=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null===n||void 0===n||null===(c=n.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:w.firstWeekContainsDate)&&void 0!==a?a:null===(u=w.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=rR(null!==(h=null!==(m=null!==(f=null!==(g=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==g?g:null===n||void 0===n||null===(v=n.locale)||void 0===v||null===(x=v.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==f?f:w.weekStartsOn)&&void 0!==m?m:null===(y=w.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==h?h:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!_.localize)throw new RangeError("locale must contain localize property");if(!_.formatLong)throw new RangeError("locale must contain formatLong property");var A=oR(e);if(!MR(A))throw new RangeError("Invalid time value");var k=OR(A,vR(A)),M={firstWeekContainsDate:C,weekStartsOn:S,locale:_,_originalDate:A};return j.match(yN).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,JR[t])(e,_.formatLong):e}).join("").match(xN).map(function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(bN);if(!t)return e;return t[1].replace(jN,"'")}(r);var o=ZR[i];if(o)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!rN(r)||iN(r,t,String(e)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!nN(r)||iN(r,t,String(e)),o(k,r,_.localize,M);if(i.match(wN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r}).join("")}function CN(e){return iR(1,arguments),oR(e).getDay()}function SN(e){iR(1,arguments);var t=oR(e),n=t.getFullYear(),r=t.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function AN(e,t){iR(2,arguments);var n=oR(e),r=oR(t);return n.getTime()>r.getTime()}function kN(e,t){iR(2,arguments);var n=oR(e),r=oR(t);return n.getTime()<r.getTime()}function MN(e){iR(1,arguments);var t=oR(e);return t.setMinutes(0,0,0),t}function ON(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function TN(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function EN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(EN=function(){return!!e})()}function PN(e){var t=EN();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}var DN=function(){function e(){a(this,e),(0,f.A)(this,"priority",void 0),(0,f.A)(this,"subPriority",0)}return c(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),RN=function(e){p(n,e);var t=PN(n);function n(e,r,i,o,s){var l;return a(this,n),(l=t.call(this)).value=e,l.validateValue=r,l.setValue=i,l.priority=o,s&&(l.subPriority=s),l}return c(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(DN),NN=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",10),(0,f.A)(d(e),"subPriority",-1),e}return c(n,[{key:"set",value:function(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),n}(DN),LN=function(){function e(){a(this,e),(0,f.A)(this,"incompatibleTokens",void 0),(0,f.A)(this,"priority",void 0),(0,f.A)(this,"subPriority",void 0)}return c(e,[{key:"run",value:function(e,t,n,r){var i=this.parse(e,t,n,r);return i?{setter:new RN(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(e,t,n){return!0}}]),e}(),IN=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",140),(0,f.A)(d(e),"incompatibleTokens",["R","u","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,n){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(LN),FN=/^(1[0-2]|0?\d)/,$N=/^(3[0-1]|[0-2]?\d)/,BN=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,zN=/^(5[0-3]|[0-4]?\d)/,HN=/^(2[0-3]|[0-1]?\d)/,WN=/^(2[0-4]|[0-1]?\d)/,VN=/^(1[0-1]|0?\d)/,UN=/^(1[0-2]|0?\d)/,qN=/^[0-5]?\d/,GN=/^[0-5]?\d/,YN=/^\d/,ZN=/^\d{1,2}/,KN=/^\d{1,3}/,XN=/^\d{1,4}/,QN=/^-?\d+/,JN=/^-?\d/,eL=/^-?\d{1,2}/,tL=/^-?\d{1,3}/,nL=/^-?\d{1,4}/,rL=/^([+-])(\d{2})(\d{2})?|Z/,iL=/^([+-])(\d{2})(\d{2})|Z/,oL=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,aL=/^([+-])(\d{2}):(\d{2})|Z/,sL=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function lL(e,t){return e?{value:t(e.value),rest:e.rest}:e}function cL(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function dL(e,t){var n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};var r="+"===n[1]?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(i*wR+o*jR+1e3*a),rest:t.slice(n[0].length)}}function uL(e){return cL(QN,e)}function pL(e,t){switch(e){case 1:return cL(YN,t);case 2:return cL(ZN,t);case 3:return cL(KN,t);case 4:return cL(XN,t);default:return cL(new RegExp("^\\d{1,"+e+"}"),t)}}function hL(e,t){switch(e){case 1:return cL(JN,t);case 2:return cL(eL,t);case 3:return cL(tL,t);case 4:return cL(nL,t);default:return cL(new RegExp("^-?\\d{1,"+e+"}"),t)}}function mL(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function fL(e,t){var n,r=t>0,i=r?t:1-t;if(i<=50)n=e||100;else{var o=i+50;n=e+100*Math.floor(o/100)-(e>=o%100?100:0)}return r?n:1-n}function gL(e){return e%400===0||e%4===0&&e%100!==0}var vL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",130),(0,f.A)(d(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return lL(pL(4,e),r);case"yo":return lL(n.ordinalNumber(e,{unit:"year"}),r);default:return lL(pL(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var i=fL(n.year,r);return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}var o="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(LN),xL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",130),(0,f.A)(d(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return lL(pL(4,e),r);case"Yo":return lL(n.ordinalNumber(e,{unit:"year"}),r);default:return lL(pL(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n,r){var i=RR(e,r);if(n.isTwoDigitYear){var o=fL(n.year,i);return e.setUTCFullYear(o,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),DR(e,r)}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),DR(e,r)}}]),n}(LN),yL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",130),(0,f.A)(d(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t){return hL("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),TR(r)}}]),n}(LN),bL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",130),(0,f.A)(d(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t){return hL("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(LN),jL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",120),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"Q":case"QQ":return pL(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(LN),wL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",120),(0,f.A)(d(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"q":case"qq":return pL(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(LN),_L=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),(0,f.A)(d(e),"priority",110),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"M":return lL(cL(FN,e),r);case"MM":return lL(pL(2,e),r);case"Mo":return lL(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(LN),CL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",110),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"L":return lL(cL(FN,e),r);case"LL":return lL(pL(2,e),r);case"Lo":return lL(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(LN);var SL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",100),(0,f.A)(d(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"w":return cL(zN,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n,r){return DR(function(e,t,n){iR(2,arguments);var r=oR(e),i=rR(t),o=NR(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*o),r}(e,n,r),r)}}]),n}(LN);var AL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",100),(0,f.A)(d(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"I":return cL(zN,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n){return TR(function(e,t){iR(2,arguments);var n=oR(e),r=rR(t),i=PR(n)-r;return n.setUTCDate(n.getUTCDate()-7*i),n}(e,n))}}]),n}(LN),kL=[31,28,31,30,31,30,31,31,30,31,30,31],ML=[31,29,31,30,31,30,31,31,30,31,30,31],OL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"subPriority",1),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"d":return cL($N,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){var n=gL(e.getUTCFullYear()),r=e.getUTCMonth();return n?t>=1&&t<=ML[r]:t>=1&&t<=kL[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),n}(LN),TL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"subpriority",1),(0,f.A)(d(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"D":case"DD":return cL(BN,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){return gL(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),n}(LN);function EL(e,t,n){var r,i,o,a,s,l,c,d;iR(2,arguments);var u=SR(),p=rR(null!==(r=null!==(i=null!==(o=null!==(a=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==a?a:null===n||void 0===n||null===(s=n.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==i?i:null===(c=u.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==r?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=oR(e),m=rR(t),f=((m%7+7)%7<p?7:0)+m-h.getUTCDay();return h.setUTCDate(h.getUTCDate()+f),h}var PL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=EL(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(LN),DL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n,r){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return lL(pL(t.length,e),i);case"eo":return lL(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=EL(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(LN),RL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n,r){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return lL(pL(t.length,e),i);case"co":return lL(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=EL(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(LN);var NL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",90),(0,f.A)(d(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){var r=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return pL(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return lL(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return lL(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return lL(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return lL(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(e,t){return t>=1&&t<=7}},{key:"set",value:function(e,t,n){return e=function(e,t){iR(2,arguments);var n=rR(t);n%7===0&&(n-=7);var r=oR(e),i=((n%7+7)%7<1?7:0)+n-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+i),r}(e,n),e.setUTCHours(0,0,0,0),e}}]),n}(LN),LL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",80),(0,f.A)(d(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(mL(n),0,0,0),e}}]),n}(LN),IL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",80),(0,f.A)(d(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(mL(n),0,0,0),e}}]),n}(LN),FL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",80),(0,f.A)(d(e),"incompatibleTokens",["a","b","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(mL(n),0,0,0),e}}]),n}(LN),$L=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",70),(0,f.A)(d(e),"incompatibleTokens",["H","K","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"h":return cL(UN,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),n}(LN),BL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",70),(0,f.A)(d(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"H":return cL(HN,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),n}(LN),zL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",70),(0,f.A)(d(e),"incompatibleTokens",["h","H","k","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"K":return cL(VN,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),n}(LN),HL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",70),(0,f.A)(d(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"k":return cL(WN,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}]),n}(LN),WL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",60),(0,f.A)(d(e),"incompatibleTokens",["t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"m":return cL(qN,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),n}(LN),VL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",50),(0,f.A)(d(e),"incompatibleTokens",["t","T"]),e}return c(n,[{key:"parse",value:function(e,t,n){switch(t){case"s":return cL(GN,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return pL(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),n}(LN),UL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",30),(0,f.A)(d(e),"incompatibleTokens",["t","T"]),e}return c(n,[{key:"parse",value:function(e,t){return lL(pL(t.length,e),function(e){return Math.floor(e*Math.pow(10,3-t.length))})}},{key:"set",value:function(e,t,n){return e.setUTCMilliseconds(n),e}}]),n}(LN),qL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",10),(0,f.A)(d(e),"incompatibleTokens",["t","T","x"]),e}return c(n,[{key:"parse",value:function(e,t){switch(t){case"X":return dL(rL,e);case"XX":return dL(iL,e);case"XXXX":return dL(oL,e);case"XXXXX":return dL(sL,e);default:return dL(aL,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}(LN),GL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",10),(0,f.A)(d(e),"incompatibleTokens",["t","T","X"]),e}return c(n,[{key:"parse",value:function(e,t){switch(t){case"x":return dL(rL,e);case"xx":return dL(iL,e);case"xxxx":return dL(oL,e);case"xxxxx":return dL(sL,e);default:return dL(aL,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}(LN),YL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",40),(0,f.A)(d(e),"incompatibleTokens","*"),e}return c(n,[{key:"parse",value:function(e){return uL(e)}},{key:"set",value:function(e,t,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),n}(LN),ZL=function(e){p(n,e);var t=PN(n);function n(){var e;a(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,f.A)(d(e),"priority",20),(0,f.A)(d(e),"incompatibleTokens","*"),e}return c(n,[{key:"parse",value:function(e){return uL(e)}},{key:"set",value:function(e,t,n){return[new Date(n),{timestampIsSet:!0}]}}]),n}(LN),KL={G:new IN,y:new vL,Y:new xL,R:new yL,u:new bL,Q:new jL,q:new wL,M:new _L,L:new CL,w:new SL,I:new AL,d:new OL,D:new TL,E:new PL,e:new DL,c:new RL,i:new NL,a:new LL,b:new IL,B:new FL,h:new $L,H:new BL,K:new zL,k:new HL,m:new WL,s:new VL,S:new UL,X:new qL,x:new GL,t:new YL,T:new ZL},XL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JL=/^'([^]*?)'?$/,eI=/''/g,tI=/\S/,nI=/[a-zA-Z]/;function rI(e,t,n,r){var i,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w;iR(3,arguments);var _=String(e),C=String(t),S=SR(),A=null!==(i=null!==(a=null===r||void 0===r?void 0:r.locale)&&void 0!==a?a:S.locale)&&void 0!==i?i:vN;if(!A.match)throw new RangeError("locale must contain match property");var k=rR(null!==(s=null!==(l=null!==(c=null!==(d=null===r||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==d?d:null===r||void 0===r||null===(u=r.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:S.firstWeekContainsDate)&&void 0!==l?l:null===(h=S.locale)||void 0===h||null===(m=h.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==s?s:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=rR(null!==(f=null!==(g=null!==(v=null!==(x=null===r||void 0===r?void 0:r.weekStartsOn)&&void 0!==x?x:null===r||void 0===r||null===(y=r.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==v?v:S.weekStartsOn)&&void 0!==g?g:null===(j=S.locale)||void 0===j||null===(w=j.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==f?f:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===C)return""===_?oR(n):new Date(NaN);var O,T={firstWeekContainsDate:k,weekStartsOn:M,locale:A},E=[new NN],P=C.match(QL).map(function(e){var t=e[0];return t in JR?(0,JR[t])(e,A.formatLong):e}).join("").match(XL),D=[],R=ON(P);try{var N=function(){var t=O.value;null!==r&&void 0!==r&&r.useAdditionalWeekYearTokens||!rN(t)||iN(t,C,e),null!==r&&void 0!==r&&r.useAdditionalDayOfYearTokens||!nN(t)||iN(t,C,e);var n=t[0],i=KL[n];if(i){var o=i.incompatibleTokens;if(Array.isArray(o)){var a=D.find(function(e){return o.includes(e.token)||e.token===n});if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===i.incompatibleTokens&&D.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));D.push({token:n,fullToken:t});var s=i.run(_,t,A.match,T);if(!s)return{v:new Date(NaN)};E.push(s.setter),_=s.rest}else{if(n.match(nI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=t.match(JL)[1].replace(eI,"'")),0!==_.indexOf(t))return{v:new Date(NaN)};_=_.slice(t.length)}};for(R.s();!(O=R.n()).done;){var L=N();if("object"===(0,o.A)(L))return L.v}}catch(U){R.e(U)}finally{R.f()}if(_.length>0&&tI.test(_))return new Date(NaN);var I=E.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return E.filter(function(t){return t.priority===e}).sort(function(e,t){return t.subPriority-e.subPriority})}).map(function(e){return e[0]}),F=oR(n);if(isNaN(F.getTime()))return new Date(NaN);var $,B=OR(F,vR(F)),z={},H=ON(I);try{for(H.s();!($=H.n()).done;){var W=$.value;if(!W.validate(B,T))return new Date(NaN);var V=W.set(B,z,T);Array.isArray(V)?(B=V[0],TN(z,V[1])):B=V}}catch(U){H.e(U)}finally{H.f()}return B}function iI(e){iR(1,arguments);var t=oR(e);return t.setDate(1),t.setHours(0,0,0,0),t}function oI(e,t){var n,r,i,o,a,s,l,c;iR(1,arguments);var d=SR(),u=rR(null!==(n=null!==(r=null!==(i=null!==(o=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:d.weekStartsOn)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=oR(e),h=p.getDay(),m=(h<u?7:0)+h-u;return p.setDate(p.getDate()-m),p.setHours(0,0,0,0),p}function aI(e){iR(1,arguments);var t=oR(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function sI(e,t){var n;iR(1,arguments);var r=rR(null!==(n=null===t||void 0===t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i,o=function(e){var t,n={},r=e.split(lI.dateTimeDelimiter);if(r.length>2)return n;/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],lI.timeZoneDelimiter.test(n.date)&&(n.date=e.split(lI.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var i=lI.timezone.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}(e);if(o.date){var a=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?i:100*o,restDateString:e.slice((r[1]||r[2]).length)}}(o.date,r);i=function(e,t){if(null===t)return new Date(NaN);var n=e.match(cI);if(!n)return new Date(NaN);var r=!!n[4],i=pI(n[1]),o=pI(n[2])-1,a=pI(n[3]),s=pI(n[4]),l=pI(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=7*(t-1)+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}(t,s,l):new Date(NaN);var c=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(mI[t]||(fI(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(fI(e)?366:365)}(t,i)?(c.setUTCFullYear(t,o,Math.max(i,a)),c):new Date(NaN)}(a.restDateString,a.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s,l=i.getTime(),c=0;if(o.time&&(c=function(e){var t=e.match(dI);if(!t)return NaN;var n=hI(t[1]),r=hI(t[2]),i=hI(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,i))return NaN;return n*wR+r*jR+1e3*i}(o.time),isNaN(c)))return new Date(NaN);if(!o.timezone){var d=new Date(l+c),u=new Date(0);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return s=function(e){if("Z"===e)return 0;var t=e.match(uI);if(!t)return 0;var n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,i))return NaN;return n*(r*wR+i*jR)}(o.timezone),isNaN(s)?new Date(NaN):new Date(l+c+s)}var lI={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},cI=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,dI=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,uI=/^([+-])(\d{2})(?::?(\d{2}))?$/;function pI(e){return e?parseInt(e):1}function hI(e){return e&&parseFloat(e.replace(",","."))||0}var mI=[31,null,31,30,31,30,31,31,30,31,30,31];function fI(e){return e%400===0||e%4===0&&e%100!==0}var gI=n(66723),vI=n.n(gI);const xI={dayOfMonth:"d",fullDate:"PP",fullDateWithWeekday:"PPPP",fullDateTime:"PP p",fullDateTime12h:"PP hh:mm aaa",fullDateTime24h:"PP HH:mm",fullTime:"p",fullTime12h:"hh:mm aaa",fullTime24h:"HH:mm",hours12h:"hh",hours24h:"HH",keyboardDate:"P",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aaa",keyboardDateTime24h:"P HH:mm",minutes:"mm",month:"LLLL",monthAndDate:"MMMM d",monthAndYear:"LLLL yyyy",monthShort:"MMM",weekday:"EEEE",weekdayShort:"EEE",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",seconds:"ss",shortDate:"MMM d",year:"yyyy"};class yI{constructor(){let{locale:e,formats:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.lib="date-fns",this.is12HourCycleInCurrentLocale=()=>{var e;return!this.locale||/a/.test(null===(e=this.locale.formatLong)||void 0===e?void 0:e.time())},this.getFormatHelperText=e=>{var t,n;const r=this.locale||gN;return null!==(n=null===(t=e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g))||void 0===t?void 0:t.map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,vI()[t])(e,r.formatLong,{})}return e}).join("").replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase())&&void 0!==n?n:e},this.parseISO=e=>sI(e),this.toISO=e=>function(e,t){var n,r;iR(1,arguments);var i=oR(e);if(isNaN(i.getTime()))throw new RangeError("Invalid time value");var o=String(null!==(n=null===t||void 0===t?void 0:t.format)&&void 0!==n?n:"extended"),a=String(null!==(r=null===t||void 0===t?void 0:t.representation)&&void 0!==r?r:"complete");if("extended"!==o&&"basic"!==o)throw new RangeError("format must be 'extended' or 'basic'");if("date"!==a&&"time"!==a&&"complete"!==a)throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",l="",c="extended"===o?"-":"",d="extended"===o?":":"";if("time"!==a){var u=LR(i.getDate(),2),p=LR(i.getMonth()+1,2),h=LR(i.getFullYear(),4);s="".concat(h).concat(c).concat(p).concat(c).concat(u)}if("date"!==a){var m=i.getTimezoneOffset();if(0!==m){var f=Math.abs(m),g=LR(Math.floor(f/60),2),v=LR(f%60,2);l="".concat(m<0?"+":"-").concat(g,":").concat(v)}else l="Z";var x=""===s?"":"T",y=[LR(i.getHours(),2),LR(i.getMinutes(),2),LR(i.getSeconds(),2)].join(d);s="".concat(s).concat(x).concat(y).concat(l)}return s}(e,{format:"extended"}),this.getCurrentLocaleCode=()=>{var e;return(null===(e=this.locale)||void 0===e?void 0:e.code)||"en-US"},this.addSeconds=(e,t)=>function(e,t){return iR(2,arguments),sR(e,1e3*rR(t))}(e,t),this.addMinutes=(e,t)=>function(e,t){return iR(2,arguments),sR(e,6e4*rR(t))}(e,t),this.addHours=(e,t)=>function(e,t){return iR(2,arguments),sR(e,36e5*rR(t))}(e,t),this.addDays=(e,t)=>aR(e,t),this.addWeeks=(e,t)=>function(e,t){return iR(2,arguments),aR(e,7*rR(t))}(e,t),this.addMonths=(e,t)=>lR(e,t),this.addYears=(e,t)=>cR(e,t),this.isValid=e=>MR(this.date(e)),this.getDiff=(e,t,n)=>{var r;const i=null!==(r=this.date(t))&&void 0!==r?r:e;if(!this.isValid(i))return 0;switch(n){case"years":return uR(e,i);case"quarters":return function(e,t,n){iR(2,arguments);var r=mR(e,t)/3;return gR(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);case"months":return mR(e,i);case"weeks":return function(e,t,n){iR(2,arguments);var r=bR(e,t)/7;return gR(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);case"days":return bR(e,i);case"hours":return function(e,t,n){iR(2,arguments);var r=_R(e,t)/wR;return gR(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);case"minutes":return function(e,t,n){iR(2,arguments);var r=_R(e,t)/jR;return gR(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);case"seconds":return function(e,t,n){iR(2,arguments);var r=_R(e,t)/1e3;return gR(null===n||void 0===n?void 0:n.roundingMethod)(r)}(e,i);default:return _R(e,i)}},this.isAfter=(e,t)=>AN(e,t),this.isBefore=(e,t)=>kN(e,t),this.startOfDay=e=>xR(e),this.endOfDay=e=>pR(e),this.getHours=e=>function(e){return iR(1,arguments),oR(e).getHours()}(e),this.setHours=(e,t)=>function(e,t){iR(2,arguments);var n=oR(e),r=rR(t);return n.setHours(r),n}(e,t),this.setMinutes=(e,t)=>function(e,t){iR(2,arguments);var n=oR(e),r=rR(t);return n.setMinutes(r),n}(e,t),this.getSeconds=e=>function(e){return iR(1,arguments),oR(e).getSeconds()}(e),this.setSeconds=(e,t)=>function(e,t){iR(2,arguments);var n=oR(e),r=rR(t);return n.setSeconds(r),n}(e,t),this.isSameDay=(e,t)=>function(e,t){iR(2,arguments);var n=xR(e),r=xR(t);return n.getTime()===r.getTime()}(e,t),this.isSameMonth=(e,t)=>function(e,t){iR(2,arguments);var n=oR(e),r=oR(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}(e,t),this.isSameYear=(e,t)=>function(e,t){iR(2,arguments);var n=oR(e),r=oR(t);return n.getFullYear()===r.getFullYear()}(e,t),this.isSameHour=(e,t)=>function(e,t){iR(2,arguments);var n=MN(e),r=MN(t);return n.getTime()===r.getTime()}(e,t),this.startOfYear=e=>aI(e),this.endOfYear=e=>kR(e),this.startOfMonth=e=>iI(e),this.endOfMonth=e=>hR(e),this.startOfWeek=e=>oI(e,{locale:this.locale}),this.endOfWeek=e=>AR(e,{locale:this.locale}),this.getYear=e=>function(e){return iR(1,arguments),oR(e).getFullYear()}(e),this.setYear=(e,t)=>function(e,t){iR(2,arguments);var n=oR(e),r=rR(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}(e,t),this.date=e=>"undefined"===typeof e?new Date:null===e?null:new Date(e),this.toJsDate=e=>e,this.parse=(e,t)=>""===e?null:rI(e,t,new Date,{locale:this.locale}),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>_N(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||function(e,t){iR(2,arguments);var n=oR(e),r=oR(t);return n.getTime()===r.getTime()}(e,t),this.isNull=e=>null===e,this.isAfterDay=(e,t)=>AN(e,pR(t)),this.isBeforeDay=(e,t)=>kN(e,xR(t)),this.isBeforeYear=(e,t)=>kN(e,aI(t)),this.isAfterYear=(e,t)=>AN(e,kR(t)),this.isWithinRange=(e,t)=>{let[n,r]=t;return function(e,t){iR(2,arguments);var n=oR(e).getTime(),r=oR(t.start).getTime(),i=oR(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}(e,{start:n,end:r})},this.formatNumber=e=>e,this.getMinutes=e=>function(e){return iR(1,arguments),oR(e).getMinutes()}(e),this.getDate=e=>function(e){return iR(1,arguments),oR(e).getDate()}(e),this.setDate=(e,t)=>function(e,t){iR(2,arguments);var n=oR(e),r=rR(t);return n.setDate(r),n}(e,t),this.getMonth=e=>function(e){return iR(1,arguments),oR(e).getMonth()}(e),this.getDaysInMonth=e=>SN(e),this.setMonth=(e,t)=>function(e,t){iR(2,arguments);var n=oR(e),r=rR(t),i=n.getFullYear(),o=n.getDate(),a=new Date(0);a.setFullYear(i,r,15),a.setHours(0,0,0,0);var s=SN(a);return n.setMonth(r,Math.min(o,s)),n}(e,t),this.getMeridiemText=e=>"am"===e?"AM":"PM",this.getNextMonth=e=>lR(e,1),this.getPreviousMonth=e=>lR(e,-1),this.getMonthArray=e=>{const t=[aI(e)];for(;t.length<12;){const e=t[t.length-1];t.push(this.getNextMonth(e))}return t},this.mergeDateAndTime=(e,t)=>this.setSeconds(this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t)),this.getSeconds(t)),this.getWeekdays=()=>{const e=new Date;return function(e,t){var n;iR(1,arguments);var r=e||{},i=oR(r.start),o=oR(r.end).getTime();if(!(i.getTime()<=o))throw new RangeError("Invalid interval");var a=[],s=i;s.setHours(0,0,0,0);var l=Number(null!==(n=null===t||void 0===t?void 0:t.step)&&void 0!==n?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=o;)a.push(oR(s)),s.setDate(s.getDate()+l),s.setHours(0,0,0,0);return a}({start:oI(e,{locale:this.locale}),end:AR(e,{locale:this.locale})}).map(e=>this.formatByString(e,"EEEEEE"))},this.getWeekArray=e=>{const t=oI(iI(e),{locale:this.locale}),n=AR(hR(e),{locale:this.locale});let r=0,i=t;const o=[];let a=null;for(;kN(i,n);){const e=Math.floor(r/7);o[e]=o[e]||[];const t=CN(i);a!==t&&(a=t,o[e].push(i),r+=1),i=aR(i,1)}return o},this.getYearRange=(e,t)=>{const n=aI(e),r=kR(t),i=[];let o=n;for(;kN(o,r);)i.push(o),o=cR(o,1);return i},this.locale=e,this.formats=Object.assign({},xI,t)}isBeforeMonth(e,t){return kN(e,iI(t))}isAfterMonth(e,t){return AN(e,iI(t))}}const bI={y:"year",yy:"year",yyy:"year",yyyy:"year",MMMM:"month",MM:"month",DD:"day",d:"day",dd:"day",H:"hour",HH:"hour",h:"hour",hh:"hour",mm:"minute",ss:"second",a:"am-pm",aa:"am-pm",aaa:"am-pm"};class jI extends yI{constructor(){super(...arguments),this.formatTokenMap=bI,this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,vI()[t])(e,(this.locale||gN).formatLong,{})}return e}).join(""),this.getFormatHelperText=e=>this.expandFormat(e).replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase()}}var wI=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===_I}(e)}(e)};var _I="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function CI(e,t){return!1!==t.clone&&t.isMergeableObject(e)?AI((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function SI(e,t,n){return e.concat(t).map(function(e){return CI(e,n)})}function AI(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||SI,n.isMergeableObject=n.isMergeableObject||wI;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(t){r[t]=CI(e[t],n)}),Object.keys(t).forEach(function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=AI(e[i],t[i],n):r[i]=CI(t[i],n)}),r}(e,t,n):CI(t,n)}AI.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return AI(e,n,t)},{})};const kI=AI;const MI="object"==typeof global&&global&&global.Object===Object&&global;var OI="object"==typeof self&&self&&self.Object===Object&&self;const TI=MI||OI||Function("return this")();const EI=TI.Symbol;var PI=Object.prototype,DI=PI.hasOwnProperty,RI=PI.toString,NI=EI?EI.toStringTag:void 0;const LI=function(e){var t=DI.call(e,NI),n=e[NI];try{e[NI]=void 0;var r=!0}catch(ba){}var i=RI.call(e);return r&&(t?e[NI]=n:delete e[NI]),i};var II=Object.prototype.toString;const FI=function(e){return II.call(e)};var $I=EI?EI.toStringTag:void 0;const BI=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":$I&&$I in Object(e)?LI(e):FI(e)};const zI=function(e,t){return function(n){return e(t(n))}};const HI=zI(Object.getPrototypeOf,Object);const WI=function(e){return null!=e&&"object"==typeof e};var VI=Function.prototype,UI=Object.prototype,qI=VI.toString,GI=UI.hasOwnProperty,YI=qI.call(Object);const ZI=function(e){if(!WI(e)||"[object Object]"!=BI(e))return!1;var t=HI(e);if(null===t)return!0;var n=GI.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&qI.call(n)==YI};const KI=function(){this.__data__=[],this.size=0};const XI=function(e,t){return e===t||e!==e&&t!==t};const QI=function(e,t){for(var n=e.length;n--;)if(XI(e[n][0],t))return n;return-1};var JI=Array.prototype.splice;const eF=function(e){var t=this.__data__,n=QI(t,e);return!(n<0)&&(n==t.length-1?t.pop():JI.call(t,n,1),--this.size,!0)};const tF=function(e){var t=this.__data__,n=QI(t,e);return n<0?void 0:t[n][1]};const nF=function(e){return QI(this.__data__,e)>-1};const rF=function(e,t){var n=this.__data__,r=QI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function iF(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}iF.prototype.clear=KI,iF.prototype.delete=eF,iF.prototype.get=tF,iF.prototype.has=nF,iF.prototype.set=rF;const oF=iF;const aF=function(){this.__data__=new oF,this.size=0};const sF=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const lF=function(e){return this.__data__.get(e)};const cF=function(e){return this.__data__.has(e)};const dF=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const uF=function(e){if(!dF(e))return!1;var t=BI(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const pF=TI["__core-js_shared__"];var hF=function(){var e=/[^.]+$/.exec(pF&&pF.keys&&pF.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();const mF=function(e){return!!hF&&hF in e};var fF=Function.prototype.toString;const gF=function(e){if(null!=e){try{return fF.call(e)}catch(ba){}try{return e+""}catch(ba){}}return""};var vF=/^\[object .+?Constructor\]$/,xF=Function.prototype,yF=Object.prototype,bF=xF.toString,jF=yF.hasOwnProperty,wF=RegExp("^"+bF.call(jF).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _F=function(e){return!(!dF(e)||mF(e))&&(uF(e)?wF:vF).test(gF(e))};const CF=function(e,t){return null==e?void 0:e[t]};const SF=function(e,t){var n=CF(e,t);return _F(n)?n:void 0};const AF=SF(TI,"Map");const kF=SF(Object,"create");const MF=function(){this.__data__=kF?kF(null):{},this.size=0};const OF=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var TF=Object.prototype.hasOwnProperty;const EF=function(e){var t=this.__data__;if(kF){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return TF.call(t,e)?t[e]:void 0};var PF=Object.prototype.hasOwnProperty;const DF=function(e){var t=this.__data__;return kF?void 0!==t[e]:PF.call(t,e)};const RF=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=kF&&void 0===t?"__lodash_hash_undefined__":t,this};function NF(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}NF.prototype.clear=MF,NF.prototype.delete=OF,NF.prototype.get=EF,NF.prototype.has=DF,NF.prototype.set=RF;const LF=NF;const IF=function(){this.size=0,this.__data__={hash:new LF,map:new(AF||oF),string:new LF}};const FF=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const $F=function(e,t){var n=e.__data__;return FF(t)?n["string"==typeof t?"string":"hash"]:n.map};const BF=function(e){var t=$F(this,e).delete(e);return this.size-=t?1:0,t};const zF=function(e){return $F(this,e).get(e)};const HF=function(e){return $F(this,e).has(e)};const WF=function(e,t){var n=$F(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function VF(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}VF.prototype.clear=IF,VF.prototype.delete=BF,VF.prototype.get=zF,VF.prototype.has=HF,VF.prototype.set=WF;const UF=VF;const qF=function(e,t){var n=this.__data__;if(n instanceof oF){var r=n.__data__;if(!AF||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new UF(r)}return n.set(e,t),this.size=n.size,this};function GF(e){var t=this.__data__=new oF(e);this.size=t.size}GF.prototype.clear=aF,GF.prototype.delete=sF,GF.prototype.get=lF,GF.prototype.has=cF,GF.prototype.set=qF;const YF=GF;const ZF=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e};const KF=function(){try{var e=SF(Object,"defineProperty");return e({},"",{}),e}catch(ba){}}();const XF=function(e,t,n){"__proto__"==t&&KF?KF(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var QF=Object.prototype.hasOwnProperty;const JF=function(e,t,n){var r=e[t];QF.call(e,t)&&XI(r,n)&&(void 0!==n||t in e)||XF(e,t,n)};const e$=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?XF(n,s,l):JF(n,s,l)}return n};const t$=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};const n$=function(e){return WI(e)&&"[object Arguments]"==BI(e)};var r$=Object.prototype,i$=r$.hasOwnProperty,o$=r$.propertyIsEnumerable,a$=n$(function(){return arguments}())?n$:function(e){return WI(e)&&i$.call(e,"callee")&&!o$.call(e,"callee")};const s$=a$;const l$=Array.isArray;const c$=function(){return!1};var d$="object"==typeof exports&&exports&&!exports.nodeType&&exports,u$=d$&&"object"==typeof module&&module&&!module.nodeType&&module,p$=u$&&u$.exports===d$?TI.Buffer:void 0;const h$=(p$?p$.isBuffer:void 0)||c$;var m$=/^(?:0|[1-9]\d*)$/;const f$=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&m$.test(e))&&e>-1&&e%1==0&&e<t};const g$=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var v$={};v$["[object Float32Array]"]=v$["[object Float64Array]"]=v$["[object Int8Array]"]=v$["[object Int16Array]"]=v$["[object Int32Array]"]=v$["[object Uint8Array]"]=v$["[object Uint8ClampedArray]"]=v$["[object Uint16Array]"]=v$["[object Uint32Array]"]=!0,v$["[object Arguments]"]=v$["[object Array]"]=v$["[object ArrayBuffer]"]=v$["[object Boolean]"]=v$["[object DataView]"]=v$["[object Date]"]=v$["[object Error]"]=v$["[object Function]"]=v$["[object Map]"]=v$["[object Number]"]=v$["[object Object]"]=v$["[object RegExp]"]=v$["[object Set]"]=v$["[object String]"]=v$["[object WeakMap]"]=!1;const x$=function(e){return WI(e)&&g$(e.length)&&!!v$[BI(e)]};const y$=function(e){return function(t){return e(t)}};var b$="object"==typeof exports&&exports&&!exports.nodeType&&exports,j$=b$&&"object"==typeof module&&module&&!module.nodeType&&module,w$=j$&&j$.exports===b$&&MI.process;const _$=function(){try{var e=j$&&j$.require&&j$.require("util").types;return e||w$&&w$.binding&&w$.binding("util")}catch(ba){}}();var C$=_$&&_$.isTypedArray;const S$=C$?y$(C$):x$;var A$=Object.prototype.hasOwnProperty;const k$=function(e,t){var n=l$(e),r=!n&&s$(e),i=!n&&!r&&h$(e),o=!n&&!r&&!i&&S$(e),a=n||r||i||o,s=a?t$(e.length,String):[],l=s.length;for(var c in e)!t&&!A$.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||f$(c,l))||s.push(c);return s};var M$=Object.prototype;const O$=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||M$)};const T$=zI(Object.keys,Object);var E$=Object.prototype.hasOwnProperty;const P$=function(e){if(!O$(e))return T$(e);var t=[];for(var n in Object(e))E$.call(e,n)&&"constructor"!=n&&t.push(n);return t};const D$=function(e){return null!=e&&g$(e.length)&&!uF(e)};const R$=function(e){return D$(e)?k$(e):P$(e)};const N$=function(e,t){return e&&e$(t,R$(t),e)};const L$=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var I$=Object.prototype.hasOwnProperty;const F$=function(e){if(!dF(e))return L$(e);var t=O$(e),n=[];for(var r in e)("constructor"!=r||!t&&I$.call(e,r))&&n.push(r);return n};const $$=function(e){return D$(e)?k$(e,!0):F$(e)};const B$=function(e,t){return e&&e$(t,$$(t),e)};var z$="object"==typeof exports&&exports&&!exports.nodeType&&exports,H$=z$&&"object"==typeof module&&module&&!module.nodeType&&module,W$=H$&&H$.exports===z$?TI.Buffer:void 0,V$=W$?W$.allocUnsafe:void 0;const U$=function(e,t){if(t)return e.slice();var n=e.length,r=V$?V$(n):new e.constructor(n);return e.copy(r),r};const q$=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};const G$=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o};const Y$=function(){return[]};var Z$=Object.prototype.propertyIsEnumerable,K$=Object.getOwnPropertySymbols,X$=K$?function(e){return null==e?[]:(e=Object(e),G$(K$(e),function(t){return Z$.call(e,t)}))}:Y$;const Q$=X$;const J$=function(e,t){return e$(e,Q$(e),t)};const eB=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e};var tB=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)eB(t,Q$(e)),e=HI(e);return t}:Y$;const nB=tB;const rB=function(e,t){return e$(e,nB(e),t)};const iB=function(e,t,n){var r=t(e);return l$(e)?r:eB(r,n(e))};const oB=function(e){return iB(e,R$,Q$)};const aB=function(e){return iB(e,$$,nB)};const sB=SF(TI,"DataView");const lB=SF(TI,"Promise");const cB=SF(TI,"Set");const dB=SF(TI,"WeakMap");var uB="[object Map]",pB="[object Promise]",hB="[object Set]",mB="[object WeakMap]",fB="[object DataView]",gB=gF(sB),vB=gF(AF),xB=gF(lB),yB=gF(cB),bB=gF(dB),jB=BI;(sB&&jB(new sB(new ArrayBuffer(1)))!=fB||AF&&jB(new AF)!=uB||lB&&jB(lB.resolve())!=pB||cB&&jB(new cB)!=hB||dB&&jB(new dB)!=mB)&&(jB=function(e){var t=BI(e),n="[object Object]"==t?e.constructor:void 0,r=n?gF(n):"";if(r)switch(r){case gB:return fB;case vB:return uB;case xB:return pB;case yB:return hB;case bB:return mB}return t});const wB=jB;var _B=Object.prototype.hasOwnProperty;const CB=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&_B.call(e,"index")&&(n.index=e.index,n.input=e.input),n};const SB=TI.Uint8Array;const AB=function(e){var t=new e.constructor(e.byteLength);return new SB(t).set(new SB(e)),t};const kB=function(e,t){var n=t?AB(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var MB=/\w*$/;const OB=function(e){var t=new e.constructor(e.source,MB.exec(e));return t.lastIndex=e.lastIndex,t};var TB=EI?EI.prototype:void 0,EB=TB?TB.valueOf:void 0;const PB=function(e){return EB?Object(EB.call(e)):{}};const DB=function(e,t){var n=t?AB(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};const RB=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return AB(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return kB(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return DB(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return OB(e);case"[object Symbol]":return PB(e)}};var NB=Object.create,LB=function(){function e(){}return function(t){if(!dF(t))return{};if(NB)return NB(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const IB=LB;const FB=function(e){return"function"!=typeof e.constructor||O$(e)?{}:IB(HI(e))};const $B=function(e){return WI(e)&&"[object Map]"==wB(e)};var BB=_$&&_$.isMap;const zB=BB?y$(BB):$B;const HB=function(e){return WI(e)&&"[object Set]"==wB(e)};var WB=_$&&_$.isSet;const VB=WB?y$(WB):HB;var UB="[object Arguments]",qB="[object Function]",GB="[object Object]",YB={};YB[UB]=YB["[object Array]"]=YB["[object ArrayBuffer]"]=YB["[object DataView]"]=YB["[object Boolean]"]=YB["[object Date]"]=YB["[object Float32Array]"]=YB["[object Float64Array]"]=YB["[object Int8Array]"]=YB["[object Int16Array]"]=YB["[object Int32Array]"]=YB["[object Map]"]=YB["[object Number]"]=YB[GB]=YB["[object RegExp]"]=YB["[object Set]"]=YB["[object String]"]=YB["[object Symbol]"]=YB["[object Uint8Array]"]=YB["[object Uint8ClampedArray]"]=YB["[object Uint16Array]"]=YB["[object Uint32Array]"]=!0,YB["[object Error]"]=YB[qB]=YB["[object WeakMap]"]=!1;const ZB=function e(t,n,r,i,o,a){var s,l=1&n,c=2&n,d=4&n;if(r&&(s=o?r(t,i,o,a):r(t)),void 0!==s)return s;if(!dF(t))return t;var u=l$(t);if(u){if(s=CB(t),!l)return q$(t,s)}else{var p=wB(t),h=p==qB||"[object GeneratorFunction]"==p;if(h$(t))return U$(t,l);if(p==GB||p==UB||h&&!o){if(s=c||h?{}:FB(t),!l)return c?rB(t,B$(s,t)):J$(t,N$(s,t))}else{if(!YB[p])return o?t:{};s=RB(t,p,l)}}a||(a=new YF);var m=a.get(t);if(m)return m;a.set(t,s),VB(t)?t.forEach(function(i){s.add(e(i,n,r,i,t,a))}):zB(t)&&t.forEach(function(i,o){s.set(o,e(i,n,r,o,t,a))});var f=u?void 0:(d?c?aB:oB:c?$$:R$)(t);return ZF(f||t,function(i,o){f&&(i=t[o=i]),JF(s,o,e(i,n,r,o,t,a))}),s};const KB=function(e){return ZB(e,5)};var XB=n(66366),QB=n.n(XB);const JB=function(e,t){};const ez=function(e){return ZB(e,4)};const tz=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};const nz=function(e){return"symbol"==typeof e||WI(e)&&"[object Symbol]"==BI(e)};function rz(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(rz.Cache||UF),n}rz.Cache=UF;const iz=rz;const oz=function(e){var t=iz(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t};var az=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sz=/\\(\\)?/g,lz=oz(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(az,function(e,n,r,i){t.push(r?i.replace(sz,"$1"):n||e)}),t});const cz=lz;const dz=function(e){if("string"==typeof e||nz(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var uz=EI?EI.prototype:void 0,pz=uz?uz.toString:void 0;const hz=function e(t){if("string"==typeof t)return t;if(l$(t))return tz(t,e)+"";if(nz(t))return pz?pz.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};const mz=function(e){return null==e?"":hz(e)};const fz=function(e){return l$(e)?tz(e,dz):nz(e)?[e]:q$(cz(mz(e)))};function gz(){return gz=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gz.apply(this,arguments)}function vz(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function xz(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function yz(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var bz=(0,We.createContext)(void 0);bz.displayName="FormikContext";var jz=bz.Provider,wz=bz.Consumer;function _z(){var e=(0,We.useContext)(bz);return e||JB(!1),e}var Cz=function(e){return Array.isArray(e)&&0===e.length},Sz=function(e){return"function"===typeof e},Az=function(e){return null!==e&&"object"===typeof e},kz=function(e){return String(Math.floor(Number(e)))===e},Mz=function(e){return"[object String]"===Object.prototype.toString.call(e)},Oz=function(e){return 0===We.Children.count(e)},Tz=function(e){return Az(e)&&Sz(e.then)};function Ez(e,t,n,r){void 0===r&&(r=0);for(var i=fz(t);e&&r<i.length;)e=e[i[r++]];return r===i.length||e?void 0===e?n:e:n}function Pz(e,t,n){for(var r=ez(e),i=r,o=0,a=fz(t);o<a.length-1;o++){var s=a[o],l=Ez(e,a.slice(0,o+1));if(l&&(Az(l)||Array.isArray(l)))i=i[s]=ez(l);else{var c=a[o+1];i=i[s]=kz(c)&&Number(c)>=0?[]:{}}}return(0===o?e:i)[a[o]]===n?e:(void 0===n?delete i[a[o]]:i[a[o]]=n,0===o&&void 0===n&&delete r[a[o]],r)}function Dz(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,o=Object.keys(e);i<o.length;i++){var a=o[i],s=e[a];Az(s)?n.get(s)||(n.set(s,!0),r[a]=Array.isArray(s)?[]:{},Dz(s,t,n,r[a])):r[a]=t}return r}var Rz={},Nz={};function Lz(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,o=e.validateOnMount,a=void 0!==o&&o,s=e.isInitialValid,l=e.enableReinitialize,c=void 0!==l&&l,d=e.onSubmit,u=xz(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=gz({validateOnChange:n,validateOnBlur:i,validateOnMount:a,onSubmit:d},u),h=(0,We.useRef)(p.initialValues),m=(0,We.useRef)(p.initialErrors||Rz),f=(0,We.useRef)(p.initialTouched||Nz),g=(0,We.useRef)(p.initialStatus),v=(0,We.useRef)(!1),x=(0,We.useRef)({});(0,We.useEffect)(function(){return v.current=!0,function(){v.current=!1}},[]);var y=(0,We.useState)(0)[1],b=(0,We.useRef)({values:KB(p.initialValues),errors:KB(p.initialErrors)||Rz,touched:KB(p.initialTouched)||Nz,status:KB(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),j=b.current,w=(0,We.useCallback)(function(e){var t=b.current;b.current=function(e,t){switch(t.type){case"SET_VALUES":return gz({},e,{values:t.payload});case"SET_TOUCHED":return gz({},e,{touched:t.payload});case"SET_ERRORS":return QB()(e.errors,t.payload)?e:gz({},e,{errors:t.payload});case"SET_STATUS":return gz({},e,{status:t.payload});case"SET_ISSUBMITTING":return gz({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return gz({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return gz({},e,{values:Pz(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return gz({},e,{touched:Pz(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return gz({},e,{errors:Pz(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return gz({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return gz({},e,{touched:Dz(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return gz({},e,{isSubmitting:!1});default:return e}}(t,e),t!==b.current&&y(function(e){return e+1})},[]),_=(0,We.useCallback)(function(e,t){return new Promise(function(n,r){var i=p.validate(e,t);null==i?n(Rz):Tz(i)?i.then(function(e){n(e||Rz)},function(e){r(e)}):n(i)})},[p.validate]),C=(0,We.useCallback)(function(e,t){var n=p.validationSchema,r=Sz(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1);var i=Fz(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r||i})}(e,r);return new Promise(function(e,t){i.then(function(){e(Rz)},function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return Pz(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;Ez(t,a.path)||(t=Pz(t,a.path,a.message))}}return t}(n)):t(n)})})},[p.validationSchema]),S=(0,We.useCallback)(function(e,t){return new Promise(function(n){return n(x.current[e].validate(t))})},[]),A=(0,We.useCallback)(function(e){var t=Object.keys(x.current).filter(function(e){return Sz(x.current[e].validate)}),n=t.length>0?t.map(function(t){return S(t,Ez(e,t))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then(function(e){return e.reduce(function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Pz(e,t[r],n)),e},{})})},[S]),k=(0,We.useCallback)(function(e){return Promise.all([A(e),p.validationSchema?C(e):{},p.validate?_(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return kI.all([t,n,r],{arrayMerge:$z})})},[p.validate,p.validationSchema,A,_,C]),M=zz(function(e){return void 0===e&&(e=j.values),w({type:"SET_ISVALIDATING",payload:!0}),k(e).then(function(e){return v.current&&(w({type:"SET_ISVALIDATING",payload:!1}),w({type:"SET_ERRORS",payload:e})),e})});(0,We.useEffect)(function(){a&&!0===v.current&&QB()(h.current,p.initialValues)&&M(h.current)},[a,M]);var O=(0,We.useCallback)(function(e){var t=e&&e.values?e.values:h.current,n=e&&e.errors?e.errors:m.current?m.current:p.initialErrors||{},r=e&&e.touched?e.touched:f.current?f.current:p.initialTouched||{},i=e&&e.status?e.status:g.current?g.current:p.initialStatus;h.current=t,m.current=n,f.current=r,g.current=i;var o=function(){w({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"===typeof e.submitCount?e.submitCount:0}})};if(p.onReset){var a=p.onReset(j.values,Y);Tz(a)?a.then(o):o()}else o()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);(0,We.useEffect)(function(){!0!==v.current||QB()(h.current,p.initialValues)||c&&(h.current=p.initialValues,O(),a&&M(h.current))},[c,p.initialValues,O,a,M]),(0,We.useEffect)(function(){c&&!0===v.current&&!QB()(m.current,p.initialErrors)&&(m.current=p.initialErrors||Rz,w({type:"SET_ERRORS",payload:p.initialErrors||Rz}))},[c,p.initialErrors]),(0,We.useEffect)(function(){c&&!0===v.current&&!QB()(f.current,p.initialTouched)&&(f.current=p.initialTouched||Nz,w({type:"SET_TOUCHED",payload:p.initialTouched||Nz}))},[c,p.initialTouched]),(0,We.useEffect)(function(){c&&!0===v.current&&!QB()(g.current,p.initialStatus)&&(g.current=p.initialStatus,w({type:"SET_STATUS",payload:p.initialStatus}))},[c,p.initialStatus,p.initialTouched]);var T=zz(function(e){if(x.current[e]&&Sz(x.current[e].validate)){var t=Ez(j.values,e),n=x.current[e].validate(t);return Tz(n)?(w({type:"SET_ISVALIDATING",payload:!0}),n.then(function(e){return e}).then(function(t){w({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),w({type:"SET_ISVALIDATING",payload:!1})})):(w({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return p.validationSchema?(w({type:"SET_ISVALIDATING",payload:!0}),C(j.values,e).then(function(e){return e}).then(function(t){w({type:"SET_FIELD_ERROR",payload:{field:e,value:Ez(t,e)}}),w({type:"SET_ISVALIDATING",payload:!1})})):Promise.resolve()}),E=(0,We.useCallback)(function(e,t){var n=t.validate;x.current[e]={validate:n}},[]),P=(0,We.useCallback)(function(e){delete x.current[e]},[]),D=zz(function(e,t){return w({type:"SET_TOUCHED",payload:e}),(void 0===t?i:t)?M(j.values):Promise.resolve()}),R=(0,We.useCallback)(function(e){w({type:"SET_ERRORS",payload:e})},[]),N=zz(function(e,t){var r=Sz(e)?e(j.values):e;return w({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?M(r):Promise.resolve()}),L=(0,We.useCallback)(function(e,t){w({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})},[]),I=zz(function(e,t,r){return w({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?M(Pz(j.values,e,t)):Promise.resolve()}),F=(0,We.useCallback)(function(e,t){var n,r=t,i=e;if(!Mz(e)){e.persist&&e.persist();var o=e.target?e.target:e.currentTarget,a=o.type,s=o.name,l=o.id,c=o.value,d=o.checked,u=(o.outerHTML,o.options),p=o.multiple;r=t||(s||l),i=/number|range/.test(a)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"===typeof e)return Boolean(t);var r=[],i=!1,o=-1;if(Array.isArray(e))r=e,i=(o=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!i)return r.concat(n);if(!i)return r;return r.slice(0,o).concat(r.slice(o+1))}(Ez(j.values,r),d,c):u&&p?function(e){return Array.from(e).filter(function(e){return e.selected}).map(function(e){return e.value})}(u):c}r&&I(r,i)},[I,j.values]),$=zz(function(e){if(Mz(e))return function(t){return F(t,e)};F(e)}),B=zz(function(e,t,n){return void 0===t&&(t=!0),w({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?i:n)?M(j.values):Promise.resolve()}),z=(0,We.useCallback)(function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,o=(n.outerHTML,t||(r||i));B(o,!0)},[B]),H=zz(function(e){if(Mz(e))return function(t){return z(t,e)};z(e)}),W=(0,We.useCallback)(function(e){Sz(e)?w({type:"SET_FORMIK_STATE",payload:e}):w({type:"SET_FORMIK_STATE",payload:function(){return e}})},[]),V=(0,We.useCallback)(function(e){w({type:"SET_STATUS",payload:e})},[]),U=(0,We.useCallback)(function(e){w({type:"SET_ISSUBMITTING",payload:e})},[]),q=zz(function(){return w({type:"SUBMIT_ATTEMPT"}),M().then(function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=Z()))return}catch(r){throw r}return Promise.resolve(n).then(function(e){return v.current&&w({type:"SUBMIT_SUCCESS"}),e}).catch(function(e){if(v.current)throw w({type:"SUBMIT_FAILURE"}),e})}if(v.current&&(w({type:"SUBMIT_FAILURE"}),t))throw e})}),G=zz(function(e){e&&e.preventDefault&&Sz(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Sz(e.stopPropagation)&&e.stopPropagation(),q().catch(function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)})}),Y={resetForm:O,validateForm:M,validateField:T,setErrors:R,setFieldError:L,setFieldTouched:B,setFieldValue:I,setStatus:V,setSubmitting:U,setTouched:D,setValues:N,setFormikState:W,submitForm:q},Z=zz(function(){return d(j.values,Y)}),K=zz(function(e){e&&e.preventDefault&&Sz(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Sz(e.stopPropagation)&&e.stopPropagation(),O()}),X=(0,We.useCallback)(function(e){return{value:Ez(j.values,e),error:Ez(j.errors,e),touched:!!Ez(j.touched,e),initialValue:Ez(h.current,e),initialTouched:!!Ez(f.current,e),initialError:Ez(m.current,e)}},[j.errors,j.touched,j.values]),Q=(0,We.useCallback)(function(e){return{setValue:function(t,n){return I(e,t,n)},setTouched:function(t,n){return B(e,t,n)},setError:function(t){return L(e,t)}}},[I,B,L]),J=(0,We.useCallback)(function(e){var t=Az(e),n=t?e.name:e,r=Ez(j.values,n),i={name:n,value:r,onChange:$,onBlur:H};if(t){var o=e.type,a=e.value,s=e.as,l=e.multiple;"checkbox"===o?void 0===a?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(a)),i.value=a):"radio"===o?(i.checked=r===a,i.value=a):"select"===s&&l&&(i.value=i.value||[],i.multiple=!0)}return i},[H,$,j.values]),ee=(0,We.useMemo)(function(){return!QB()(h.current,j.values)},[h.current,j.values]),te=(0,We.useMemo)(function(){return"undefined"!==typeof s?ee?j.errors&&0===Object.keys(j.errors).length:!1!==s&&Sz(s)?s(p):s:j.errors&&0===Object.keys(j.errors).length},[s,ee,j.errors,p]);return gz({},j,{initialValues:h.current,initialErrors:m.current,initialTouched:f.current,initialStatus:g.current,handleBlur:H,handleChange:$,handleReset:K,handleSubmit:G,resetForm:O,setErrors:R,setFormikState:W,setFieldTouched:B,setFieldValue:I,setFieldError:L,setStatus:V,setSubmitting:U,setTouched:D,setValues:N,submitForm:q,validateForm:M,validateField:T,isValid:te,dirty:ee,unregisterField:P,registerField:E,getFieldProps:J,getFieldMeta:X,getFieldHelpers:Q,validateOnBlur:i,validateOnChange:n,validateOnMount:a})}function Iz(e){var t=Lz(e),n=e.component,r=e.children,i=e.render,o=e.innerRef;return(0,We.useImperativeHandle)(o,function(){return t}),(0,We.createElement)(jz,{value:t},n?(0,We.createElement)(n,t):i?i(t):r?Sz(r)?r(t):Oz(r)?null:We.Children.only(r):null)}function Fz(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map(function(e){return!0===Array.isArray(e)||ZI(e)?Fz(e):""!==e?e:void 0}):ZI(e[r])?t[r]=Fz(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function $z(e,t,n){var r=e.slice();return t.forEach(function(t,i){if("undefined"===typeof r[i]){var o=!1!==n.clone&&n.isMergeableObject(t);r[i]=o?kI(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=kI(e[i],t,n):-1===e.indexOf(t)&&r.push(t)}),r}var Bz="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?We.useLayoutEffect:We.useEffect;function zz(e){var t=(0,We.useRef)(e);return Bz(function(){t.current=e}),(0,We.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)},[])}function Hz(e){var t=e.validate,n=e.name,r=e.render,i=e.children,o=e.as,a=e.component,s=e.className,l=xz(e,["validate","name","render","children","as","component","className"]),c=xz(_z(),["validate","validationSchema"]);var d=c.registerField,u=c.unregisterField;(0,We.useEffect)(function(){return d(n,{validate:t}),function(){u(n)}},[d,u,n,t]);var p=c.getFieldProps(gz({name:n},l)),h=c.getFieldMeta(n),m={field:p,form:c};if(r)return r(gz({},m,{meta:h}));if(Sz(i))return i(gz({},m,{meta:h}));if(a){if("string"===typeof a){var f=l.innerRef,g=xz(l,["innerRef"]);return(0,We.createElement)(a,gz({ref:f},p,g,{className:s}),i)}return(0,We.createElement)(a,gz({field:p,form:c},l,{className:s}),i)}var v=o||"input";if("string"===typeof v){var x=l.innerRef,y=xz(l,["innerRef"]);return(0,We.createElement)(v,gz({ref:x},p,y,{className:s}),i)}return(0,We.createElement)(v,gz({},p,l,{className:s}),i)}var Wz=(0,We.forwardRef)(function(e,t){var n=e.action,r=xz(e,["action"]),i=null!=n?n:"#",o=_z(),a=o.handleReset,s=o.handleSubmit;return(0,We.createElement)("form",gz({onSubmit:s,ref:t,onReset:a,action:i},r))});function Vz(e){var t=function(t){return(0,We.createElement)(wz,null,function(n){return n||JB(!1),(0,We.createElement)(e,gz({},t,{formik:n}))})},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+n+")",At()(t,e)}Wz.displayName="Form";var Uz=function(e,t,n){var r=qz(e);return r.splice(t,0,n),r},qz=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map(function(e){return parseInt(e)}).reduce(function(e,t){return t>e?t:e},0);return Array.from(gz({},e,{length:t+1}))}return[]},Gz=function(e,t){var n="function"===typeof e?e:t;return function(e){if(Array.isArray(e)||Az(e)){var t=qz(e);return n(t)}return e}},Yz=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,o=i.name;(0,i.formik.setFormikState)(function(n){var i=Gz(r,e),a=Gz(t,e),s=Pz(n.values,o,e(Ez(n.values,o))),l=r?i(Ez(n.errors,o)):void 0,c=t?a(Ez(n.touched,o)):void 0;return Cz(l)&&(l=void 0),Cz(c)&&(c=void 0),gz({},n,{values:s,errors:r?Pz(n.errors,o,l):n.errors,touched:t?Pz(n.touched,o,c):n.touched})})},n.push=function(e){return n.updateArrayField(function(t){return[].concat(qz(t),[KB(e)])},!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField(function(n){return function(e,t,n){var r=qz(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)},!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField(function(n){return function(e,t,n){var r=qz(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)},!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField(function(n){return Uz(n,e,t)},function(t){return Uz(t,e,null)},function(t){return Uz(t,e,null)})},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField(function(n){return function(e,t,n){var r=qz(e);return r[t]=n,r}(n,e,t)},!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField(function(n){var r=n?[e].concat(n):[e];return t=r.length,r},function(e){return e?[null].concat(e):[null]},function(e){return e?[null].concat(e):[null]}),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(yz(n)),n.pop=n.pop.bind(yz(n)),n}vz(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!QB()(Ez(e.formik.values,e.name),Ez(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField(function(n){var r=n?qz(n):[];return t||(t=r[e]),Sz(r.splice)&&r.splice(e,1),Sz(r.every)&&r.every(function(e){return void 0===e})?[]:r},!0,!0),t},n.pop=function(){var e;return this.updateArrayField(function(t){var n=t.slice();return e||(e=n&&n.pop&&n.pop()),n},!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,o=t.name,a=gz({},e,{form:xz(t.formik,["validate","validationSchema"]),name:o});return n?(0,We.createElement)(n,a):r?r(a):i?"function"===typeof i?i(a):Oz(i)?null:We.Children.only(i):null},t}(We.Component);Yz.defaultProps={validateOnChange:!0};var Zz=Vz(Yz),Kz=function(e){function t(){return e.apply(this,arguments)||this}vz(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return Ez(this.props.formik.errors,this.props.name)!==Ez(e.formik.errors,this.props.name)||Ez(this.props.formik.touched,this.props.name)!==Ez(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},n.render=function(){var e=this.props,t=e.component,n=e.formik,r=e.render,i=e.children,o=e.name,a=xz(e,["component","formik","render","children","name"]),s=Ez(n.touched,o),l=Ez(n.errors,o);return s&&l?r?Sz(r)?r(l):null:i?Sz(i)?i(l):null:t?(0,We.createElement)(t,a,l):l:null},t}(We.Component),Xz=Vz(Kz);const Qz=e=>{let{popoverFilter:t,handleOpenFilter:n,handleCloseFilter:r,filterState:o,setFilterState:a,pageDetails:s,fetchListFunction:l,allPrograms:c}=e;const d=Ct(Id),u=null===c||void 0===c?void 0:c.find(e=>(null===e||void 0===e?void 0:e.code)===(null===o||void 0===o?void 0:o.program)),p=Boolean(t);return(0,Gt.jsxs)("div",{children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Vp,{"aria-describedby":"simple-popover",onClick:e=>n(e),sx:{"&:hover":{backgroundColor:"transparent"}},children:(0,Gt.jsx)(Kp,{sx:{"&:hover":{backgroundColor:"transparent"}},children:(0,Gt.jsx)(jc,{})})})}),(0,Gt.jsx)(vm,{id:"simple-popover",open:p,anchorEl:t,onClose:()=>r(),className:"filterPopover",PaperProps:{style:{width:"600px"}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,Gt.jsx)(Iz,{initialValues:{event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""},enableReinitialize:!0,children:()=>(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{sx:{p:2},children:[(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,Gt.jsx)(Eu,{sx:{flex:"0 0 160px"},children:(0,Gt.jsx)(qj,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:we("rpm_UserName")})}),(0,Gt.jsx)(Eu,{sx:{flex:"1"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",variant:"outlined",name:"username",value:o.username,placeholder:we("message:rpm_Username"),onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{username:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_SearchByUsername"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,Gt.jsx)(Eu,{sx:{flex:"0 0 160px"},children:(0,Gt.jsx)(qj,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:we("rpm_EventCode")})}),(0,Gt.jsx)(Eu,{sx:{flex:"1"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",variant:"outlined",name:"event_id",value:o.event_id,placeholder:we("message:rpm_EventCode"),onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{event_id:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_SearchByEventCode"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,Gt.jsx)(Eu,{sx:{flex:"0 0 160px"},children:(0,Gt.jsx)(qj,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:we("rpm_Service")})}),(0,Gt.jsx)(Eu,{sx:{flex:"1"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",variant:"outlined",name:"service_code",value:o.service_code,placeholder:we("message:rpm_ServiceCode"),onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{service_code:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_SearchByService"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,Gt.jsx)(Eu,{sx:{flex:"0 0 160px"},children:(0,Gt.jsx)(qj,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:we("rpm_Duration")})}),(0,Gt.jsxs)(Eu,{sx:{flex:"1"},display:"flex",className:"durationField",children:[(0,Gt.jsxs)(TT,{dateAdapter:jI,children:[(0,Gt.jsx)(Hz,{as:nR,size:"small",name:"start_date",value:o.start_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),maxDate:new Date,onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{start_date:e}))},className:"newForm-from"}),(0,Gt.jsx)(Eu,{})]}),(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",name:"end_date",value:o.end_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:o.start_date?new Date(o.start_date):void 0,maxDate:new Date,onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{end_date:e}))}})})]})]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,Gt.jsx)(Eu,{sx:{flex:"0 0 160px"},children:(0,Gt.jsx)(qj,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:we("rpm_Program")})}),(0,Gt.jsx)(Eu,{sx:{flex:"1"},children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"program",name:"program",options:as(c)?[]:c,isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.id)===(null===t||void 0===t?void 0:t.id),getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{a(e=>(0,i.A)((0,i.A)({},e),{},{program:null===t||void 0===t?void 0:t.code})),"clear"===n&&a(e=>(0,i.A)((0,i.A)({},e),{},{program:"/"}))},value:u||null,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:we("rpm_SelectProgram")+"..."}))})})]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"start",justifyContent:"space-between",sx:{mb:"10px"},children:[(0,Gt.jsx)(Eu,{sx:{flex:"0 0 160px"},children:(0,Gt.jsx)(qj,{htmlFor:"display_name",required:!0,sx:{fontWeight:"500"},children:we("rpm_Description")})}),(0,Gt.jsx)(Eu,{sx:{flex:"1"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",variant:"outlined",name:"service_code",value:o.description,placeholder:we("message:rpm_Description"),onChange:e=>{a(t=>(0,i.A)((0,i.A)({},t),{},{description:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_SearchByDescription"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})]}),(0,Gt.jsx)(Eu,{py:.5,display:"flex",alignItems:"center",justifyContent:"end",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:()=>{s.current_page=1,a({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""}),l({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""}),r()},children:we("rpm_Reset")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(CT,{loading:d,color:"primary",disableElevation:!0,variant:"contained",type:"submit",onClick:()=>{s.current_page=1,l(o),r()},children:we("rpm_ApplyFilters")})})]})})]})})})})]})},Jz=e=>{let{order:t,orderBy:n,setOrder:r,setOrderBy:o,dataParameter:a,onCheck:s,isSelection:l,checkState:c,nodata:d,programHead:u,logHeads:p,initialHeadcells:h,setHeadcells:m,handleSettingModalToggle:f,settingModal:g,logs:v,getAuditLogs:x,pageDetails:y,filterState:b,setFilterState:j,popoverFilter:w,handleOpenFilter:_,handleCloseFilter:C,setDetailsTab:S,detailsTab:A,allPrograms:k}=e;const M=Object.values(b).every(e=>""===e||null===e),[O,T]=We.useState({}),E=Nt(),P=e=>{S(!0),(async e=>{const{data:t}=await E(Pg(e));T(t)})(null===e||void 0===e?void 0:e.event_id)},D=We.useRef(null),R=()=>{const e=D.current.value;e&&window.find(e)};return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:we("rpm_AuditLogs")})})})}),(0,Gt.jsx)(Eu,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsxs)(df,{item:!0,xl:4,sm:9,xs:9,position:"relative",children:[(0,Gt.jsx)(Eu,{pl:1,mb:2,position:"relative",children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Rj,{id:"Search",variant:"outlined",size:"small",inputRef:D,autoComplete:"search",onKeyDown:e=>(e=>{"Enter"===e.key&&R()})(e),placeholder:we("rpm_SearchHere"),startAdornment:(0,Gt.jsx)(H_,{position:"start",children:(0,Gt.jsx)(Kp,{onClick:()=>R(),children:(0,Gt.jsx)(R_.A,{})})})})})})})}),(0,Gt.jsx)(Eu,{position:"absolute",top:"3px",right:0,children:(0,Gt.jsx)(Qz,{popoverFilter:w,handleOpenFilter:_,handleCloseFilter:C,fetchListFunction:x,filterState:b,setFilterState:j,pageDetails:y,allPrograms:k})})]}),(0,Gt.jsx)(df,{item:!0,xl:8,sm:3,xs:3,sx:{ml:"auto"},display:"flex",alignItems:"start",justifyContent:"end",children:(0,Gt.jsx)(Yx,{title:we("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:f,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,Gt.jsxs)(df,{container:!0,spacing:1,m:1,className:"filterResults",children:[Object.entries(b).map((e,t)=>{let[n,r]=e;const o=sa()(r,["ddd MMM DD HH:mm:ss [UTC] YYYY"],!0);if(o.isValid()&&(r=o.format("DD/MM/YYYY")),"program"===n&&null!==r){const e=null===k||void 0===k?void 0:k.find(e=>(null===e||void 0===e?void 0:e.code)===r);r=null===e||void 0===e?void 0:e.display_name}if(!cs(r))return(0,Gt.jsx)(df,{item:!0,lg:2,xs:2,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(qj,{htmlFor:"triggerdBy",sx:{fontWeight:"500",marginBottom:"5px"},children:we("rpm_".concat(n))}),(0,Gt.jsx)($w,{value:r,disabled:!0,InputProps:{endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Kp,{edge:"end",onClick:()=>(e=>{const t=(0,i.A)({},b);t[e]="",j(t),x(t)})(n),children:(0,Gt.jsx)(Bw.A,{})})})}})]})},t)}),!M&&(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",sx:{marginTop:"auto",marginBottom:"6px"},children:(0,Gt.jsx)(Vp,{color:"primary",sx:{fontWeight:"600"},onClick:()=>{y.current_page=1,j({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""}),x({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""})},children:we("rpm_ClearFilters")})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{p:1,children:(0,Gt.jsx)(EM,{order:t,orderBy:n,setOrder:r,setOrderBy:o,data:v,headCells:null===u||void 0===u?void 0:u.filter(e=>h.includes(e.id)),dataParameter:a,selected:c,setSelected:s,isSelection:l,noDataImage:d,fetchList:x,pageDetails:y,skeletonVrows:6,className:"theme_scroll",children:null===v||void 0===v?void 0:v.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0},bgcolor:"".concat((null===e||void 0===e?void 0:e.event_id)===(null===O||void 0===O?void 0:O.event_id)?"grey.100":"")},className:"program-tour-step0",children:[l&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:s,checked:c.includes(e.event_id),name:e.event_id,color:"primary"})}),h.includes("eventCode")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{className:"linkClr",onClick:()=>P(e),children:null===e||void 0===e?void 0:e.event_id})}),h.includes("serviceCode")&&(0,Gt.jsx)(rC,{children:e.service_code||"NA"}),h.includes("triggeredBy")&&(0,Gt.jsxs)(rC,{children:[e.principal||"NA"," "]}),h.includes("patientName")&&(0,Gt.jsx)(rC,{children:!as(null===e||void 0===e?void 0:e.attributes)&&null!==e&&void 0!==e&&e.attributes["Patient Name"]?null===e||void 0===e?void 0:e.attributes["Patient Name"]:"NA"}),h.includes("programName")&&(0,Gt.jsx)(rC,{children:e.program_name||"NA"}),h.includes("timeLog")&&(0,Gt.jsx)(rC,{children:sa()(null===e||void 0===e?void 0:e.event_time).format("DD-MM-YYYY hh:mm:ss a")||"NA"}),h.includes("descriptions")&&(0,Gt.jsx)(rC,{children:e.description||"NA"}),h.includes("action")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Vp,{onClick:()=>P(e),children:(0,Gt.jsx)(Kl,{})})})]},e.event_id))})}),(0,Gt.jsx)(IO,{pageDetails:y,fetchListFunction:x})]})]})}),(0,Gt.jsx)(QO,{order:t,orderBy:n,setOrder:r,setOrderBy:o,dataParameter:a,checkState:c,onCheck:s,isSelection:!1,nodata:d,logHeads:p,open:A,setDetailsTab:S,logDetails:O,setDetailedLog:T}),(0,Gt.jsx)(fO,{open:g,allHeadCells:u,initialHeadcells:h,setHeadcells:m,onClose:f})]})},eH=["content"],tH=()=>{const e=Nt(),t=Ct(Gd),{t:n}=vg(),r=Ct(Nd),[o,a]=(0,We.useState)("desc"),[s,l]=(0,We.useState)("event_time"),[c,d]=(0,We.useState)([]),[u,p]=(0,We.useState)([]),[h,m]=We.useState(!1),[f,g]=We.useState(!1),[v,x]=(0,We.useState)((0,i.A)({},Fc)),y=P_(BA().breakpoints.down("sm")),[b,j]=We.useState(null),[w,_]=We.useState({event_id:"",start_date:null,end_date:null,username:"",service_code:"",program:null,description:""}),[C,S]=We.useState(!1),A=y?["eventCode","serviceCode","action"]:["eventCode","serviceCode","triggeredBy","patientName","programName","timeLog","descriptions","action"],[k,M]=We.useState(as($o.getLogsCell())?A:$o.getLogsCell()),O=function(e){M(e),$o.setLogsCell(e)},T=[{id:"eventCode",label:n("rpm_EventCode"),isSort:!1,sortProperty:"eventCode"},{id:"serviceCode",label:n("rpm_Service"),isSort:!1,sortProperty:"serviceCode"},{id:"triggeredBy",label:n("rpm_TriggeredBy"),isSort:!1,sortProperty:"triggeredBy"},{id:"patientName",label:n("rpm_Patient"),isSort:!1,sortProperty:"patientName"},{id:"programName",label:n("rpm_Program"),isSort:!1,sortProperty:"programName"},{id:"timeLog",label:n("rpm_TimeLog"),isSort:!1,sortProperty:"timeLog"},{id:"descriptions",label:n("rpm_Descriptions"),isSort:!1,sortProperty:"descriptions"},{id:"action",label:n("rpm_Actions"),isSort:!1,sortProperty:"action"}],E=[{id:"timestamp",label:n("rpm_Time"),isSort:!1,sortProperty:"timestamp"},{id:"message",label:n("rpm_Message"),isSort:!1,sortProperty:"message"},{id:"error",label:n("rpm_Error"),isSort:!1,sortProperty:"error"},{id:"attributes",label:n("rpm_Attributes"),isSort:!1,sortProperty:"attributes"}],P=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;const n=(0,i.A)({sort_by:s,sort_order:o},v);let r=[];try{const o=await e(((e,t)=>async n=>{n(na(!0));try{var r;const o="".concat(fa.logs,"/events?&principal=").concat(null===t||void 0===t?void 0:t.username,"&startDate=").concat(null!==t&&void 0!==t&&t.start_date?sa()(t.start_date).startOf("day").valueOf():"","&endDate=").concat(null!==t&&void 0!==t&&t.end_date?sa()(t.end_date).endOf("day").valueOf():"","&eventId=").concat(null===t||void 0===t?void 0:t.event_id,"&service=").concat(null===t||void 0===t?void 0:t.service_code,"&page=").concat(e.current_page||"","&q=").concat(null!==t&&void 0!==t&&t.description?null===t||void 0===t?void 0:t.description:"","&source=").concat(null!==t&&void 0!==t&&t.program?"/RPMCORE/".concat(null===t||void 0===t?void 0:t.program,"/"):"/","&perPage=").concat(e.per_page||"","&sortBy=").concat(e.sort_by||"","&sortOrder=").concat(e.sort_order||""),a=await cu(o,{}),{data:s}=a;let l=[];null===s||void 0===s||null===(r=s.content)||void 0===r||r.forEach(e=>{const t=null===e||void 0===e?void 0:e.source.split("/");l.push({program_code:t.length>=3?t[2]:null})});const c=await n(Eg(l));return(0,i.A)((0,i.A)({},a),{},{allProgramName:c})}catch(o){return o}finally{n(na(!1))}})(n,t)),{data:a,allProgramName:s}=o||{},l=a||{},{content:c}=l,d=Ko(l,eH);null===c||void 0===c||c.forEach((e,t)=>{var n;r.push((0,i.A)((0,i.A)({},e),{},{program_name:as(null===s||void 0===s?void 0:s.data[t])?null:null===s||void 0===s||null===(n=s.data[t])||void 0===n?void 0:n.display_name}))}),p(r),x(e=>(0,i.A)((0,i.A)({},e),{},{last_page:null===d||void 0===d?void 0:d.last_page,current_page:null===d||void 0===d?void 0:d.current_page,from:null===d||void 0===d?void 0:d.from,per_page:null===d||void 0===d?void 0:d.per_page,to:null===d||void 0===d?void 0:d.to,total:null===d||void 0===d?void 0:d.total}))}catch(a){console.log(a)}};return We.useEffect(()=>{O(A)},[y]),We.useEffect(()=>{e(w_({activeMenuItem:"logs",heading:{}}))},[]),We.useEffect(()=>{r&&P()},[r]),(0,Gt.jsx)(Jz,{order:o,orderBy:s,setOrder:a,setOrderBy:l,dataParameter:"event_id",checkState:c,onCheck:e=>{if(Array.isArray(e))return d(e.map(e=>e));const t=e.target.name;c.includes(t)?d(c.filter(e=>e!==t)):d(e=>[...e,t])},isSelection:!1,nodata:D_,programHead:T,logHeads:E,initialHeadcells:k,setHeadcells:O,handleSettingModalToggle:()=>{m(!h)},settingModal:h,logs:u,getAuditLogs:P,pageDetails:v,viewButton:e=>(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Yx,{title:n("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":null===e||void 0===e?void 0:e.event_id,color:"primary",sx:{bgcolor:"primary.theme.50"},onClick:()=>window.open("/rpm/logs/".concat(null===e||void 0===e?void 0:e.event_id),"_blank"),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})})}),filterState:w,setFilterState:_,showFilterColor:C,setShowFilterColor:S,popoverFilter:b,handleOpenFilter:e=>{j(e.currentTarget)},handleCloseFilter:()=>{j(null)},detailsTab:f,setDetailsTab:g,allPrograms:t})};function nH(e){return(0,sr.Ay)("MuiCard",e)}(0,ar.A)("MuiCard",["root"]);const rH=["className","raised"],iH=(0,Un.Ay)(Uu,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),oH=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCard"}),{className:r,raised:i=!1}=n,o=(0,nn.A)(n,rH),a=(0,Ft.A)({},n,{raised:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},nH,t)})(a);return(0,Gt.jsx)(iH,(0,Ft.A)({className:(0,nr.A)(s.root,r),elevation:i?8:void 0,ref:t,ownerState:a},o))}),aH=oH;function sH(e){return(0,sr.Ay)("MuiCardContent",e)}(0,ar.A)("MuiCardContent",["root"]);const lH=["className","component"],cH=(0,Un.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),dH=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCardContent"}),{className:r,component:i="div"}=n,o=(0,nn.A)(n,lH),a=(0,Ft.A)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},sH,t)})(a);return(0,Gt.jsx)(cH,(0,Ft.A)({as:i,className:(0,nr.A)(s.root,r),ownerState:a,ref:t},o))}),uH=dH,pH=(0,dy.A)((0,Gt.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),hH=["slots","slotProps"],mH=(0,Un.Ay)(Dp,{name:"MuiBreadcrumbCollapsed"})(e=>{let{theme:t}=e;return(0,Ft.A)({display:"flex",marginLeft:"calc(".concat(t.spacing(1)," * 0.5)"),marginRight:"calc(".concat(t.spacing(1)," * 0.5)")},"light"===t.palette.mode?{backgroundColor:t.palette.grey[100],color:t.palette.grey[700]}:{backgroundColor:t.palette.grey[700],color:t.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,Ft.A)({},"light"===t.palette.mode?{backgroundColor:t.palette.grey[200]}:{backgroundColor:t.palette.grey[600]}),"&:active":(0,Ft.A)({boxShadow:t.shadows[0]},"light"===t.palette.mode?{backgroundColor:(0,$u.tL)(t.palette.grey[200],.12)}:{backgroundColor:(0,$u.tL)(t.palette.grey[600],.12)})})}),fH=(0,Un.Ay)(pH)({width:24,height:16});const gH=function(e){const{slots:t={},slotProps:n={}}=e,r=(0,nn.A)(e,hH),i=e;return(0,Gt.jsx)("li",{children:(0,Gt.jsx)(mH,(0,Ft.A)({focusRipple:!0},r,{ownerState:i,children:(0,Gt.jsx)(fH,(0,Ft.A)({as:t.CollapsedIcon,ownerState:i},n.collapsedIcon))}))})};function vH(e){return(0,sr.Ay)("MuiBreadcrumbs",e)}const xH=(0,ar.A)("MuiBreadcrumbs",["root","ol","li","separator"]),yH=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],bH=(0,Un.Ay)(Ym,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{["& .".concat(xH.li)]:t.li},t.root]})({}),jH=(0,Un.Ay)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),wH=(0,Un.Ay)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function _H(e,t,n,r){return e.reduce((i,o,a)=>(a<e.length-1?i=i.concat(o,(0,Gt.jsx)(wH,{"aria-hidden":!0,className:t,ownerState:r,children:n},"separator-".concat(a))):i.push(o),i),[])}const CH=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiBreadcrumbs"}),{children:r,className:i,component:o="nav",slots:a={},slotProps:s={},expandText:l="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:d=1,maxItems:u=8,separator:p="/"}=n,h=(0,nn.A)(n,yH),[m,f]=We.useState(!1),g=(0,Ft.A)({},n,{component:o,expanded:m,expandText:l,itemsAfterCollapse:c,itemsBeforeCollapse:d,maxItems:u,separator:p}),v=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},vH,t)})(g),x=ah({elementType:a.CollapsedIcon,externalSlotProps:s.collapsedIcon,ownerState:g}),y=We.useRef(null),b=We.Children.toArray(r).filter(e=>We.isValidElement(e)).map((e,t)=>(0,Gt.jsx)("li",{className:v.li,children:e},"child-".concat(t)));return(0,Gt.jsx)(bH,(0,Ft.A)({ref:t,component:o,color:"text.secondary",className:(0,nr.A)(v.root,i),ownerState:g},h,{children:(0,Gt.jsx)(jH,{className:v.ol,ref:y,ownerState:g,children:_H(m||u&&b.length<=u?b:(e=>d+c>=e.length?e:[...e.slice(0,d),(0,Gt.jsx)(gH,{"aria-label":l,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:x},onClick:()=>{f(!0);const e=y.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-c,e.length)])(b),v.separator,p,g)})}))}),SH=CH;function AH(e){let{labels:t}=e;const n=so();return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",children:[(0,Gt.jsx)(Kp,{size:"small",className:"back-button",onClick:()=>n(-1),sx:{bgcolor:"primary.theme.50",color:"primary.theme.500",marginRight:"16px",border:"1.5px solid #3f51b5",borderRadius:"4px",padding:"3px"},children:(0,Gt.jsx)(C_.A,{sx:{fontSize:"18px"}})}),(null===t||void 0===t?void 0:t.length)>0?(0,Gt.jsx)(SH,{"aria-label":"breadcrumb",className:"breadCrumbsMobile",children:null===t||void 0===t?void 0:t.map((e,n)=>(0,Gt.jsxs)(yf,{component:n===t.length-1?"p":Lo,underline:n===t.length-1?"none":"hover",color:n===t.length-1?"primary":"inherit",to:n===t.length-1?"#":e.url,sx:{display:"flex",alignItems:"center"},children:[(null===e||void 0===e?void 0:e.icon)&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Eu,{component:"span",pr:1,display:"inline-flex",children:null===e||void 0===e?void 0:e.icon})}),e.name]},n))}):(0,Gt.jsx)(ZC,{width:"40%"})]})})}AH.defaultProps={labels:[]};const kH=AH,MH=e=>{var t,n;let{order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,onCheck:l,isSelection:c,checkState:d,nodata:u,logHeads:p,logDetails:h,fetchLogById:m,programHead:f,viewButton:g,setDetailsTab:v,detailsTab:x,detailedLog:y,setDetailedLog:b,viewDetails:j}=e;const w=[{name:we("rpm_AuditLogs"),url:Lc.DOCTOR.LOGS},{name:we("rpm_LogDetails"),url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:w})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Eu,{sx:{mb:2.5},children:[(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Ym,{variant:"h5",component:"h5",children:[we("rpm_LogDetails")," ",(null===h||void 0===h?void 0:h.description)&&"(".concat(h.description,")")]})})}),(0,Gt.jsx)(df,{container:!0,spacing:2,mt:.05,children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsx)(uH,{sx:{p:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:we("rpm_UserPrincipal")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",wordBreak:"break-word",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null===h||void 0===h?void 0:h.principal})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:we("rpm_EventCode")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:null===h||void 0===h?void 0:h.event_id})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:we("rpm_Service")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:null===h||void 0===h?void 0:h.service_code})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:we("rpm_EventTime")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-word"},children:sa()(null===h||void 0===h?void 0:h.event_time).format("DD-MM-YYYY hh:mm:ss a")||"NA"})})]})})]})})})})}),!as(null===h||void 0===h?void 0:h.attributes)&&(0,Gt.jsx)(df,{container:!0,spacing:2,mt:.05,children:(0,Gt.jsxs)(df,{item:!0,xs:!0,children:[(0,Gt.jsx)(Eu,{sx:{px:.5,mb:2},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Event_Information")})}),(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsx)(uH,{sx:{p:2.5},children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsx)(Gt.Fragment,{children:Object.entries(null===h||void 0===h?void 0:h.attributes).map((e,t)=>{let[n,r]=e;const i=sa()(r,["ddd MMM DD HH:mm:ss [UTC] YYYY"],!0);return i.isValid()&&(r=i.format("DD/MM/YYYY")),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,wordBreak:"break-word"},children:n}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:r})})]})},t)})})})})})]})})]}),!as(null===h||void 0===h?void 0:h.logs)&&(0,Gt.jsxs)(Eu,{sx:{mb:2.5},children:[(0,Gt.jsx)(Eu,{sx:{px:.5,mb:2},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Logs")})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:as(null===h||void 0===h?void 0:h.logs)?[]:null===h||void 0===h?void 0:h.logs,headCells:p,dataParameter:s,selected:d,setSelected:l,isSelection:c,noDataImage:u,fetchList:m,pageDetails:{},skeletonVrows:6,className:"theme_scroll",children:null===h||void 0===h||null===(t=h.logs)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsxs)(K_,{selected:d.includes(null===e||void 0===e?void 0:e.id),sx:{"&:last-child td, &:last-child th":{border:0}},children:[c&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:l,checked:d.includes(null===e||void 0===e?void 0:e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,Gt.jsx)(rC,{children:sa()(null===e||void 0===e?void 0:e.timestamp).format("DD-MM-YYYY hh:mm:ss a")||"NA"}),(0,Gt.jsx)(rC,{minWidth:"300px",sx:{whiteSpace:"normal",wordBreak:"break-word"},children:(null===e||void 0===e?void 0:e.message)||"NA"}),(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.error)||"NA"}),(0,Gt.jsx)(rC,{children:as(null===e||void 0===e?void 0:e.attributes)?(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:"NA"}):e.attributes["exception.message"]?(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:e.attributes["exception.message"]}):Object.entries(e.attributes).map((e,t)=>{let[n,r]=e;return(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",children:[n,": ",r]},t)})})]},t))})})]}),!as(null===h||void 0===h?void 0:h.children)&&(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{px:.5,mb:2},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_ChildrenLogs")})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:as(null===h||void 0===h?void 0:h.children)?[]:null===h||void 0===h?void 0:h.children,headCells:f,dataParameter:s,selected:d,setSelected:l,isSelection:c,noDataImage:u,fetchList:m,pageDetails:{},skeletonVrows:6,className:"theme_scroll",children:null===h||void 0===h||null===(n=h.children)||void 0===n?void 0:n.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0},bgcolor:"".concat((null===e||void 0===e?void 0:e.event_id)===(null===y||void 0===y?void 0:y.event_id)?"grey.100":"")},className:"program-tour-step0",children:[c&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:l,checked:d.includes(e.event_id),name:e.event_id,color:"primary"})}),(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{className:"linkClr",onClick:()=>j(e),children:null===e||void 0===e?void 0:e.event_id})}),(0,Gt.jsx)(rC,{children:e.service_code||"NA"}),(0,Gt.jsx)(rC,{children:e.principal||"NA"}),(0,Gt.jsx)(rC,{children:sa()(null===e||void 0===e?void 0:e.event_time).format("DD-MM-YYYY hh:mm:ss a")||"NA"}),(0,Gt.jsx)(rC,{children:e.description||"NA"}),(0,Gt.jsx)(rC,{children:g(e)})]},e.event_id))})})]}),(0,Gt.jsx)(QO,{order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,checkState:d,onCheck:l,isSelection:!1,nodata:u,logHeads:p,open:x,setDetailsTab:v,logDetails:y,setDetailedLog:b})]})})]})},OH=()=>{const e=Nt(),t=Ct(Nd),n=lo(),[r,i]=(0,We.useState)("desc"),[o,a]=(0,We.useState)("event_time"),[s,l]=(0,We.useState)([]),[c,d]=We.useState({}),[u,p]=We.useState(!1),[h,m]=We.useState({}),f=async t=>{const r=t||(null===n||void 0===n?void 0:n.eventId),{data:i}=await e(Pg(r));d(i)},g=[{id:"eventCode",label:we("rpm_EventCode"),isSort:!1,sortProperty:"eventCode"},{id:"serviceCode",label:we("rpm_Service"),isSort:!1,sortProperty:"serviceCode"},{id:"triggeredBy",label:we("rpm_TriggeredBy"),isSort:!1,sortProperty:"triggeredBy"},{id:"timeLog",label:we("rpm_TimeLog"),isSort:!1,sortProperty:"timeLog"},{id:"descriptions",label:we("rpm_Descriptions"),isSort:!1,sortProperty:"descriptions"},{id:"action",label:we("rpm_Actions"),isSort:!1,sortProperty:"action"}],v=e=>{p(!0);const t=null===c||void 0===c?void 0:c.children.find(t=>(null===t||void 0===t?void 0:t.event_id)===(null===e||void 0===e?void 0:e.event_id));m(t)},x=[{id:"timestamp",label:we("rpm_Time"),isSort:!1,sortProperty:"timestamp"},{id:"message",label:we("rpm_Message"),isSort:!1,sortProperty:"message"},{id:"error",label:we("rpm_Error"),isSort:!1,sortProperty:"error"},{id:"attributes",label:we("rpm_Attributes"),isSort:!1,sortProperty:"attributes"}];return We.useEffect(()=>{e(w_({activeMenuItem:"logs",heading:{}}))},[]),We.useEffect(()=>{t&&null!==n&&void 0!==n&&n.eventId&&f()},[t,null===n||void 0===n?void 0:n.eventId]),(0,Gt.jsx)(MH,{order:r,orderBy:o,setOrder:i,setOrderBy:a,dataParameter:"event_id",checkState:s,onCheck:e=>{if(Array.isArray(e))return l(e.map(e=>e));const t=e.target.name;s.includes(t)?l(s.filter(e=>e!==t)):l(e=>[...e,t])},isSelection:!1,nodata:D_,logHeads:x,logDetails:c,fetchLogById:f,viewButton:e=>(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Yx,{title:we("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":null===e||void 0===e?void 0:e.event_id,color:"primary",sx:{bgcolor:"primary.theme.50"},onClick:()=>v(e),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})})}),programHead:g,detailsTab:u,setDetailsTab:p,detailedLog:h,setDetailedLog:m,viewDetails:v})};function TH(e){return(0,sr.Ay)("MuiCardActions",e)}(0,ar.A)("MuiCardActions",["root","spacing"]);const EH=["disableSpacing","className"],PH=(0,Un.Ay)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})}),DH=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCardActions"}),{disableSpacing:r=!1,className:i}=n,o=(0,nn.A)(n,EH),a=(0,Ft.A)({},n,{disableSpacing:r}),s=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,ir.A)(r,TH,t)})(a);return(0,Gt.jsx)(PH,(0,Ft.A)({className:(0,nr.A)(s.root,i),ownerState:a,ref:t},o))}),RH=DH;function NH(e){return(0,sr.Ay)("MuiCardHeader",e)}const LH=(0,ar.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]),IH=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],FH=(0,Un.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,Ft.A)({["& .".concat(LH.title)]:t.title,["& .".concat(LH.subheader)]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),$H=(0,Un.Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),BH=(0,Un.Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),zH=(0,Un.Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),HH=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiCardHeader"}),{action:r,avatar:i,className:o,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:d,titleTypographyProps:u}=n,p=(0,nn.A)(n,IH),h=(0,Ft.A)({},n,{component:a,disableTypography:s}),m=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},NH,t)})(h);let f=d;null==f||f.type===Ym||s||(f=(0,Gt.jsx)(Ym,(0,Ft.A)({variant:i?"body2":"h5",className:m.title,component:"span",display:"block"},u,{children:f})));let g=l;return null==g||g.type===Ym||s||(g=(0,Gt.jsx)(Ym,(0,Ft.A)({variant:i?"body2":"body1",className:m.subheader,color:"text.secondary",component:"span",display:"block"},c,{children:g}))),(0,Gt.jsxs)(FH,(0,Ft.A)({className:(0,nr.A)(m.root,o),as:a,ref:t,ownerState:h},p,{children:[i&&(0,Gt.jsx)($H,{className:m.avatar,ownerState:h,children:i}),(0,Gt.jsxs)(zH,{className:m.content,ownerState:h,children:[f,g]}),r&&(0,Gt.jsx)(BH,{className:m.action,ownerState:h,children:r})]}))}),WH=HH;var VH,UH;try{VH=Map}catch(Nke){}try{UH=Set}catch(Nke){}function qH(e,t,n){if(!e||"object"!==typeof e||"function"===typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(GH);if(VH&&e instanceof VH)return new Map(Array.from(e.entries()));if(UH&&e instanceof UH)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var i in n.push(r),e){var o=t.findIndex(function(t){return t===e[i]});r[i]=o>-1?n[o]:qH(e[i],t,n)}return r}return e}function GH(e){return qH(e,[],[])}const YH=Object.prototype.toString,ZH=Error.prototype.toString,KH=RegExp.prototype.toString,XH="undefined"!==typeof Symbol?Symbol.prototype.toString:()=>"",QH=/^Symbol\((.*)\)(.*)$/;function JH(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?'"'.concat(e,'"'):e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return XH.call(e).replace(QH,"Symbol($1)");const r=YH.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+ZH.call(e)+"]":"RegExp"===r?KH.call(e):null}function eW(e,t){let n=JH(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=JH(this[e],t);return null!==r?r:n},2)}let tW={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:e=>{let{path:t,type:n,value:r,originalValue:i}=e,o=null!=i&&i!==r,a="".concat(t," must be a `").concat(n,"` type, ")+"but the final value was: `".concat(eW(r,!0),"`")+(o?" (cast from the value `".concat(eW(i,!0),"`)."):".");return null===r&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},nW={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},rW={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},iW={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},oW={isValue:"${path} field must be ${value}"},aW={noUnknown:"${path} field has unspecified keys: ${unknown}"},sW={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:tW,string:nW,number:rW,date:iW,object:aW,array:sW,boolean:oW});const lW=e=>e&&e.__isYupSchema__;const cW=class{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"===typeof t)return void(this.fn=t);if(!ka()(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,o="function"===typeof n?n:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.every(e=>e===n)};this.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let a=t.pop(),s=t.pop(),l=o(...t)?r:i;if(l)return"function"===typeof l?l(s):s.concat(l.resolve(a))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!lW(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}};function dW(e){return null==e?[]:[].concat(e)}function uW(){return uW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uW.apply(this,arguments)}let pW=/\$\{\s*(\w+)\s*\}/g;class hW extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=uW({},t,{path:n})),"string"===typeof e?e.replace(pW,(e,n)=>eW(t[n])):"function"===typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],dW(e).forEach(e=>{hW.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?"".concat(this.errors.length," errors occurred"):this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,hW)}}function mW(e,t){let{endEarly:n,tests:r,args:i,value:o,errors:a,sort:s,path:l}=e,c=(e=>{let t=!1;return function(){t||(t=!0,e(...arguments))}})(t),d=r.length;const u=[];if(a=a||[],!d)return a.length?c(new hW(a,o,l)):c(null,o);for(let p=0;p<r.length;p++){(0,r[p])(i,function(e){if(e){if(!hW.isError(e))return c(e,o);if(n)return e.value=o,c(e,o);u.push(e)}if(--d<=0){if(u.length&&(s&&u.sort(s),a.length&&u.push(...a),a=u),a.length)return void c(new hW(a,o,l),o);c(null,o)}})}}var fW=n(91733),gW=n.n(fW),vW=n(54575);const xW="$",yW=".";function bW(e,t){return new jW(e,t)}class jW{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!==typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===xW,this.isValue=this.key[0]===yW,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?xW:this.isValue?yW:"";this.path=this.key.slice(n.length),this.getter=this.path&&(0,vW.getter)(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return"Ref(".concat(this.key,")")}static isRef(e){return e&&e.__isYupRef}}function wW(){return wW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wW.apply(this,arguments)}function _W(e){function t(t,n){let{value:r,path:i="",label:o,options:a,originalValue:s,sync:l}=t,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["value","path","label","options","originalValue","sync"]);const{name:d,test:u,params:p,message:h}=e;let{parent:m,context:f}=a;function g(e){return jW.isRef(e)?e.getValue(r,m,f):e}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=gW()(wW({value:r,originalValue:s,label:o,path:e.path||i},p,e.params),g),n=new hW(hW.formatError(e.message||h,t),r,t.path,e.type||d);return n.params=t,n}let x,y=wW({path:i,parent:m,type:d,createError:v,resolve:g,options:a,originalValue:s},c);if(l){try{var b;if(x=u.call(y,r,y),"function"===typeof(null==(b=x)?void 0:b.then))throw new Error('Validation test of type: "'.concat(y.type,'" returned a Promise during a synchronous validate. ')+"This test will finish after the validate call has returned")}catch(j){return void n(j)}hW.isError(x)?n(x):x?n(null,x):n(v())}else try{Promise.resolve(u.call(y,r,y)).then(e=>{hW.isError(e)?n(e):e?n(null,e):n(v())}).catch(n)}catch(j){n(j)}}return t.OPTIONS=e,t}jW.prototype.__isYupRef=!0;function CW(e,t,n){let r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return t?((0,vW.forEach)(t,(s,l,c)=>{let d=l?(e=>e.substr(0,e.length-1).substr(1))(s):s;if((e=e.resolve({context:a,parent:r,value:n})).innerType){let i=c?parseInt(d,10):0;if(n&&i>=n.length)throw new Error("Yup.reach cannot resolve an array item at index: ".concat(s,", in the path: ").concat(t,". ")+"because there is no value at that index. ");r=n,n=n&&n[i],e=e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error("The schema does not contain the path: ".concat(t,". ")+"(failed at: ".concat(o,' which is a type: "').concat(e._type,'")'));r=n,n=n&&n[d],e=e.fields[d]}i=d,o=l?"["+s+"]":"."+s}),{schema:e,parent:r,parentPath:i}):{parent:r,parentPath:t,schema:e}}class SW{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const t of this.list)e.push(t);for(const[,t]of this.refs)e.push(t.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce((t,n)=>t.concat(jW.isRef(n)?e(n):n),[])}add(e){jW.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){jW.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new SW;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){const n=this.clone();return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function AW(){return AW=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AW.apply(this,arguments)}class kW{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new SW,this._blacklist=new SW,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(tW.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=AW({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=AW({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=GH(AW({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(){if(0===arguments.length)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},arguments.length<=0?void 0:arguments[0]),e}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError("You cannot `concat()` schema's of different types: ".concat(this.type," and ").concat(e.type));let t=this,n=e.clone();const r=AW({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return!(!this.spec.nullable||null!==e)||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}cast(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.resolve(AW({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=eW(e),o=eW(r);throw new TypeError("The value of ".concat(t.path||"field"," could not be cast to a value ")+'that satisfies the schema type: "'.concat(n._type,'". \n\n')+"attempted value: ".concat(i," \n")+(o!==i?"result of cast: ".concat(o):""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,{sync:r,path:i,from:o=[],originalValue:a=e,strict:s=this.spec.strict,abortEarly:l=this.spec.abortEarly}=t,c=e;s||(c=this._cast(c,AW({assert:!1},t)));let d={value:c,path:i,options:t,originalValue:a,schema:this,label:this.spec.label,sync:r,from:o},u=[];this._typeError&&u.push(this._typeError);let p=[];this._whitelistError&&p.push(this._whitelistError),this._blacklistError&&p.push(this._blacklistError),mW({args:d,value:c,path:i,sync:r,tests:u,endEarly:l},e=>{e?n(e,c):mW({tests:this.tests.concat(p),args:d,path:i,sync:r,value:c,endEarly:l},n)})}validate(e,t,n){let r=this.resolve(AW({},t,{value:e}));return"function"===typeof n?r._validate(e,t,n):new Promise((n,i)=>r._validate(e,t,(e,t)=>{e?i(e):n(t)}))}validateSync(e,t){let n;return this.resolve(AW({},t,{value:e}))._validate(e,AW({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(hW.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(n){if(hW.isError(n))return!1;throw n}}_getDefault(){let e=this.spec.default;return null==e?e:"function"===typeof e?e.call(this):GH(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tW.defined;return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tW.required;return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.clone({nullable:!1!==e})}transform(e){let t=this.clone();return t.transforms.push(e),t}test(){let e;if(e=1===arguments.length?"function"===typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]},void 0===e.message&&(e.message=tW.default),"function"!==typeof e.test)throw new TypeError("`test` is a required parameters");let t=this.clone(),n=_W(e),r=e.exclusive||e.name&&!0===t.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(t.exclusiveTests[e.name]=!!e.exclusive),t.tests=t.tests.filter(t=>{if(t.OPTIONS.name===e.name){if(r)return!1;if(t.OPTIONS.test===n.OPTIONS.test)return!1}return!0}),t.tests.push(n),t}when(e,t){Array.isArray(e)||"string"===typeof e||(t=e,e=".");let n=this.clone(),r=dW(e).map(e=>new jW(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new cW(r,t)),n}typeError(e){let t=this.clone();return t._typeError=_W({message:e,name:"typeError",test(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tW.oneOf,n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=_W({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}notOneOf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tW.notOneOf,n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=_W({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}strip(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.clone();return t.spec.strip=e,t}describe(){const e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}kW.prototype.__isYupSchema__=!0;for(const n of["validate","validateSync"])kW.prototype["".concat(n,"At")]=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{parent:i,parentPath:o,schema:a}=CW(this,e,t,r.context);return a[n](i&&i[o],AW({},r,{parent:i,path:e}))};for(const n of["equals","is"])kW.prototype[n]=kW.prototype.oneOf;for(const n of["not","nope"])kW.prototype[n]=kW.prototype.notOneOf;kW.prototype.optional=kW.prototype.notRequired;const MW=kW;function OW(){return new MW}OW.prototype=MW.prototype;const TW=e=>null==e;class EW extends kW{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"===typeof e}isTrue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oW.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>TW(e)||!0===e})}isFalse(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oW.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>TW(e)||!1===e})}}EW.prototype;let PW=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,DW=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,RW=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,NW=e=>TW(e)||e===e.trim(),LW={}.toString();function IW(){return new FW}class FW extends kW{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e))return e;if(Array.isArray(e))return e;const t=null!=e&&e.toString?e.toString():e;return t===LW?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"===typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nW.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return TW(t)||t.length===this.resolve(e)}})}min(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nW.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return TW(t)||t.length>=this.resolve(e)}})}max(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nW.max;return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return TW(t)||t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"===typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||nW.matches,params:{regex:e},test:t=>TW(t)||""===t&&i||-1!==t.search(e)})}email(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nW.email;return this.matches(PW,{name:"email",message:e,excludeEmptyString:!0})}url(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nW.url;return this.matches(DW,{name:"url",message:e,excludeEmptyString:!0})}uuid(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nW.uuid;return this.matches(RW,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nW.trim;return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:NW})}lowercase(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nW.lowercase;return this.transform(e=>TW(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>TW(e)||e===e.toLowerCase()})}uppercase(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nW.uppercase;return this.transform(e=>TW(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>TW(e)||e===e.toUpperCase()})}}IW.prototype=FW.prototype;function $W(){return new BW}class BW extends kW{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(e){let t=e;if("string"===typeof t){if(t=t.replace(/\s/g,""),""===t)return NaN;t=+t}return this.isType(t)?t:parseFloat(t)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),"number"===typeof e&&!(e=>e!=+e)(e)}min(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rW.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return TW(t)||t>=this.resolve(e)}})}max(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rW.max;return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return TW(t)||t<=this.resolve(e)}})}lessThan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rW.lessThan;return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return TW(t)||t<this.resolve(e)}})}moreThan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rW.moreThan;return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test(t){return TW(t)||t>this.resolve(e)}})}positive(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rW.positive;return this.moreThan(0,e)}negative(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rW.negative;return this.lessThan(0,e)}integer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rW.integer;return this.test({name:"integer",message:e,test:e=>TW(e)||Number.isInteger(e)})}truncate(){return this.transform(e=>TW(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>TW(t)?t:Math[e](t))}}$W.prototype=BW.prototype;var zW=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let HW=new Date("");function WW(){return new VW}class VW extends kW{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=zW.exec(e)){for(var o,a=0;o=r[a];++a)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?HW:new Date(e))})})}_typeCheck(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}prepareParam(e,t){let n;if(jW.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError("`".concat(t,"` must be a Date or a value that can be `cast()` to a Date"));n=r}return n}min(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iW.min,n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return TW(e)||e>=this.resolve(n)}})}max(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iW.max,n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return TW(e)||e<=this.resolve(n)}})}}VW.INVALID_DATE=HW,WW.prototype=VW.prototype,WW.INVALID_DATE=HW;var UW=n(19185),qW=n.n(UW),GW=n(41979),YW=n.n(GW),ZW=n(3295),KW=n.n(ZW),XW=n(8704),QW=n.n(XW);function JW(e,t){let n=1/0;return e.some((e,r)=>{var i;if(-1!==(null==(i=t.path)?void 0:i.indexOf(e)))return n=r,!0}),n}function eV(e){return(t,n)=>JW(e,t)-JW(e,n)}function tV(){return tV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tV.apply(this,arguments)}let nV=e=>"[object Object]"===Object.prototype.toString.call(e);const rV=eV([]);class iV extends kW{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=rV,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return nV(e)||"function"===typeof e}_cast(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,o=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),s={},l=tV({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const d of a){let e=i[d],n=ka()(r,d);if(e){let n,i=r[d];l.path=(t.path?"".concat(t.path,"."):"")+d,e=e.resolve({value:i,context:t.context,parent:s});let o="spec"in e?e.spec:void 0,a=null==o?void 0:o.strict;if(null==o?void 0:o.strip){c=c||d in r;continue}n=t.__validating&&a?r[d]:e.cast(r[d],l),void 0!==n&&(s[d]=n)}else n&&!o&&(s[d]=r[d]);s[d]!==r[d]&&(c=!0)}return c?s:r}_validate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=[],{sync:i,from:o=[],originalValue:a=e,abortEarly:s=this.spec.abortEarly,recursive:l=this.spec.recursive}=t;o=[{schema:this,value:a},...o],t.__validating=!0,t.originalValue=a,t.from=o,super._validate(e,t,(e,c)=>{if(e){if(!hW.isError(e)||s)return void n(e,c);r.push(e)}if(!l||!nV(c))return void n(r[0]||null,c);a=a||c;let d=this._nodes.map(e=>(n,r)=>{let i=-1===e.indexOf(".")?(t.path?"".concat(t.path,"."):"")+e:"".concat(t.path||"",'["').concat(e,'"]'),s=this.fields[e];s&&"validate"in s?s.validate(c[e],tV({},t,{path:i,from:o,strict:!0,parent:c,originalValue:a[e]}),r):r(null)});mW({sync:i,tests:d,value:c,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)})}clone(e){const t=super.clone(e);return t.fields=tV({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[r,i]of Object.entries(this.fields)){const e=n[r];void 0===e?n[r]=i:e instanceof kW&&i instanceof kW&&(n[r]=i.concat(e))}return t.withMutation(()=>t.shape(n,this._excludedEdges))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{const n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.clone(),r=Object.assign(n.fields,e);return n.fields=r,n._sortErrors=eV(Object.keys(r)),t.length&&(Array.isArray(t[0])||(t=[t]),n._excludedEdges=[...n._excludedEdges,...t]),n._nodes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=new Set,i=new Set(t.map(e=>{let[t,n]=e;return"".concat(t,"-").concat(n)}));function o(e,t){let o=(0,vW.split)(e)[0];r.add(o),i.has("".concat(t,"-").concat(o))||n.push([t,o])}for(const a in e)if(ka()(e,a)){let t=e[a];r.add(a),jW.isRef(t)&&t.isSibling?o(t.path,a):lW(t)&&"deps"in t&&t.deps.forEach(e=>o(e,a))}return QW().array(Array.from(r),n).reverse()}(r,n._excludedEdges),n}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){const t=this.clone(),n=t.fields;t.fields={};for(const r of e)delete n[r];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=(0,vW.getter)(e,!0);return this.transform(i=>{if(null==i)return i;let o=i;return ka()(i,e)&&(o=tV({},i),n||delete o[e],o[t]=r(i)),o})}noUnknown(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aW.noUnknown;"string"===typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=function(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aW.noUnknown;return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&KW()(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(YW())}snakeCase(){return this.transformKeys(qW())}constantCase(){return this.transformKeys(e=>qW()(e).toUpperCase())}describe(){let e=super.describe();return e.fields=gW()(this.fields,e=>e.describe()),e}}function oV(e){return new iV(e)}function aV(){return aV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aV.apply(this,arguments)}function sV(e){return new lV(e)}oV.prototype=iV.prototype;class lV extends kW{constructor(e){super({type:"array"}),this.innerType=void 0,this.innerType=e,this.withMutation(()=>{this.transform(function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,n)=>{const i=this.innerType.cast(e,aV({},t,{path:"".concat(t.path||"","[").concat(n,"]")}));return i!==e&&(r=!0),i});return r?i:n}_validate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;var r,i;let o=[],a=t.sync,s=t.path,l=this.innerType,c=null!=(r=t.abortEarly)?r:this.spec.abortEarly,d=null!=(i=t.recursive)?i:this.spec.recursive,u=null!=t.originalValue?t.originalValue:e;super._validate(e,t,(e,r)=>{if(e){if(!hW.isError(e)||c)return void n(e,r);o.push(e)}if(!d||!l||!this._typeCheck(r))return void n(o[0]||null,r);u=u||r;let i=new Array(r.length);for(let n=0;n<r.length;n++){let e=r[n],o="".concat(t.path||"","[").concat(n,"]"),a=aV({},t,{path:o,strict:!0,parent:r,index:n,originalValue:u[n]});i[n]=(t,n)=>l.validate(e,a,n)}mW({sync:a,path:s,value:r,errors:o,endEarly:c,tests:i},n)})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!lW(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+eW(e));return t.innerType=e,t}length(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sW.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return TW(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||sW.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return TW(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||sW.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return TW(t)||t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}sV.prototype=lV.prototype;const cV=/^\S*$/,dV=/^[a-zA-Z0-9_ .-]+$/,uV=/^\+?[0-9\s\-().]{4,15}$/,pV=/^\d{3,10}$/,hV=/^[a-zA-Z\d._]+$/,mV=/^\d+$/,fV=e=>{if(!e)return"";let t=e.replace(/<[^>]*>/g,"");return t=t.replace(/&amp;|&lt;|&gt;/g,"1"),t},gV={editAGMUser:oV({first_name:IW().trim("error:rpm_errorSpace").min(2,_e.t("error:rpm_minLength",{length:2})).max(26,_e.t("error:rpm_maxLength",{length:26})).required("error:rpm_required"),last_name:IW().trim("error:errorSpace").min(2,_e.t("error:rpm_minLength",{length:2})).max(26,_e.t("error:rpm_maxLength",{length:26})).required("error:rpm_required"),dob:IW().required("error:rpm_required"),gender:IW().required("error:rpm_required"),mobile:OW().test("mobile","error:rpm_validPhone",e=>!e||uV.test(e)).required("error:rpm_required")}),updatePassword:oV({currentPassword:IW().required("error:rpm_required"),password:IW().min(8,_e.t("error:rpm_minLength",{length:8})).max(20,_e.t("error:rpm_maxLength",{length:20})).test("password","error:rpm_PasswordTestLowerCaseErr",e=>!e||e.toUpperCase()!==e).test("password","error:rpm_PasswordTestUpperCaseErr",e=>!e||e.toLowerCase()!==e).test("password","error:rpm_PasswordTestDigitErr",e=>!e||/\d/.test(e)).test("password","error:rpm_PasswordTestSpecialErr",e=>!e||!/^[A-Za-z0-9 ]+$/.test(e)).required("error:rpm_required"),confirmPassword:IW().oneOf([bW("password"),null],"error:rpm_PasswordConfirmNotMatchErr").required("error:rpm_required")}),resetPassword:oV({new_password:IW().min(8,_e.t("error:rpm_minLength",{length:8})).max(20,_e.t("error:rpm_maxLength",{length:20})).test("new_password","error:rpm_PasswordTestLowerCaseErr",e=>!e||e.toUpperCase()!==e).test("new_password","error:rpm_PasswordTestUpperCaseErr",e=>!e||e.toLowerCase()!==e).test("new_password","error:rpm_PasswordTestDigitErr",e=>!e||/\d/.test(e)).test("new_password","error:rpm_PasswordTestSpecialErr",e=>!e||!/^[A-Za-z0-9 ]+$/.test(e)).required("error:rpm_required"),confirmPassword:IW().oneOf([bW("new_password"),null],"error:rpm_PasswordConfirmNotMatchErr").required("error:rpm_required")}),createCustomRole:oV({role_level:IW(),program:IW().when("role_level",{is:Zc.CLIENT,then:IW(),otherwise:IW().required("error:rpm_required")}),name:IW().trim("error:rpm_errorSpace").max(50,_e.t("error:rpm_maxLength",{length:50})).required("error:rpm_required"),description:IW().max(150,_e.t("error:rpm_maxLength",{length:150}))}),createNewUserSchema:oV({email:IW().required("error:rpm_required").email("error:rpm_validEmail").trim(),first_name:IW().max(32,()=>_e.t("error:rpm_maxLength",{length:32})),username:IW().required("error:rpm_required").max(30,()=>_e.t("error:rpm_maxLength",{length:30})).min(8,()=>_e.t("error:rpm_minLength",{length:8})).test("username","error:rpm_UsernameValidation",e=>!e||hV.test(e)).trim(),last_name:IW().max(32,()=>_e.t("error:rpm_maxLength",{length:32})),mobile:OW().test("mobile","error:rpm_ValidPhone",e=>!e||uV.test(e)).required("error:rpm_required")}),editRoleSchema:oV({name:IW().trim("error:rpm_errorSpace").max(50,_e.t("error:rpm_maxLength",{length:50})).required("error:rpm_required"),description:IW().max(150,_e.t("error:rpm_maxLength",{length:150}))})},vV={addNewProgram:oV({image:OW().test("fileType","The system accepts only .png or .jpg format.",e=>{if(!e)return!0;return["image/jpeg","image/png"].includes(e.type)}).test("fileSize","File size should less than 1 mb.",e=>!e||e.size<=1048576),display_name:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),country:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),state:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),city:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),facility_type:IW().required("error:rpm_required")}),addNewPatient:oV({first_name:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})).test("first_name","error:rpm_specialCharacter",e=>!e||dV.test(e)).trim(),last_name:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_noWhiteSpaceAllowed",e=>!e||cV.test(e)).test("last_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),mobile:OW().test("mobile","error:rpm_ValidPhone",e=>!e||uV.test(e)).required("error:rpm_required"),country_code:$W().required("error:rpm_required"),age:$W().required("error:rpm_required").nullable().min(18,_e.t("error:rpm_AgeError",{length:18})).max(99,_e.t("error:rpm_AgeError",{length:99})),birth_date:IW().required("error:rpm_required").nullable(),country:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),state:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),city:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})).test("last_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),email:IW().email("error:rpm_emailValid").max(65,_e.t("error:rpm_maxLength",{length:65}))}),addRule:oV({data_type:IW().required("error:rpm_required"),processing_mode:IW().required("error:rpm_required"),data_batch_size:$W().when("processing_mode",{is:e=>"BATCH"===e,then:$W().moreThan(1,_e.t("error:rpm_batchSize",{length:21})).lessThan(21,_e.t("error:rpm_batchSize",{length:21})).required("error:rpm_required")}),short_description:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(300,_e.t("error:rpm_maxLength",{length:300})),rule:sV().of(oV({name:IW().required("error:rpm_required"),desc:IW().required("error:rpm_required"),when:oV({cond:sV(oV({value:$W().required("error:rpm_required").min(60,_e.t("error:rpm_minLength",{length:60})).max(200,_e.t("error:rpm_maxLength",{length:200}))}))})}))}),addLevel:oV({role_level:IW().required("error:rpm_required"),program:IW().when("role_level",{is:Zc.CLIENT,then:IW(),otherwise:IW().required("error:rpm_required")})}),addUserInfo:oV({username:IW().required("error:rpm_required"),first_name:IW().required("error:rpm_required"),last_name:IW().required("error:rpm_required"),email:IW().required("error:rpm_required")}),assignLevel:oV({role_level:IW().required("error:rpm_required"),program:IW().when("role_level",{is:Zc.CLIENT,then:IW(),otherwise:IW().required("error:rpm_required")}),role_type:IW().when("role_level",{is:Zc.PROGRAM,then:IW().required("error:rpm_required"),otherwise:IW()}),role:IW().when("role_level",{is:Zc.PROGRAM,then:IW().required("error:rpm_required"),otherwise:IW()})}),userProfileUpdate:oV({first_name:IW().min(2,_e.t("error:rpm_minLength",{length:2})).max(26,_e.t("error:rpm_maxLength",{length:26})).required("error:rpm_required").test("last_name","error:rpm_noWhiteSpaceAllowed",e=>!e||cV.test(e)).test("first_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),last_name:IW().trim("error:errorSpace").min(2,_e.t("error:rpm_minLength",{length:2})).max(26,_e.t("error:rpm_maxLength",{length:26})).required("error:rpm_required").test("last_name","error:rpm_noWhiteSpaceAllowed",e=>!e||cV.test(e)).test("first_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),mobile:OW().test("mobile","error:rpm_ValidPhone",e=>!e||uV.test(e)),professional_bio:IW().max(250,_e.t("error:rpm_maxLength",{length:250})),qualification:IW().max(250,_e.t("error:rpm_maxLength",{length:250})),adr_zipcode:IW().trim("error:rpm_errorSpace").max(10,_e.t("error:rpm_maxLength",{length:10})).min(3,_e.t("error:rpm_minLength",{length:3})).test("mobile","error:rpm_ValidZipCode",e=>!e||pV.test(e))}),personalDetail:oV({first_name:IW().min(2,_e.t("error:rpm_minLength",{length:2})).max(26,_e.t("error:rpm_maxLength",{length:26})).required("error:rpm_required").test("first_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),last_name:IW().trim("error:errorSpace").min(2,_e.t("error:rpm_minLength",{length:2})).max(26,_e.t("error:rpm_maxLength",{length:26})).required("error:rpm_required").test("last_name","error:rpm_noWhiteSpaceAllowed",e=>!e||cV.test(e)).test("first_name","error:rpm_specialCharacter",e=>!e||dV.test(e)),mobile:OW().test("mobile","error:rpm_ValidPhone",e=>!e||uV.test(e)).required("error:rpm_required"),country_code:$W().required("error:rpm_required"),age:$W().required("error:rpm_required").nullable().min(18,_e.t("error:rpm_AgeError",{length:18})).max(99,_e.t("error:rpm_AgeError",{length:99})),adr_address1:IW().max(100,_e.t("error:rpm_maxLength",{length:100})),adr_address2:IW().max(100,_e.t("error:rpm_maxLength",{length:100})),adr_zipcode:IW().trim("error:rpm_errorSpace").max(10,_e.t("error:rpm_maxLength",{length:10})).min(3,_e.t("error:rpm_minLength",{length:3})).test("mobile","error:rpm_ValidZipCode",e=>!e||pV.test(e))}),resolveAlert:oV({description:IW().required("error:rpm_required").min(5,_e.t("error:rpm_minLength",{length:5})).max(500,_e.t("error:rpm_maxLength",{length:500}))}),addNewSchedule:oV({name:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(64,_e.t("error:rpm_maxLength",{length:64})),vital_name:IW().required("error:rpm_required"),duration:$W().moreThan(0,_e.t("error:rpm_durationLength",{length:1})).lessThan(101,_e.t("error:rpm_durationLength",{length:100})).required("error:rpm_required"),max_strikes:IW().when("enable",{is:e=>!!e,then:IW().required("error:rpm_required")}),notification_title:IW().when("enable",{is:e=>!!e,then:IW().required("error:rpm_required").max(128,_e.t("error:rpm_maxLength",{length:128}))}),notification_text:IW().when("enable",{is:e=>!!e,then:IW().required("error:rpm_required").max(512,_e.t("error:rpm_maxLength",{length:512}))}),mandate:sV().when("vital_name",{is:e=>"glucose"===e,then:sV().of(oV({start_time:IW().required("error:rpm_required").nullable(),end_time:IW().required("error:rpm_required").nullable(),activity_name:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(30,_e.t("error:rpm_maxLength",{length:30})).nullable(),activity_type:IW().required("error:rpm_required").nullable()})),otherwise:sV().of(oV({start_time:IW().required("error:rpm_required").nullable(),end_time:IW().required("error:rpm_required").nullable()}))}),reading_reminder_title:IW().when("reading_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required").max(128,_e.t("error:rpm_maxLength",{length:128}))}),reading_reminder_time:IW().when("reading_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required")}),reading_reminder_repetition:IW().when("reading_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required")}),reading_reminder_msg:IW().when("reading_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required").max(512,_e.t("error:rpm_maxLength",{length:512}))}),pre_reminder:IW().when("pre_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required")}),missed_reminder_title:IW().when("missed_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required").max(128,_e.t("error:rpm_maxLength",{length:128}))}),missed_reminder_msg:IW().when("missed_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required").max(512,_e.t("error:rpm_maxLength",{length:512}))})}),addNewMandate:oV({start_time:IW().required("error:rpm_required").nullable(),end_time:IW().required("error:rpm_required").nullable(),reading_reminder_title:IW().when("reading_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required").max(128,_e.t("error:rpm_maxLength",{length:128}))}),reading_reminder_time:IW().when("reading_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required")}),reading_reminder_repetition:IW().when("reading_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required")}),reading_reminder_msg:IW().when("reading_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required").max(512,_e.t("error:rpm_maxLength",{length:512}))}),missed_reminder_title:IW().when("missed_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required").max(128,_e.t("error:rpm_maxLength",{length:128}))}),missed_reminder_msg:IW().when("missed_reminder_enabled",{is:e=>!!e,then:IW().required("error:rpm_required").max(512,_e.t("error:rpm_maxLength",{length:512}))})}),addNewDisease:oV({relationship:IW().required("error:rpm_required"),disease_name:IW().required("error:rpm_required"),remark:IW().max(500,_e.t("error:rpm_maxLength",{length:500})),start_date:IW().nullable().when("duration_unit",{is:e=>"CUSTOM"===e||"PRESENT"===e,then:IW().required("error:rpm_required").nullable().test("start_date",_e.t("error:rpm_dateErr"),(e,t)=>{let n=new Date(e),r=new Date;return!(n.getFullYear()<1900||n.getFullYear()>r.getFullYear())||t.createError({message:_e.t("error:rpm_invalidYear",{length:n.getFullYear()}),path:"start_date"})})}),end_date:IW().nullable().when("duration_unit",{is:e=>"CUSTOM"===e,then:IW().required("error:rpm_required").nullable().test("end_date",_e.t("error:rpm_dateErr"),(e,t)=>{let n=new Date(t.parent.start_date),r=new Date(e),i=new Date;return n.getFullYear()<1900||n.getFullYear()>i.getFullYear()?t.createError({message:_e.t("error:rpm_invalidYear",{length:n.getFullYear()}),path:"start_date"}):n.getFullYear()>r.getFullYear()?t.createError({message:_e.t("error:rpm_minYear",{length:n.getFullYear()}),path:"end_date"}):n.getFullYear()!==r.getFullYear()||t.createError({message:_e.t("error:rpm_equalYear",{length:n.getFullYear()}),path:"end_date"})})}),duration_unit:IW().required(_e.t("error:rpm_required",{field:_e.t("rpm_Duration")})),duration:$W().nullable().transform((e,t)=>""===t?null:e).when("duration_unit",(e,t)=>["PRESENT","CUSTOM"].includes(e)?t.notRequired():t.required(_e.t("error:rpm_required",{field:_e.t("rpm_Duration")})).positive("Duration must be a positive number"))}),editNewDisease:oV({disease_name:IW().required("error:rpm_required").min(2,_e.t("error:rpm_minLength",{length:2})).max(50,_e.t("error:rpm_maxLength",{length:50})),remark:IW().max(500,_e.t("error:rpm_maxLength",{length:500})),duration:IW().test("duration",_e.t("error:rpm_durationErr"),(e,t)=>{switch(t.parent.duration_unit){case"YEAR":return e<=t.parent.relationship!=="SELF"||"YEAR"===t.parent.duration_unit?mV.test(e):t.createError({message:_e.t("error:rpm_durationErrYear",{length:"SELF"!==t.parent.relationship?100:60}),path:"duration"});case"MONTH":return e<=t.parent.relationship!=="SELF"||"MONTH"===t.parent.duration_unit?mV.test(e):t.createError({message:_e.t("error:rpm_durationErrMonth",{length:"SELF"!==t.parent.relationship?1200:720}),path:"duration"});case"DAY":return e<=t.parent.relationship!=="SELF"||"DAY"===t.parent.duration_unit?mV.test(e):t.createError({message:_e.t("error:rpm_durationErrDay",{length:"SELF"!==t.parent.relationship?36500:21900}),path:"duration"});default:return!0}})}),addPrescriptionNote:oV({vital:IW().required("error:rpm_required"),medicationList:sV(oV({medicine:oV().nullable().required("error:rpm_required").shape({medicine:IW().required("error:rpm_required")}),frequency:IW().required("error:rpm_required"),dose:$W().integer("error:decimalValue").typeError("error:validWholeNumber").min(1,_e.t("error:rpm_minLengthNumber",{length:1})).max(999,_e.t("error:rpm_maxLengthNumber",{length:999})).nullable(),days:$W().required("error:rpm_required").typeError("error:validWholeNumber").min(1,_e.t("error:rpm_minLengthNumber",{length:1})).max(999,_e.t("error:rpm_maxLengthNumber",{length:999})).nullable(),comments:IW().max(100,_e.t("error:rpm_maxLength",{length:100})),start_date:IW().required("error:rpm_required"),end_date:IW().required("error:rpm_required"),image:OW().test("fileType","The system accepts only .png or .jpg format.",e=>{if(!e)return!0;return["image/jpeg","image/png"].includes(e.type)}).test("fileSize","File size should less than 1 mb.",e=>!e||e.size<=1048576),timing:sV().of(oV().shape({start_time:IW().nullable(),interval:IW().nullable()})).test("timing","error:rpm_sameTimingError",e=>e.every((t,n)=>!!cs(t.start_time)||e.findLastIndex(e=>e.start_time===t.start_time)===n)).test("timing","error:rpm_timingError",e=>e.every(e=>null===(null===e||void 0===e?void 0:e.start_time))||e.every(e=>null!==(null===e||void 0===e?void 0:e.start_time))).test("interval","error:rpm_bothFields",(e,t)=>t.parent.repetition_kind!==qc||!!(cs(e[0].start_time)&&cs(e[0].interval)||!cs(e[0].start_time)&&!cs(e[0].interval)))}))}),noteSchema:oV({vital:IW().required("error:rpm_required"),description:IW().required("error:rpm_required").test("description",_e.t("error:rpm_minLength",{length:5}),e=>fV(e).length>=5).test("description",_e.t("error:rpm_maxLength",{length:500}),e=>fV(e).length<=500)}),summaryNoteSchema:oV({vital:IW().required("error:rpm_required"),description:IW().required("error:rpm_required").test("description",_e.t("error:rpm_minLength",{length:5}),e=>fV(e).length>=5).test("description",_e.t("error:rpm_maxLength",{length:4e3}),e=>fV(e).length<=4e3)}),addGoal:oV({goal_name:IW().required("error:rpm_required"),category:OW().required("error:rpm_required"),priority:IW()}),addExercise:oV({name:IW().required("error:rpm_required"),category:IW().required("error:rpm_required"),primary_muscle:OW().required("error:rpm_required"),movement_pattern:IW().required("error:rpm_required"),instructions:OW().required("error:rpm_required"),equipment:OW().required("error:rpm_required"),level:OW().required("error:rpm_required"),exercise_type:OW().required("error:rpm_required")})},xV={role_level:null===Zc||void 0===Zc?void 0:Zc.PROGRAM,program:"",name:"",description:""};const yV=function(e){let{allPrograms:t,addNewRole:n}=e;const{t:r}=vg(),o=so(),a=[{name:r("rpm_Roles"),url:Lc.DOCTOR.ROLES},{name:r("rpm_AddRole"),url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:a})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Iz,{initialValues:xV,validationSchema:gV.createCustomRole,onSubmit:n,enableReinitialize:!0,children:e=>{let{values:n,setFieldValue:a}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:r("rpm_AddNewCustomRole")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{sx:{py:4,":last-child":{pb:4}},children:(0,Gt.jsx)(df,{container:!0,spacing:4,children:(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:6,children:[(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:r("rpm_RoleLevelText")}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"role_level",name:"role_level",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:r("message:rpm_RoleLevelTextHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:(0,Gt.jsx)($m,{value:Zc.PROGRAM,children:r("rpm_".concat(Zc.PROGRAM))})})})]})}),n.role_level===Zc.PROGRAM&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[r("rpm_SelectProgram"),(0,Gt.jsx)(Eu,{component:"span",children:"*"}),(0,Gt.jsx)(Yx,{title:r("message:rpm_ProgramHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{component:Gb,fullWidth:!0,size:"small",id:"program",name:"program",variant:"outlined",options:t||[],isOptionEqualToValue:(e,t)=>e.display_name===t.display_name,getOptionLabel:e=>e.display_name,renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),t.display_name),onChange:(e,t)=>{a("program",null!==t&&void 0!==t&&t.code?"RPMCORE/".concat(null===t||void 0===t?void 0:t.code):"")},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e))}),(0,Gt.jsx)(Xz,{name:"program",children:e=>(0,Gt.jsx)(iw,{error:!0,children:r(e,{field:r("rpm_SelectProgram")})})})]})]})})}),(n.role_level===Zc.CLIENT||n.role_level===Zc.PROGRAM)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[r("rpm_RoleName"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"name",name:"name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:r("message:rpm_RoleNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:r(e,{field:r("rpm_RoleName")})})})]})]})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:r("rpm_Description")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"description",name:"description",variant:"outlined",multiline:!0,rows:4,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:r("message:rpm_RoleDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:r(e,{field:r("rpm_Description")})})}),(0,Gt.jsx)(RH,{sx:{mt:4,p:0},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>o(-1),children:"Cancel"})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",disabled:!n.name||n.name===Zc.PROGRAM&&!n.program,children:"Save"})})]})})]})]})})]})]})})})]})})})}},"addRole_formik")})})]})};const bV=function(){const e=Nt(),t=so(),n=Ct(Gd);return(0,Gt.jsx)(yV,{addNewRole:async(n,r)=>{let{setErrors:o}=r;const a=(0,i.A)({},n);try{await e((e=>async t=>{t(na(!0));const n={name:e.name,description:e.description,path:e.program?"/".concat(e.program,"/"):"/"};try{const e="".concat(ma.ROLES);return await du(e,n)}finally{t(na(!1))}})(a)),e(Zo({subTitle:"message:rpm_RoleCreatedSuccessfully",severity:Bc})),t(-1)}catch(s){const t=ls(s,"response.data.field_errors",{}),n=ls(s,"response.data.code","");as(t)?as(n)?e(Zo({subTitle:"error:rpm_AddNewRoleFailed",severity:$c})):e(Zo({subTitle:bd(n,"error:rpm_AddNewRoleFailed"),severity:$c})):o(yd(t))}},allPrograms:n})};function jV(e){return(0,sr.Ay)("MuiTab",e)}const wV=(0,ar.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),_V=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],CV=(0,Un.Ay)(Dp,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor".concat((0,Fu.A)(n.textColor))],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{["& .".concat(wV.iconWrapper)]:t.iconWrapper}]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},n.label&&{flexDirection:"top"===n.iconPosition||"bottom"===n.iconPosition?"column":"row"},{lineHeight:1.25},n.icon&&n.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > .".concat(wV.iconWrapper)]:(0,Ft.A)({},"top"===n.iconPosition&&{marginBottom:6},"bottom"===n.iconPosition&&{marginTop:6},"start"===n.iconPosition&&{marginRight:t.spacing(1)},"end"===n.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===n.textColor&&{color:"inherit",opacity:.6,["&.".concat(wV.selected)]:{opacity:1},["&.".concat(wV.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(wV.selected)]:{color:(t.vars||t).palette.primary.main},["&.".concat(wV.disabled)]:{color:(t.vars||t).palette.text.disabled}},"secondary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(wV.selected)]:{color:(t.vars||t).palette.secondary.main},["&.".concat(wV.disabled)]:{color:(t.vars||t).palette.text.disabled}},n.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},n.wrapped&&{fontSize:t.typography.pxToRem(12)})}),SV=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTab"}),{className:r,disabled:i=!1,disableFocusRipple:o=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:c,label:d,onChange:u,onClick:p,onFocus:h,selected:m,selectionFollowsFocus:f,textColor:g="inherit",value:v,wrapped:x=!1}=n,y=(0,nn.A)(n,_V),b=(0,Ft.A)({},n,{disabled:i,disableFocusRipple:o,selected:m,icon:!!s,iconPosition:l,label:!!d,fullWidth:a,textColor:g,wrapped:x}),j=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:l}=e,c={root:["root",o&&a&&"labelIcon","textColor".concat((0,Fu.A)(n)),r&&"fullWidth",i&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return(0,ir.A)(c,jV,t)})(b),w=s&&d&&We.isValidElement(s)?We.cloneElement(s,{className:(0,nr.A)(j.iconWrapper,s.props.className)}):s;return(0,Gt.jsxs)(CV,(0,Ft.A)({focusRipple:!o,className:(0,nr.A)(j.root,r),ref:t,role:"tab","aria-selected":m,disabled:i,onClick:e=>{!m&&u&&u(e,v),p&&p(e)},onFocus:e=>{f&&!m&&u&&u(e,v),h&&h(e)},ownerState:b,tabIndex:m?0:-1},y,{children:["top"===l||"start"===l?(0,Gt.jsxs)(We.Fragment,{children:[w,d]}):(0,Gt.jsxs)(We.Fragment,{children:[d,w]}),c]}))}),AV=SV;let kV;function MV(){if(kV)return kV;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),kV="reverse",e.scrollLeft>0?kV="default":(e.scrollLeft=1,0===e.scrollLeft&&(kV="negative")),document.body.removeChild(e),kV}function OV(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(MV()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function TV(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const EV=["onChange"],PV={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};const DV=(0,dy.A)((0,Gt.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),RV=(0,dy.A)((0,Gt.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function NV(e){return(0,sr.Ay)("MuiTabScrollButton",e)}const LV=(0,ar.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),IV=["className","slots","slotProps","direction","orientation","disabled"],FV=(0,Un.Ay)(Dp,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({width:40,flexShrink:0,opacity:.8,["&.".concat(LV.disabled)]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})}),$V=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:s={},direction:l}=i,c=(0,nn.A)(i,IV),d=dn(),u=(0,Ft.A)({isRtl:d},i),p=(e=>{const{classes:t,orientation:n,disabled:r}=e,i={root:["root",n,r&&"disabled"]};return(0,ir.A)(i,NV,t)})(u),h=null!=(n=a.StartScrollButtonIcon)?n:DV,m=null!=(r=a.EndScrollButtonIcon)?r:RV,f=ah({elementType:h,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u}),g=ah({elementType:m,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u});return(0,Gt.jsx)(FV,(0,Ft.A)({component:"div",className:(0,nr.A)(p.root,o),ref:t,role:null,ownerState:u,tabIndex:null},c,{children:"left"===l?(0,Gt.jsx)(h,(0,Ft.A)({},f)):(0,Gt.jsx)(m,(0,Ft.A)({},g))}))}),BV=$V;function zV(e){return(0,sr.Ay)("MuiTabs",e)}const HV=(0,ar.A)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),WV=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],VV=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,UV=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,qV=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},GV=(0,Un.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(HV.scrollButtons)]:t.scrollButtons},{["& .".concat(HV.scrollButtons)]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{["& .".concat(HV.scrollButtons)]:{[n.breakpoints.down("sm")]:{display:"none"}}})}),YV=(0,Un.Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})}),ZV=(0,Un.Ay)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})}),KV=(0,Un.Ay)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})}),XV=(0,Un.Ay)(function(e){const{onChange:t}=e,n=(0,nn.A)(e,EV),r=We.useRef(),i=We.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return(0,gh.A)(()=>{const e=(0,Nn.A)(()=>{const e=r.current;o(),e!==r.current&&t(r.current)}),n=(0,Bn.A)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),We.useEffect(()=>{o(),t(r.current)},[t]),(0,Gt.jsx)("div",(0,Ft.A)({style:PV},n,{ref:i}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),QV={};const JV=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiTabs"}),r=In(),i=dn(),{"aria-label":o,"aria-labelledby":a,action:s,centered:l=!1,children:c,className:d,component:u="div",allowScrollButtonsMobile:p=!1,indicatorColor:h="primary",onChange:m,orientation:f="horizontal",ScrollButtonComponent:g=BV,scrollButtons:v="auto",selectionFollowsFocus:x,slots:y={},slotProps:b={},TabIndicatorProps:j={},TabScrollButtonProps:w={},textColor:_="primary",value:C,variant:S="standard",visibleScrollbar:A=!1}=n,k=(0,nn.A)(n,WV),M="scrollable"===S,O="vertical"===f,T=O?"scrollTop":"scrollLeft",E=O?"top":"left",P=O?"bottom":"right",D=O?"clientHeight":"clientWidth",R=O?"height":"width",N=(0,Ft.A)({},n,{component:u,allowScrollButtonsMobile:p,indicatorColor:h,orientation:f,vertical:O,scrollButtons:v,textColor:_,variant:S,visibleScrollbar:A,fixed:!M,hideScrollbar:M&&!A,scrollableX:M&&!O,scrollableY:M&&O,centered:l&&!M,scrollButtonsHideMobile:!p}),L=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:l}=e,c={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,ir.A)(c,zV,l)})(N),I=ah({elementType:y.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:N}),F=ah({elementType:y.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:N});const[$,B]=We.useState(!1),[z,H]=We.useState(QV),[W,V]=We.useState(!1),[U,q]=We.useState(!1),[G,Y]=We.useState(!1),[Z,K]=We.useState({overflow:"hidden",scrollbarWidth:0}),X=new Map,Q=We.useRef(null),J=We.useRef(null),ee=()=>{const e=Q.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:OV(e,i?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==C){const e=J.current.children;if(e.length>0){const t=e[X.get(C)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},te=(0,ep.A)(()=>{const{tabsMeta:e,tabMeta:t}=ee();let n,r=0;if(O)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=i?"right":"left",t&&e){const o=i?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(i?-1:1)*(t[n]-e[n]+o)}const o={[n]:r,[R]:t?t[R]:0};if(isNaN(z[n])||isNaN(z[R]))H(o);else{const e=Math.abs(z[n]-o[n]),t=Math.abs(z[R]-o[R]);(e>=1||t>=1)&&H(o)}}),ne=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const{ease:o=TV,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const d=()=>{c=!0},u=r=>{if(c)return void i(new Error("Animation cancelled"));null===s&&(s=r);const d=Math.min(1,(r-s)/a);t[e]=o(d)*(n-l)+l,d>=1?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(u)};l===n?i(new Error("Element already at target position")):requestAnimationFrame(u)}(T,Q.current,e,{duration:r.transitions.duration.standard}):Q.current[T]=e},re=e=>{let t=Q.current[T];O?t+=e:(t+=e*(i?-1:1),t*=i&&"reverse"===MV()?-1:1),ne(t)},ie=()=>{const e=Q.current[D];let t=0;const n=Array.from(J.current.children);for(let r=0;r<n.length;r+=1){const i=n[r];if(t+i[D]>e){0===r&&(t=e);break}t+=i[D]}return t},oe=()=>{re(-1*ie())},ae=()=>{re(ie())},se=We.useCallback(e=>{K({overflow:null,scrollbarWidth:e})},[]),le=(0,ep.A)(e=>{const{tabsMeta:t,tabMeta:n}=ee();if(n&&t)if(n[E]<t[E]){const r=t[T]+(n[E]-t[E]);ne(r,{animation:e})}else if(n[P]>t[P]){const r=t[T]+(n[P]-t[P]);ne(r,{animation:e})}}),ce=(0,ep.A)(()=>{M&&!1!==v&&Y(!G)});We.useEffect(()=>{const e=(0,Nn.A)(()=>{Q.current&&te()});let t;const n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{var n;null==(n=t)||n.unobserve(e)}),e.addedNodes.forEach(e=>{var n;null==(n=t)||n.observe(e)})}),e(),ce()},r=(0,Bn.A)(Q.current);let i;return r.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(J.current.children).forEach(e=>{t.observe(e)})),"undefined"!==typeof MutationObserver&&(i=new MutationObserver(n),i.observe(J.current,{childList:!0})),()=>{var n,o;e.clear(),r.removeEventListener("resize",e),null==(n=i)||n.disconnect(),null==(o=t)||o.disconnect()}},[te,ce]),We.useEffect(()=>{const e=Array.from(J.current.children),t=e.length;if("undefined"!==typeof IntersectionObserver&&t>0&&M&&!1!==v){const n=e[0],r=e[t-1],i={root:Q.current,threshold:.99},o=new IntersectionObserver(e=>{V(!e[0].isIntersecting)},i);o.observe(n);const a=new IntersectionObserver(e=>{q(!e[0].isIntersecting)},i);return a.observe(r),()=>{o.disconnect(),a.disconnect()}}},[M,v,G,null==c?void 0:c.length]),We.useEffect(()=>{B(!0)},[]),We.useEffect(()=>{te()}),We.useEffect(()=>{le(QV!==z)},[le,z]),We.useImperativeHandle(s,()=>({updateIndicator:te,updateScrollButtons:ce}),[te,ce]);const de=(0,Gt.jsx)(KV,(0,Ft.A)({},j,{className:(0,nr.A)(L.indicator,j.className),ownerState:N,style:(0,Ft.A)({},z,j.style)}));let ue=0;const pe=We.Children.map(c,e=>{if(!We.isValidElement(e))return null;const t=void 0===e.props.value?ue:e.props.value;X.set(t,ue);const n=t===C;return ue+=1,We.cloneElement(e,(0,Ft.A)({fullWidth:"fullWidth"===S,indicator:n&&!$&&de,selected:n,selectionFollowsFocus:x,onChange:m,textColor:_,value:t},1!==ue||!1!==C||e.props.tabIndex?{}:{tabIndex:0}))}),he=(()=>{const e={};e.scrollbarSizeListener=M?(0,Gt.jsx)(XV,{onChange:se,className:(0,nr.A)(L.scrollableX,L.hideScrollbar)}):null;const t=M&&("auto"===v&&(W||U)||!0===v);return e.scrollButtonStart=t?(0,Gt.jsx)(g,(0,Ft.A)({slots:{StartScrollButtonIcon:y.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:I},orientation:f,direction:i?"right":"left",onClick:oe,disabled:!W},w,{className:(0,nr.A)(L.scrollButtons,w.className)})):null,e.scrollButtonEnd=t?(0,Gt.jsx)(g,(0,Ft.A)({slots:{EndScrollButtonIcon:y.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:F},orientation:f,direction:i?"left":"right",onClick:ae,disabled:!U},w,{className:(0,nr.A)(L.scrollButtons,w.className)})):null,e})();return(0,Gt.jsxs)(GV,(0,Ft.A)({className:(0,nr.A)(L.root,d),ownerState:N,ref:t,as:u},k,{children:[he.scrollButtonStart,he.scrollbarSizeListener,(0,Gt.jsxs)(YV,{className:L.scroller,ownerState:N,style:{overflow:Z.overflow,[O?"margin".concat(i?"Left":"Right"):"marginBottom"]:A?void 0:-Z.scrollbarWidth},ref:Q,children:[(0,Gt.jsx)(ZV,{"aria-label":o,"aria-labelledby":a,"aria-orientation":"vertical"===f?"vertical":null,className:L.flexContainer,ownerState:N,onKeyDown:e=>{const t=J.current,n=(0,sh.A)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===f?"ArrowLeft":"ArrowUp",o="horizontal"===f?"ArrowRight":"ArrowDown";switch("horizontal"===f&&i&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),qV(t,n,UV);break;case o:e.preventDefault(),qV(t,n,VV);break;case"Home":e.preventDefault(),qV(t,null,VV);break;case"End":e.preventDefault(),qV(t,null,UV)}},ref:J,role:"tablist",children:pe}),$&&de]}),he.scrollButtonEnd]}))}),eU=JV;var tU=n(51937);const nU=We.createContext({});function rU(e){return(0,sr.Ay)("MuiAccordion",e)}const iU=(0,ar.A)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),oU=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],aU=(0,Un.Ay)(Uu,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(iU.region)]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],n),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],n)},"&:first-of-type":{"&::before":{display:"none"}},["&.".concat(iU.expanded)]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},["&.".concat(iU.disabled)]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}},e=>{let{theme:t}=e;return{variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{["&.".concat(iU.expanded)]:{margin:"16px 0"}}}]}}),sU=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAccordion"}),{children:r,className:i,defaultExpanded:o=!1,disabled:a=!1,disableGutters:s=!1,expanded:l,onChange:c,square:d=!1,slots:u={},slotProps:p={},TransitionComponent:h,TransitionProps:m}=n,f=(0,nn.A)(n,oU),[g,v]=(0,Nx.A)({controlled:l,default:o,name:"Accordion",state:"expanded"}),x=We.useCallback(e=>{v(!g),c&&c(e,!g)},[g,c,v]),[y,...b]=We.Children.toArray(r),j=We.useMemo(()=>({expanded:g,disabled:a,disableGutters:s,toggle:x}),[g,a,s,x]),w=(0,Ft.A)({},n,{square:d,disabled:a,disableGutters:s,expanded:g}),_=(e=>{const{classes:t,square:n,expanded:r,disabled:i,disableGutters:o}=e,a={root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!o&&"gutters"],region:["region"]};return(0,ir.A)(a,rU,t)})(w),C=(0,Ft.A)({transition:h},u),S=(0,Ft.A)({transition:m},p),[A,k]=gy("transition",{elementType:mr,externalForwardedProps:{slots:C,slotProps:S},ownerState:w});return(0,Gt.jsxs)(aU,(0,Ft.A)({className:(0,nr.A)(_.root,i),ref:t,ownerState:w,square:d},f,{children:[(0,Gt.jsx)(nU.Provider,{value:j,children:y}),(0,Gt.jsx)(A,(0,Ft.A)({in:g,timeout:"auto"},k,{children:(0,Gt.jsx)("div",{"aria-labelledby":y.props.id,id:y.props["aria-controls"],role:"region",className:_.region,children:b})}))]}))}),lU=sU;function cU(e){return(0,sr.Ay)("MuiAccordionDetails",e)}(0,ar.A)("MuiAccordionDetails",["root"]);const dU=["className"],uU=(0,Un.Ay)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{padding:t.spacing(1,2,2)}}),pU=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAccordionDetails"}),{className:r}=n,i=(0,nn.A)(n,dU),o=n,a=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},cU,t)})(o);return(0,Gt.jsx)(uU,(0,Ft.A)({className:(0,nr.A)(a.root,r),ref:t,ownerState:o},i))}),hU=pU;function mU(e){return(0,sr.Ay)("MuiAccordionSummary",e)}const fU=(0,ar.A)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),gU=["children","className","expandIcon","focusVisibleClassName","onClick"],vU=(0,Un.Ay)(Dp,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],n),["&.".concat(fU.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(fU.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["&:hover:not(.".concat(fU.disabled,")")]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{["&.".concat(fU.expanded)]:{minHeight:64}}}]}}),xU=(0,Un.Ay)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(e=>{let{theme:t}=e;return{display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),["&.".concat(fU.expanded)]:{margin:"20px 0"}}}]}}),yU=(0,Un.Ay)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(e=>{let{theme:t}=e;return{display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),["&.".concat(fU.expanded)]:{transform:"rotate(180deg)"}}}),bU=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAccordionSummary"}),{children:r,className:i,expandIcon:o,focusVisibleClassName:a,onClick:s}=n,l=(0,nn.A)(n,gU),{disabled:c=!1,disableGutters:d,expanded:u,toggle:p}=We.useContext(nU),h=(0,Ft.A)({},n,{expanded:u,disabled:c,disableGutters:d}),m=(e=>{const{classes:t,expanded:n,disabled:r,disableGutters:i}=e,o={root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,ir.A)(o,mU,t)})(h);return(0,Gt.jsxs)(vU,(0,Ft.A)({focusRipple:!1,disableRipple:!0,disabled:c,component:"div","aria-expanded":u,className:(0,nr.A)(m.root,i),focusVisibleClassName:(0,nr.A)(m.focusVisible,a),onClick:e=>{p&&p(e),s&&s(e)},ref:t,ownerState:h},l,{children:[(0,Gt.jsx)(xU,{className:m.content,ownerState:h,children:r}),o&&(0,Gt.jsx)(yU,{className:m.expandIconWrapper,ownerState:h,children:o})]}))}),jU=bU,wU=(0,Un.Ay)(e=>(0,Gt.jsx)(lU,(0,i.A)({disableGutters:!0,elevation:0,square:!0},e)))(e=>{let{theme:t}=e;return{border:"1px solid ".concat(t.palette.divider),borderRadius:t.shape.borderRadius,"&:not(:last-child)":{marginBottom:t.spacing(2)},"&:before":{display:"none"}}}),_U=(0,Un.Ay)(e=>(0,Gt.jsx)(jU,(0,i.A)({expandIcon:(0,Gt.jsx)(tU.A,{sx:{fontSize:"0.9rem"}})},e)))(e=>{let{theme:t}=e;return{backgroundColor:"dark"===t.palette.mode?"rgba(255, 255, 255, .05)":"rgba(0, 0, 0, .03)",flexDirection:"row-reverse","& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(90deg)"},"& .MuiAccordionSummary-content":{marginLeft:t.spacing(1)}}}),CU=(0,Un.Ay)(hU)(e=>{let{theme:t}=e;return{padding:t.spacing(2),borderTop:"1px solid rgba(0, 0, 0, .125)"}}),SU=["children","value","index"];function AU(e){const{children:t,value:n,index:r}=e,o=Ko(e,SU);return(0,Gt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function kU(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}const MU=function(e){let{role:t,actions:n,checkState:r,onCheckPermissions:o,updatePoliciesOnRole:a,handleSelectAllClick:s}=e;const{t:l}=vg(),c=so(),[d,u]=We.useState(0),[p,h]=We.useState([]),m=e=>{var t,n;return(null===e||void 0===e||null===(t=e.tag)||void 0===t||null===(n=t.actions)||void 0===n?void 0:n.map(t=>"".concat(e.group,"/").concat(t.name))).every(e=>r.includes(e))},f=[{name:l("rpm_Roles"),url:Lc.DOCTOR.ROLES},{name:l("rpm_EditRole"),url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:f})}),(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",children:[l("rpm_EditRole"),(0,Gt.jsxs)(Eu,{component:"span",fontSize:"body1.fontSize",children:[" ",as(t)?(0,Gt.jsx)(ZC,{variant:"text",width:120,sx:{display:"inline-block"}}):"(".concat(null===t||void 0===t?void 0:t.name,")")]})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>c(-1),children:l("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:a,children:l("rpm_Save")})})]})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsx)(uH,{sx:{p:0,":last-child":{pb:0}},children:(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{sx:{borderBottom:1,borderColor:"divider"},children:(0,Gt.jsxs)(eU,{value:d,onChange:(e,t)=>{u(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,Gt.jsx)(AV,(0,i.A)({label:l("rpm_Permissions")},kU(0))),(0,Gt.jsx)(AV,(0,i.A)({label:l("rpm_Details")},kU(1)))]})}),(0,Gt.jsx)(AU,{value:d,index:0,children:(0,Gt.jsx)(Eu,{px:2,py:4,children:as(n)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):null===n||void 0===n?void 0:n.map(e=>{var t;return(0,Gt.jsxs)(Eu,{sx:{":not(:first-of-type)":{mt:3}},className:"permission-list",children:[(0,Gt.jsx)(Ym,{component:"h6",variant:"h6",fontSize:"body1.fontSize",color:"primary",children:e.group}),(0,Gt.jsx)(Eu,{my:2,children:(0,Gt.jsx)(Af,{})}),null===e||void 0===e||null===(t=e.tags)||void 0===t?void 0:t.map(t=>{return(0,Gt.jsxs)(wU,{expanded:p.includes(t.tag),onChange:(n=t.tag,()=>{if(p.includes(n)){const e=p.filter(e=>e!==n);h(e)}else h([n])}),children:[(0,Gt.jsx)(_U,{"aria-controls":"panel1d-content",id:"panel1d-header",children:(0,Gt.jsx)(Ym,{fontWeight:"h6.fontWeight",children:l("rpm_ActionTag_".concat(t.tag))})}),(0,Gt.jsxs)(CU,{children:[(0,Gt.jsx)(df,{item:!0,xs:12,mb:2,children:(0,Gt.jsx)(uO,{labelPlacement:"end",value:"end",control:(0,Gt.jsx)(jC,{name:"".concat(t.tag),checked:m({group:e.group,tag:t}),onChange:n=>s(n,{group:e.group,tag:t})}),label:(0,Gt.jsx)(Eu,{component:"span",fontWeight:"h6.fontWeight",children:l("rpm_SelectAll")})})}),null===t||void 0===t?void 0:t.actions.map(t=>(0,Gt.jsxs)(df,{container:!0,spacing:2,mb:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:4,children:(0,Gt.jsx)(uO,{labelPlacement:"end",value:"end",control:(0,Gt.jsx)(jC,{name:"".concat(e.group,"/").concat(t.name),checked:r.includes("".concat(e.group,"/").concat(t.name)),onChange:o}),label:(0,Gt.jsx)(Eu,{component:"span",fontWeight:"h6.fontWeight",children:l("rpm_Action".concat(t.name))})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:8,lg:6,children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:l("message:rpm_ActionDescription".concat(t.name))})})]},t.name))]})]},t.tag);var n})]},e.group)})})}),(0,Gt.jsx)(AU,{value:d,index:1,children:(0,Gt.jsxs)(Eu,{px:2,py:4,children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,sx:{mb:2.5},children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_RoleName")})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:8,children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.name})})]}),(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_RoleDescription")})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.description})})]})]})})]})})})})})})]})};const OU=function(){const{roleId:e}=lo(),{t:t}=vg(),n=Nt(),{enqueueSnackbar:r}=hi(),o=Ct(Nd),[a,s]=We.useState(null),[l,c]=We.useState(null),[d,u]=We.useState(null),[p,h]=We.useState(null),[m,f]=We.useState([]),g=async()=>{try{const{data:t}=await n((e=>async t=>{t(na(!0));try{const t="".concat(ma.ROLES,"/").concat(e);return await cu(t)}finally{t(na(!1))}})(e));s(t)}catch(t){r(t.message,{variant:"error"})}},v=async()=>{try{const e=await n(async e=>{e(na(!0));try{let e=["AGM","RPMCORE"];const t=await Promise.all(e.sort().map(e=>cu("".concat(ma.ACTIONS,"/").concat(e))));return e=e.map((e,n)=>{const r=[];return t[n].data.forEach(e=>{const t=r.find(t=>{var n;return t.tag===(null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.vgroup)});var n;t?t.actions.push({name:e.name,isSelected:!1}):r.push({tag:(null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.vgroup)||e.name,actions:[{name:e.name,isSelected:!1}]})}),{group:e,tags:r}}),e}finally{e(na(!1))}});if(!as(p)){const t=null!==p&&void 0!==p&&p.grants?null===p||void 0===p?void 0:p.grants:[];e.forEach(e=>{e.tags.forEach(n=>{n.actions.forEach(n=>{n.isSelected=t.includes("".concat(e.group,"/").concat(n.name))})})})}c(e)}catch(e){r(e.message,{variant:"error"})}},x=async()=>{try{const{data:t}=await n((e=>async t=>{t(na(!0));try{const t="".concat(ma.ROLES,"/").concat(e,"/policies");return await cu(t)}finally{t(na(!1))}})(e)),{content:r}=t||{};u(r)}catch(t){r(t.message,{variant:"error"})}},y=async()=>{try{var e;const{data:r}=await n((t=null===(e=d[0])||void 0===e?void 0:e.id,async e=>{e(na(!0));try{const e="".concat(ma.POLICY,"/").concat(t);return await cu(e)}finally{e(na(!1))}}));h(r)}catch(i){r(i.message,{variant:"error"})}var t},b=()=>{const e=[];null===l||void 0===l||l.forEach(t=>{t.tags.forEach(n=>{n.actions.forEach(n=>{n.isSelected&&e.push("".concat(t.group,"/").concat(n.name))})})}),f(e)};return We.useEffect(()=>{as(l)||b()},[l]),We.useEffect(()=>{as(p)||v()},[p]),We.useEffect(()=>{as(d)||y()},[d]),We.useEffect(()=>{o&&e&&(g(),x(),v())},[o,e]),(0,Gt.jsx)(MU,{role:a,actions:l,checkState:m,onCheckPermissions:e=>{if(Array.isArray(e))return f(e.map(e=>e.toString()));const t=e.target.name;m.includes(t)?f(m.filter(e=>e!==t)):f(e=>e.includes(t)?[...e]:[...e,t])},updatePoliciesOnRole:async()=>{const o={grants:[...m]};try{if(as(p)){const l=(0,i.A)({},a);try{const{data:a}=await n((e=>async t=>{t(na(!0));try{const t={id:"POL".concat(sa()().valueOf()),path:e.group.path,grants:[],options:{flexible:!1},description:e.description},n="".concat(ma.POLICY);return await du(n,t)}finally{t(na(!1))}})(l));if(null!==a&&void 0!==a&&a.id)try{h((0,i.A)((0,i.A)({},a),{},{grants:[...m]}));const l=await n(((e,t)=>async n=>{n(na(!0));try{const n="".concat(ma.ROLES,"/").concat(e,"/add-policy?policyId=").concat(t);return await uu(n,{})}finally{n(na(!1))}})(e,null===a||void 0===a?void 0:a.id));if(null!==l&&void 0!==l&&l.data)try{await n(Ng(null===a||void 0===a?void 0:a.id,o)),r(t("message:rpm_UpdateRoleSuccess"),{variant:"success"})}catch(s){r(t("error:rpm_PolicyUpdateFailed"),{variant:"error"})}}catch(s){r(t("error:rpm_PolicyAttachFailed"),{variant:"error"})}}catch(s){r(t("error:rpm_PolicyCreateFailed"),{variant:"error"})}}else await n(Ng(null===p||void 0===p?void 0:p.id,o)),r(t("message:rpm_UpdateRoleSuccess"),{variant:"success"});f([...m])}catch(s){b(),r(s.message,{variant:"error"})}},handleSelectAllClick:(e,t)=>{var n,r;const i=null===t||void 0===t||null===(n=t.tag)||void 0===n||null===(r=n.actions)||void 0===r?void 0:r.map(e=>"".concat(t.group,"/").concat(e.name));e.target.checked?f([...m,...i]):f(m.filter(e=>!i.includes(e)))}})},TU=["children","onClose"],EU=e=>{const{children:t,onClose:n}=e,r=Ko(e,TU);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};function PU(e){let{dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o,children:a}=e;return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"sm",open:r,onClose:i,children:[(0,Gt.jsxs)(EU,{sx:{px:4},onClose:i,children:[o.primaryText,t&&(0,Gt.jsx)(Ym,{component:"p",variant:"subtitle2",children:"(".concat(t,")")})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(s_,{sx:{p:4},children:a?a({dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{component:"p",variant:"h6",children:o.secondaryText}),o.descText&&(0,Gt.jsx)(Ym,{component:"p",variant:"body1",children:o.descText})]}),(0,Gt.jsx)(Eu,{mt:2.5,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,direction:o.btnSwap?"row-reverse":"row",children:[(0,Gt.jsx)(df,{item:!0,xs:o.btnSwap,children:(0,Gt.jsx)(Vp,{color:o.btn.secondaryColor,variant:"outlined",onClick:i,children:o.btn.secondaryText})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:o.btn.primaryColor,disableElevation:!0,variant:"contained",onClick:n,children:o.btn.primaryText})})]})})]})})]})})}function DU(e){return t=>typeof t===e}var RU=DU("function"),NU=e=>"RegExp"===Object.prototype.toString.call(e).slice(8,-1),LU=e=>!IU(e)&&!(e=>null===e)(e)&&(RU(e)||"object"===typeof e),IU=DU("undefined");function FU(e,t){if(e===t)return!0;if(e&&LU(e)&&t&&LU(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return function(e,t){const{length:n}=e;if(n!==t.length)return!1;for(let r=n;0!==r--;)if(!FU(e[r],t[r]))return!1;return!0}(e,t);if(e instanceof Map&&t instanceof Map)return function(e,t){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;for(const n of e.entries())if(!FU(n[1],t.get(n[0])))return!1;return!0}(e,t);if(e instanceof Set&&t instanceof Set)return function(e,t){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;return!0}(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return function(e,t){if(e.byteLength!==t.byteLength)return!1;const n=new DataView(e.buffer),r=new DataView(t.buffer);let i=e.byteLength;for(;i--;)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}(e,t);if(NU(e)&&NU(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e=n.length;0!==e--;)if(!Object.prototype.hasOwnProperty.call(t,n[e]))return!1;for(let i=n.length;0!==i--;){const r=n[i];if(("_owner"!==r||!e.$$typeof)&&!FU(e[r],t[r]))return!1}return!0}return!(!Number.isNaN(e)||!Number.isNaN(t))||e===t}var $U=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],BU=["bigint","boolean","null","number","string","symbol","undefined"];function zU(e){const t=Object.prototype.toString.call(e).slice(8,-1);return/HTML\w+Element/.test(t)?"HTMLElement":(n=t,$U.includes(n)?t:void 0);var n}function HU(e){return t=>zU(t)===e}function WU(e){return t=>typeof t===e}var VU=["innerHTML","ownerDocument","style","attributes","nodeValue"];function UU(e){if(null===e)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(UU.array(e))return"Array";if(UU.plainFunction(e))return"Function";const t=zU(e);return t||"Object"}UU.array=Array.isArray,UU.arrayOf=(e,t)=>!(!UU.array(e)&&!UU.function(t))&&e.every(e=>t(e)),UU.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===zU(e),UU.asyncFunction=HU("AsyncFunction"),UU.bigint=WU("bigint"),UU.boolean=e=>!0===e||!1===e,UU.date=HU("Date"),UU.defined=e=>!UU.undefined(e),UU.domElement=e=>UU.object(e)&&!UU.plainObject(e)&&1===e.nodeType&&UU.string(e.nodeName)&&VU.every(t=>t in e),UU.empty=e=>UU.string(e)&&0===e.length||UU.array(e)&&0===e.length||UU.object(e)&&!UU.map(e)&&!UU.set(e)&&0===Object.keys(e).length||UU.set(e)&&0===e.size||UU.map(e)&&0===e.size,UU.error=HU("Error"),UU.function=WU("function"),UU.generator=e=>UU.iterable(e)&&UU.function(e.next)&&UU.function(e.throw),UU.generatorFunction=HU("GeneratorFunction"),UU.instanceOf=(e,t)=>!(!e||!t)&&Object.getPrototypeOf(e)===t.prototype,UU.iterable=e=>!UU.nullOrUndefined(e)&&UU.function(e[Symbol.iterator]),UU.map=HU("Map"),UU.nan=e=>Number.isNaN(e),UU.null=e=>null===e,UU.nullOrUndefined=e=>UU.null(e)||UU.undefined(e),UU.number=e=>WU("number")(e)&&!UU.nan(e),UU.numericString=e=>UU.string(e)&&e.length>0&&!Number.isNaN(Number(e)),UU.object=e=>!UU.nullOrUndefined(e)&&(UU.function(e)||"object"===typeof e),UU.oneOf=(e,t)=>!!UU.array(e)&&e.indexOf(t)>-1,UU.plainFunction=HU("Function"),UU.plainObject=e=>{if("Object"!==zU(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},UU.primitive=e=>{return UU.null(e)||(t=typeof e,BU.includes(t));var t},UU.promise=HU("Promise"),UU.propertyOf=(e,t,n)=>{if(!UU.object(e)||!t)return!1;const r=e[t];return UU.function(n)?n(r):UU.defined(r)},UU.regexp=HU("RegExp"),UU.set=HU("Set"),UU.string=WU("string"),UU.symbol=WU("symbol"),UU.undefined=WU("undefined"),UU.weakMap=HU("WeakMap"),UU.weakSet=HU("WeakSet");var qU=UU;function GU(e,t,n){const{actual:r,key:i,previous:o,type:a}=n,s=tq(e,i),l=tq(t,i);let c=[s,l].every(qU.number)&&("increased"===a?s<l:s>l);return qU.undefined(r)||(c=c&&l===r),qU.undefined(o)||(c=c&&s===o),c}function YU(e,t,n){const{key:r,type:i,value:o}=n,a=tq(e,r),s=tq(t,r),l="added"===i?a:s,c="added"===i?s:a;return qU.nullOrUndefined(o)?[a,s].every(qU.array)?!c.every(JU(l)):[a,s].every(qU.plainObject)?function(e,t){return t.some(t=>!e.includes(t))}(Object.keys(l),Object.keys(c)):![a,s].every(e=>qU.primitive(e)&&qU.defined(e))&&("added"===i?!qU.defined(a)&&qU.defined(s):qU.defined(a)&&!qU.defined(s)):qU.defined(l)?!(!qU.array(l)&&!qU.plainObject(l))&&function(e,t,n){return!!eq(e,t)&&([e,t].every(qU.array)?!e.some(XU(n))&&t.some(XU(n)):[e,t].every(qU.plainObject)?!Object.entries(e).some(KU(n))&&Object.entries(t).some(KU(n)):t===n)}(l,c,o):FU(c,o)}function ZU(e,t){let{key:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=tq(e,n),i=tq(t,n);if(!eq(r,i))throw new TypeError("Inputs have different types");if(!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(e=>qU.string(e)||qU.array(e)||qU.plainObject(e))}(r,i))throw new TypeError("Inputs don't have length");return[r,i].every(qU.plainObject)&&(r=Object.keys(r),i=Object.keys(i)),[r,i]}function KU(e){return t=>{let[n,r]=t;return qU.array(e)?FU(e,r)||e.some(e=>FU(e,r)||qU.array(r)&&JU(r)(e)):qU.plainObject(e)&&e[n]?!!e[n]&&FU(e[n],r):FU(e,r)}}function XU(e){return t=>qU.array(e)?e.some(e=>FU(e,t)||qU.array(t)&&JU(t)(e)):FU(e,t)}function QU(e,t){return qU.array(e)?e.some(e=>FU(e,t)):FU(e,t)}function JU(e){return t=>e.some(e=>FU(e,t))}function eq(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(qU.array)||t.every(qU.number)||t.every(qU.plainObject)||t.every(qU.string)}function tq(e,t){if(qU.plainObject(e)||qU.array(e)){if(qU.string(t)){return t.split(".").reduce((e,t)=>e&&e[t],e)}return qU.number(t)?e[t]:e}return e}function nq(e,t){if([e,t].some(qU.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(e=>qU.plainObject(e)||qU.array(e)))throw new Error("Expected plain objects or array");return{added:(n,r)=>{try{return YU(e,t,{key:n,type:"added",value:r})}catch(i){return!1}},changed:(n,r,i)=>{try{const o=tq(e,n),a=tq(t,n),s=qU.defined(r),l=qU.defined(i);if(s||l){const e=l?QU(i,o):!QU(r,o),t=QU(r,a);return e&&t}return[o,a].every(qU.array)||[o,a].every(qU.plainObject)?!FU(o,a):o!==a}catch(o){return!1}},changedFrom:(n,r,i)=>{if(!qU.defined(n))return!1;try{const o=tq(e,n),a=tq(t,n),s=qU.defined(i);return QU(r,o)&&(s?QU(i,a):!s)}catch(o){return!1}},decreased:(n,r,i)=>{if(!qU.defined(n))return!1;try{return GU(e,t,{key:n,actual:r,previous:i,type:"decreased"})}catch(o){return!1}},emptied:n=>{try{const[r,i]=ZU(e,t,{key:n});return!!r.length&&!i.length}catch(r){return!1}},filled:n=>{try{const[r,i]=ZU(e,t,{key:n});return!r.length&&!!i.length}catch(r){return!1}},increased:(n,r,i)=>{if(!qU.defined(n))return!1;try{return GU(e,t,{key:n,actual:r,previous:i,type:"increased"})}catch(o){return!1}},removed:(n,r)=>{try{return YU(e,t,{key:n,type:"removed",value:r})}catch(i){return!1}}}}var rq=n(13865),iq=n(89496),oq=n(2861),aq=n(95419),sq="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,lq=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(sq&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var cq=sq&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},lq))}};function dq(e){return e&&"[object Function]"==={}.toString.call(e)}function uq(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function pq(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function hq(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=uq(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:hq(pq(e))}function mq(e){return e&&e.referenceNode?e.referenceNode:e}var fq=sq&&!(!window.MSInputMethodContext||!document.documentMode),gq=sq&&/MSIE 10/.test(navigator.userAgent);function vq(e){return 11===e?fq:10===e?gq:fq||gq}function xq(e){if(!e)return document.documentElement;for(var t=vq(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===uq(n,"position")?xq(n):n:e?e.ownerDocument.documentElement:document.documentElement}function yq(e){return null!==e.parentNode?yq(e.parentNode):e}function bq(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||r.contains(i))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||xq(e.firstElementChild)===e)}(a)?a:xq(a);var s=yq(e);return s.host?bq(s.host,t):bq(e,yq(t).host)}function jq(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function wq(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function _q(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],vq(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function Cq(e){var t=e.body,n=e.documentElement,r=vq(10)&&getComputedStyle(n);return{height:_q("Height",t,n,r),width:_q("Width",t,n,r)}}var Sq=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Aq=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},kq=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function Mq(e){return kq({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Oq(e){var t={};try{if(vq(10)){t=e.getBoundingClientRect();var n=jq(e,"top"),r=jq(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(ba){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?Cq(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,s=o.height||e.clientHeight||i.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var d=uq(e);l-=wq(d,"x"),c-=wq(d,"y"),i.width-=l,i.height-=c}return Mq(i)}function Tq(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=vq(10),i="HTML"===t.nodeName,o=Oq(e),a=Oq(t),s=hq(e),l=uq(t),c=parseFloat(l.borderTopWidth),d=parseFloat(l.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var u=Mq({top:o.top-a.top-c,left:o.left-a.left-d,width:o.width,height:o.height});if(u.marginTop=0,u.marginLeft=0,!r&&i){var p=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);u.top-=c-p,u.bottom-=c-p,u.left-=d-h,u.right-=d-h,u.marginTop=p,u.marginLeft=h}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=jq(t,"top"),i=jq(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}(u,t)),u}function Eq(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===uq(e,"position"))return!0;var n=pq(e);return!!n&&Eq(n)}function Pq(e){if(!e||!e.parentElement||vq())return document.documentElement;for(var t=e.parentElement;t&&"none"===uq(t,"transform");)t=t.parentElement;return t||document.documentElement}function Dq(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?Pq(e):bq(e,mq(t));if("viewport"===r)o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=Tq(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:jq(n),s=t?0:jq(n,"left");return Mq({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o})}(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=hq(pq(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=Tq(s,a,i);if("HTML"!==s.nodeName||Eq(a))o=l;else{var c=Cq(e.ownerDocument),d=c.height,u=c.width;o.top+=l.top-l.marginTop,o.bottom=d+l.top,o.left+=l.left-l.marginLeft,o.right=u+l.left}}var p="number"===typeof(n=n||0);return o.left+=p?n:n.left||0,o.top+=p?n:n.top||0,o.right-=p?n:n.right||0,o.bottom-=p?n:n.bottom||0,o}function Rq(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=Dq(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map(function(e){return kq({key:e},s[e],{area:(t=s[e],t.width*t.height)});var t}).sort(function(e,t){return t.area-e.area}),c=l.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),d=c.length>0?c[0].key:l[0].key,u=e.split("-")[1];return d+(u?"-"+u:"")}function Nq(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return Tq(n,r?Pq(t):bq(t,mq(n)),r)}function Lq(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function Iq(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function Fq(e,t,n){n=n.split("-")[0];var r=Lq(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[c]:t[Iq(s)],i}function $q(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Bq(e,t,n){var r=void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=$q(e,function(e){return e[t]===n});return e.indexOf(r)}(e,"name",n));return r.forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&dq(n)&&(t.offsets.popper=Mq(t.offsets.popper),t.offsets.reference=Mq(t.offsets.reference),t=n(t,e))}),t}function zq(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Nq(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Rq(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Fq(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Bq(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Hq(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function Wq(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if("undefined"!==typeof document.body.style[o])return o}return null}function Vq(){return this.state.isDestroyed=!0,Hq(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[Wq("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Uq(e){var t=e.ownerDocument;return t?t.defaultView:window}function qq(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||qq(hq(o.parentNode),t,n,r),r.push(o)}function Gq(e,t,n,r){n.updateBound=r,Uq(e).addEventListener("resize",n.updateBound,{passive:!0});var i=hq(e);return qq(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function Yq(){this.state.eventsEnabled||(this.state=Gq(this.reference,this.options,this.state,this.scheduleUpdate))}function Zq(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=function(e,t){return Uq(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}(this.reference,this.state))}function Kq(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Xq(e,t){Object.keys(t).forEach(function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Kq(t[n])&&(r="px"),e.style[n]=t[n]+r})}var Qq=sq&&/Firefox/i.test(navigator.userAgent);function Jq(e,t,n){var r=$q(e,function(e){return e.name===t}),i=!!r&&e.some(function(e){return e.name===n&&e.enabled&&e.order<r.order});if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var eG=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],tG=eG.slice(3);function nG(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=tG.indexOf(e),r=tG.slice(n+1).concat(tG.slice(0,n));return t?r.reverse():r}var rG="flip",iG="clockwise",oG="counterclockwise";function aG(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf($q(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return c=c.map(function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){return Mq("%p"===a?n:r)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,n)})}),c.forEach(function(e,t){e.forEach(function(n,r){Kq(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))})}),i}var sG={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",d={start:Aq({},l,o[l]),end:Aq({},l,o[l]+o[c]-a[c])};e.offsets.popper=kq({},a,d[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=Kq(+n)?[+n,0]:aG(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||xq(e.instance.popper);e.instance.reference===n&&(n=xq(n));var r=Wq("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=Dq(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=l;var c=t.priority,d=e.offsets.popper,u={primary:function(e){var n=d[e];return d[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(d[e],l[e])),Aq({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=d[n];return d[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(d[n],l[e]-("right"===e?d.width:d.height))),Aq({},n,r)}};return c.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";d=kq({},d,u[t](e))}),e.offsets.popper=d,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[c]),n[l]>o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Jq(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",d=l?"Top":"Left",u=d.toLowerCase(),p=l?"left":"top",h=l?"bottom":"right",m=Lq(r)[c];s[h]-m<a[u]&&(e.offsets.popper[u]-=a[u]-(s[h]-m)),s[u]+m>a[h]&&(e.offsets.popper[u]+=s[u]+m-a[h]),e.offsets.popper=Mq(e.offsets.popper);var f=s[u]+s[c]/2-m/2,g=uq(e.instance.popper),v=parseFloat(g["margin"+d]),x=parseFloat(g["border"+d+"Width"]),y=f-e.offsets.popper[u]-v-x;return y=Math.max(Math.min(a[c]-m,y),0),e.arrowElement=r,e.offsets.arrow=(Aq(n={},u,Math.round(y)),Aq(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(Hq(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=Dq(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=Iq(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case rG:a=[r,i];break;case iG:a=nG(r);break;case oG:a=nG(r,!0);break;default:a=t.behavior}return a.forEach(function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],i=Iq(r);var c=e.offsets.popper,d=e.offsets.reference,u=Math.floor,p="left"===r&&u(c.right)>u(d.left)||"right"===r&&u(c.left)<u(d.right)||"top"===r&&u(c.bottom)>u(d.top)||"bottom"===r&&u(c.top)<u(d.bottom),h=u(c.left)<u(n.left),m=u(c.right)>u(n.right),f=u(c.top)<u(n.top),g=u(c.bottom)>u(n.bottom),v="left"===r&&h||"right"===r&&m||"top"===r&&f||"bottom"===r&&g,x=-1!==["top","bottom"].indexOf(r),y=!!t.flipVariations&&(x&&"start"===o&&h||x&&"end"===o&&m||!x&&"start"===o&&f||!x&&"end"===o&&g),b=!!t.flipVariationsByContent&&(x&&"start"===o&&m||x&&"end"===o&&h||!x&&"start"===o&&g||!x&&"end"===o&&f),j=y||b;(p||v||j)&&(e.flipped=!0,(p||v)&&(r=a[l+1]),j&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=kq({},e.offsets.popper,Fq(e.instance.popper,e.offsets.reference,e.placement)),e=Bq(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=Iq(t),e.offsets.popper=Mq(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Jq(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=$q(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=$q(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=xq(e.instance.popper),l=Oq(s),c={position:i.position},d=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},l=o(i.width),c=o(r.width),d=-1!==["left","right"].indexOf(e.placement),u=-1!==e.placement.indexOf("-"),p=t?d||u||l%2===c%2?o:a:s,h=t?o:s;return{left:p(l%2===1&&c%2===1&&!u&&t?r.left-1:r.left),top:h(r.top),bottom:h(r.bottom),right:p(r.right)}}(e,window.devicePixelRatio<2||!Qq),u="bottom"===n?"top":"bottom",p="right"===r?"left":"right",h=Wq("transform"),m=void 0,f=void 0;if(f="bottom"===u?"HTML"===s.nodeName?-s.clientHeight+d.bottom:-l.height+d.bottom:d.top,m="right"===p?"HTML"===s.nodeName?-s.clientWidth+d.right:-l.width+d.right:d.left,a&&h)c[h]="translate3d("+m+"px, "+f+"px, 0)",c[u]=0,c[p]=0,c.willChange="transform";else{var g="bottom"===u?-1:1,v="right"===p?-1:1;c[u]=f*g,c[p]=m*v,c.willChange=u+", "+p}var x={"x-placement":e.placement};return e.attributes=kq({},x,e.attributes),e.styles=kq({},c,e.styles),e.arrowStyles=kq({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return Xq(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach(function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)}),e.arrowElement&&Object.keys(e.arrowStyles).length&&Xq(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=Nq(i,t,e,n.positionFixed),a=Rq(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),Xq(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}},lG={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:sG},cG=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=cq(this.update.bind(this)),this.options=kq({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(kq({},e.Defaults.modifiers,i.modifiers)).forEach(function(t){r.options.modifiers[t]=kq({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return kq({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&dq(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return Sq(e,[{key:"update",value:function(){return zq.call(this)}},{key:"destroy",value:function(){return Vq.call(this)}},{key:"enableEventListeners",value:function(){return Yq.call(this)}},{key:"disableEventListeners",value:function(){return Zq.call(this)}}]),e}();cG.Utils=("undefined"!==typeof window?window:n.g).PopperUtils,cG.placements=eG,cG.Defaults=lG;const dG=cG;var uG=n(52718),pG=n.n(uG),hG=["innerHTML","ownerDocument","style","attributes","nodeValue"],mG=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],fG=["bigint","boolean","null","number","string","symbol","undefined"];function gG(e){var t,n=Object.prototype.toString.call(e).slice(8,-1);return/HTML\w+Element/.test(n)?"HTMLElement":(t=n,mG.includes(t)?n:void 0)}function vG(e){return function(t){return gG(t)===e}}function xG(e){return function(t){return typeof t===e}}function yG(e){if(null===e)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(yG.array(e))return"Array";if(yG.plainFunction(e))return"Function";var t=gG(e);return t||"Object"}yG.array=Array.isArray,yG.arrayOf=function(e,t){return!(!yG.array(e)&&!yG.function(t))&&e.every(function(e){return t(e)})},yG.asyncGeneratorFunction=function(e){return"AsyncGeneratorFunction"===gG(e)},yG.asyncFunction=vG("AsyncFunction"),yG.bigint=xG("bigint"),yG.boolean=function(e){return!0===e||!1===e},yG.date=vG("Date"),yG.defined=function(e){return!yG.undefined(e)},yG.domElement=function(e){return yG.object(e)&&!yG.plainObject(e)&&1===e.nodeType&&yG.string(e.nodeName)&&hG.every(function(t){return t in e})},yG.empty=function(e){return yG.string(e)&&0===e.length||yG.array(e)&&0===e.length||yG.object(e)&&!yG.map(e)&&!yG.set(e)&&0===Object.keys(e).length||yG.set(e)&&0===e.size||yG.map(e)&&0===e.size},yG.error=vG("Error"),yG.function=xG("function"),yG.generator=function(e){return yG.iterable(e)&&yG.function(e.next)&&yG.function(e.throw)},yG.generatorFunction=vG("GeneratorFunction"),yG.instanceOf=function(e,t){return!(!e||!t)&&Object.getPrototypeOf(e)===t.prototype},yG.iterable=function(e){return!yG.nullOrUndefined(e)&&yG.function(e[Symbol.iterator])},yG.map=vG("Map"),yG.nan=function(e){return Number.isNaN(e)},yG.null=function(e){return null===e},yG.nullOrUndefined=function(e){return yG.null(e)||yG.undefined(e)},yG.number=function(e){return xG("number")(e)&&!yG.nan(e)},yG.numericString=function(e){return yG.string(e)&&e.length>0&&!Number.isNaN(Number(e))},yG.object=function(e){return!yG.nullOrUndefined(e)&&(yG.function(e)||"object"===typeof e)},yG.oneOf=function(e,t){return!!yG.array(e)&&e.indexOf(t)>-1},yG.plainFunction=vG("Function"),yG.plainObject=function(e){if("Object"!==gG(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},yG.primitive=function(e){return yG.null(e)||(t=typeof e,fG.includes(t));var t},yG.promise=vG("Promise"),yG.propertyOf=function(e,t,n){if(!yG.object(e)||!t)return!1;var r=e[t];return yG.function(n)?n(r):yG.defined(r)},yG.regexp=vG("RegExp"),yG.set=vG("Set"),yG.string=xG("string"),yG.symbol=xG("symbol"),yG.undefined=xG("undefined"),yG.weakMap=vG("WeakMap"),yG.weakSet=vG("WeakSet");const bG=yG;function jG(e){return function(t){return typeof t===e}}var wG=jG("function"),_G=function(e){return"RegExp"===Object.prototype.toString.call(e).slice(8,-1)},CG=function(e){return!SG(e)&&!function(e){return null===e}(e)&&(wG(e)||"object"===typeof e)},SG=jG("undefined"),AG=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function kG(e,t){if(e===t)return!0;if(e&&CG(e)&&t&&CG(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=n;0!==r--;)if(!kG(e[r],t[r]))return!1;return!0}(e,t);if(e instanceof Map&&t instanceof Map)return function(e,t){var n,r,i,o;if(e.size!==t.size)return!1;try{for(var a=AG(e.entries()),s=a.next();!s.done;s=a.next()){var l=s.value;if(!t.has(l[0]))return!1}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}try{for(var c=AG(e.entries()),d=c.next();!d.done;d=c.next())if(!kG((l=d.value)[1],t.get(l[0])))return!1}catch(p){i={error:p}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return!0}(e,t);if(e instanceof Set&&t instanceof Set)return function(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=AG(e.entries()),o=i.next();!o.done;o=i.next()){var a=o.value;if(!t.has(a[0]))return!1}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e.buffer),r=new DataView(t.buffer),i=e.byteLength;i--;)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}(e,t);if(_G(e)&&_G(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=n.length;0!==i--;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=n.length;0!==i--;){var o=n[i];if(("_owner"!==o||!e.$$typeof)&&!kG(e[o],t[o]))return!1}return!0}return!(!Number.isNaN(e)||!Number.isNaN(t))||e===t}function MG(e,t,n){var r=n.actual,i=n.key,o=n.previous,a=n.type,s=LG(e,i),l=LG(t,i),c=[s,l].every(bG.number)&&("increased"===a?s<l:s>l);return bG.undefined(r)||(c=c&&l===r),bG.undefined(o)||(c=c&&s===o),c}function OG(e,t,n){var r=n.key,i=n.type,o=n.value,a=LG(e,r),s=LG(t,r),l="added"===i?a:s,c="added"===i?s:a;return bG.nullOrUndefined(o)?[a,s].every(bG.array)?!c.every(RG(l)):[a,s].every(bG.plainObject)?function(e,t){return t.some(function(t){return!e.includes(t)})}(Object.keys(l),Object.keys(c)):![a,s].every(function(e){return bG.primitive(e)&&bG.defined(e)})&&("added"===i?!bG.defined(a)&&bG.defined(s):bG.defined(a)&&!bG.defined(s)):bG.defined(l)?!(!bG.array(l)&&!bG.plainObject(l))&&function(e,t,n){return!!NG(e,t)&&([e,t].every(bG.array)?!e.some(PG(n))&&t.some(PG(n)):[e,t].every(bG.plainObject)?!Object.entries(e).some(EG(n))&&Object.entries(t).some(EG(n)):t===n)}(l,c,o):kG(c,o)}function TG(e,t,n){var r=(void 0===n?{}:n).key,i=LG(e,r),o=LG(t,r);if(!NG(i,o))throw new TypeError("Inputs have different types");if(!function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(function(e){return bG.string(e)||bG.array(e)||bG.plainObject(e)})}(i,o))throw new TypeError("Inputs don't have length");return[i,o].every(bG.plainObject)&&(i=Object.keys(i),o=Object.keys(o)),[i,o]}function EG(e){return function(t){var n=t[0],r=t[1];return bG.array(e)?kG(e,r)||e.some(function(e){return kG(e,r)||bG.array(r)&&RG(r)(e)}):bG.plainObject(e)&&e[n]?!!e[n]&&kG(e[n],r):kG(e,r)}}function PG(e){return function(t){return bG.array(e)?e.some(function(e){return kG(e,t)||bG.array(t)&&RG(t)(e)}):kG(e,t)}}function DG(e,t){return bG.array(e)?e.some(function(e){return kG(e,t)}):kG(e,t)}function RG(e){return function(t){return e.some(function(e){return kG(e,t)})}}function NG(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(bG.array)||e.every(bG.number)||e.every(bG.plainObject)||e.every(bG.string)}function LG(e,t){return bG.plainObject(e)||bG.array(e)?bG.string(t)?t.split(".").reduce(function(e,t){return e&&e[t]},e):bG.number(t)?e[t]:e:e}function IG(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 FG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IG(Object(n),!0).forEach(function(t){HG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BG(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,ZG(r.key),r)}}function zG(e,t,n){return t&&BG(e.prototype,t),n&&BG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HG(e,t,n){return(t=ZG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WG(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&&UG(e,t)}function VG(e){return VG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},VG(e)}function UG(e,t){return UG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},UG(e,t)}function qG(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function GG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YG(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(ba){return!1}}();return function(){var n,r=VG(e);if(t){var i=VG(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return GG(e)}(this,n)}}function ZG(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}var KG={flip:{padding:20},preventOverflow:{padding:10}};function XG(e,t,n){return function(e,t){if("function"!==typeof e)throw new TypeError("The typeValidator argument must be a function with the signature function(props, propName, componentName).");if(Boolean(t)&&"string"!==typeof t)throw new TypeError("The error message is optional, but must be a string if provided.")}(e,n),function(r,i,o){for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];return function(e,t,n,r){return"boolean"===typeof e?e:"function"===typeof e?e(t,n,r):!0===Boolean(e)&&Boolean(e)}(t,r,i,o)?function(e,t){return Object.hasOwnProperty.call(e,t)}(r,i)?e.apply(void 0,[r,i,o].concat(s)):function(e,t,n,r){return r?new Error(r):new Error("Required ".concat(e[t]," `").concat(t,"` was not specified in `").concat(n,"`."))}(r,i,o,n):e.apply(void 0,[r,i,o].concat(s))}}var QG={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},JG=void 0!==ut.createPortal;function eY(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}function tY(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function nY(e){var t=e.title,n=e.data,r=e.warn,i=void 0!==r&&r,o=e.debug,a=void 0!==o&&o,s=i?console.warn||console.error:console.log;a&&t&&n&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach(function(e){bG.plainObject(e)&&e.key?s.apply(console,[e.key,e.value]):s.apply(console,[e])}):s.apply(console,[n]),console.groupEnd())}function rY(){}var iY=function(e){WG(n,e);var t=YG(n);function n(){return $G(this,n),t.apply(this,arguments)}return zG(n,[{key:"componentDidMount",value:function(){eY()&&(this.node||this.appendNode(),JG||this.renderPortal())}},{key:"componentDidUpdate",value:function(){eY()&&(JG||this.renderPortal())}},{key:"componentWillUnmount",value:function(){eY()&&this.node&&(JG||ut.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var e=this.props,t=e.id,n=e.zIndex;this.node||(this.node=document.createElement("div"),t&&(this.node.id=t),n&&(this.node.style.zIndex=n),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!eY())return null;var e=this.props,t=e.children,n=e.setRef;return this.node||this.appendNode(),JG?ut.createPortal(t,this.node):(n(ut.unstable_renderSubtreeIntoContainer(this,t.length>1?We.createElement("div",null,t):t[0],this.node)),null)}},{key:"renderReact16",value:function(){var e=this.props,t=e.hasChildren,n=e.placement,r=e.target;return t||r||"center"===n?this.renderPortal():null}},{key:"render",value:function(){return JG?this.renderReact16():null}}]),n}(We.Component);HG(iY,"propTypes",{children:gu().oneOfType([gu().element,gu().array]),hasChildren:gu().bool,id:gu().oneOfType([gu().string,gu().number]),placement:gu().string,setRef:gu().func.isRequired,target:gu().oneOfType([gu().object,gu().string]),zIndex:gu().number});var oY=function(e){WG(n,e);var t=YG(n);function n(){return $G(this,n),t.apply(this,arguments)}return zG(n,[{key:"parentStyle",get:function(){var e=this.props,t=e.placement,n=e.styles.arrow.length,r={pointerEvents:"none",position:"absolute",width:"100%"};return t.startsWith("top")?(r.bottom=0,r.left=0,r.right=0,r.height=n):t.startsWith("bottom")?(r.left=0,r.right=0,r.top=0,r.height=n):t.startsWith("left")?(r.right=0,r.top=0,r.bottom=0):t.startsWith("right")&&(r.left=0,r.top=0),r}},{key:"render",value:function(){var e,t=this.props,n=t.placement,r=t.setArrowRef,i=t.styles.arrow,o=i.color,a=i.display,s=i.length,l=i.margin,c=i.position,d=i.spread,u={display:a,position:c},p=d,h=s;return n.startsWith("top")?(e="0,0 ".concat(p/2,",").concat(h," ").concat(p,",0"),u.bottom=0,u.marginLeft=l,u.marginRight=l):n.startsWith("bottom")?(e="".concat(p,",").concat(h," ").concat(p/2,",0 0,").concat(h),u.top=0,u.marginLeft=l,u.marginRight=l):n.startsWith("left")?(h=d,e="0,0 ".concat(p=s,",").concat(h/2," 0,").concat(h),u.right=0,u.marginTop=l,u.marginBottom=l):n.startsWith("right")&&(h=d,e="".concat(p=s,",").concat(h," ").concat(p,",0 0,").concat(h/2),u.left=0,u.marginTop=l,u.marginBottom=l),We.createElement("div",{className:"__floater__arrow",style:this.parentStyle},We.createElement("span",{ref:r,style:u},We.createElement("svg",{width:p,height:h,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},We.createElement("polygon",{points:e,fill:o}))))}}]),n}(We.Component);HG(oY,"propTypes",{placement:gu().string.isRequired,setArrowRef:gu().func.isRequired,styles:gu().object.isRequired});var aY=["color","height","width"];function sY(e){var t=e.handleClick,n=e.styles,r=n.color,i=n.height,o=n.width,a=qG(n,aY);return We.createElement("button",{"aria-label":"close",onClick:t,style:a,type:"button"},We.createElement("svg",{width:"".concat(o,"px"),height:"".concat(i,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},We.createElement("g",null,We.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}function lY(e){var t=e.content,n=e.footer,r=e.handleClick,i=e.open,o=e.positionWrapper,a=e.showCloseButton,s=e.title,l=e.styles,c={content:We.isValidElement(t)?t:We.createElement("div",{className:"__floater__content",style:l.content},t)};return s&&(c.title=We.isValidElement(s)?s:We.createElement("div",{className:"__floater__title",style:l.title},s)),n&&(c.footer=We.isValidElement(n)?n:We.createElement("div",{className:"__floater__footer",style:l.footer},n)),!a&&!o||bG.boolean(i)||(c.close=We.createElement(sY,{styles:l.close,handleClick:r})),We.createElement("div",{className:"__floater__container",style:l.container},c.close,c.title,c.content,c.footer)}sY.propTypes={handleClick:gu().func.isRequired,styles:gu().object.isRequired},lY.propTypes={content:gu().node.isRequired,footer:gu().node,handleClick:gu().func.isRequired,open:gu().bool,positionWrapper:gu().bool.isRequired,showCloseButton:gu().bool.isRequired,styles:gu().object.isRequired,title:gu().node};var cY=function(e){WG(n,e);var t=YG(n);function n(){return $G(this,n),t.apply(this,arguments)}return zG(n,[{key:"style",get:function(){var e=this.props,t=e.disableAnimation,n=e.component,r=e.placement,i=e.hideArrow,o=e.status,a=e.styles,s=a.arrow.length,l=a.floater,c=a.floaterCentered,d=a.floaterClosing,u=a.floaterOpening,p=a.floaterWithAnimation,h=a.floaterWithComponent,m={};return i||(r.startsWith("top")?m.padding="0 0 ".concat(s,"px"):r.startsWith("bottom")?m.padding="".concat(s,"px 0 0"):r.startsWith("left")?m.padding="0 ".concat(s,"px 0 0"):r.startsWith("right")&&(m.padding="0 0 0 ".concat(s,"px"))),-1!==[QG.OPENING,QG.OPEN].indexOf(o)&&(m=FG(FG({},m),u)),o===QG.CLOSING&&(m=FG(FG({},m),d)),o!==QG.OPEN||t||(m=FG(FG({},m),p)),"center"===r&&(m=FG(FG({},m),c)),n&&(m=FG(FG({},m),h)),FG(FG({},l),m)}},{key:"render",value:function(){var e=this.props,t=e.component,n=e.handleClick,r=e.hideArrow,i=e.setFloaterRef,o=e.status,a={},s=["__floater"];return a.content=t?We.isValidElement(t)?We.cloneElement(t,{closeFn:n}):t({closeFn:n}):We.createElement(lY,this.props),o===QG.OPEN&&s.push("__floater__open"),r||(a.arrow=We.createElement(oY,this.props)),We.createElement("div",{ref:i,className:s.join(" "),style:this.style},We.createElement("div",{className:"__floater__body"},a.content,a.arrow))}}]),n}(We.Component);HG(cY,"propTypes",{component:gu().oneOfType([gu().func,gu().element]),content:gu().node,disableAnimation:gu().bool.isRequired,footer:gu().node,handleClick:gu().func.isRequired,hideArrow:gu().bool.isRequired,open:gu().bool,placement:gu().string.isRequired,positionWrapper:gu().bool.isRequired,setArrowRef:gu().func.isRequired,setFloaterRef:gu().func.isRequired,showCloseButton:gu().bool,status:gu().string.isRequired,styles:gu().object.isRequired,title:gu().node});var dY=function(e){WG(n,e);var t=YG(n);function n(){return $G(this,n),t.apply(this,arguments)}return zG(n,[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.handleClick,i=t.handleMouseEnter,o=t.handleMouseLeave,a=t.setChildRef,s=t.setWrapperRef,l=t.style,c=t.styles;if(n)if(1===We.Children.count(n))if(We.isValidElement(n)){var d=bG.function(n.type)?"innerRef":"ref";e=We.cloneElement(We.Children.only(n),HG({},d,a))}else e=We.createElement("span",null,n);else e=n;return e?We.createElement("span",{ref:s,style:FG(FG({},c),l),onClick:r,onMouseEnter:i,onMouseLeave:o},e):null}}]),n}(We.Component);HG(dY,"propTypes",{children:gu().node,handleClick:gu().func.isRequired,handleMouseEnter:gu().func.isRequired,handleMouseLeave:gu().func.isRequired,setChildRef:gu().func.isRequired,setWrapperRef:gu().func.isRequired,style:gu().object,styles:gu().object.isRequired});var uY={zIndex:100};var pY=["arrow","flip","offset"],hY=["position","top","right","bottom","left"],mY=function(e){WG(n,e);var t=YG(n);function n(e){var r;return $G(this,n),HG(GG(r=t.call(this,e)),"setArrowRef",function(e){r.arrowRef=e}),HG(GG(r),"setChildRef",function(e){r.childRef=e}),HG(GG(r),"setFloaterRef",function(e){r.floaterRef=e}),HG(GG(r),"setWrapperRef",function(e){r.wrapperRef=e}),HG(GG(r),"handleTransitionEnd",function(){var e=r.state.status,t=r.props.callback;r.wrapperPopper&&r.wrapperPopper.instance.update(),r.setState({status:e===QG.OPENING?QG.OPEN:QG.IDLE},function(){var e=r.state.status;t(e===QG.OPEN?"open":"close",r.props)})}),HG(GG(r),"handleClick",function(){var e=r.props,t=e.event,n=e.open;if(!bG.boolean(n)){var i=r.state,o=i.positionWrapper,a=i.status;("click"===r.event||"hover"===r.event&&o)&&(nY({title:"click",data:[{event:t,status:a===QG.OPEN?"closing":"opening"}],debug:r.debug}),r.toggle())}}),HG(GG(r),"handleMouseEnter",function(){var e=r.props,t=e.event,n=e.open;if(!bG.boolean(n)&&!tY()){var i=r.state.status;"hover"===r.event&&i===QG.IDLE&&(nY({title:"mouseEnter",data:[{key:"originalEvent",value:t}],debug:r.debug}),clearTimeout(r.eventDelayTimeout),r.toggle())}}),HG(GG(r),"handleMouseLeave",function(){var e=r.props,t=e.event,n=e.eventDelay,i=e.open;if(!bG.boolean(i)&&!tY()){var o=r.state,a=o.status,s=o.positionWrapper;"hover"===r.event&&(nY({title:"mouseLeave",data:[{key:"originalEvent",value:t}],debug:r.debug}),n?-1===[QG.OPENING,QG.OPEN].indexOf(a)||s||r.eventDelayTimeout||(r.eventDelayTimeout=setTimeout(function(){delete r.eventDelayTimeout,r.toggle()},1e3*n)):r.toggle(QG.IDLE))}}),r.state={currentPlacement:e.placement,needsUpdate:!1,positionWrapper:e.wrapperOptions.position&&!!e.target,status:QG.INIT,statusWrapper:QG.INIT},r._isMounted=!1,r.hasMounted=!1,eY()&&window.addEventListener("load",function(){r.popper&&r.popper.instance.update(),r.wrapperPopper&&r.wrapperPopper.instance.update()}),r}return zG(n,[{key:"componentDidMount",value:function(){if(eY()){var e=this.state.positionWrapper,t=this.props,n=t.children,r=t.open,i=t.target;this._isMounted=!0,nY({title:"init",data:{hasChildren:!!n,hasTarget:!!i,isControlled:bG.boolean(r),positionWrapper:e,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!n&&i&&bG.boolean(r)}}},{key:"componentDidUpdate",value:function(e,t){if(eY()){var n,r=this.props,i=r.autoOpen,o=r.open,a=r.target,s=r.wrapperOptions,l=function(e,t){if([e,t].some(bG.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(function(e){return bG.plainObject(e)||bG.array(e)}))throw new Error("Expected plain objects or array");var n=function(n,r,i){try{var o=LG(e,n),a=LG(t,n),s=bG.defined(r),l=bG.defined(i);if(s||l){var c=l?DG(i,o):!DG(r,o),d=DG(r,a);return c&&d}return[o,a].every(bG.array)||[o,a].every(bG.plainObject)?!kG(o,a):o!==a}catch(u){return!1}};return{added:function(n,r){try{return OG(e,t,{key:n,type:"added",value:r})}catch(i){return!1}},changed:n,changedFrom:function(n,r,i){if(!bG.defined(n))return!1;try{var o=LG(e,n),a=LG(t,n),s=bG.defined(i);return DG(r,o)&&(s?DG(i,a):!s)}catch(l){return!1}},changedTo:function(e,t){return!!bG.defined(e)&&n(e,t)},decreased:function(n,r,i){if(!bG.defined(n))return!1;try{return MG(e,t,{key:n,actual:r,previous:i,type:"decreased"})}catch(o){return!1}},emptied:function(n){try{var r=TG(e,t,{key:n}),i=r[0],o=r[1];return!!i.length&&!o.length}catch(a){return!1}},filled:function(n){try{var r=TG(e,t,{key:n}),i=r[0],o=r[1];return!i.length&&!!o.length}catch(a){return!1}},increased:function(n,r,i){if(!bG.defined(n))return!1;try{return MG(e,t,{key:n,actual:r,previous:i,type:"increased"})}catch(o){return!1}},removed:function(n,r){try{return OG(e,t,{key:n,type:"removed",value:r})}catch(i){return!1}}}}(t,this.state),c=l.changedFrom,d=l.changed;if(e.open!==o)bG.boolean(o)&&(n=o?QG.OPENING:QG.CLOSING),this.toggle(n);e.wrapperOptions.position===s.position&&e.target===a||this.changeWrapperPosition(this.props),(d("status",QG.IDLE)&&o||c("status",QG.INIT,QG.IDLE)&&i)&&this.toggle(QG.OPEN),this.popper&&d("status",QG.OPENING)&&this.popper.instance.update(),this.floaterRef&&(d("status",QG.OPENING)||d("status",QG.CLOSING))&&function(e,t,n){var r;r=function(i){n(i),function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.removeEventListener(t,n,r)}(e,t,r)},function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.addEventListener(t,n,r)}(e,t,r,arguments.length>3&&void 0!==arguments[3]&&arguments[3])}(this.floaterRef,"transitionend",this.handleTransitionEnd),d("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){eY()&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.target,n=this.state.positionWrapper,r=this.props,i=r.disableFlip,o=r.getPopper,a=r.hideArrow,s=r.offset,l=r.placement,c=r.wrapperOptions,d="top"===l||"bottom"===l?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if("center"===l)this.setState({status:QG.IDLE});else if(t&&this.floaterRef){var u=this.options,p=u.arrow,h=u.flip,m=u.offset,f=qG(u,pY);new dG(t,this.floaterRef,{placement:l,modifiers:FG({arrow:FG({enabled:!a,element:this.arrowRef},p),flip:FG({enabled:!i,behavior:d},h),offset:FG({offset:"0, ".concat(s,"px")},m)},f),onCreate:function(t){var n;e.popper=t,null!==(n=e.floaterRef)&&void 0!==n&&n.isConnected?(o(t,"floater"),e._isMounted&&e.setState({currentPlacement:t.placement,status:QG.IDLE}),l!==t.placement&&setTimeout(function(){t.instance.update()},1)):e.setState({needsUpdate:!0})},onUpdate:function(t){e.popper=t;var n=e.state.currentPlacement;e._isMounted&&t.placement!==n&&e.setState({currentPlacement:t.placement})}})}if(n){var g=bG.undefined(c.offset)?0:c.offset;new dG(this.target,this.wrapperRef,{placement:c.placement||l,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(g,"px")},flip:{enabled:!1}},onCreate:function(t){e.wrapperPopper=t,e._isMounted&&e.setState({statusWrapper:QG.IDLE}),o(t,"wrapper"),l!==t.placement&&setTimeout(function(){t.instance.update()},1)}})}}},{key:"rebuildPopper",value:function(){var e=this;this.floaterRefInterval=setInterval(function(){var t;null!==(t=e.floaterRef)&&void 0!==t&&t.isConnected&&(clearInterval(e.floaterRefInterval),e.setState({needsUpdate:!1}),e.initPopper())},50)}},{key:"changeWrapperPosition",value:function(e){var t=e.target,n=e.wrapperOptions;this.setState({positionWrapper:n.position&&!!t})}},{key:"toggle",value:function(e){var t=this.state.status===QG.OPEN?QG.CLOSING:QG.OPENING;bG.undefined(e)||(t=e),this.setState({status:t})}},{key:"debug",get:function(){return this.props.debug||eY()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function(){var e=this.props,t=e.disableHoverToClick,n=e.event;return"hover"===n&&tY()&&!t?"click":n}},{key:"options",get:function(){var e=this.props.options;return pG()(KG,e||{})}},{key:"styles",get:function(){var e,t=this,n=this.state,r=n.status,i=n.positionWrapper,o=n.statusWrapper,a=this.props.styles,s=pG()(function(e){var t=pG()(uY,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}(a),a);i&&(e=-1===[QG.IDLE].indexOf(r)||-1===[QG.IDLE].indexOf(o)?s.wrapperPosition:this.wrapperPopper.styles,s.wrapper=FG(FG({},s.wrapper),e));if(this.target){var l=window.getComputedStyle(this.target);this.wrapperStyles?s.wrapper=FG(FG({},s.wrapper),this.wrapperStyles):-1===["relative","static"].indexOf(l.position)&&(this.wrapperStyles={},i||(hY.forEach(function(e){t.wrapperStyles[e]=l[e]}),s.wrapper=FG(FG({},s.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return s}},{key:"target",get:function(){if(!eY())return null;var e=this.props.target;return e?bG.domElement(e)?e:document.querySelector(e):this.childRef||this.wrapperRef}},{key:"render",value:function(){var e=this.state,t=e.currentPlacement,n=e.positionWrapper,r=e.status,i=this.props,o=i.children,a=i.component,s=i.content,l=i.disableAnimation,c=i.footer,d=i.hideArrow,u=i.id,p=i.open,h=i.showCloseButton,m=i.style,f=i.target,g=i.title,v=We.createElement(dY,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:m,styles:this.styles.wrapper},o),x={};return n?x.wrapperInPortal=v:x.wrapperAsChildren=v,We.createElement("span",null,We.createElement(iY,{hasChildren:!!o,id:u,placement:t,setRef:this.setFloaterRef,target:f,zIndex:this.styles.options.zIndex},We.createElement(cY,{component:a,content:s,disableAnimation:l,footer:c,handleClick:this.handleClick,hideArrow:d||"center"===t,open:p,placement:t,positionWrapper:n,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:h,status:r,styles:this.styles,title:g}),x.wrapperInPortal),x.wrapperAsChildren)}}]),n}(We.Component);HG(mY,"propTypes",{autoOpen:gu().bool,callback:gu().func,children:gu().node,component:XG(gu().oneOfType([gu().func,gu().element]),function(e){return!e.content}),content:XG(gu().node,function(e){return!e.component}),debug:gu().bool,disableAnimation:gu().bool,disableFlip:gu().bool,disableHoverToClick:gu().bool,event:gu().oneOf(["hover","click"]),eventDelay:gu().number,footer:gu().node,getPopper:gu().func,hideArrow:gu().bool,id:gu().oneOfType([gu().string,gu().number]),offset:gu().number,open:gu().bool,options:gu().object,placement:gu().oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:gu().bool,style:gu().object,styles:gu().object,target:gu().oneOfType([gu().object,gu().string]),title:gu().node,wrapperOptions:gu().shape({offset:gu().number,placement:gu().oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:gu().bool})}),HG(mY,"defaultProps",{autoOpen:!1,callback:rY,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:rY,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});const fY=["mixBlendMode","zIndex"],gY=["styles"],vY=["color","height","width"],xY=["beaconComponent","tooltipComponent"];var yY=Object.defineProperty,bY=(e,t,n)=>((e,t,n)=>t in e?yY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!==typeof t?t+"":t,n),jY="init",wY="start",_Y="stop",CY="reset",SY="prev",AY="next",kY="go",MY="close",OY="skip",TY="update",EY={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},PY={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},DY={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"};function RY(){var e;return!("undefined"===typeof window||!(null==(e=window.document)?void 0:e.createElement))}function NY(e){return e?e.getBoundingClientRect():null}function LY(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{body:t,documentElement:n}=document;if(!t||!n)return 0;if(e){const e=[t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight].sort((e,t)=>e-t),r=Math.floor(e.length/2);return e.length%2===0?(e[r-1]+e[r])/2:e[r]}return Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)}function IY(e){if("string"===typeof e)try{return document.querySelector(e)}catch(t){return null}return e}function FY(e,t,n){if(!e)return HY();const r=iq(e);if(r){if(r.isSameNode(HY()))return n?document:HY();if(!(r.scrollHeight>r.offsetHeight)&&!t)return r.style.overflow="initial",HY()}return r}function $Y(e,t){if(!e)return!1;const n=FY(e,t);return!!n&&!n.isSameNode(HY())}function BY(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fixed";if(!e||!(e instanceof HTMLElement))return!1;const{nodeName:n}=e,r=function(e){return e&&1===e.nodeType?getComputedStyle(e):null}(e);return"BODY"!==n&&"HTML"!==n&&(!(!r||r.position!==t)||!!e.parentNode&&BY(e.parentNode,t))}function zY(e,t,n){var r;if(!e)return 0;const{offsetTop:i=0,scrollTop:o=0}=null!=(r=iq(e))?r:{};let a=e.getBoundingClientRect().top+o;i&&($Y(e,n)||function(e){return e.offsetParent!==document.body}(e))&&(a-=i);const s=Math.floor(a-t);return s<0?0:s}function HY(){var e;return null!=(e=document.scrollingElement)?e:document.documentElement}var WY=void 0!==ut.createPortal;function VY(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,t=e;return"undefined"===typeof window?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":Boolean(window.opera)||e.includes(" OPR/")?t="opera":"undefined"!==typeof window.InstallTrigger?t="firefox":window.chrome?t="chrome":/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function UY(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function qY(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultValue:n,step:r,steps:i}=t;let o=oq(e);if(o)(o.includes("{step}")||o.includes("{steps}"))&&r&&i&&(o=o.replace("{step}",r.toString()).replace("{steps}",i.toString()));else if((0,We.isValidElement)(e)&&!Object.values(e.props).length&&"function"===UY(e.type)){o=qY(e.type({}),t)}else o=oq(n);return o}function GY(e){const t=e.replace(/^#?([\da-f])([\da-f])([\da-f])$/i,(e,t,n,r)=>t+t+n+n+r+r),n=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(t);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}function YY(e){return e.disableBeacon||"center"===e.placement}function ZY(){return!["chrome","safari","firefox","opera"].includes(VY())}function KY(e){let{data:t,debug:n=!1,title:r,warn:i=!1}=e;const o=i?console.warn||console.error:console.log;n&&(r&&t?(console.groupCollapsed("%creact-joyride: ".concat(r),"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(t)?t.forEach(e=>{qU.plainObject(e)&&e.key?o.apply(console,[e.key,e.value]):o.apply(console,[e])}):o.apply(console,[t]),console.groupEnd()):console.error("Missing title or data props"))}function XY(e){if(!qU.plainObject(e))throw new TypeError("Expected an object");const t={};for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(const o in e)({}).hasOwnProperty.call(e,o)&&(r.includes(o)||(t[o]=e[o]));return t}function QY(e,t,n){const r=e=>e.replace("{step}",String(t)).replace("{steps}",String(n));if("string"===UY(e))return r(e);if(!(0,We.isValidElement)(e))return e;const{children:i}=e.props;if("string"===UY(i)&&i.includes("{step}"))return(0,We.cloneElement)(e,{children:r(i)});if(Array.isArray(i))return(0,We.cloneElement)(e,{children:i.map(e=>"string"===typeof e?r(e):QY(e,t,n))});if("function"===UY(e.type)&&!Object.values(e.props).length){return QY(e.type({}),t,n)}return e}var JY={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},eZ={back:"Back",close:"Close",last:"Last",next:"Next",nextLabelWithProgress:"Next (Step {step} of {steps})",open:"Open the dialog",skip:"Skip"},tZ={event:"click",placement:"bottom",offset:10,disableBeacon:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrollParentFix:!1,disableScrolling:!1,hideBackButton:!1,hideCloseButton:!1,hideFooter:!1,isFixed:!1,locale:eZ,showProgress:!1,showSkipButton:!1,spotlightClicks:!1,spotlightPadding:10},nZ={continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:void 0,hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]},rZ={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100},iZ={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},oZ={borderRadius:4,position:"absolute"};function aZ(e){return function(e){if(!qU.plainObject(e))throw new TypeError("Expected an object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;const i={};for(const o in e)({}).hasOwnProperty.call(e,o)&&n.includes(o)&&(i[o]=e[o]);return i}(e,"beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","hideCloseButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent")}function sZ(e,t){var n,r,o,a,s,l;const c=null!=t?t:{},d=aq.all([tZ,aZ(e),c],{isMergeableObject:qU.plainObject}),u=function(e,t){var n,r,o,a,s;const{floaterProps:l,styles:c}=e,d=aq(null!=(n=t.floaterProps)?n:{},null!=l?l:{}),u=aq(null!=c?c:{},null!=(r=t.styles)?r:{}),p=aq(rZ,u.options||{}),h="center"===t.placement||t.disableBeacon;let{width:m}=p;window.innerWidth>480&&(m=380),"width"in p&&(m="number"===typeof p.width&&window.innerWidth<p.width?window.innerWidth-30:p.width);const f={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:p.zIndex},g={beacon:(0,i.A)((0,i.A)({},iZ),{},{display:h?"none":"inline-block",height:p.beaconSize,position:"relative",width:p.beaconSize,zIndex:p.zIndex}),beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:p.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:"rgba(".concat(GY(p.primaryColor).join(","),", 0.2)"),border:"2px solid ".concat(p.primaryColor),borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:p.backgroundColor,borderRadius:5,boxSizing:"border-box",color:p.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:m},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:(0,i.A)((0,i.A)({},iZ),{},{backgroundColor:p.primaryColor,borderRadius:4,color:"#fff"}),buttonBack:(0,i.A)((0,i.A)({},iZ),{},{color:p.primaryColor,marginLeft:"auto",marginRight:5}),buttonClose:(0,i.A)((0,i.A)({},iZ),{},{color:p.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14}),buttonSkip:(0,i.A)((0,i.A)({},iZ),{},{color:p.textColor,fontSize:14}),overlay:(0,i.A)((0,i.A)({},f),{},{backgroundColor:p.overlayColor,mixBlendMode:"hard-light"}),overlayLegacy:(0,i.A)({},f),overlayLegacyCenter:(0,i.A)((0,i.A)({},f),{},{backgroundColor:p.overlayColor}),spotlight:(0,i.A)((0,i.A)({},oZ),{},{backgroundColor:"gray"}),spotlightLegacy:(0,i.A)((0,i.A)({},oZ),{},{boxShadow:"0 0 0 9999px ".concat(p.overlayColor,", ").concat(p.spotlightShadow)}),floaterStyles:{arrow:{color:null!=(s=null==(a=null==(o=null==d?void 0:d.styles)?void 0:o.arrow)?void 0:a.color)?s:p.arrowColor},options:{zIndex:p.zIndex+100}},options:p};return aq(g,u)}(e,d),p=$Y(IY(d.target),d.disableScrollParentFix),h=aq.all([JY,null!=(n=e.floaterProps)?n:{},null!=(r=d.floaterProps)?r:{}]);return h.offset=d.offset,h.styles=aq(null!=(o=h.styles)?o:{},u.floaterStyles),h.offset+=null!=(s=null!=(a=e.spotlightPadding)?a:d.spotlightPadding)?s:0,d.placementBeacon&&h.wrapperOptions&&(h.wrapperOptions.placement=d.placementBeacon),p&&h.options.preventOverflow&&(h.options.preventOverflow.boundariesElement="window"),(0,i.A)((0,i.A)({},d),{},{locale:aq.all([eZ,null!=(l=e.locale)?l:{},d.locale||{}]),floaterProps:h,styles:XY(u,"floaterStyles")})}function lZ(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return qU.plainObject(e)?!!e.target||(KY({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(KY({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function cZ(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return qU.array(e)?e.every(e=>lZ(e,t)):(KY({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var dZ,uZ={action:"init",controlled:!1,index:0,lifecycle:PY.INIT,origin:null,size:0,status:DY.IDLE},pZ=(dZ=XY(uZ,"controlled","size"),Object.keys(dZ)),hZ=class{constructor(e){var t=this;bY(this,"beaconPopper"),bY(this,"tooltipPopper"),bY(this,"data",new Map),bY(this,"listener"),bY(this,"store",new Map),bY(this,"addListener",e=>{this.listener=e}),bY(this,"setSteps",e=>{const{size:t,status:n}=this.getState(),r={size:e.length,status:n};this.data.set("steps",e),n===DY.WAITING&&!t&&e.length&&(r.status=DY.RUNNING),this.setState(r)}),bY(this,"getPopper",e=>"beacon"===e?this.beaconPopper:this.tooltipPopper),bY(this,"setPopper",(e,t)=>{"beacon"===e?this.beaconPopper=t:this.tooltipPopper=t}),bY(this,"cleanupPoppers",()=>{this.beaconPopper=null,this.tooltipPopper=null}),bY(this,"close",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{index:n,status:r}=t.getState();r===DY.RUNNING&&t.setState((0,i.A)({},t.getNextState({action:MY,index:n+1,origin:e})))}),bY(this,"go",e=>{const{controlled:t,status:n}=this.getState();if(t||n!==DY.RUNNING)return;const r=this.getSteps()[e];this.setState((0,i.A)((0,i.A)({},this.getNextState({action:kY,index:e})),{},{status:r?n:DY.FINISHED}))}),bY(this,"info",()=>this.getState()),bY(this,"next",()=>{const{index:e,status:t}=this.getState();t===DY.RUNNING&&this.setState(this.getNextState({action:AY,index:e+1}))}),bY(this,"open",()=>{const{status:e}=this.getState();e===DY.RUNNING&&this.setState((0,i.A)({},this.getNextState({action:TY,lifecycle:PY.TOOLTIP})))}),bY(this,"prev",()=>{const{index:e,status:t}=this.getState();t===DY.RUNNING&&this.setState((0,i.A)({},this.getNextState({action:SY,index:e-1})))}),bY(this,"reset",function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{controlled:n}=t.getState();n||t.setState((0,i.A)((0,i.A)({},t.getNextState({action:CY,index:0})),{},{status:e?DY.RUNNING:DY.READY}))}),bY(this,"skip",()=>{const{status:e}=this.getState();e===DY.RUNNING&&this.setState({action:OY,lifecycle:PY.INIT,status:DY.SKIPPED})}),bY(this,"start",e=>{const{index:t,size:n}=this.getState();this.setState((0,i.A)((0,i.A)({},this.getNextState({action:wY,index:qU.number(e)?e:t},!0)),{},{status:n?DY.RUNNING:DY.WAITING}))}),bY(this,"stop",function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{index:n,status:r}=t.getState();[DY.FINISHED,DY.SKIPPED].includes(r)||t.setState((0,i.A)((0,i.A)({},t.getNextState({action:_Y,index:n+(e?1:0)})),{},{status:DY.PAUSED}))}),bY(this,"update",e=>{var t,n;if(!function(e,t){return!(!qU.plainObject(e)||!qU.array(t))&&Object.keys(e).every(e=>t.includes(e))}(e,pZ))throw new Error("State is not valid. Valid keys: ".concat(pZ.join(", ")));this.setState((0,i.A)({},this.getNextState((0,i.A)((0,i.A)((0,i.A)({},this.getState()),e),{},{action:null!=(t=e.action)?t:TY,origin:null!=(n=e.origin)?n:null}),!0)))});const{continuous:n=!1,stepIndex:r,steps:o=[]}=null!=e?e:{};this.setState({action:jY,controlled:qU.number(r),continuous:n,index:qU.number(r)?r:0,lifecycle:PY.INIT,origin:null,status:o.length?DY.READY:DY.IDLE},!0),this.beaconPopper=null,this.tooltipPopper=null,this.listener=null,this.setSteps(o)}getState(){return this.store.size?{action:this.store.get("action")||"",controlled:this.store.get("controlled")||!1,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}:(0,i.A)({},uZ)}getNextState(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n,r,i,o,a;const{action:s,controlled:l,index:c,size:d,status:u}=this.getState(),p=qU.number(e.index)?e.index:c,h=l&&!t?c:Math.min(Math.max(p,0),d);return{action:null!=(n=e.action)?n:s,controlled:l,index:h,lifecycle:null!=(r=e.lifecycle)?r:PY.INIT,origin:null!=(i=e.origin)?i:null,size:null!=(o=e.size)?o:d,status:h===d?DY.FINISHED:null!=(a=e.status)?a:u}}getSteps(){const e=this.data.get("steps");return Array.isArray(e)?e:[]}hasUpdatedState(e){return JSON.stringify(e)!==JSON.stringify(this.getState())}setState(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.getState(),{action:r,index:o,lifecycle:a,origin:s=null,size:l,status:c}=(0,i.A)((0,i.A)({},n),e);this.store.set("action",r),this.store.set("index",o),this.store.set("lifecycle",a),this.store.set("origin",s),this.store.set("size",l),this.store.set("status",c),t&&(this.store.set("controlled",e.controlled),this.store.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(n)&&this.listener(this.getState())}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};var mZ=function(e){let{styles:t}=e;return We.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:t})},fZ=class extends We.Component{constructor(){super(...arguments),bY(this,"isActive",!1),bY(this,"resizeTimeout"),bY(this,"scrollTimeout"),bY(this,"scrollParent"),bY(this,"state",{isScrolling:!1,mouseOverSpotlight:!1,showSpotlight:!0}),bY(this,"hideSpotlight",()=>{const{continuous:e,disableOverlay:t,lifecycle:n}=this.props,r=[PY.INIT,PY.BEACON,PY.COMPLETE,PY.ERROR];return t||(e?r.includes(n):n!==PY.TOOLTIP)}),bY(this,"handleMouseMove",e=>{const{mouseOverSpotlight:t}=this.state,{height:n,left:r,position:i,top:o,width:a}=this.spotlightStyles,s="fixed"===i?e.clientY:e.pageY,l="fixed"===i?e.clientX:e.pageX,c=l>=r&&l<=r+a&&(s>=o&&s<=o+n);c!==t&&this.updateState({mouseOverSpotlight:c})}),bY(this,"handleScroll",()=>{const{target:e}=this.props,t=IY(e);if(this.scrollParent!==document){const{isScrolling:e}=this.state;e||this.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout(()=>{this.updateState({isScrolling:!1,showSpotlight:!0})},50)}else BY(t,"sticky")&&this.updateState({})}),bY(this,"handleResize",()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.isActive&&this.forceUpdate()},100)})}componentDidMount(){const{debug:e,disableScrolling:t,disableScrollParentFix:n=!1,target:r}=this.props,i=IY(r);this.scrollParent=FY(null!=i?i:document.body,n,!0),this.isActive=!0,window.addEventListener("resize",this.handleResize)}componentDidUpdate(e){var t;const{disableScrollParentFix:n,lifecycle:r,spotlightClicks:i,target:o}=this.props,{changed:a}=nq(e,this.props);if(a("target")||a("disableScrollParentFix")){const e=IY(o);this.scrollParent=FY(null!=e?e:document.body,n,!0)}a("lifecycle",PY.TOOLTIP)&&(null==(t=this.scrollParent)||t.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(()=>{const{isScrolling:e}=this.state;e||this.updateState({showSpotlight:!0})},100)),(a("spotlightClicks")||a("disableOverlay")||a("lifecycle"))&&(i&&r===PY.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):r!==PY.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}componentWillUnmount(){var e;this.isActive=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),null==(e=this.scrollParent)||e.removeEventListener("scroll",this.handleScroll)}get overlayStyles(){const{mouseOverSpotlight:e}=this.state,{disableOverlayClose:t,placement:n,styles:r}=this.props;let o=r.overlay;return ZY()&&(o="center"===n?r.overlayLegacyCenter:r.overlayLegacy),(0,i.A)({cursor:t?"default":"pointer",height:LY(),pointerEvents:e?"none":"auto"},o)}get spotlightStyles(){var e,t,n;const{showSpotlight:r}=this.state,{disableScrollParentFix:o=!1,spotlightClicks:a,spotlightPadding:s=0,styles:l,target:c}=this.props,d=IY(c),u=NY(d),p=BY(d),h=function(e,t,n){var r,i,o;const a=NY(e),s=FY(e,n),l=$Y(e,n),c=BY(e);let d=0,u=null!=(r=null==a?void 0:a.top)?r:0;l&&c?u=(null!=(i=null==e?void 0:e.offsetTop)?i:0)-(null!=(o=null==s?void 0:s.scrollTop)?o:0):s instanceof HTMLElement&&(d=s.scrollTop,l||BY(e)||(u+=d),s.isSameNode(HY())||(u+=HY().scrollTop));return Math.floor(u-t)}(d,s,o);return(0,i.A)((0,i.A)({},ZY()?l.spotlightLegacy:l.spotlight),{},{height:Math.round((null!=(e=null==u?void 0:u.height)?e:0)+2*s),left:Math.round((null!=(t=null==u?void 0:u.left)?t:0)-s),opacity:r?1:0,pointerEvents:a?"none":"auto",position:p?"fixed":"absolute",top:h,transition:"opacity 0.2s",width:Math.round((null!=(n=null==u?void 0:u.width)?n:0)+2*s)})}updateState(e){this.isActive&&this.setState(t=>(0,i.A)((0,i.A)({},t),e))}render(){const{showSpotlight:e}=this.state,{onClickOverlay:t,placement:n}=this.props,{hideSpotlight:r,overlayStyles:o,spotlightStyles:a}=this;if(r())return null;let s="center"!==n&&e&&We.createElement(mZ,{styles:a});if("safari"===VY()){const{mixBlendMode:e,zIndex:t}=o,n=Ko(o,fY);s=We.createElement("div",{style:(0,i.A)({},n)},s),delete o.backgroundColor}return We.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:t,role:"presentation",style:o},s)}},gZ=class extends We.Component{constructor(){super(...arguments),bY(this,"node",null)}componentDidMount(){const{id:e}=this.props;RY()&&(this.node=document.createElement("div"),this.node.id=e,document.body.appendChild(this.node),WY||this.renderReact15())}componentDidUpdate(){RY()&&(WY||this.renderReact15())}componentWillUnmount(){RY()&&this.node&&(WY||ut.unmountComponentAtNode(this.node),this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=null))}renderReact15(){if(!RY())return;const{children:e}=this.props;this.node&&ut.unstable_renderSubtreeIntoContainer(this,e,this.node)}renderReact16(){if(!RY()||!WY)return null;const{children:e}=this.props;return this.node?ut.createPortal(e,this.node):null}render(){return WY?this.renderReact16():null}},vZ=class{constructor(e,t){if(bY(this,"element"),bY(this,"options"),bY(this,"canBeTabbed",e=>{const{tabIndex:t}=e;return!(null===t||t<0)&&this.canHaveFocus(e)}),bY(this,"canHaveFocus",e=>{const t=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(t)&&!e.getAttribute("disabled")||"a"===t&&!!e.getAttribute("href"))&&this.isVisible(e)}),bY(this,"findValidTabElements",()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)),bY(this,"handleKeyDown",e=>{const{code:t="Tab"}=this.options;e.code===t&&this.interceptTab(e)}),bY(this,"interceptTab",e=>{e.preventDefault();const t=this.findValidTabElements(),{shiftKey:n}=e;if(!t.length)return;let r=document.activeElement?t.indexOf(document.activeElement):0;-1===r||!n&&r+1===t.length?r=0:n&&0===r?r=t.length-1:r+=n?-1:1,t[r].focus()}),bY(this,"isHidden",e=>{const t=e.offsetWidth<=0&&e.offsetHeight<=0,n=window.getComputedStyle(e);return!(!t||e.innerHTML)||(t&&"visible"!==n.getPropertyValue("overflow")||"none"===n.getPropertyValue("display"))}),bY(this,"isVisible",e=>{let t=e;for(;t;)if(t instanceof HTMLElement){if(t===document.body)break;if(this.isHidden(t))return!1;t=t.parentNode}return!0}),bY(this,"removeScope",()=>{window.removeEventListener("keydown",this.handleKeyDown)}),bY(this,"checkFocus",e=>{document.activeElement!==e&&(e.focus(),window.requestAnimationFrame(()=>this.checkFocus(e)))}),bY(this,"setFocus",()=>{const{selector:e}=this.options;if(!e)return;const t=this.element.querySelector(e);t&&window.requestAnimationFrame(()=>this.checkFocus(t))}),!(e instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=e,this.options=t,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}},xZ=class extends We.Component{constructor(e){if(super(e),bY(this,"beacon",null),bY(this,"setBeaconRef",e=>{this.beacon=e}),e.beaconComponent)return;const t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id="joyride-beacon-animation",e.nonce&&n.setAttribute("nonce",e.nonce);n.appendChild(document.createTextNode("\n        @keyframes joyride-beacon-inner {\n          20% {\n            opacity: 0.9;\n          }\n        \n          90% {\n            opacity: 0.7;\n          }\n        }\n        \n        @keyframes joyride-beacon-outer {\n          0% {\n            transform: scale(1);\n          }\n        \n          45% {\n            opacity: 0.7;\n            transform: scale(0.75);\n          }\n        \n          100% {\n            opacity: 0.9;\n            transform: scale(1);\n          }\n        }\n      ")),t.appendChild(n)}componentDidMount(){const{shouldFocus:e}=this.props;setTimeout(()=>{qU.domElement(this.beacon)&&e&&this.beacon.focus()},0)}componentWillUnmount(){const e=document.getElementById("joyride-beacon-animation");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e)}render(){const{beaconComponent:e,continuous:t,index:n,isLastStep:r,locale:o,onClickOrHover:a,size:s,step:l,styles:c}=this.props,d=qY(o.open),u={"aria-label":d,onClick:a,onMouseEnter:a,ref:this.setBeaconRef,title:d};let p;if(e){const o=e;p=We.createElement(o,(0,i.A)({continuous:t,index:n,isLastStep:r,size:s,step:l},u))}else p=We.createElement("button",(0,i.A)({key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:c.beacon,type:"button"},u),We.createElement("span",{style:c.beaconInner}),We.createElement("span",{style:c.beaconOuter}));return p}};var yZ=function(e){let{styles:t}=e,n=Ko(e,gY);const{color:r,height:o,width:a}=t,s=Ko(t,vY);return We.createElement("button",(0,i.A)({style:s,type:"button"},n),We.createElement("svg",{height:"number"===typeof o?"".concat(o,"px"):o,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:"number"===typeof a?"".concat(a,"px"):a,xmlns:"http://www.w3.org/2000/svg"},We.createElement("g",null,We.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))};var bZ=function(e){const{backProps:t,closeProps:n,index:r,isLastStep:o,primaryProps:a,skipProps:s,step:l,tooltipProps:c}=e,{content:d,hideBackButton:u,hideCloseButton:p,hideFooter:h,showSkipButton:m,styles:f,title:g}=l,v={};return v.primary=We.createElement("button",(0,i.A)({"data-test-id":"button-primary",style:f.buttonNext,type:"button"},a)),m&&!o&&(v.skip=We.createElement("button",(0,i.A)({"aria-live":"off","data-test-id":"button-skip",style:f.buttonSkip,type:"button"},s))),!u&&r>0&&(v.back=We.createElement("button",(0,i.A)({"data-test-id":"button-back",style:f.buttonBack,type:"button"},t))),v.close=!p&&We.createElement(yZ,(0,i.A)({"data-test-id":"button-close",styles:f.buttonClose},n)),We.createElement("div",(0,i.A)({key:"JoyrideTooltip","aria-label":qY(null!=g?g:d),className:"react-joyride__tooltip",style:f.tooltip},c),We.createElement("div",{style:f.tooltipContainer},g&&We.createElement("h1",{"aria-label":qY(g),style:f.tooltipTitle},g),We.createElement("div",{style:f.tooltipContent},d)),!h&&We.createElement("div",{style:f.tooltipFooter},We.createElement("div",{style:f.tooltipFooterSpacer},v.skip),v.back,v.primary),v.close)},jZ=class extends We.Component{constructor(){super(...arguments),bY(this,"handleClickBack",e=>{e.preventDefault();const{helpers:t}=this.props;t.prev()}),bY(this,"handleClickClose",e=>{e.preventDefault();const{helpers:t}=this.props;t.close("button_close")}),bY(this,"handleClickPrimary",e=>{e.preventDefault();const{continuous:t,helpers:n}=this.props;t?n.next():n.close("button_primary")}),bY(this,"handleClickSkip",e=>{e.preventDefault();const{helpers:t}=this.props;t.skip()}),bY(this,"getElementsProps",()=>{const{continuous:e,index:t,isLastStep:n,setTooltipRef:r,size:i,step:o}=this.props,{back:a,close:s,last:l,next:c,nextLabelWithProgress:d,skip:u}=o.locale,p=qY(a),h=qY(s),m=qY(l),f=qY(c),g=qY(u);let v=s,x=h;if(e){if(v=c,x=f,o.showProgress&&!n){const e=qY(d,{step:t+1,steps:i});v=QY(d,t+1,i),x=e}n&&(v=l,x=m)}return{backProps:{"aria-label":p,children:a,"data-action":"back",onClick:this.handleClickBack,role:"button",title:p},closeProps:{"aria-label":h,children:s,"data-action":"close",onClick:this.handleClickClose,role:"button",title:h},primaryProps:{"aria-label":x,children:v,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:x},skipProps:{"aria-label":g,children:u,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:g},tooltipProps:{"aria-modal":!0,ref:r,role:"alertdialog"}}})}render(){const{continuous:e,index:t,isLastStep:n,setTooltipRef:r,size:o,step:a}=this.props,{beaconComponent:s,tooltipComponent:l}=a,c=Ko(a,xY);let d;if(l){const a=(0,i.A)((0,i.A)({},this.getElementsProps()),{},{continuous:e,index:t,isLastStep:n,size:o,step:c,setTooltipRef:r}),s=l;d=We.createElement(s,(0,i.A)({},a))}else d=We.createElement(bZ,(0,i.A)((0,i.A)({},this.getElementsProps()),{},{continuous:e,index:t,isLastStep:n,size:o,step:a}));return d}},wZ=class extends We.Component{constructor(){super(...arguments),bY(this,"scope",null),bY(this,"tooltip",null),bY(this,"handleClickHoverBeacon",e=>{const{step:t,store:n}=this.props;"mouseenter"===e.type&&"hover"!==t.event||n.update({lifecycle:PY.TOOLTIP})}),bY(this,"setTooltipRef",e=>{this.tooltip=e}),bY(this,"setPopper",(e,t)=>{var n;const{action:r,lifecycle:i,step:o,store:a}=this.props;"wrapper"===t?a.setPopper("beacon",e):a.setPopper("tooltip",e),a.getPopper("beacon")&&(a.getPopper("tooltip")||"center"===o.placement)&&i===PY.INIT&&a.update({action:r,lifecycle:PY.READY}),(null==(n=o.floaterProps)?void 0:n.getPopper)&&o.floaterProps.getPopper(e,t)}),bY(this,"renderTooltip",e=>{const{continuous:t,helpers:n,index:r,size:o,step:a}=this.props;return We.createElement(jZ,(0,i.A)({continuous:t,helpers:n,index:r,isLastStep:r+1===o,setTooltipRef:this.setTooltipRef,size:o,step:a},e))})}componentDidMount(){const{debug:e,index:t}=this.props;KY({title:"step:".concat(t),data:[{key:"props",value:this.props}],debug:e})}componentDidUpdate(e){var t;const{action:n,callback:r,continuous:o,controlled:a,debug:s,helpers:l,index:c,lifecycle:d,shouldScroll:u,status:p,step:h,store:m}=this.props,{changed:f,changedFrom:g}=nq(e,this.props),v=l.info(),x=o&&n!==MY&&(c>0||n===SY),y=f("action")||f("index")||f("lifecycle")||f("status"),b=g("lifecycle",[PY.TOOLTIP,PY.INIT],PY.INIT),j=f("action",[AY,SY,OY,MY]),w=a&&c===e.index;if(j&&(b||w)&&r((0,i.A)((0,i.A)({},v),{},{index:e.index,lifecycle:PY.COMPLETE,step:e.step,type:EY.STEP_AFTER})),"center"===h.placement&&p===DY.RUNNING&&f("index")&&n!==wY&&d===PY.INIT&&m.update({lifecycle:PY.READY}),y){const e=IY(h.target),t=!!e,o=t&&function(e){var t;if(!e)return!1;let n=e;for(;n&&n!==document.body;){if(n instanceof HTMLElement){const{display:e,visibility:t}=getComputedStyle(n);if("none"===e||"hidden"===t)return!1}n=null!=(t=n.parentElement)?t:null}return!0}(e);o?(g("status",DY.READY,DY.RUNNING)||g("lifecycle",PY.INIT,PY.READY))&&r((0,i.A)((0,i.A)({},v),{},{step:h,type:EY.STEP_BEFORE})):(console.warn(t?"Target not visible":"Target not mounted",h),r((0,i.A)((0,i.A)({},v),{},{type:EY.TARGET_NOT_FOUND,step:h})),a||m.update({index:c+(n===SY?-1:1)}))}g("lifecycle",PY.INIT,PY.READY)&&m.update({lifecycle:YY(h)||x?PY.TOOLTIP:PY.BEACON}),f("index")&&KY({title:"step:".concat(d),data:[{key:"props",value:this.props}],debug:s}),f("lifecycle",PY.BEACON)&&r((0,i.A)((0,i.A)({},v),{},{step:h,type:EY.BEACON})),f("lifecycle",PY.TOOLTIP)&&(r((0,i.A)((0,i.A)({},v),{},{step:h,type:EY.TOOLTIP})),u&&this.tooltip&&(this.scope=new vZ(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus())),g("lifecycle",[PY.TOOLTIP,PY.INIT],PY.INIT)&&(null==(t=this.scope)||t.removeScope(),m.cleanupPoppers())}componentWillUnmount(){var e;null==(e=this.scope)||e.removeScope()}get open(){const{lifecycle:e,step:t}=this.props;return YY(t)||e===PY.TOOLTIP}render(){const{continuous:e,debug:t,index:n,nonce:r,shouldScroll:o,size:a,step:s}=this.props,l=IY(s.target);return lZ(s)&&qU.domElement(l)?We.createElement("div",{key:"JoyrideStep-".concat(n),className:"react-joyride__step"},We.createElement(mY,(0,i.A)((0,i.A)({},s.floaterProps),{},{component:this.renderTooltip,debug:t,getPopper:this.setPopper,id:"react-joyride-step-".concat(n),open:this.open,placement:s.placement,target:s.target}),We.createElement(xZ,{beaconComponent:s.beaconComponent,continuous:e,index:n,isLastStep:n+1===a,locale:s.locale,nonce:r,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:o,size:a,step:s,styles:s.styles}))):null}},_Z=class extends We.Component{constructor(e){super(e),bY(this,"helpers"),bY(this,"store"),bY(this,"callback",e=>{const{callback:t}=this.props;qU.function(t)&&t(e)}),bY(this,"handleKeyboard",e=>{const{index:t,lifecycle:n}=this.state,{steps:r}=this.props,i=r[t];n===PY.TOOLTIP&&"Escape"===e.code&&i&&!i.disableCloseOnEsc&&this.store.close("keyboard")}),bY(this,"handleClickOverlay",()=>{const{index:e}=this.state,{steps:t}=this.props;sZ(this.props,t[e]).disableOverlayClose||this.helpers.close("overlay")}),bY(this,"syncState",e=>{this.setState(e)});const{debug:t,getHelpers:n,run:r=!0,stepIndex:o}=e;var a;this.store=(a=(0,i.A)((0,i.A)({},e),{},{controlled:r&&qU.number(o)}),new hZ(a)),this.helpers=this.store.getHelpers();const{addListener:s}=this.store;KY({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:t}),s(this.syncState),n&&n(this.helpers),this.state=this.store.getState()}componentDidMount(){if(!RY())return;const{debug:e,disableCloseOnEsc:t,run:n,steps:r}=this.props,{start:i}=this.store;cZ(r,e)&&n&&i(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}componentDidUpdate(e,t){if(!RY())return;const{action:n,controlled:r,index:o,status:a}=this.state,{debug:s,run:l,stepIndex:c,steps:d}=this.props,{stepIndex:u,steps:p}=e,{reset:h,setSteps:m,start:f,stop:g,update:v}=this.store,{changed:x}=nq(e,this.props),{changed:y,changedFrom:b}=nq(t,this.state),j=sZ(this.props,d[o]),w=!FU(p,d),_=qU.number(c)&&x("stepIndex"),C=IY(j.target);if(w&&(cZ(d,s)?m(d):console.warn("Steps are not valid",d)),x("run")&&(l?f(c):g()),_){let e=qU.number(u)&&u<c?AY:SY;n===_Y&&(e=wY),[DY.FINISHED,DY.SKIPPED].includes(a)||v({action:n===MY?MY:e,index:c,lifecycle:PY.INIT})}r||a!==DY.RUNNING||0!==o||C||(this.store.update({index:o+1}),this.callback((0,i.A)((0,i.A)({},this.state),{},{type:EY.TARGET_NOT_FOUND,step:j})));const S=(0,i.A)((0,i.A)({},this.state),{},{index:o,step:j});if(y("action",[AY,SY,OY,MY])&&y("status",DY.PAUSED)){const e=sZ(this.props,d[t.index]);this.callback((0,i.A)((0,i.A)({},S),{},{index:t.index,lifecycle:PY.COMPLETE,step:e,type:EY.STEP_AFTER}))}if(y("status",[DY.FINISHED,DY.SKIPPED])){const e=sZ(this.props,d[t.index]);r||this.callback((0,i.A)((0,i.A)({},S),{},{index:t.index,lifecycle:PY.COMPLETE,step:e,type:EY.STEP_AFTER})),this.callback((0,i.A)((0,i.A)({},S),{},{type:EY.TOUR_END,step:e,index:t.index})),h()}else b("status",[DY.IDLE,DY.READY],DY.RUNNING)?this.callback((0,i.A)((0,i.A)({},S),{},{type:EY.TOUR_START})):(y("status")||y("action",CY))&&this.callback((0,i.A)((0,i.A)({},S),{},{type:EY.TOUR_STATUS}));this.scrollToStep(t)}componentWillUnmount(){const{disableCloseOnEsc:e}=this.props;e||document.body.removeEventListener("keydown",this.handleKeyboard)}scrollToStep(e){const{index:t,lifecycle:n,status:r}=this.state,{debug:i,disableScrollParentFix:o=!1,scrollDuration:a,scrollOffset:s=20,scrollToFirstStep:l=!1,steps:c}=this.props,d=sZ(this.props,c[t]),u=IY(d.target),p=function(e){const{isFirstStep:t,lifecycle:n,previousLifecycle:r,scrollToFirstStep:i,step:o,target:a}=e;return!o.disableScrolling&&(!t||i||n===PY.TOOLTIP)&&"center"!==o.placement&&(!o.isFixed||!BY(a))&&r!==n&&[PY.BEACON,PY.TOOLTIP].includes(n)}({isFirstStep:0===t,lifecycle:n,previousLifecycle:e.lifecycle,scrollToFirstStep:l,step:d,target:u});if(r===DY.RUNNING&&p){const e=$Y(u,o),l=FY(u,o);let c=Math.floor(zY(u,s,o))||0;KY({title:"scrollToStep",data:[{key:"index",value:t},{key:"lifecycle",value:n},{key:"status",value:r}],debug:i});const p=this.store.getPopper("beacon"),h=this.store.getPopper("tooltip");if(n===PY.BEACON&&p){const{offsets:t,placement:n}=p;["bottom"].includes(n)||e||(c=Math.floor(t.popper.top-s))}else if(n===PY.TOOLTIP&&h){const{flipped:t,offsets:n,placement:r}=h;!["top","right","left"].includes(r)||t||e?c-=d.spotlightPadding:c=Math.floor(n.popper.top-s)}c=c>=0?c:0,r===DY.RUNNING&&function(e,t){const{duration:n,element:r}=t;return new Promise((t,i)=>{const{scrollTop:o}=r,a=e>o?e-o:o-e;rq.top(r,e,{duration:a<100?50:n},e=>e&&"Element already at target scroll position"!==e.message?i(e):t())})}(c,{element:l,duration:a}).then(()=>{setTimeout(()=>{var e;null==(e=this.store.getPopper("tooltip"))||e.instance.update()},10)})}}render(){if(!RY())return null;const{index:e,lifecycle:t,status:n}=this.state,{continuous:r=!1,debug:o=!1,nonce:a,scrollToFirstStep:s=!1,steps:l}=this.props,c={};if(n===DY.RUNNING&&l[e]){const n=sZ(this.props,l[e]);c.step=We.createElement(wZ,(0,i.A)((0,i.A)({},this.state),{},{callback:this.callback,continuous:r,debug:o,helpers:this.helpers,nonce:a,shouldScroll:!n.disableScrolling&&(0!==e||s),step:n,store:this.store})),c.overlay=We.createElement(gZ,{id:"react-joyride-portal"},We.createElement(fZ,(0,i.A)((0,i.A)({},n),{},{continuous:r,debug:o,lifecycle:t,onClickOverlay:this.handleClickOverlay})))}return We.createElement("div",{className:"react-joyride"},c.step,c.overlay)}};bY(_Z,"defaultProps",nZ);var CZ=_Z;function SZ(e){let{setRenderer:t,isTour:n,path:r}=e;const o=oo(),a=Nt(),s=$o.getTourState(),{t:l}=vg(),[c,d]=We.useState({stepIndex:0,steps:[],run:!0,showTour:!1});We.useEffect(()=>{const e=u();d((0,i.A)((0,i.A)((0,i.A)({},c),{},{stepIndex:0,run:!0},e),{},{showTour:n?null===e||void 0===e?void 0:e.showTour:n}))},[o,n]);const u=()=>{const e={};return as(r)||"programsTour"!==r?o.pathname.includes(Lc.DOCTOR.PROFILE)?(e.steps=[{target:".profile-tour-step0",title:l("tourProfileTourTitleStep0"),content:l("tourProfileTourContentStep0"),disableBeacon:!0,placement:"top"}],e.scrollOffset=180,e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.profile)):as(r)||"programDashboardTour"!==r?as(r)||"allPatientsTour"!==r?as(r)||"programCoursesTour"!==r?as(r)||"programRulesTour"!==r?as(r)||"prescriptionTemplateTour"!==r?as(r)||"patientDashboardTour"!==r?as(r)||"medicalHistoryTour"!==r?as(r)||"patientCoursesTour"!==r?as(r)||"patientRulesTour"!==r?as(r)||"prescriptionTour"!==r?as(r)||"notesTour"!==r?as(r)||"personalDetailsTour"!==r?as(r)||"fmedicalHistoryTour"!==r?as(r)||"staffTour"!==r?as(r)||"rolesTour"!==r?as(r)||"programSettingsTour"!==r?as(r)||"followUpTour"!==r?as(r)||"adherenceReportTour"!==r||(e.steps=[{target:".adherenceReport-tour-step0",title:l("tourAdherenceReportTitleStep0"),content:l("tourAdherenceReportContentStep0"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.adherenceReportTour)):(e.steps=[{target:".followUp-tour-step0",title:l("tourFollowupTitleStep0"),content:l("tourFollowupContentStep0"),disableBeacon:!0,placement:"top"},{target:".followUp-tour-step1",title:l("tourFollowupTitleStep1"),content:l("tourFollowupContentStep1"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.followUpTour)):(e.steps=[{target:".programSettings-tour-step0",title:l("tourProgramSettingsTitleStep0"),content:l("tourProgramSettingsContentStep0"),disableBeacon:!0,placement:"top"},{target:".programSettings-tour-step1",title:l("tourProgramSettingsTitleStep1"),content:l("tourProgramSettingsContentStep1"),disableBeacon:!0,placement:"top"},{target:".programSettings-tour-step2",title:l("tourProgramSettingsTitleStep2"),content:l("tourProgramSettingsContentStep2"),disableBeacon:!0,placement:"top"},{target:".programSettings-tour-step3",title:l("tourProgramSettingsTitleStep3"),content:l("tourProgramSettingsContentStep3"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.programSettingsTour)):(e.steps=[{target:".roles-tour-step0",title:l("tourRolesTitleStep0"),content:l("tourRolesContentStep0"),disableBeacon:!0,placement:"top"},{target:".roles-tour-step1",title:l("tourRolesTitleStep1"),content:l("tourRolesContentStep1"),disableBeacon:!0,placement:"top"},{target:".roles-tour-step2",title:l("tourRolesTitleStep2"),content:l("tourRolesContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.rolesTour)):(e.steps=[{target:".staff-tour-step0",title:l("tourStaffTitleStep0"),content:l("tourStaffContentStep0"),disableBeacon:!0,placement:"top"},{target:".staff-tour-step1",title:l("tourStaffTitleStep1"),content:l("tourStaffContentStep1"),disableBeacon:!0,placement:"top"},{target:".staff-tour-step2",title:l("tourStaffTitleStep2"),content:l("tourStaffContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.staffTour)):(e.steps=[{target:".fmedicalHistory-tour-step0",title:l("tourMedicalHistoryTitleStep0"),content:l("tourMedicalHistoryContentStep0"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.fmedicalHistory)):(e.steps=[{target:".pd-tour-step0",title:l("tourPersonalTitleStep0"),content:l("tourPersonalContentStep0"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.personalDetailsTour)):(e.steps=[{target:".notes-tour-step0",title:l("tourNotesTitleStep0"),content:l("tourNotesContentStep0"),disableBeacon:!0,placement:"top"},{target:".notes-tour-step1",title:l("tourNotesTitleStep1"),content:l("tourNotesContentStep1"),disableBeacon:!0,placement:"top"},{target:".notes-tour-step2",title:l("tourNotesTitleStep2"),content:l("tourNotesContentStep2"),disableBeacon:!0,placement:"top"},{target:".notes-tour-step3",title:l("tourNotesTitleStep3"),content:l("tourNotesContentStep3"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.notesTour)):(e.steps=[{target:".prescription-tour-step0",title:l("tourPrescriptionTitleStep0"),content:l("tourPrescriptionContentStep0"),disableBeacon:!0,placement:"top"},{target:".prescription-tour-step1",title:l("tourPrescriptionTitleStep1"),content:l("tourPrescriptionContentStep1"),disableBeacon:!0,placement:"top"},{target:".prescription-tour-step2",title:l("tourPrescriptionTitleStep2"),content:l("tourPrescriptionContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.prescriptionTour)):(e.steps=[{target:".patientrules-tour-step0",title:l("tourPatientRulesTitleStep0"),content:l("tourPatientRulesContentStep0"),disableBeacon:!0,placement:"top"},{target:".patientrules-tour-step1",title:l("tourPatientRulesTitleStep1"),content:l("tourPatientRulesContentStep1"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.patientRules)):(e.steps=[{target:".patientCourses-tour-step0",title:l("tourPatientCoursesTitleStep0"),content:l("tourPatientCoursesContentStep0"),disableBeacon:!0,placement:"top"},{target:".patientCourses-tour-step1",title:l("tourPatientCoursesTitleStep1"),content:l("tourPatientCoursesContentStep1"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.patientCourses)):(e.steps=[{target:".medicalHistory-tour-step0",title:l("tourMedicalHistoryTitleStep0"),content:l("tourMedicalHistoryContentStep0"),disableBeacon:!0,placement:"top"},{target:".medicalHistory-tour-step1",title:l("tourMedicalHistoryTitleStep1"),content:l("tourMedicalHistoryContentStep1"),disableBeacon:!0,placement:"top"},{target:".medicalHistory-tour-step3",title:l("tourMedicalHistoryTitleStep3"),content:l("tourMedicalHistoryContentStep3"),disableBeacon:!0,placement:"top"},{target:".medicalHistory-tour-step2",title:l("tourMedicalHistoryTitleStep2"),content:l("tourMedicalHistoryContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.medicalHistory)):(e.steps=[{target:".patientDashboard-tour-step0",title:l("tourPatientDashboardTitleStep0"),content:l("tourPatientDashboardContentStep0"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step1",title:l("tourPatientDashboardTitleStep1"),content:l("tourPatientDashboardContentStep1"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step2",title:l("tourPatientDashboardTitleStep2"),content:l("tourPatientDashboardContentStep2"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step3",title:l("tourPatientDashboardTitleStep3"),content:l("tourPatientDashboardContentStep3"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step4",title:l("tourPatientDashboardTitleStep4"),content:l("tourPatientDashboardContentStep4"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step5",title:l("tourPatientDashboardTitleStep5"),content:l("tourPatientDashboardContentStep5"),disableBeacon:!0,placement:"top"},{target:".patientDashboard-tour-step6",title:l("tourPatientDashboardTitleStep6"),content:l("tourPatientDashboardContentStep6"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.patientDashboard)):(e.steps=[{target:".template-tour-step0",title:l("tourTemplateTitleStep0"),content:l("tourTemplateContentStep0"),disableBeacon:!0,placement:"top"},{target:".template-tour-step1",title:l("tourTemplateTitleStep1"),content:l("tourTemplateContentStep1"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.prescriptionTemplate)):(e.steps=[{target:".programrules-tour-step0",title:l("tourProgramRulesTitleStep0"),content:l("tourProgramRulesContentStep0"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.programRules)):(e.steps=[{target:".schedule-tour-step0",title:l("tourScheduleTitleStep0"),content:l("tourScheduleContentStep0"),disableBeacon:!0,placement:"top"},{target:".schedule-tour-step2",title:l("tourScheduleTitleStep2"),content:l("tourScheduleContentStep2"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.programCourses)):(e.steps=[{target:".patients-tour-step0",title:l("tourPatientsTitleStep0"),content:l("tourPatientsContentStep0"),disableBeacon:!0,placement:"top"},{target:".patients-tour-step1",title:l("tourPatientsTitleStep1"),content:l("tourPatientsContentStep1"),disableBeacon:!0,placement:"top"},{target:".patients-tour-step2",title:l("tourPatientsTitleStep2"),content:l("tourPatientsContentStep2"),disableBeacon:!0,placement:"top"},{target:".patients-tour-step3",title:l("tourPatientsTitleStep3"),content:l("tourPatientsContentStep3"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.allPatients)):(e.steps=[{target:".dashboard-tour-step0",title:l("tourDashboardTitleStep0"),content:l("tourDashboardContentStep0"),disableBeacon:!0,placement:"top"},{target:".dashboard-tour-step1",title:l("tourDashboardTitleStep1"),content:l("tourDashboardContentStep1"),disableBeacon:!0,placement:"top"},{target:".dashboard-tour-step2",title:l("tourDashboardTitleStep2"),content:l("tourDashboardContentStep2"),disableBeacon:!0,placement:"top"},{target:".dashboard-tour-step3",title:l("tourDashboardTitleStep3"),content:l("tourDashboardContentStep3"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.programDashboard)):(e.steps=[{target:".program-tour-step0",title:l("tourProgramTitleStep0"),content:l("tourProgramContentStep0"),disableBeacon:!0,placement:"top"},{target:".program-tour-step1",title:l("tourProgramTitleStep1"),content:l("tourProgramContentStep1"),disableBeacon:!0,placement:"top"},{target:".program-tour-step3",title:l("tourProgramTitleStep3"),content:l("tourProgramContentStep3"),disableBeacon:!0,placement:"top"},{target:".program-tour-step2",title:l("tourProgramTitleStep2"),content:l("tourProgramContentStep2"),disableBeacon:!0,placement:"top"},{target:".program-tour-step4",title:l("tourProgramTitleStep4"),content:l("tourProgramContentStep4"),disableBeacon:!0,placement:"top"},{target:".program-tour-step5",title:l("tourProgramTitleStep5"),content:l("tourProgramContentStep5"),disableBeacon:!0,placement:"top"},{target:".program-tour-step6",title:l("tourProgramTitleStep6"),content:l("tourProgramContentStep6"),disableBeacon:!0,placement:"top"}],e.disableScrollParentFix=!0,e.disableScrolling=!0,e.showTour=!1!==(null===s||void 0===s?void 0:s.allPrograms)),e},p=()=>{as(r)||"programsTour"!==r?o.pathname.includes(Lc.DOCTOR.PROFILE)?$o.setTourState({profile:!1}):as(r)||"programDashboardTour"!==r?as(r)||"allPatientsTour"!==r?as(r)||"programCoursesTour"!==r?as(r)||"programRulesTour"!==r?as(r)||"prescriptionTemplateTour"!==r?as(r)||"patientDashboardTour"!==r?as(r)||"medicalHistoryTour"!==r?as(r)||"patientCoursesTour"!==r?as(r)||"patientRulesTour"!==r?as(r)||"prescriptionTour"!==r?as(r)||"notesTour"!==r?as(r)||"personalDetailsTour"!==r?as(r)||"fmedicalHistoryTour"!==r?as(r)||"staffTour"!==r?as(r)||"rolesTour"!==r?as(r)||"programSettingsTour"!==r?as(r)||"followUpTour"!==r?as(r)||"adherenceReportTour"!==r||$o.setTourState({adherenceReportTour:!1}):$o.setTourState({followUpTour:!1}):$o.setTourState({programSettingsTour:!1}):$o.setTourState({rolesTour:!1}):$o.setTourState({staffTour:!1}):$o.setTourState({fmedicalHistory:!1}):$o.setTourState({personalDetailsTour:!1}):$o.setTourState({notesTour:!1}):$o.setTourState({prescriptionTour:!1}):$o.setTourState({patientRules:!1}):$o.setTourState({patientCourses:!1}):$o.setTourState({medicalHistory:!1}):$o.setTourState({patientDashboard:!1}):$o.setTourState({prescriptionTemplate:!1}):$o.setTourState({programRules:!1}):$o.setTourState({programCourses:!1}):$o.setTourState({allPatients:!1}):$o.setTourState({programDashboard:!1}):($o.setTourState({allPrograms:!1}),t(Math.random()))};return c.showTour?(0,Gt.jsx)(CZ,(0,i.A)((0,i.A)({},c),{},{callback:e=>{const{action:t,index:n,status:r,type:o}=e;[EY.STEP_AFTER,EY.TARGET_NOT_FOUND].includes(o)?(document.body.classList.add("joyride-open"),d((0,i.A)((0,i.A)({},c),{},{stepIndex:n+(t===SY?-1:1)}))):[DY.FINISHED].includes(r)?(document.body.classList.remove("joyride-open"),d((0,i.A)((0,i.A)({},c),{},{run:!1})),p()):[DY.SKIPPED].includes(r)?(document.body.classList.remove("joyride-open"),d((0,i.A)((0,i.A)({},c),{},{run:!1})),a(Bg({skip_tour:["true"]})),p()):"close"!==t&&"tour:end"!==o||(document.body.classList.remove("joyride-open"),d((0,i.A)((0,i.A)({},c),{},{run:!1})))},continuous:!0,showSkipButton:!0,spotlightClicks:!0,disableOverlayClose:!0,offset:5,locale:{last:"End"},styles:{beaconInner:{backgroundColor:"var(--color-secondary-error-dark)"},beaconOuter:{borderColor:"var(--color-secondary-error-dark)"},tooltipContainer:{textAlign:"justify"},options:{width:"500px",arrowColor:"#ffffff",backgroundColor:"#fff",overlayColor:"rgba(0,0,0,0.6)",primaryColor:"blue",textColor:"#000",zIndex:1203,beaconSize:"28px"}}})):null}SZ.defaultProps={setRenderer:()=>{},isTour:!0,path:""};const AZ=SZ;var kZ=n(47030);function MZ(e){let{fetchListFunction:t,searchText:n,setSearchText:r,pageDetails:i,searchInField:o,placeHolder:a}=e;const{t:s}=vg(),l=function(){i.current_page=1,t(n)},c=()=>{r(""),i.current_page=1,t("")};return(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Rj,{label:"",id:"Search",variant:"outlined",size:"small",onChange:function(e){r(e.target.value)},autoComplete:"search",value:n,onKeyDown:function(e){(e=>13===e.keyCode)(e)&&(e.preventDefault(),l())},placeholder:a||s("rpm_Search"),endAdornment:o&&(0,Gt.jsxs)(H_,{position:"end",children:[n&&(0,Gt.jsx)(Yx,{title:s("rpm_Reset"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",onClick:c,children:(0,Gt.jsx)(Bw.A,{})})}),(0,Gt.jsx)(Yx,{title:s("rpm_Search"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",onClick:l,children:(0,Gt.jsx)(R_.A,{})})})]})})})}),!o&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",onClick:l,variant:"contained",disableElevation:!0,children:s("rpm_Search")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{onClick:c,disabled:!n,color:"primary",variant:"outlined",children:(0,Gt.jsx)(Bw.A,{})})})]})]})}function OZ(e){let{userData:t,roleCustomList:n,roleSystemList:r,rolePredefinedList:o,order:a,orderBy:s,setOrder:l,setOrderBy:c,searchText:d,setSearchText:u,dataParameter:p,roleHead:h,checkState:m,onCheck:f,isSelection:g,nodata:v,fetchRoleCustomList:x,fetchRolePredefinedList:y,pageDetails:b,editButton:j,viewButton:w,deleteButton:_,onProgramChange:C,onResetFilter:S,multipleDelete:A,setHeadcells:k,settingModal:M,initialHeadcells:O,handleSettingModalToggle:T,allPrograms:E}=e;const{t:P}=vg(),D=so(),[R,N]=We.useState(0),L=[{name:P("rpm_Roles"),url:""}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",children:[(0,Gt.jsx)(kH,{labels:L}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:P("rpm_Roles")})})]}),(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:P("rpm_Roles")})})}),(null===t||void 0===t?void 0:t.showCreateRoleBtn)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>D("add"),className:(null===t||void 0===t?void 0:t.showCreateRoleBtn)&&"roles-tour-step2",children:P("rpm_CreateRole")})})]})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsxs)(uH,{sx:{p:0,":last-child":{pb:0}},children:[(0,Gt.jsx)(Eu,{sx:{borderBottom:1,borderColor:"divider"},children:(0,Gt.jsxs)(eU,{value:R,onChange:(e,t)=>{N(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,Gt.jsx)(AV,(0,i.A)({label:P("rpm_CustomRole")},kU(0))),(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:P("rpm_SystemRole")},kU(1)),{},{disabled:!(null!==t&&void 0!==t&&t.isAdmin)})),(0,Gt.jsx)(AV,(0,i.A)({label:P("rpm_PredefinedRole")},kU(2)))]})}),(0,Gt.jsx)(AU,{value:R,index:0,children:(0,Gt.jsx)(Eu,{px:2,py:4,children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,justifyContent:"space-between",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:5,lg:4,className:"roles-tour-step1",children:(0,Gt.jsx)(MZ,{fetchListFunction:x,searchText:d,setSearchText:u,pageDetails:b,searchInField:!0,placeHolder:"Search by role name and description"})}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:8,container:!0,spacing:2,justifyContent:"flex-end",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,className:"roles-tour-step0",children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:as(E)?[]:E,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{C(null===t||void 0===t?void 0:t.code,null===Gc||void 0===Gc?void 0:Gc.CUSTOM),"clear"===n&&S()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:P("rpm_SelectProgram")+"..."}))})}),m.length>0&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:P("rpm_Delete"),children:(0,Gt.jsx)(Kp,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>A(m,{}),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:P("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:T,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:a,orderBy:s,setOrder:l,setOrderBy:c,data:n,headCells:null===h||void 0===h?void 0:h.filter(e=>O.includes(e.id)),dataParameter:p,selected:m,setSelected:f,isSelection:g,noDataImage:v,fetchList:x,pageDetails:b,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[g&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:f,checked:m.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),O.includes("role_name")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"edit/".concat(e.id),children:e.name})}),O.includes("description")&&(0,Gt.jsx)(rC,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.description}),O.includes("access_layer")&&(0,Gt.jsx)(rC,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.group.path}),O.includes("action")&&(0,Gt.jsxs)(rC,{children:[(null===t||void 0===t?void 0:t.showUpdateRoleBtn)&&j(e),(null===t||void 0===t?void 0:t.showReadRoleBtn)&&w(e),(null===t||void 0===t?void 0:t.showDeleteRoleBtn)&&_(e)]})]},e.id))})}),(0,Gt.jsx)(IO,{pageDetails:b,fetchListFunction:x}),(0,Gt.jsx)(fO,{open:M,allHeadCells:h,initialHeadcells:O,setHeadcells:k,onClose:T})]})]})})}),(0,Gt.jsx)(AU,{value:R,index:1,children:(0,Gt.jsx)(Eu,{px:2,py:4,children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:8,children:null===r||void 0===r?void 0:r.map(e=>(0,Gt.jsxs)(Eu,{sx:{bgcolor:"primary.theme.50",p:2.5,borderRadius:1},children:[(0,Gt.jsxs)(JM,{direction:"row",spacing:2,justifyContent:"space-between",children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:"h6.fontWeight",children:P("rpm_SystemRole")}),(0,Gt.jsx)(kZ.A,{})]}),(0,Gt.jsxs)(JM,{direction:"row",spacing:2,sx:{mt:1.5},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",children:P("rpm_RoleName")}),(0,Gt.jsx)(Ym,{variant:"body2",children:e.name})]}),(0,Gt.jsxs)(JM,{direction:"row",spacing:2,sx:{mt:1.5},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",children:P("rpm_Description")}),(0,Gt.jsx)(Ym,{variant:"body2",children:e.description})]})]},e.id))})})})}),(0,Gt.jsx)(AU,{value:R,index:2,children:(0,Gt.jsx)(Eu,{px:2,py:4,children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,justifyContent:"space-between",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:5,lg:4,className:"roles-tour-step1",children:(0,Gt.jsx)(MZ,{fetchListFunction:y,searchText:d,setSearchText:u,pageDetails:b,searchInField:!0,placeHolder:"Search by role name and description"})}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:8,container:!0,spacing:2,justifyContent:"flex-end",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,className:"roles-tour-step0",children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:as(E)?[]:E,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{C(null===t||void 0===t?void 0:t.code,null===Gc||void 0===Gc?void 0:Gc.PREDEFINED),"clear"===n&&S()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:P("rpm_SelectProgram")+"..."}))})}),m.length>0&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:P("rpm_Delete"),children:(0,Gt.jsx)(Kp,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>A(m,{}),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:P("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:T,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:a,orderBy:s,setOrder:l,setOrderBy:c,data:o,headCells:null===h||void 0===h?void 0:h.filter(e=>O.includes(e.id)),dataParameter:p,selected:m,setSelected:f,isSelection:g,noDataImage:v,fetchList:y,pageDetails:b,skeletonVrows:6,className:"theme_scroll",children:null===o||void 0===o?void 0:o.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[g&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:f,checked:m.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),O.includes("role_name")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"edit/".concat(e.id),children:e.name})}),O.includes("description")&&(0,Gt.jsx)(rC,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.description}),O.includes("access_layer")&&(0,Gt.jsx)(rC,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.group.path}),O.includes("action")&&(0,Gt.jsx)(rC,{children:(null===t||void 0===t?void 0:t.showReadRoleBtn)&&w(e)})]},e.id))})}),(0,Gt.jsx)(IO,{pageDetails:b,fetchListFunction:y}),(0,Gt.jsx)(fO,{open:M,allHeadCells:h,initialHeadcells:O,setHeadcells:k,onClose:T})]})]})})})]})})})})]})})}OZ.defaultProps={userData:{},roleHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},searchText:"",setSearchText:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",roleSystemList:[],roleCustomList:[],rolePredefinedList:[],fetchRoleCustomList:()=>{},fetchRolePredefinedList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},filterByProgram:0,onProgramChange:()=>{},programList:[],onApplyFilter:()=>{},onResetFilter:()=>{},multipleDelete:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},allPrograms:[]};const TZ=OZ,EZ=["children","onClose"],PZ=e=>{const{children:t,onClose:n}=e,r=Ko(e,EZ);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};function DZ(e){var t,n,r,i;let{openModal:o,onCloseModal:a,editRole:s}=e;const{t:l}=vg(),c=Ct(Id),d={name:null!==o&&void 0!==o&&null!==(t=o.data)&&void 0!==t&&t.name?null===o||void 0===o||null===(n=o.data)||void 0===n?void 0:n.name:"",description:null!==o&&void 0!==o&&null!==(r=o.data)&&void 0!==r&&r.description?null===o||void 0===o||null===(i=o.data)||void 0===i?void 0:i.description:""};return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(Kw,{fullWidth:!0,maxWidth:"sm",open:o.open,onClose:a,children:(0,Gt.jsx)(Iz,{initialValues:d,validationSchema:gV.editRoleSchema,onSubmit:s,enableReinitialize:!0,children:()=>(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(PZ,{sx:{px:4},onClose:a,children:l("rpm_EditRole")}),(0,Gt.jsx)(s_,{sx:{p:4},dividers:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,direction:"column",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"name",required:!0,sx:{mb:.75},children:l("rpm_RoleName")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"name",name:"name",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_RoleNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_RoleName")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"location",sx:{mb:.75},children:l("rpm_Description")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"description",name:"description",color:"primary",size:"small",rows:3,multiline:!0,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_RoleDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_Description")})})})]})})]})}),(0,Gt.jsx)(iO,{sx:{py:3,px:4},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:a,children:l("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(CT,{loading:c,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:l("rpm_Submit")})})]})})]})})},"editrole_formik")})})}const RZ=["content"],NZ=["content"];const LZ=function(){const e=Nt(),t=so(),{t:n}=vg(),r=Ct(qd),o=!("true"===ls(r,"user_principal.attributes.skip_tour[0]","")),{userData:a}=(0,We.useContext)(Zg),{programList:s}=(0,We.useContext)(j_),l=Ct(Gd),c=Ct(Nd),d=We.useRef([]),[u,p]=(0,We.useState)("desc"),[h,m]=(0,We.useState)("updated_at"),[f,g]=We.useState(""),[v,x]=We.useState(null),[y,b]=We.useState(null),[j,w]=We.useState(null),[_,C]=(0,We.useState)([]),[S,A]=(0,We.useState)(null),[k,M]=(0,We.useState)(null),[O,T]=We.useState(""),[E,P]=(0,We.useState)((0,i.A)({},Fc)),[D,R]=We.useState({open:!1,data:{}}),[N,L]=We.useState({open:!1,data:{}}),[I,F]=We.useState(!1),[$,B]=We.useState(as($o.getRolesHeadcells())?["role_name","description","access_layer","action"]:$o.getRolesHeadcells()),z=(e,t)=>{if(N.open)d.current=[],L((0,i.A)((0,i.A)({},N),{},{open:!N.open}));else{const n=Array.isArray(e)?[...e]:[t.id];d.current=n,L((0,i.A)((0,i.A)({},N),{},{open:!N.open,data:t}))}},H=e=>{R((0,i.A)((0,i.A)({},D),{},{open:!D.open,data:e}))},W=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,n=arguments.length>1?arguments[1]:void 0;const r=as(n)?(0,i.A)((0,i.A)({q:t},E),{},{sort_by:h,sort_order:u,programId:"/".concat(S,"/"),kind:Gc.CUSTOM}):{filterParams:n,sort_by:h,sort_order:u,programId:(null===n||void 0===n?void 0:n.programId)&&"/".concat(null===n||void 0===n?void 0:n.programId,"/"),kind:Gc.CUSTOM};try{const{data:t}=await e(Rg(r)),n=t||{},{content:o}=n,a=Ko(n,RZ);x(o),P(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(o){const t=ls(o,"response.data.code","");as(t)?e(Zo({subTitle:"error:rpm_FetchRolesFailed",severity:$c})):e(Zo({subTitle:bd(t,"error:rpm_FetchRolesFailed"),severity:$c}))}},V=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,n=arguments.length>1?arguments[1]:void 0;const r=as(n)?(0,i.A)((0,i.A)({q:t},E),{},{sort_by:h,sort_order:u,programId:"/".concat(k,"/"),kind:Gc.PREDEFINED}):{filterParams:n,sort_by:h,sort_order:u,programId:(null===n||void 0===n?void 0:n.programId)&&"/".concat(null===n||void 0===n?void 0:n.programId,"/"),kind:Gc.PREDEFINED};try{const{data:t}=await e(Rg(r)),n=t||{},{content:o}=n,a=Ko(n,NZ);b(o),P(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(o){const t=ls(o,"response.data.code","");as(t)?e(Zo({subTitle:"error:rpm_FetchRolesFailed",severity:$c})):e(Zo({subTitle:bd(t,"error:rpm_FetchRolesFailed"),severity:$c}))}},U=()=>{if(null!==S){const e=(0,i.A)((0,i.A)({programId:S},E),{},{current_page:1,per_page:999});W("",e)}if(null!==k){const e=(0,i.A)((0,i.A)({programId:k},E),{},{current_page:1,per_page:999});V("",e)}};We.useEffect(()=>{U()},[S,k]),We.useEffect(()=>{if(c&&!as(s)&&!as(a))if(null!==a&&void 0!==a&&a.isAdmin)W();else if(null!==a&&void 0!==a&&a.showRoleMenu){var e,t;const n=(0,i.A)((0,i.A)({programId:"RPMCORE/".concat(null===(e=s[0])||void 0===e?void 0:e.code)},E),{},{current_page:1,per_page:999});W("",n),A("RPMCORE/".concat(null===(t=s[0])||void 0===t?void 0:t.code))}else W(),A(null)},[c,u,h,s,a]),We.useEffect(()=>{if(c&&!as(s)&&!as(a))if(null!==a&&void 0!==a&&a.isAdmin)V();else if(null!==a&&void 0!==a&&a.showRoleMenu){var e,t;const n=(0,i.A)((0,i.A)({programId:"RPMCORE/".concat(null===(e=s[0])||void 0===e?void 0:e.code)},E),{},{current_page:1,per_page:999});V("",n),M("RPMCORE/".concat(null===(t=s[0])||void 0===t?void 0:t.code))}else V(),M(null)},[c,u,h,s,a]),We.useEffect(()=>{c&&(async()=>{try{const{data:t}=await e(Rg({kind:Gc.SYSTEM})),{content:n}=t||{};w(n)}catch(t){console.log(t)}})()},[c]),We.useEffect(()=>{e(w_({activeMenuItem:"roles",heading:{}}))},[]);const q=[{id:"role_name",label:n("rpm_RoleName"),isSort:!0,sortProperty:"name"},{id:"description",label:n("rpm_Description"),isSort:!0,sortProperty:"description"},{id:"access_layer",label:n("rpm_AccessLevel"),isSort:!0,sortProperty:"access_layer"},{id:"action",label:n("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(TZ,{userData:a,order:u,orderBy:h,setOrder:p,setOrderBy:m,searchText:f,setSearchText:g,dataParameter:"id",checkState:_,onCheck:e=>{if(Array.isArray(e))return C(e.map(e=>e.toString()));const t=e.target.name;_.includes(t)?C(_.filter(e=>e!==t)):C(e=>[...e,t])},isSelection:!1,nodata:D_,roleHead:q,roleSystemList:j,roleCustomList:v,rolePredefinedList:y,fetchRoleCustomList:W,fetchRolePredefinedList:V,pageDetails:E,editButton:e=>(0,Gt.jsx)(Yx,{title:n("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>H(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,Gt.jsx)(Yx,{title:n("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>t("edit/".concat(e.id)),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,Gt.jsx)(Yx,{title:n("rpm_Delete"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:t=>z(t,e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})}),filterByProgram:S,onProgramChange:(e,t)=>{t===(null===Gc||void 0===Gc?void 0:Gc.PREDEFINED)&&M("RPMCORE/".concat(e)),t===(null===Gc||void 0===Gc?void 0:Gc.CUSTOM)&&A("RPMCORE/".concat(e))},programList:s,onApplyFilter:U,onResetFilter:()=>{A(null),M(null),W(),V()},multipleDelete:z,setHeadcells:function(e){B(e),$o.setRolesHeadcells(e)},settingModal:I,initialHeadcells:$,handleSettingModalToggle:()=>{F(!I)},allPrograms:l}),(0,Gt.jsx)(DZ,{openModal:D,onCloseModal:H,editRole:async(t,n)=>{let{setErrors:r}=n;const o=(0,i.A)((0,i.A)({},t),{},{name:t.name,description:t.description});try{await e(((e,t)=>async n=>{n(na(!0));const r=(0,i.A)((0,i.A)({},t),{},{name:t.name,description:t.description});try{const t="".concat(ma.ROLES,"/").concat(e);return await uu(t,r)}finally{n(na(!1))}})(D.data.id,o)),e(Zo({subTitle:"message:rpm_RoleUpdatedSuccessfully",severity:Bc})),W(),R({open:!1,data:{}})}catch(a){const t=ls(a,"response.data.field_errors",{}),n=ls(a,"response.data.code","");as(t)?as(n)?e(Zo({subTitle:a.message,severity:$c})):e(Zo({subTitle:bd(n,"error:rpm_UpdateRoleFailed"),severity:$c})):r(yd(t))}}}),(0,Gt.jsx)(PU,{openModal:N.open,onCloseModal:z,actionFunction:async()=>{try{await e(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return async t=>{if(!as(e)){t(na(!0));try{await Promise.all(e.map(e=>pu("".concat(ma.ROLES,"/").concat(e))))}finally{t(na(!1))}}}}(d.current)),C([]),W(),A(null),M(null),L((0,i.A)((0,i.A)({},N),{},{open:!N.open})),e(Zo({subTitle:"message:rpm_DeleteRoleSuccess",severity:Bc}))}catch(t){const n=ls(t,"response.data.code","");as(n)?e(Zo({subTitle:"error:rpm_RoleDeleteFailed",severity:$c})):e(Zo({subTitle:bd(n,"error:rpm_RoleDeleteFailed"),severity:$c}))}},dataName:N.data.name,options:{primaryText:n("message:rpm_DeleteTitle"),secondaryText:n("message:rpm_DeleteBodyText"),descText:n("message:rpm_DeleteSubText"),btn:{primaryText:n("rpm_Delete"),secondaryText:n("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),!as(s)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:o,path:"rolesTour",setRenderer:T}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:O})," "]})]})};var IZ=n(630),FZ=n(67500),$Z=n(98348),BZ=n(57566);const zZ=We.createContext({});const HZ=zZ,WZ=We.createContext({});const VZ=WZ;function UZ(e){return(0,sr.Ay)("MuiStep",e)}(0,ar.A)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const qZ=["active","children","className","component","completed","disabled","expanded","index","last"],GZ=(0,Un.Ay)("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({},"horizontal"===t.orientation&&{paddingLeft:8,paddingRight:8},t.alternativeLabel&&{flex:1,position:"relative"})}),YZ=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiStep"}),{active:r,children:i,className:o,component:a="div",completed:s,disabled:l,expanded:c=!1,index:d,last:u}=n,p=(0,nn.A)(n,qZ),{activeStep:h,connector:m,alternativeLabel:f,orientation:g,nonLinear:v}=We.useContext(HZ);let[x=!1,y=!1,b=!1]=[r,s,l];h===d?x=void 0===r||r:!v&&h>d?y=void 0===s||s:!v&&h<d&&(b=void 0===l||l);const j=We.useMemo(()=>({index:d,last:u,expanded:c,icon:d+1,active:x,completed:y,disabled:b}),[d,u,c,x,y,b]),w=(0,Ft.A)({},n,{active:x,orientation:g,alternativeLabel:f,completed:y,disabled:b,expanded:c,component:a}),_=(e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:i}=e,o={root:["root",n,r&&"alternativeLabel",i&&"completed"]};return(0,ir.A)(o,UZ,t)})(w),C=(0,Gt.jsxs)(GZ,(0,Ft.A)({as:a,className:(0,nr.A)(_.root,o),ref:t,ownerState:w},p,{children:[m&&f&&0!==d?m:null,i]}));return(0,Gt.jsx)(VZ.Provider,{value:j,children:m&&!f&&0!==d?(0,Gt.jsxs)(We.Fragment,{children:[m,C]}):C})}),ZZ=YZ;function KZ(e){return(0,sr.Ay)("MuiStepConnector",e)}const XZ=(0,ar.A)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]),QZ=["className"],JZ=(0,Un.Ay)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({flex:"1 1 auto"},"vertical"===t.orientation&&{marginLeft:12},t.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})}),eK=(0,Un.Ay)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t["line".concat((0,Fu.A)(n.orientation))]]}})(e=>{let{ownerState:t,theme:n}=e;const r="light"===n.palette.mode?n.palette.grey[400]:n.palette.grey[600];return(0,Ft.A)({display:"block",borderColor:n.vars?n.vars.palette.StepConnector.border:r},"horizontal"===t.orientation&&{borderTopStyle:"solid",borderTopWidth:1},"vertical"===t.orientation&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})}),tK=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiStepConnector"}),{className:r}=n,i=(0,nn.A)(n,QZ),{alternativeLabel:o,orientation:a="horizontal"}=We.useContext(HZ),{active:s,disabled:l,completed:c}=We.useContext(VZ),d=(0,Ft.A)({},n,{alternativeLabel:o,orientation:a,active:s,completed:c,disabled:l}),u=(e=>{const{classes:t,orientation:n,alternativeLabel:r,active:i,completed:o,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",i&&"active",o&&"completed",a&&"disabled"],line:["line","line".concat((0,Fu.A)(n))]};return(0,ir.A)(s,KZ,t)})(d);return(0,Gt.jsx)(JZ,(0,Ft.A)({className:(0,nr.A)(u.root,r),ref:t,ownerState:d},i,{children:(0,Gt.jsx)(eK,{className:u.line,ownerState:d})}))}),nK=tK,rK=(0,dy.A)((0,Gt.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),iK=(0,dy.A)((0,Gt.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function oK(e){return(0,sr.Ay)("MuiStepIcon",e)}const aK=(0,ar.A)("MuiStepIcon",["root","active","completed","error","text"]);var sK;const lK=["active","className","completed","error","icon"],cK=(0,Un.Ay)(fr.A,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),color:(t.vars||t).palette.text.disabled,["&.".concat(aK.completed)]:{color:(t.vars||t).palette.primary.main},["&.".concat(aK.active)]:{color:(t.vars||t).palette.primary.main},["&.".concat(aK.error)]:{color:(t.vars||t).palette.error.main}}}),dK=(0,Un.Ay)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(e=>{let{theme:t}=e;return{fill:(t.vars||t).palette.primary.contrastText,fontSize:t.typography.caption.fontSize,fontFamily:t.typography.fontFamily}}),uK=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiStepIcon"}),{active:r=!1,className:i,completed:o=!1,error:a=!1,icon:s}=n,l=(0,nn.A)(n,lK),c=(0,Ft.A)({},n,{active:r,completed:o,error:a}),d=(e=>{const{classes:t,active:n,completed:r,error:i}=e,o={root:["root",n&&"active",r&&"completed",i&&"error"],text:["text"]};return(0,ir.A)(o,oK,t)})(c);if("number"===typeof s||"string"===typeof s){const e=(0,nr.A)(i,d.root);return a?(0,Gt.jsx)(cK,(0,Ft.A)({as:iK,className:e,ref:t,ownerState:c},l)):o?(0,Gt.jsx)(cK,(0,Ft.A)({as:rK,className:e,ref:t,ownerState:c},l)):(0,Gt.jsxs)(cK,(0,Ft.A)({className:e,ref:t,ownerState:c},l,{children:[sK||(sK=(0,Gt.jsx)("circle",{cx:"12",cy:"12",r:"12"})),(0,Gt.jsx)(dK,{className:d.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:c,children:s})]}))}return s}),pK=uK;function hK(e){return(0,sr.Ay)("MuiStepLabel",e)}const mK=(0,ar.A)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),fK=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],gK=(0,Un.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",alignItems:"center",["&.".concat(mK.alternativeLabel)]:{flexDirection:"column"},["&.".concat(mK.disabled)]:{cursor:"default"}},"vertical"===t.orientation&&{textAlign:"left",padding:"8px 0"})}),vK=(0,Un.Ay)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(e=>{let{theme:t}=e;return(0,Ft.A)({},t.typography.body2,{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),["&.".concat(mK.active)]:{color:(t.vars||t).palette.text.primary,fontWeight:500},["&.".concat(mK.completed)]:{color:(t.vars||t).palette.text.primary,fontWeight:500},["&.".concat(mK.alternativeLabel)]:{marginTop:16},["&.".concat(mK.error)]:{color:(t.vars||t).palette.error.main}})}),xK=(0,Un.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})(()=>({flexShrink:0,display:"flex",paddingRight:8,["&.".concat(mK.alternativeLabel)]:{paddingRight:0}})),yK=(0,Un.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(e=>{let{theme:t}=e;return{width:"100%",color:(t.vars||t).palette.text.secondary,["&.".concat(mK.alternativeLabel)]:{textAlign:"center"}}}),bK=We.forwardRef(function(e,t){var n;const r=(0,$t.b)({props:e,name:"MuiStepLabel"}),{children:i,className:o,componentsProps:a={},error:s=!1,icon:l,optional:c,slotProps:d={},StepIconComponent:u,StepIconProps:p}=r,h=(0,nn.A)(r,fK),{alternativeLabel:m,orientation:f}=We.useContext(HZ),{active:g,disabled:v,completed:x,icon:y}=We.useContext(VZ),b=l||y;let j=u;b&&!j&&(j=pK);const w=(0,Ft.A)({},r,{active:g,alternativeLabel:m,completed:x,disabled:v,error:s,orientation:f}),_=(e=>{const{classes:t,orientation:n,active:r,completed:i,error:o,disabled:a,alternativeLabel:s}=e,l={root:["root",n,o&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",i&&"completed",o&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",i&&"completed",o&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]};return(0,ir.A)(l,hK,t)})(w),C=null!=(n=d.label)?n:a.label;return(0,Gt.jsxs)(gK,(0,Ft.A)({className:(0,nr.A)(_.root,o),ref:t,ownerState:w},h,{children:[b||j?(0,Gt.jsx)(xK,{className:_.iconContainer,ownerState:w,children:(0,Gt.jsx)(j,(0,Ft.A)({completed:x,active:g,error:s,icon:b},p))}):null,(0,Gt.jsxs)(yK,{className:_.labelContainer,ownerState:w,children:[i?(0,Gt.jsx)(vK,(0,Ft.A)({ownerState:w},C,{className:(0,nr.A)(_.label,null==C?void 0:C.className),children:i})):null,c]})]}))});bK.muiName="StepLabel";const jK=bK;function wK(e){return(0,sr.Ay)("MuiStepper",e)}(0,ar.A)("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const _K=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],CK=(0,Un.Ay)("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex"},"horizontal"===t.orientation&&{flexDirection:"row",alignItems:"center"},"vertical"===t.orientation&&{flexDirection:"column"},t.alternativeLabel&&{alignItems:"flex-start"})}),SK=(0,Gt.jsx)(nK,{}),AK=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiStepper"}),{activeStep:r=0,alternativeLabel:i=!1,children:o,className:a,component:s="div",connector:l=SK,nonLinear:c=!1,orientation:d="horizontal"}=n,u=(0,nn.A)(n,_K),p=(0,Ft.A)({},n,{nonLinear:c,alternativeLabel:i,orientation:d,component:s}),h=(e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:i}=e,o={root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]};return(0,ir.A)(o,wK,i)})(p),m=We.Children.toArray(o).filter(Boolean),f=m.map((e,t)=>We.cloneElement(e,(0,Ft.A)({index:t,last:t+1===m.length},e.props))),g=We.useMemo(()=>({activeStep:r,alternativeLabel:i,connector:l,nonLinear:c,orientation:d}),[r,i,l,c,d]);return(0,Gt.jsx)(HZ.Provider,{value:g,children:(0,Gt.jsx)(CK,(0,Ft.A)({as:s,ownerState:p,className:(0,nr.A)(h.root,a),ref:t},u,{children:f}))})}),kK=AK,MK=(0,Un.Ay)(nK)(e=>{let{theme:t}=e;return{["&.".concat(XZ.alternativeLabel)]:{top:22},["&.".concat(XZ.active)]:{["& .".concat(XZ.line)]:{backgroundImage:"linear-gradient( 95deg,".concat(t.palette.primary.main," 0%,").concat(t.palette.primary.theme[300]," 50%,").concat(t.palette.primary.theme[800]," 100%)")}},["&.".concat(XZ.completed)]:{["& .".concat(XZ.line)]:{backgroundImage:"linear-gradient( 95deg,".concat(t.palette.primary.main," 0%,").concat(t.palette.primary.theme[300]," 50%,").concat(t.palette.primary.theme[800]," 100%)")}},["& .".concat(XZ.line)]:{height:3,border:0,backgroundColor:"dark"===t.palette.mode?t.palette.grey[800]:"#eaeaf0",borderRadius:1}}}),OK=(0,Un.Ay)("div")(e=>{let{theme:t,ownerState:n}=e;return(0,i.A)((0,i.A)({backgroundColor:"dark"===t.palette.mode?t.palette.grey[700]:"#ccc",zIndex:1,color:"#fff",width:50,height:50,display:"flex",borderRadius:"50%",justifyContent:"center",alignItems:"center"},n.active&&{backgroundImage:"linear-gradient( 136deg, ".concat(t.palette.primary.main," 0%, ").concat(t.palette.primary.theme[300]," 50%, ").concat(t.palette.primary.theme[800]," 100%)"),boxShadow:"0 4px 10px 0 rgba(0,0,0,.25)"}),n.completed&&{backgroundImage:"linear-gradient( 136deg, ".concat(t.palette.primary.main," 0%, ").concat(t.palette.primary.theme[300]," 50%, ").concat(t.palette.primary.theme[800]," 100%)")})});function TK(e){let{activeStep:t,stepsAndIcon:n}=e;return(0,Gt.jsx)(JM,{sx:{width:"100%"},spacing:4,children:(0,Gt.jsx)(kK,{alternativeLabel:!0,activeStep:t,connector:(0,Gt.jsx)(MK,{}),children:n.map(e=>(0,Gt.jsx)(ZZ,{children:(0,Gt.jsx)(jK,{StepIconComponent:e=>function(e){var t,n;const{active:r,completed:i,className:o,stepsAndIcon:a}=e;return(0,Gt.jsx)(OK,{ownerState:{completed:i,active:r},className:o,children:i?null===(n=a[e.icon-1])||void 0===n?void 0:n.doneIcon:null===(t=a[e.icon-1])||void 0===t?void 0:t.icon})}((0,i.A)((0,i.A)({},e),{},{stepsAndIcon:n})),children:e.name})},e.name))})})}const EK={system_role:"None",custom_role:"None",predefined_role:"None"};const PK=function(e){let{levelPayload:t,rolePayload:n,toggleRolePayload:r,handleBackStep:i,roleSystemList:o,roleCustomList:a,rolePredefinedList:s}=e;const{t:l}=vg(),c=()=>{if(null===t||void 0===t||!t.program)return(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_SystemRole")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"system_role",name:"system_role",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:l("message:rpm_SystemRoleHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"None",disabled:!0,sx:{display:"none"},children:"None"}),null===o||void 0===o?void 0:o.map(e=>(0,Gt.jsx)($m,{value:e.id,children:e.name},e.id))]}),(0,Gt.jsx)(Xz,{name:"system_role",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_SystemRole")})})})]})]})});switch(null===t||void 0===t?void 0:t.role_type){case"CUSTOM":return(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_CustomRole")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"custom_role",name:"custom_role",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:l("message:rpm_CustomRoleHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"None",disabled:!0,sx:{display:"none"},children:"None"}),null===a||void 0===a?void 0:a.map(e=>(0,Gt.jsx)($m,{value:e.id,children:e.name},e.id))]}),(0,Gt.jsx)(Xz,{name:"custom_role",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_CustomRole")})})})]})]})});case"PREDEFINED":return(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:l("rpm_PredefinedRole")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"predefined_role",name:"predefined_role",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:l("message:rpm_CustomRoleHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"None",disabled:!0,sx:{display:"none"},children:"None"}),null===s||void 0===s?void 0:s.map(e=>(0,Gt.jsx)($m,{value:e.id,children:e.name},e.id))]}),(0,Gt.jsx)(Xz,{name:"predefined_role",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_PredefinedRole")})})})]})]})});default:return null}};return(0,Gt.jsx)(Iz,{initialValues:ds(EK,n),onSubmit:function(e,t){let{setErrors:n}=t;r(e,{setErrors:n})},enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{sx:{mt:4},children:(0,Gt.jsx)(df,{container:!0,justifyContent:"center",children:(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:6,children:[c(),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:i,children:l("rpm_Back")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{type:"submit",color:"primary",variant:"contained",disableElevation:!0,disabled:"None"===t.system_role&&"None"===t.custom_role&&"None"===t.predefined_role,children:l("rpm_Next")})})]})})]})})})})}},"assignRole_formik")},DK={username:"",first_name:"",last_name:"",email:"",registration:"",mobile:""};const RK=function(e){let{userPayload:t,toggleUserPayload:n,handleBackStep:r}=e;const{t:i}=vg();return(0,Gt.jsx)(Iz,{initialValues:ds(DK,t),validationSchema:gV.createNewUserSchema,onSubmit:function(e,t){let{setErrors:r}=t;n(e,{setErrors:r})},enableReinitialize:!0,children:()=>(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{sx:{mt:4},children:(0,Gt.jsx)(df,{container:!0,justifyContent:"center",children:(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:6,children:[(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[i("rpm_UserName"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"username",name:"username",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:i("message:rpm_AddUser_UserNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"username",children:e=>(0,Gt.jsx)(iw,{error:!0,children:i(e,{field:i("rpm_UserName")})})})]})]})}),(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:i("rpm_FirstName")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"first_name",name:"first_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:i("message:rpm_AddUser_FirstNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"first_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:i(e,{field:i("rpm_FirstName")})})})]})]})}),(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:i("rpm_LastName")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"last_name",name:"last_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:i("message:rpm_AddUser_LastNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"last_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:i(e,{field:i("rpm_LastName")})})})]})]})}),(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[i("rpm_EmailAddress"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"email",name:"email",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:i("message:rpm_AddUser_EmailHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"email",children:e=>(0,Gt.jsx)(iw,{error:!0,children:i(e,{field:i("rpm_Email")})})})]})]})}),(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:i("rpm_Registration")}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"registration",name:"registration",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:i("message:rpm_AddUser_RegistrationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]})}),(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[i("rpm_Mobile"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"mobile",name:"mobile",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:i("message:rpm_AddUser_MobileHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"mobile",children:e=>(0,Gt.jsx)(iw,{error:!0,children:i(e,{field:i("rpm_Mobile")})})})]})]})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:r,children:i("rpm_Back")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{type:"submit",color:"primary",variant:"contained",disableElevation:!0,children:i("rpm_Next")})})]})})]})})})})},"level_formik")};var NK=n(72023);const LK=function(e){let{handleResetStep:t}=e;const{t:n}=vg(),r=so();return(0,Gt.jsx)(Eu,{sx:{mt:4,textAlign:"center"},children:(0,Gt.jsx)(df,{container:!0,justifyContent:"center",children:(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:6,children:[(0,Gt.jsx)(Eu,{mb:2,children:(0,Gt.jsx)(wy,{sx:{bgcolor:"lightGreen.100",width:160,height:160,mx:"auto"},children:(0,Gt.jsx)(NK.A,{sx:{fontSize:72},color:"success"})})}),(0,Gt.jsx)(Ym,{component:"h3",variant:"h6",color:"success.main",children:"User added successfully."}),(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",sx:{mt:2.5,mr:2.5},onClick:()=>r(Lc.DOCTOR.USERS),children:n("rpm_Back")}),(0,Gt.jsx)(Vp,{color:"primary",variant:"contained",disableElevation:!0,sx:{mt:2.5},onClick:t,children:n("rpm_CreateAnotherUser")})]})})})},IK=["form","options","field","label","nameKey","valueKey","optionId","onKeyssDown","InputProps","onClear","onValueChange","dependent","browserAutocomplete"],FK=e=>{const{form:t,options:n,field:r,label:o,nameKey:a,valueKey:s,optionId:l,onKeyssDown:c,InputProps:d,onClear:u,onValueChange:p,dependent:h,browserAutocomplete:m}=e,f=Ko(e,IK),{name:g}=r,v=(0,We.useRef)(null),[x,y]=(0,We.useState)({}),b=()=>{y({}),u(),t.setFieldValue(g,"")};return(0,We.useEffect)(()=>{ta()(t.values[g])&&!h||y(n.find(e=>e[l]===t.values[g])||{})},[t.values[g],n]),(0,We.useEffect)(()=>{var e;const t=null===v||void 0===v||null===(e=v.current)||void 0===e?void 0:e.getElementsByClassName("MuiAutocomplete-clearIndicator")[0];if(t)return t.addEventListener("click",b),()=>{var e;const t=null===v||void 0===v||null===(e=v.current)||void 0===e?void 0:e.getElementsByClassName("MuiAutocomplete-clearIndicator")[0];t&&t.removeEventListener("click",b)}},[]),(0,Gt.jsx)(Gb,(0,i.A)((0,i.A)((0,i.A)({ref:v},e),r),{},{getOptionLabel:e=>e[a]||"",value:x,onInputChange:(e,n,r)=>{c(event,n,r,t)},onChange:(e,n,r)=>{n&&t.setFieldValue(g,n[s]),"function"===typeof p&&p(event,n[s],r)},renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t[s]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t[a]})})),renderInput:e=>{if(!m){e.inputProps.autoComplete="new-password"}return(0,Gt.jsx)($w,(0,i.A)((0,i.A)({variant:f.variant,label:o},e),d))}}))};FK.defaultProps={form:{},label:"",options:[],field:{},nameKey:"name",optionId:"id",valueKey:"",onKeyssDown:()=>{},onClear:()=>{},onValueChange:()=>{},dependent:!1,browserAutocomplete:!1,inputProps:{}};const $K=FK,BK={role_level:"",program:"",role_type:""};const zK=function(e){let{levelPayload:t,toggleLevelPayload:n,allPrograms:r}=e;const{userData:o}=(0,We.useContext)(Zg),{t:a}=vg(),s=so();return(0,Gt.jsx)(Iz,{initialValues:ds(BK,t),validationSchema:vV.addLevel,onSubmit:function(e,t){let{setErrors:r}=t;n((0,i.A)((0,i.A)({},e),{},{program:(null===e||void 0===e?void 0:e.role_level)===Zc.CLIENT?"":null===e||void 0===e?void 0:e.program}),{setErrors:r})},enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{sx:{mt:4},children:(0,Gt.jsx)(df,{container:!0,justifyContent:"center",children:(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:6,children:[(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:a("rpm_RoleUserText")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"role_level",name:"role_level",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:a("message:rpm_UserLevelTextHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:o.isAdmin?Object.values(Zc).map(e=>(0,Gt.jsx)($m,{value:e,children:a("rpm_".concat(e))},e)):(0,Gt.jsx)($m,{value:Zc.PROGRAM,children:a("rpm_".concat(Zc.PROGRAM))})}),(0,Gt.jsx)(Xz,{name:"role_level",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_UserLevel")})})})]})]})}),t.role_level===Zc.PROGRAM&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:a("rpm_SelectProgram")}),(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,fullWidth:!0,size:"small",id:"program",optionId:"code",name:"program",options:r,browserAutocomplete:!1,valueKey:"code",nameKey:"display_name"}),(0,Gt.jsx)(Yx,{title:a("message:rpm_UserLevelProgramHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})}),(0,Gt.jsx)(Xz,{name:"program",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_SelectProgram")})})})]})]})}),(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:a("rpm_SelectRoleType")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"role_type",name:"role_type",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:a("message:rpm_UserLevelTextHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===Yc||void 0===Yc?void 0:Yc.map(e=>(0,Gt.jsx)($m,{value:null===e||void 0===e?void 0:e.value,children:null===e||void 0===e?void 0:e.label},null===e||void 0===e?void 0:e.id))}),(0,Gt.jsx)(Xz,{name:"ROLE_TYPES",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_RoleType")})})})]})]})})]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:()=>s(Lc.DOCTOR.USERS),children:a("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{type:"submit",color:"primary",variant:"contained",disableElevation:!0,children:a("rpm_Next")})})]})})]})})})})}},"level_formik")};const HK=function(e){let{activeStep:t,handleResetStep:n,handleNextStep:r,handleBackStep:o,levelPayload:a,userPayload:s,rolePayload:l,toggleLevelPayload:c,toggleUserPayload:d,toggleRolePayload:u,programList:p,roleSystemList:h,roleCustomList:m,rolePredefinedList:f,allPrograms:g}=e;const{t:v}=vg(),x=[{name:"Select Level",icon:(0,Gt.jsx)(BZ.A,{}),doneIcon:(0,Gt.jsx)(FZ.A,{})},{name:"General Information",icon:(0,Gt.jsx)($Z.A,{}),doneIcon:(0,Gt.jsx)(FZ.A,{})},{name:"Assign Role",icon:(0,Gt.jsx)(IZ.A,{}),doneIcon:(0,Gt.jsx)(FZ.A,{})}],y=[{name:v("rpm_Staff"),url:Lc.DOCTOR.USERS},{name:v("rpm_CreateUser"),url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:y})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:v("rpm_CreateUser")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsxs)(uH,{sx:{py:4,":last-child":{pb:4}},children:[(0,Gt.jsx)(TK,{activeStep:t,stepsAndIcon:x}),t===x.length?(0,Gt.jsx)(LK,{handleResetStep:n}):(0,Gt.jsx)(We.Fragment,{children:((e,t)=>{switch(e){case 0:default:return(0,Gt.jsx)(zK,(0,i.A)({},t));case 1:return(0,Gt.jsx)(RK,(0,i.A)({},t));case 2:return(0,Gt.jsx)(PK,(0,i.A)({},t))}})(t,{activeStep:t,handleNextStep:r,handleBackStep:o,levelPayload:a,userPayload:s,rolePayload:l,toggleLevelPayload:c,toggleUserPayload:d,toggleRolePayload:u,roleSystemList:h,roleCustomList:m,rolePredefinedList:f,programList:p,allPrograms:g})})]})]})})})]})},WK=["first_name","username","last_name","email"];const VK=function(){const e=Nt(),{t:t}=vg(),{enqueueSnackbar:n}=hi(),{programList:r}=(0,We.useContext)(j_),o=Ct(Gd),[a,s]=We.useState(0),[l,c]=We.useState({}),[d,u]=We.useState({}),[p,h]=We.useState({}),[m,f]=We.useState({}),[g,v]=We.useState(null),[x,y]=We.useState(null),[b,j]=We.useState(null),w=()=>{s(e=>e+1)},_=async(r,i)=>{let{setErrors:o}=i;const{first_name:a,username:s,last_name:l,email:d}=r,u=Ko(r,WK),p={email:d,first_name:a,last_name:l,path:r.program?"".concat(r.program):"/",username:s,attributes:Object.keys(u).reduce((e,t)=>(e[t]=Array.isArray(u[t])?u[t]:[u[t]],e),{})};try{const{data:r}=await e((e=>async t=>{t(na(!0));try{const t="".concat(ma.USERS);return await du(t,e)}finally{t(na(!1))}})(p));n(t("message:rpm_UserCreatedSuccessfully"),{variant:"success"}),r&&await e((h=null===r||void 0===r?void 0:r.id,async e=>{e(na(!0));try{const e="".concat(ca.utility,"/welcome-messages/to-doctor?id=").concat(h);return await cu(e)}finally{e(na(!1))}})),c(r),w()}catch(m){const e=ls(m,"response.data.field_errors",{}),r=ls(m,"response.data.code","");as(e)?as(r)?n(t("error:rpm_UserCreateFailed"),{variant:"error"}):n(t(bd(r)),{variant:"error"}):o(yd(e))}var h};return We.useEffect(()=>{as(l)||(async()=>{const{custom_role:t,system_role:r,predefined_role:i}=m;let o={role_ids:[]};"None"!==t&&o.role_ids.push(t),"None"!==r&&o.role_ids.push(r),"None"!==i&&o.role_ids.push(i);try{await e(Ig(l.id,o))}catch(a){n(a.message,{variant:"error"})}})()},[l]),We.useEffect(()=>{2!==a||as(d)||((null===d||void 0===d?void 0:d.role_type)===(null===Gc||void 0===Gc?void 0:Gc.PREDEFINED)?(async()=>{try{const{data:t}=await e(Rg({q:"",per_page:1e3,kind:Gc.PREDEFINED,programId:null!==d&&void 0!==d&&d.program?null===d||void 0===d?void 0:d.program:"/"})),{content:n}=t||{};y(n)}catch(t){console.log(t)}})():(async()=>{try{const{data:t}=await e(Rg({q:"",per_page:1e3,kind:Gc.CUSTOM,programId:null!==d&&void 0!==d&&d.program?null===d||void 0===d?void 0:d.program:"/"})),{content:n}=t||{};v(n)}catch(t){console.log(t)}})(),(async()=>{try{const{data:t}=await e(Rg({kind:Gc.SYSTEM})),{content:n}=t||{};j(n)}catch(t){console.log(t)}})())},[a,d]),We.useEffect(()=>{e(w_({activeMenuItem:"users"}))},[]),(0,Gt.jsx)(HK,{activeStep:a,levelPayload:d,userPayload:p,rolePayload:m,handleNextStep:w,handleBackStep:()=>{s(e=>e-1)},handleResetStep:()=>{s(0),u({}),h({}),f({})},toggleLevelPayload:function(e){if(!as(e)){const t=(0,i.A)((0,i.A)({},e),{},{program:"programTypeRole"===(null===e||void 0===e?void 0:e.role_level)?"/RPMCORE/".concat(e.program,"/"):e.program});u(t),w()}},toggleUserPayload:function(e){as(e)||(h(e),w())},toggleRolePayload:function(e,t){let{setErrors:n}=t;if(!as(e)){f(e);const t=(0,i.A)((0,i.A)((0,i.A)({},d),p),e);_(t,{setErrors:n})}},roleSystemList:b,roleCustomList:g,rolePredefinedList:x,programList:r,allPrograms:o})};var UK=n(36285);function qK(e){var t;let{userData:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,checkState:c,onCheck:d,isSelection:u,nodata:p,assignCustomRoleHead:h,assignSystemRoleHead:m,pageDetails:f,toggleRoles:g,role:v,handleChangeRole:x,onProgramChange:y,roleCustomList:b,rolePredefinedList:j,fetchRoleCustomList:w,fetchRolePredefinedList:_,roleSystemList:C,fetchRoleSystemList:S,assignProgramList:A,allPrograms:k,onResetFilter:M,setRolesHeadcells:O,rolesSettingModal:T,rolesInitialHeadcells:E,handleRolesSettingModalToggle:P,isGroupRootAccess:D,clickedProgram:R,setClickedProgram:N}=e;const{t:L}=vg(),I=as(D)?A:k;return We.useEffect(()=>{as(R)||y(null===R||void 0===R?void 0:R.code)},[R]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(df,{container:!0,item:!0,xs:12,justifyContent:"space-between",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,container:!0,spacing:2.5,children:(v===Gc.CUSTOM||v===Gc.PREDEFINED)&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",value:R,options:I,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>(null===e||void 0===e?void 0:e.display_name)||"",renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:null===t||void 0===t?void 0:t.code}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.display_name})})),onChange:async(e,t,n)=>{y(null===t||void 0===t?void 0:t.code),"clear"===n&&(N(null),M())},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:L("rpm_SelectProgram")+"..."}))})})})}),(0,Gt.jsx)(df,{item:!0,md:4,lg:3,children:(0,Gt.jsxs)(Eu,{mb:3,display:"flex",gap:2,children:[(0,Gt.jsxs)(Dw,{as:Dw,fullWidth:!0,size:"small",id:"role",name:"role",variant:"outlined",value:v,onChange:x,disabled:!(null!==n&&void 0!==n&&n.isAdmin),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:L("message:rpm_RoleHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"CUSTOM",children:"Custom Role"}),(0,Gt.jsx)($m,{value:"SYSTEM",children:"System Role"}),(0,Gt.jsx)($m,{value:"PREDEFINED",children:"Predefined Role"})]}),v===Gc.CUSTOM&&(0,Gt.jsx)(Yx,{title:L("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:P,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})]})})]}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:v===Gc.CUSTOM||v===Gc.PREDEFINED?(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,selected:c,setSelected:d,isSelection:u,noDataImage:p,pageDetails:f,data:v===Gc.CUSTOM?b:j||[],headCells:null===h||void 0===h?void 0:h.filter(e=>E.includes(e.id)),fetchList:v===Gc.CUSTOM?w:_,skeletonVrows:6,className:"theme_scroll",children:null===(t=v===Gc.CUSTOM?b:j||[])||void 0===t?void 0:t.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),E.includes("role_name")&&(0,Gt.jsx)(rC,{children:e.name}),E.includes("description")&&(0,Gt.jsx)(rC,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.description||"NA"}),E.includes("access_layer")&&(0,Gt.jsx)(rC,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.group.path}),E.includes("action")&&(0,Gt.jsx)(rC,{width:"250",children:g(e)})]},e.id))})}),(0,Gt.jsx)(fO,{open:T,allHeadCells:h,initialHeadcells:E,setHeadcells:O,onClose:P})]}):(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,selected:c,setSelected:d,isSelection:u,noDataImage:p,pageDetails:f,data:C,headCells:m,fetchList:S,skeletonVrows:6,className:"theme_scroll",children:null===C||void 0===C?void 0:C.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,Gt.jsx)(rC,{children:e.name}),(0,Gt.jsx)(rC,{sx:{maxWidth:"250px",whiteSpace:"normal"},children:e.description}),(0,Gt.jsx)(rC,{width:"250",children:g(e)})]},e.id))})})})})]})}qK.defaultProps={userData:{},rootAccess:!1,pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",assignCustomRoleHead:[],assignCustomRoleList:[],assignSystemRoleHead:[],toggleRoles:()=>{},role:"",assignUserRoles:[],handleChangeRole:()=>{},roleCustomList:[],rolePredefinedList:[],fetchRoleCustomList:()=>{},fetchRolePredefinedList:()=>{},roleSystemList:[],fetchRoleSystemList:()=>{},assignProgramList:()=>{},onApplyFilter:()=>{},onResetFilter:()=>{},setRolesHeadcells:()=>{},rolesSettingModal:!1,rolesInitialHeadcells:[],allPrograms:[],handleRolesSettingModalToggle:()=>{},isGroupRootAccess:{},clickedProgram:{},setClickedProgram:()=>{}};const GK=qK;var YK=n(59131);const ZK=function(e){let{user:t,revokeAccess:n}=e;return(0,Gt.jsx)(df,{container:!0,spacing:2,justifyContent:"center",children:(0,Gt.jsx)(df,{item:!0,md:6,children:(0,Gt.jsxs)(Eu,{sx:{px:2,py:{xs:4,md:6},bgcolor:"secondary.theme.50",textAlign:"center",borderRadius:1},children:[(0,Gt.jsx)(Eu,{mb:2,children:(0,Gt.jsx)(wy,{sx:{bgcolor:"lightGreen.700",width:140,height:140,mx:"auto"},children:(0,Gt.jsx)(YK.A,{sx:{fontSize:64}})})}),(0,Gt.jsx)(XO,{severity:"warning",icon:!1,sx:e=>({mb:2,py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,Gt.jsx)("strong",{children:"Current Access Level : Client"})}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"You have access to all the programs"}),(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:null===t||void 0===t?void 0:t.email}),!1]})})})},KK={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:2(?:(?:[0-26-9]\\d|3[0-8]|5[0135-9])\\d|4(?:[02-9]\\d|10))|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90))|7(?:[013-57-9]\\d|2[0-8])\\d)\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|[24-689])\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};var XK={}.constructor;function QK(e){return void 0!==e&&null!==e&&e.constructor===XK}function JK(e){return JK="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},JK(e)}function eX(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 tX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=JK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=JK(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==JK(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nX(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rX(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rX(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iX(e){var t,n,r,i=nX(Array.prototype.slice.call(e),4),o=i[0],a=i[1],s=i[2],l=i[3];if("string"!==typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!==typeof a){if(!QK(a))throw new Error("Invalid second argument: ".concat(a));s?(n=a,r=s):r=a}else l?(n=s,r=l):(n=void 0,r=s),a&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eX(Object(n),!0).forEach(function(t){tX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:a},n));return{text:t,options:n,metadata:r}}var oX="0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9",aX="".concat("-\u2010-\u2015\u2212\u30fc\uff0d").concat("\uff0f/").concat("\uff0e.").concat(" \xa0\xad\u200b\u2060\u3000").concat("()\uff08\uff09\uff3b\uff3d\\[\\]").concat("~\u2053\u223c\uff5e");function sX(e){return sX="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},sX(e)}function lX(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,cX(r.key),r)}}function cX(e){var t=function(e,t){if("object"!=sX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=sX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==sX(t)?t:t+""}function dX(e,t,n){return t=mX(t),function(e,t){if(t&&("object"==sX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pX()?Reflect.construct(t,n||[],mX(e).constructor):t.apply(e,n))}function uX(e){var t="function"==typeof Map?new Map:void 0;return uX=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(wa){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(pX())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&hX(i,n.prototype),i}(e,arguments,mX(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),hX(n,e)},uX(e)}function pX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pX=function(){return!!e})()}function hX(e,t){return hX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hX(e,t)}function mX(e){return mX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mX(e)}var fX=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=dX(this,t,[e]),Object.setPrototypeOf(n,t.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hX(e,t)}(t,e),function(e,t,n){return t&&lX(e.prototype,t),n&&lX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(uX(Error));function gX(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),i=0;i<3;i++){var o=Number(n[i]),a=Number(r[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function vX(e){return vX="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},vX(e)}function xX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yX(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,jX(r.key),r)}}function bX(e,t,n){return t&&yX(e.prototype,t),n&&yX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jX(e){var t=function(e,t){if("object"!=vX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=vX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==vX(t)?t:t+""}var wX=" ext. ",_X=/^\d+$/,CX=function(){return bX(function e(t){xX(this,e),TX(t),this.metadata=t,DX.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&_X.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new SX(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new SX(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),SX=function(){return bX(function e(t,n){xX(this,e),this.globalMetadataObject=n,this.metadata=t,DX.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map(function(t){return new AX(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&OX(this.types(),e))return new MX(OX(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?wX:this.metadata[13]||wX}}])}(),AX=function(){return bX(function e(t,n){xX(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||kX.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),kX=/^\(?\$1\)?$/,MX=function(){return bX(function e(t,n){xX(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function OX(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function TX(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!QK(e)||!QK(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(QK(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+EX(e)+": "+e,"."))}var EX=function(e){return vX(e)};function PX(e,t){if((t=new CX(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function DX(e){var t=e.version;"number"===typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===gX(t,"1.2.0")?this.v2=!0:-1===gX(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var RX=function(e){return"([".concat(oX,"]{1,").concat(e,"})")};function NX(e){var t="[ \xa0\\t,]*",n="[:\\.\uff0e]?[ \xa0\\t,-]*",r="#?",i="[ \xa0\\t]*";return";ext="+RX("20")+"|"+(t+"(?:e?xt(?:ensi(?:o\u0301?|\xf3))?n?|\uff45?\uff58\uff54\uff4e?|\u0434\u043e\u0431|anexo)"+n+RX("20")+r)+"|"+(t+"(?:[x\uff58#\uff03~\uff5e]|int|\uff49\uff4e\uff54)"+n+RX("9")+r)+"|"+("[- ]+"+RX("6")+"#")+"|"+(i+"(?:,{2}|;)"+n+RX("15")+r)+"|"+(i+"(?:,)+"+n+RX("9")+r)}var LX="["+oX+"]{2}",IX="[+\uff0b]{0,1}(?:["+aX+"]*["+oX+"]){3,}["+aX+oX+"]*",FX=new RegExp("^[+\uff0b]{0,1}(?:["+aX+"]*["+oX+"]){1,2}$","i"),$X=IX+"(?:"+NX()+")?",BX=new RegExp("^"+LX+"$|^"+$X+"$","i");var zX=new RegExp("(?:"+NX()+")$","i");var HX={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9"};function WX(e){return HX[e]}function VX(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return UX(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?UX(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function UX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qX(e){for(var t,n="",r=VX(e.split(""));!(t=r()).done;){n+=GX(t.value,n)||""}return n}function GX(e,t,n){return"+"===e?t?void("function"===typeof n&&n("end")):"+":WX(e)}function YX(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ZX(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ZX(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ZX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function KX(e,t,n){return XX(e,t,void 0,n)}function XX(e,t,n,r){t&&(r=new CX(r.metadata)).selectNumberingPlan(t);var i=r.type(n),o=i&&i.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===n){if(!r.type("FIXED_LINE"))return XX(e,t,"MOBILE",r);var a=r.type("MOBILE");a&&(o=function(e,t){for(var n,r=e.slice(),i=YX(t);!(n=i()).done;){var o=n.value;e.indexOf(o)<0&&r.push(o)}return r.sort(function(e,t){return e-t})}(o,a.possibleLengths()))}else if(n&&!i)return"INVALID_LENGTH";var s=e.length,l=o[0];return l===s?"IS_POSSIBLE":l>s?"TOO_SHORT":o[o.length-1]<s?"TOO_LONG":o.indexOf(s,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function QX(e,t,n){return"IS_POSSIBLE"===KX(e,t,n)}function JX(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function eQ(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return tQ(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tQ(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nQ=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function rQ(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new CX(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(JX(r,n.nationalNumberPattern())){if(iQ(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?iQ(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var i,o=eQ(nQ);!(i=o()).done;){var a=i.value;if(iQ(r,a,n))return a}}}}function iQ(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&JX(e,t.pattern()))}function oQ(e,t,n){var r=new CX(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new CX(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var aQ=new RegExp("(["+oX+"])");function sQ(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return lQ(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lQ(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function lQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cQ(e,t){var n=t.nationalNumber,r=t.metadata;var i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:function(e,t){var n=t.countries,r=t.metadata;r=new CX(r);for(var i,o=sQ(n);!(i=o()).done;){var a=i.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(rQ({phone:e,country:a},void 0,r.metadata))return a}}(n,{countries:i,metadata:r.metadata})}function dQ(e,t,n){var r=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var i,o,a,s=r.length-1,l=s>0&&r[s];if(t.nationalPrefixTransformRule()&&l)i=e.replace(n,t.nationalPrefixTransformRule()),s>1&&(o=r[1]);else{var c=r[0];i=e.slice(c.length),l&&(o=r[1])}if(l){var d=e.indexOf(r[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=r[0];return{nationalNumber:i,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}(e,n),i=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(JX(e,n.nationalNumberPattern())&&!JX(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=cQ(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(KX(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:i}}function uQ(e,t,n,r,i){if(!e)return{};var o;if("+"!==e[0]){var a=function(e,t,n,r){if(t){var i=new CX(r);i.selectNumberingPlan(t,n);var o=new RegExp(i.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(aQ);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,t||n,r,i);if(!a||a===e){if(t||n||r){var s=function(e,t,n,r,i){var o=t||n?PX(t||n,i):r;if(0===e.indexOf(o)){(i=new CX(i)).selectNumberingPlan(t||n,o);var a=e.slice(o.length),s=dQ(a,t,i).nationalNumber,l=dQ(e,t,i).nationalNumber;if(!JX(l,i.nationalNumberPattern())&&JX(s,i.nationalNumberPattern())||"TOO_LONG"===KX(l,t,i))return{countryCallingCode:o,number:a}}return{number:e}}(e,t,n,r,i),l=s.countryCallingCode,c=s.number;if(l)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:l,number:c}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};i=new CX(i);for(var d=2;d-1<=3&&d<=e.length;){var u=e.slice(1,d);if(i.hasCallingCode(u))return i.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(d)};d++}return{}}var pQ=/(\$\d)/;function hQ(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix,o=(n.carrierCode,n.metadata,e.replace(new RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(pQ,t.nationalPrefixFormattingRule()):t.format()));return r?function(e){return e.replace(new RegExp("[".concat(aX,"]+"),"g")," ").trim()}(o):o}var mQ=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var fQ={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function gQ(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var i in n[e])n[0][i]=n[e][i];e++}return n[0]}({},fQ,n):fQ,r=new CX(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var i,o=r.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?xQ(i=vQ(a,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return a?(i=vQ(a,null,"INTERNATIONAL",r,n),xQ(i="+".concat(o," ").concat(i),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(a);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(o).concat(a),ext:e.ext});case"IDD":if(!n.fromCountry)return;var s=function(e,t,n,r,i){var o=PX(r,i.metadata);if(o===n){var a=vQ(e,t,"NATIONAL",i);return"1"===n?n+" "+a:a}var s=function(e,t,n){var r=new CX(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():mQ.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,i.metadata);if(s)return"".concat(s," ").concat(n," ").concat(vQ(e,null,"INTERNATIONAL",i))}(a,e.carrierCode,o,n.fromCountry,r);return xQ(s,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function vQ(e,t,n,r,i){var o,a,s=(o=r.formats(),a=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(o,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==a.search(t))return!1}return JX(a,e.pattern())}));return s?hQ(e,s,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!s.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix,carrierCode:t,metadata:r}):e}function xQ(e,t,n,r){return t?r(e,t,n):e}function yQ(e){return yQ="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},yQ(e)}function bQ(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 jQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bQ(Object(n),!0).forEach(function(t){wQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wQ(e,t,n){return(t=CQ(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,CQ(r.key),r)}}function CQ(e){var t=function(e,t){if("object"!=yQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=yQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yQ(t)?t:t+""}var SQ=function(){return function(e,t,n){return t&&_Q(e.prototype,t),n&&_Q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!==typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(QK(n)&&QK(n.countries)){r=n;var i=t;if(!kQ.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=uQ(i,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!==typeof n)throw new TypeError("`nationalNumber` argument must be a string");TX(r);var a=function(e,t){var n,r,i=new CX(t);AQ(e)?(n=e,i.selectNumberingPlan(n),r=i.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),s=a.country,l=a.countryCallingCode;this.country=s,this.countryCallingCode=l,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:oQ(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new CX(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return QX(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,n){return t=t||{},(n=new CX(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==rQ(e,t,n.metadata):JX(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new CX(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return rQ(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return gQ(this,e,t?jQ(jQ({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),AQ=function(e){return/^[A-Z]{2}$/.test(e)};var kQ=/^\+\d+$/,MQ="(["+oX+"]|[\\-\\.\\(\\)]?)",OQ=new RegExp("^\\+"+MQ+"*["+oX+"]"+MQ+"*$","g"),TQ=new RegExp("^("+("["+oX+"]+((\\-)*["+oX+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+oX+"])*")+"\\.?$","g"),EQ="tel:",PQ=";phone-context=";function DQ(e,t){var n,r=t.extractFormattedPhoneNumber,i=function(e){var t=e.indexOf(PQ);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(OQ.test(e)||TQ.test(e))}(i))throw new fX("NOT_A_NUMBER");if(null===i)n=r(e)||"";else{n="","+"===i.charAt(0)&&(n+=i);var o,a=e.indexOf(EQ);o=a>=0?a+4:0;var s=e.indexOf(PQ);n+=e.substring(o,s)}var l=n.indexOf(";isub=");if(l>0&&(n=n.substring(0,l)),""!==n)return n}var RQ=new RegExp("[+\uff0b"+oX+"]"),NQ=new RegExp("[^"+oX+"#]+$");function LQ(e,t,n){if(t=t||{},n=new CX(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new fX("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=DQ(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new fX("TOO_LONG");return}if(!1===t)return e;var r=e.search(RQ);if(r<0)return;return e.slice(r).replace(NQ,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&BX.test(e)}(r))return function(e){return FX.test(e)}(r)?{error:"TOO_SHORT"}:{};var i=function(e){var t=e.search(zX);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(zX),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}(r);if(i.ext)return i;return{number:r}}(e,t.v2,t.extract),i=r.number,o=r.ext,a=r.error;if(!i){if(t.v2){if("TOO_SHORT"===a)throw new fX("TOO_SHORT");throw new fX("NOT_A_NUMBER")}return{}}var s=function(e,t,n,r){var i,o=uQ(qX(e),void 0,t,n,r.metadata),a=o.countryCallingCodeSource,s=o.countryCallingCode,l=o.number;if(s)r.selectNumberingPlan(s);else{if(!l||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(i=t),s=n||PX(t,r.metadata)}if(!l)return{countryCallingCodeSource:a,countryCallingCode:s};var c=dQ(qX(l),i,r),d=c.nationalNumber,u=c.carrierCode,p=cQ(s,{nationalNumber:d,metadata:r});p&&(i=p,"001"===p||r.selectNumberingPlan(i));return{country:i,countryCallingCode:s,countryCallingCodeSource:a,nationalNumber:d,carrierCode:u}}(i,t.defaultCountry,t.defaultCallingCode,n),l=s.country,c=s.nationalNumber,d=s.countryCallingCode,u=s.countryCallingCodeSource,p=s.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new fX("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new fX("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new fX("TOO_LONG");return{}}if(t.v2){var h=new SQ(d,c,n.metadata);return l&&(h.country=l),p&&(h.carrierCode=p),o&&(h.ext=o),h.__countryCallingCodeSource=u,h}var m=!!(t.extended?n.hasSelectedNumberingPlan():l)&&JX(c,n.nationalNumberPattern());return t.extended?{country:l,countryCallingCode:d,carrierCode:p,valid:m,possible:!!m||!(!0!==t.extended||!n.possibleLengths()||!QX(c,l,n)),phone:c,ext:o}:m?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(l,c,o):{}}function IQ(e){return IQ="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},IQ(e)}function FQ(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 $Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FQ(Object(n),!0).forEach(function(t){BQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=IQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=IQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==IQ(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zQ(e){return zQ="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},zQ(e)}function HQ(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 WQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HQ(Object(n),!0).forEach(function(t){VQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=zQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=zQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zQ(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UQ(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=WQ(WQ({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return LQ(e,$Q($Q({},t),{},{v2:!0}),n)}(e,t,n)}catch(r){if(!(r instanceof fX))throw r}}function qQ(){var e=iX(arguments);return UQ(e.text,e.options,e.metadata)}function GQ(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(KK),e.apply(this,n)}(qQ,arguments)}const YQ=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T;let{user:E,userData:P}=e;const{t:D}=vg(),R=so();return(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"flex-start",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:4,children:(0,Gt.jsxs)(Eu,{sx:{px:2,py:{xs:4},bgcolor:"primary.theme.50",textAlign:"center",borderRadius:1},children:[(0,Gt.jsx)(Eu,{mb:1,children:(0,Gt.jsx)(wy,{sx:{bgcolor:"secondary.main",width:140,height:140,fontSize:64,mx:"auto"},children:null===E||void 0===E||null===(t=E.first_name)||void 0===t||null===(n=t.charAt(0))||void 0===n?void 0:n.toLocaleUpperCase()})}),ta()(E)?(0,Gt.jsx)(ZC,{width:150,sx:{mx:"auto"}}):(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:(null===E||void 0===E?void 0:E.first_name)+" "+(null===E||void 0===E?void 0:E.last_name)}),ta()(E)?(0,Gt.jsx)(ZC,{width:150,sx:{mx:"auto"}}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:null===E||void 0===E?void 0:E.email}),(0,Gt.jsxs)(JM,{sx:{mt:3},flexDirection:"row",gap:1,alignItems:"center",justifyContent:"center",children:[ta()(E)?(0,Gt.jsx)(ZC,{width:60,height:48}):null!==E&&void 0!==E&&E.active?(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,Gt.jsx)("strong",{children:"Active"})}):(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,Gt.jsx)("strong",{children:"Inactive"})}),(null===P||void 0===P?void 0:P.showUpdateUserBtn)&&(0,Gt.jsx)(Vp,{color:"primary",variant:"contained",disableElevation:!0,onClick:()=>R("".concat(Lc.DOCTOR.PROFILE,"/edit/").concat(null===E||void 0===E?void 0:E.id)),children:D("rpm_EditProfile")})]})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,lg:8,container:!0,spacing:4,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:D("rpm_GeneralInformation")})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"First Name"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:(null===E||void 0===E?void 0:E.first_name)||"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Last Name"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:(null===E||void 0===E?void 0:E.last_name)||"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Email"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:(null===E||void 0===E?void 0:E.email)||"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Mobile"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&E.phone_number?"+".concat(null===(r=GQ(null===E||void 0===E?void 0:E.phone_number))||void 0===r?void 0:r.countryCallingCode,"-").concat(null===(i=GQ(null===E||void 0===E?void 0:E.phone_number))||void 0===i?void 0:i.nationalNumber):null})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"DOB"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(o=E.attributes)&&void 0!==o&&o.dob?sa()(null===E||void 0===E||null===(a=E.attributes)||void 0===a?void 0:a.dob).format("DD/MM/YYYY"):"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Gender"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:(null===E||void 0===E||null===(s=E.attributes)||void 0===s?void 0:s.gender)||"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Created Date"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:sa()(null===E||void 0===E?void 0:E.created_at).format("DD MMM YYYY hh:mm A")})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:D("rpm_ProfessionalDetail")})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_Speciality")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(l=E.attributes)&&void 0!==l&&l.speciality?null===E||void 0===E||null===(c=E.attributes)||void 0===c?void 0:c.speciality:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_Experience")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(d=E.attributes)&&void 0!==d&&d.experience?null===E||void 0===E||null===(u=E.attributes)||void 0===u?void 0:u.experience:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_ConsultingLanguage")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(p=E.attributes)&&void 0!==p&&p.consulting_language?null===E||void 0===E||null===(h=E.attributes)||void 0===h?void 0:h.consulting_language:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_ProfessionalBio")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{whiteSpace:"normal",wordWrap:"break-word"},children:null!==E&&void 0!==E&&null!==(m=E.attributes)&&void 0!==m&&m.professional_bio?null===E||void 0===E||null===(f=E.attributes)||void 0===f?void 0:f.professional_bio:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_HighestQualifications")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{whiteSpace:"normal",wordWrap:"break-word"},children:null!==E&&void 0!==E&&null!==(g=E.attributes)&&void 0!==g&&g.qualification?null===E||void 0===E||null===(v=E.attributes)||void 0===v?void 0:v.qualification:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Registration Number"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:(null===E||void 0===E||null===(x=E.attributes)||void 0===x?void 0:x.registration)||"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:D("rpm_AddressInformation")})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_Address1")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(y=E.attributes)&&void 0!==y&&y.adr_address1?null===E||void 0===E||null===(b=E.attributes)||void 0===b?void 0:b.adr_address1:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_Address2")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(j=E.attributes)&&void 0!==j&&j.adr_address2?null===E||void 0===E||null===(w=E.attributes)||void 0===w?void 0:w.adr_address2:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_Country")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(_=E.attributes)&&void 0!==_&&_.adr_country_name?null===E||void 0===E||null===(C=E.attributes)||void 0===C?void 0:C.adr_country_name:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_State")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(S=E.attributes)&&void 0!==S&&S.adr_state_name?null===E||void 0===E||null===(A=E.attributes)||void 0===A?void 0:A.adr_state_name:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_City")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(k=E.attributes)&&void 0!==k&&k.adr_city?null===E||void 0===E||null===(M=E.attributes)||void 0===M?void 0:M.adr_city:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:D("rpm_Pin")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(E)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==E&&void 0!==E&&null!==(O=E.attributes)&&void 0!==O&&O.adr_zipcode?null===E||void 0===E||null===(T=E.attributes)||void 0===T?void 0:T.adr_zipcode:"NA"})})]})})]})]})};var ZQ=n(72819);const KQ={new_password:"",confirmPassword:""};const XQ=function(e){let{setUserPassword:t}=e;const{t:n}=vg(),r=so(),[i,o]=We.useState(!0),a=()=>{o(!i)},s=[{id:1,info:n("rpm_passwordInstruction1")},{id:2,info:n("rpm_passwordInstruction2")},{id:3,info:n("rpm_passwordInstruction3")},{id:4,info:n("rpm_passwordInstruction4")},{id:5,info:n("rpm_passwordInstruction5")},{id:6,info:n("rpm_passwordInstruction6")}];return(0,Gt.jsx)(Iz,{initialValues:KQ,validationSchema:gV.resetPassword,onSubmit:t,enableReinitialize:!0,children:()=>(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:4,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:6,children:[(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[n("rpm_NewPassword"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"new_password",name:"new_password",variant:"outlined",type:i?"password":"text",endAdornment:(0,Gt.jsxs)(H_,{position:"end",children:[(0,Gt.jsx)(Kp,{size:"small",onClick:a,children:i?(0,Gt.jsx)(ZQ.A,{fontSize:"small"}):(0,Gt.jsx)(Kl,{fontSize:"small"})}),(0,Gt.jsx)(Yx,{title:n("message:rpm_NewPasswordHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]})}),(0,Gt.jsx)(Xz,{name:"new_password",children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_NewPassword")})})})]})]})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:n("rpm_ConfirmPassword")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"confirmPassword",name:"confirmPassword",variant:"outlined",type:"password",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:n("message:rpm_ConfirmPasswordHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"confirmPassword",children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_ConfirmPassword")})})}),(0,Gt.jsx)(RH,{sx:{mt:4,p:0},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>r(-1),children:"Cancel"})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:"Save"})})]})})]})]})})]}),(0,Gt.jsx)(df,{item:!0,xs:!0,container:!0,justifyContent:"center",children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"subtitle2",component:"h6",gutterBottom:!0,children:n("rpm_passwordStandards")+":"}),(0,Gt.jsx)(Eu,{component:"ul",sx:{p:0,pl:3,m:0},children:s.map(e=>(0,Gt.jsx)(Eu,{component:"li",children:(0,Gt.jsx)(Ym,{sx:{display:"inline"},component:"p",variant:"body2",color:"text.primary",children:e.info})},e.id))})]})})})]})})})},"password_formik")},QQ=["children","onClose"],JQ=e=>{const{children:t,onClose:n}=e,r=Ko(e,QQ);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};function eJ(e){let{allPrograms:t,openModal:n,onCloseModal:r,attachProgram:i,fetchRoleCustomList:o,customRoles:a,fetchRolePredefinedList:s,rolePredefinedList:l}=e;const{t:c}=vg();return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(Kw,{fullWidth:!0,maxWidth:"sm",open:n,onClose:r,children:(0,Gt.jsx)(Iz,{initialValues:{role_level:"",program:"",role_type:"",role:""},validationSchema:vV.assignLevel,onSubmit:i,enableReinitialize:!0,children:e=>{let{values:n,setFieldValue:i}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(JQ,{sx:{px:4},onClose:r,children:c("rpm_AssignLevel")}),(0,Gt.jsx)(s_,{sx:{p:4},dividers:!0,children:(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsxs)(df,{item:!0,xs:!0,children:[(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:c("rpm_SelectLevel")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"role_level",name:"role_level",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_RoleLevelTextHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:Object.values(Zc).map(e=>(0,Gt.jsx)($m,{value:e,children:c("rpm_".concat(e))},e))}),(0,Gt.jsx)(Xz,{name:"role_level",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_RoleLevel")})})})]})]})}),n.role_level===Zc.PROGRAM&&(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:c("rpm_SelectProgram")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{component:$K,fullWidth:!0,size:"small",id:"program",optionId:"code",name:"program",options:t,browserAutocomplete:!1,onValueChange:()=>{i("role",""),i("role_type","")},valueKey:"code",nameKey:"display_name"}),(0,Gt.jsx)(Xz,{name:"program",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_SelectProgram")})})})]})]})}),!as(n.program)&&(null===n||void 0===n?void 0:n.role_level)===(null===Zc||void 0===Zc?void 0:Zc.PROGRAM)&&(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:c("rpm_SelectRoleType")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"role_type",name:"role_type",variant:"outlined",value:null===n||void 0===n?void 0:n.role_type,onChange:e=>{e.target.value===Gc.PREDEFINED?s("","/RPMCORE/".concat(null===n||void 0===n?void 0:n.program,"/")):o("","/RPMCORE/".concat(null===n||void 0===n?void 0:n.program,"/")),i("role_type",e.target.value)},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_RoleLevelTextHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===Yc||void 0===Yc?void 0:Yc.map(e=>(0,Gt.jsx)($m,{value:null===e||void 0===e?void 0:e.value,children:null===e||void 0===e?void 0:e.label},null===e||void 0===e?void 0:e.id))}),(0,Gt.jsx)(Xz,{name:"role_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_RoleType")})})})]})]})}),!as(n.program)&&(null===n||void 0===n?void 0:n.role_level)===(null===Zc||void 0===Zc?void 0:Zc.PROGRAM)&&(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:c("rpm_SelectRole")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{component:$K,fullWidth:!0,size:"small",id:"role",optionId:"id",name:"role",options:(null===n||void 0===n?void 0:n.role_type)===Gc.PREDEFINED?l:a,browserAutocomplete:!1,valueKey:"id",nameKey:"name"}),(0,Gt.jsx)(Xz,{name:"role",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_SelectRole")})})})]})]})})]})})}),(0,Gt.jsx)(iO,{sx:{py:3,px:4},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:r,children:c("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:c("rpm_Submit")})})]})})]})})}},"assignLevel_formik")})})}const tJ=(0,dy.A)((0,Gt.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function nJ(e){let{userData:t,assignProgramList:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,assignProgramHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchAssignProgramList:m,pageDetails:f,deleteButton:g,progPageDetails:v,attachProgram:x,groupsProgram:y,revokeAccess:b,isGroupRootAccess:j,assignLevelModalOpen:w,handleAssignLevelModalToggle:_,setHeadcells:C,settingModal:S,initialHeadcells:A,handleSettingModalToggle:k,allPrograms:M,fetchRoleCustomList:O,customRoles:T,goToRoles:E,fetchRolePredefinedList:P,rolePredefinedList:D}=e;const{t:R}=vg(),N=null===v||void 0===v?void 0:v.per_page,L=Math.ceil((null===n||void 0===n?void 0:n.length)/parseInt(N)),I=(0,i.A)((0,i.A)({},v),{},{last_page:parseInt(L)});return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsxs)(df,{container:!0,item:!0,xs:12,justifyContent:"space-between",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(XO,{severity:"warning",icon:!1,sx:e=>({mb:2,py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:[(0,Gt.jsxs)("strong",{children:["Current Access Level : ",as(j)?"Program":"Client"]}),!as(j)&&(0,Gt.jsxs)(Ym,{variant:"body2",children:["You are showing all the programs and related roles on ROLES tab,",(0,Gt.jsx)("br",{})," for the access all programs first assign root role on"," ",(0,Gt.jsx)("strong",{children:"ROLES"})," tab."]})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{display:"flex",gap:2,children:[(null===t||void 0===t?void 0:t.isAdmin)&&(0,Gt.jsx)(df,{item:!0,children:as(j)?(0,Gt.jsx)(Vp,{color:"primary",variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(BZ.A,{}),onClick:_,children:R("rpm_Assign")}):b(j)}),(0,Gt.jsx)(Yx,{title:R("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:k,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})]})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:n,headCells:null===c||void 0===c?void 0:c.filter(e=>A.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.map(e=>(0,Gt.jsxs)(K_,{className:e.code?"":"d-none",sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:u,checked:d.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),A.includes("name")&&(0,Gt.jsx)(rC,{children:e.display_name}),A.includes("location")&&(0,Gt.jsx)(rC,{children:e.city}),A.includes("updated_at")&&(0,Gt.jsx)(rC,{children:sa()(e.updated_at).format("DD MMM YYYY")}),A.includes("updated_by")&&(0,Gt.jsx)(rC,{children:e.updated_by}),A.includes("action")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",gap:"16px",children:[(0,Gt.jsx)(Vp,{sx:{padding:"4px 12px",minWidth:"unset"},color:"primary",variant:"outlined",onClick:()=>E(e),startIcon:(0,Gt.jsx)(BZ.A,{}),children:R("rpm_Assign_Role")}),null!==t&&void 0!==t&&t.isAdmin?g(e):(0,Gt.jsx)(Kp,{color:"error",disabled:!0,children:(0,Gt.jsx)(tJ,{fontSize:"small",sx:{width:20,height:20}})})]})})]},e.id))})}),(0,Gt.jsx)(IO,{pageDetails:as(j)?I:v,fetchListFunction:m}),(0,Gt.jsx)(fO,{open:S,allHeadCells:c,initialHeadcells:A,setHeadcells:C,onClose:k})]})]}),(0,Gt.jsx)(eJ,{groupsProgram:y,openModal:w,onCloseModal:_,attachProgram:x,allPrograms:M,fetchRoleCustomList:O,customRoles:T,fetchRolePredefinedList:P,rolePredefinedList:D})]})}nJ.defaultProps={userData:{},assignProgramHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",assignProgramList:[],fetchAssignProgramList:()=>{},viewButton:()=>{},deleteButton:()=>{},progPageDetails:{},attachProgram:()=>{},groupsProgram:[],isGroupRootAccess:{},assignLevelModalOpen:!1,revokeAccess:{},handleAssignLevelModalToggle:()=>{},initialHeadcells:[],allPrograms:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},fetchRoleCustomList:()=>{},fetchRolePredefinedList:()=>{},customRoles:[],rolePredefinedList:[],goToRoles:()=>{}};const rJ=nJ;function iJ(e){let{rootAccess:t,user:n,userData:r,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,checkState:d,onCheck:u,isSelection:p,nodata:h,assignProgramHead:m,assignProgramList:f,fetchAssignProgramList:g,assignCustomRoleHead:v,rolePredefinedList:x,fetchRolePredefinedList:y,roleCustomList:b,fetchRoleCustomList:j,assignSystemRoleHead:w,fetchAssignRoleList:_,roleSystemList:C,fetchRoleSystemList:S,pageDetails:A,deleteButton:k,revokeAccess:M,toggleRoles:O,role:T,assignUserRoles:E,handleChangeRole:P,filterByProgram:D,onProgramChange:R,progPageDetails:N,onApplyFilter:L,onResetFilter:I,attachProgram:F,isGroupRootAccess:$,groupsProgram:B,assignLevelModalOpen:z,handleAssignLevelModalToggle:H,setUserPassword:W,setHeadcells:V,settingModal:U,initialHeadcells:q,handleSettingModalToggle:G,allPrograms:Y,setRolesHeadcells:Z,rolesSettingModal:K,rolesInitialHeadcells:X,handleRolesSettingModalToggle:Q,customRoles:J}=e;const{t:ee}=vg(),te=so(),[ne,re]=We.useState(0),[ie,oe]=We.useState(null),ae=[{name:ee("rpm_Staff"),url:Lc.DOCTOR.USERS},{name:ee("rpm_UserDetail"),url:""}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:ae})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",children:[ee("rpm_EditUser")," ",(0,Gt.jsxs)(Eu,{component:"span",fontSize:"body1.fontSize",children:[" ","(",null===n||void 0===n?void 0:n.first_name,")"]})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:()=>te(-1),children:ee("rpm_Back")})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsxs)(uH,{sx:{p:0,":last-child":{pb:0}},children:[(0,Gt.jsx)(Eu,{sx:{borderBottom:1,borderColor:"divider"},children:(0,Gt.jsxs)(eU,{value:ne,onChange:(e,t)=>{re(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,Gt.jsx)(AV,(0,i.A)({label:ee("rpm_MyInformation")},kU(0))),(0,Gt.jsx)(AV,(0,i.A)({label:ee("rpm_Programs")},kU(1))),(0,Gt.jsx)(AV,(0,i.A)({label:ee("rpm_Roles")},kU(2))),(0,Gt.jsx)(AV,(0,i.A)({label:ee("rpm_PasswordReset")},kU(3)))]})}),(0,Gt.jsx)(AU,{value:ne,index:0,children:(0,Gt.jsx)(Eu,{px:2,py:4,children:(0,Gt.jsx)(YQ,{user:n,userData:r})})}),(0,Gt.jsx)(AU,{value:ne,index:1,children:(0,Gt.jsx)(Eu,{px:2,py:4,children:t?(0,Gt.jsx)(ZK,{user:n,revokeAccess:M,isGroupRootAccess:$}):(0,Gt.jsx)(rJ,{userData:r,rootAccess:t,assignProgramList:f,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,assignProgramHead:m,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchAssignProgramList:g,pageDetails:A,deleteButton:k,revokeAccess:M,progPageDetails:N,attachProgram:F,groupsProgram:B,isGroupRootAccess:$,assignLevelModalOpen:z,handleAssignLevelModalToggle:H,setHeadcells:V,settingModal:U,initialHeadcells:q,handleSettingModalToggle:G,allPrograms:Y,fetchRoleCustomList:j,customRoles:J,goToRoles:e=>{oe(e),re(2)},fetchRolePredefinedList:y,rolePredefinedList:x})})}),(0,Gt.jsx)(AU,{value:ne,index:2,children:(0,Gt.jsx)(Eu,{px:2,py:4,children:(0,Gt.jsx)(GK,{userData:r,rootAccess:t,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,checkState:d,onCheck:u,isSelection:p,nodata:h,pageDetails:A,roleCustomList:b,rolePredefinedList:x,assignCustomRoleHead:v,fetchRoleCustomList:j,fetchRolePredefinedList:y,assignSystemRoleHead:w,fetchAssignRoleList:_,roleSystemList:C,fetchRoleSystemList:S,deleteButton:k,revokeAccess:M,toggleRoles:O,role:T,assignUserRoles:E,handleChangeRole:P,filterByProgram:D,onProgramChange:R,assignProgramList:f,onApplyFilter:L,onResetFilter:I,setRolesHeadcells:Z,rolesSettingModal:K,rolesInitialHeadcells:X,handleRolesSettingModalToggle:Q,allPrograms:Y,isGroupRootAccess:$,clickedProgram:ie,setClickedProgram:oe})})}),(0,Gt.jsx)(AU,{value:ne,index:3,children:(0,Gt.jsx)(Eu,{px:2,py:4,children:(0,Gt.jsx)(XQ,{setUserPassword:W})})})]})]})})})]})})}iJ.defaultProps={userData:{},rootAccess:!1,pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",assignProgramHead:[],assignProgramList:[],fetchAssignProgramList:()=>{},assignCustomRoleHead:[],roleCustomList:[],rolePredefinedList:[],fetchRoleCustomList:()=>{},fetchRolePredefinedList:()=>{},assignSystemRoleHead:[],fetchAssignRoleList:()=>{},viewButton:()=>{},deleteButton:()=>{},revokeAccess:()=>{},toggleRoles:()=>{},role:"",assignUserRoles:[],handleChangeRole:()=>{},filterByProgram:"",onProgramChange:()=>{},user:{},progPageDetails:{},roleSystemList:[],fetchRoleSystemList:()=>{},onApplyFilter:()=>{},onResetFilter:()=>{},attachProgram:()=>{},isGroupRootAccess:{},groupsProgram:[],assignLevelModalOpen:!1,handleAssignLevelModalToggle:()=>{},setUserPassword:()=>{},initialHeadcells:[],allPrograms:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},setRolesHeadcells:()=>{},rolesSettingModal:!1,rolesInitialHeadcells:[],handleRolesSettingModalToggle:()=>{},customRoles:[]};const oJ=iJ,aJ=["content"],sJ=["content"];const lJ=function(e){var t;let{fetchProgramList:n,pageDetails:r}=e;const o=Nt(),a=Ct(Nd),{t:s}=vg(),{enqueueSnackbar:l}=hi(),{userId:c}=lo(),{programList:d}=(0,We.useContext)(j_),u=Ct(Gd),{userData:p}=(0,We.useContext)(Zg),[h,m]=(0,We.useState)("desc"),[f,g]=(0,We.useState)("updated_at"),[v,x]=We.useState(""),[y,b]=We.useState(null),[j,w]=We.useState(null),[_,C]=We.useState(null),[S,A]=We.useState(null),[k,M]=We.useState(null),[O,T]=We.useState([]),[E,P]=We.useState(null),[D,R]=We.useState([]),[N,L]=(0,We.useState)({custom_roles:[],system_roles:[],predefined_roles:[]}),[I,F]=We.useState(null),[$,B]=We.useState("CUSTOM"),[z,H]=We.useState({}),[W,V]=(0,We.useState)(null),[U,q]=(0,We.useState)([]),[G,Y]=We.useState(!1),[Z,K]=(0,We.useState)((0,i.A)({},Fc)),[X,Q]=We.useState({open:!1,data:{}}),J=e=>{Q((0,i.A)((0,i.A)({},X),{},{open:!X.open,data:e}))},ee=()=>{Y(!G)},te=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;try{const{data:n}=await o(Rg((0,i.A)((0,i.A)({q:e},Z),{},{per_page:999,sort_by:f,sort_order:h,programId:t,kind:Gc.CUSTOM}))),r=n||{},{content:a}=r,s=Ko(r,aJ);if(T(a),null!==a&&void 0!==a&&a.length){let e=ue(a);M(e)}else M([]);K(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:null===s||void 0===s?void 0:s.total}))}catch(n){const e=ls(n,"response.data.code","");as(e)?o(Zo({subTitle:"error:rpm_ERR_NOT_FOUND",severity:$c})):o(Zo({subTitle:bd(e,"error:rpm_NotFound"),severity:$c}))}},ne=async()=>{try{const{data:e}=await o(Rg({kind:Gc.SYSTEM})),{content:t}=e||{};P(t)}catch(e){console.log(e)}},re=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;try{const{data:n}=await o(Rg((0,i.A)((0,i.A)({q:e},Z),{},{per_page:999,sort_by:f,sort_order:h,programId:t,kind:Gc.PREDEFINED}))),r=n||{},{content:a}=r,s=Ko(r,sJ);R(a),K(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:null===s||void 0===s?void 0:s.total}))}catch(n){const e=ls(n,"response.data.code","");as(e)?o(Zo({subTitle:"error:rpm_ERR_NOT_FOUND",severity:$c})):o(Zo({subTitle:bd(e,"error:rpm_NotFound"),severity:$c}))}},ie=async()=>{try{const{data:e}=await o((e=>async t=>{t(na(!0));const n="".concat(ma.USERS,"/").concat(e,"/roles");try{return await cu(n)}finally{t(na(!1))}})(c)),t=e.filter(e=>e.kind===Gc.CUSTOM);F(t),L({custom_roles:e.filter(e=>e.kind===Gc.CUSTOM).map(e=>e.id),system_roles:e.filter(e=>e.kind===Gc.SYSTEM).map(e=>e.id),predefined_roles:e.filter(e=>"PRE_DEFINED"===e.kind).map(e=>e.id)})}catch(e){console.log(e)}},oe=async()=>{try{var e;let t=[];const{data:n}=await o((e=>async t=>{t(na(!0));let n="".concat(ma.USERS,"/").concat(e,"/groups");try{return await cu(n)}finally{t(na(!1))}})(c)),r=null===n||void 0===n?void 0:n.find(e=>"/"===e.path);if(as(r))t=n;else{const{data:e}=await o($g({sort_by:f,sort_order:h,include_child:!0,per_page:999}));t=e.content}const a=[],s=[];let l={};null===(e=t)||void 0===e||e.forEach(e=>{if("/"===e.path){var n;l=null===(n=t)||void 0===n?void 0:n.find(e=>"/"===e.path),C(l),s.push((0,i.A)({},l))}else{var r,o;const t=null===e||void 0===e||null===(r=e.path)||void 0===r?void 0:r.substr(1,(null===e||void 0===e||null===(o=e.path)||void 0===o?void 0:o.length)-2).split("/");t[1]&&(null===a||void 0===a||a.push({code:t[1],path:e.path}))}}),null!==a&&void 0!==a&&a.length&&null!==u&&void 0!==u&&u.length?(null===a||void 0===a||a.forEach(e=>{let t=as(l)?u:d;const n=null===t||void 0===t?void 0:t.find(t=>(null===t||void 0===t?void 0:t.code)===e.code);n?s.push((0,i.A)((0,i.A)({},n),{},{path:e.path})):s.push((0,i.A)((0,i.A)({},u),{},{path:e.path}))}),A(s)):A([])}catch(t){console.log(t)}},ae=async e=>{try{await o(((e,t)=>async n=>{n(na(!0));let r="".concat(ma.USERS,"/").concat(e,"/groups/leave?path=").concat(t);try{return await du(r)}finally{n(na(!1))}})(c,e)),oe(),J({}),l(s("message:rpm_ProgramRemoveSuccess"),{variant:"success"}),C(null)}catch(t){const e=ls(t,"response.data.code","");as(e)?l(s("error:rpm_ProgramRemoveFailed"),{variant:"error"}):l(s(bd(e)),{variant:"error"})}},se=async e=>{const t={role_ids:[...N.system_roles,...N.custom_roles,...N.predefined_roles,null===e||void 0===e?void 0:e.id]};try{"PRE_DEFINED"==e.kind&&await o(zg(c,e.group.path)),await o(Ig(c,t)),ie(),l(s("message:rpm_AttachRoleSuccess"),{variant:"success"})}catch(n){l(n.message,{variant:"error"})}},le=async e=>{const t=[...N.system_roles,...N.custom_roles,...N.predefined_roles].filter(t=>t!==e.id).map(e=>e),n={role_ids:t};try{"PRE_DEFINED"==e.kind&&await o(zg(c,e.group.path)),await o(Ig(c,n)),ie(),l(s("message:rpm_RemoveRoleSuccess"),{variant:"success"})}catch(r){l(r.message,{variant:"error"})}},ce=()=>{null!==W&&(te("",W),re("",W))},de=e=>{const t=[],n=[];return null===e||void 0===e||e.forEach(e=>{if("/"!==e.path){var n,r;const i=null===e||void 0===e||null===(n=e.path)||void 0===n?void 0:n.substr(1,(null===e||void 0===e||null===(r=e.path)||void 0===r?void 0:r.length)-2).split("/");i[1]&&(null===t||void 0===t||t.push({code:i[1],path:e.path}))}}),null!==t&&void 0!==t&&t.length&&(null===t||void 0===t||t.forEach(e=>{const t=null===d||void 0===d?void 0:d.find(t=>(null===t||void 0===t?void 0:t.code)===e.code);t&&n.push((0,i.A)((0,i.A)({},t),{},{path:e.path}))})),n},ue=e=>{let t=[];null===S||void 0===S||S.forEach(n=>{const r=null===e||void 0===e?void 0:e.filter(e=>{var t;if(e.group.path===n.path&&(null===(t=N.custom_roles)||void 0===t||!t.includes(e.id)))return!0});t.push(...r)});const n=null===e||void 0===e?void 0:e.filter(e=>{var t;return null===(t=N.custom_roles)||void 0===t?void 0:t.includes(e.id)});return n.concat(t)};We.useEffect(()=>{as(null===N||void 0===N?void 0:N.system_roles)?as(null===N||void 0===N?void 0:N.predefined_roles)?B("CUSTOM"):B("PREDEFINED"):B("SYSTEM")},[S]),We.useEffect(()=>{(()=>{const e=(null===p||void 0===p?void 0:p.isAdmin)&&(!as(null===N||void 0===N?void 0:N.system_roles)||!as(null===I||void 0===I?void 0:I.find(e=>"/"===e.group.path)));b(e)})()},[N]),We.useEffect(()=>{a&&!as(d)&&(async()=>{try{const{data:e}=await o($g({sort_order:"asc",per_page:999,include_child:!0})),{content:t}=e||{},n=de(t);w(n)}catch(e){console.log(e)}})()},[a,d]),We.useEffect(()=>{if(a&&!as(S))if(null!==p&&void 0!==p&&p.isAdmin)te(),re();else if(null!==p&&void 0!==p&&p.showStaffMenu){var e,t,n;te("","/RPMCORE/".concat(null===(e=S[0])||void 0===e?void 0:e.code,"/")),re("","/RPMCORE/".concat(null===(t=S[0])||void 0===t?void 0:t.code,"/")),V("/RPMCORE/".concat(null===(n=S[0])||void 0===n?void 0:n.code,"/"))}else te(),re(),V(null)},[a,S,y]),We.useEffect(()=>{a&&c&&!as(d)&&((async()=>{try{const{data:e}=await o(Fg(c));H(e)}catch(e){l(e.message,{variant:"error"})}})(),ie(),ne())},[a,c,d]),We.useEffect(()=>{a&&c&&!as(d)&&!as(u)&&oe()},[a,c,d,f,h,u]),We.useEffect(()=>{o(w_({activeMenuItem:"users"}))},[]);const[pe,he]=We.useState(!1),[me,fe]=We.useState(as($o.getAssignedProgramsHeadcells())?["name","location","updated_at","updated_by","action"]:$o.getAssignedProgramsHeadcells()),[ge,ve]=We.useState(!1),[xe,ye]=We.useState(as($o.getAssignedRolesHeadcells())?["role_name","description","access_layer","action"]:$o.getAssignedRolesHeadcells()),be=[{id:"name",label:s("rpm_Name"),isSort:!1,sortProperty:"name"},{id:"location",label:s("rpm_Location"),isSort:!1,sortProperty:"location"},{id:"updated_at",label:s("rpm_DateModified"),isSort:!1,sortProperty:"updated_at"},{id:"updated_by",label:s("rpm_ModifiedBy"),isSort:!1,sortProperty:"updated_by"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}],je=[{id:"role_name",label:s("rpm_RoleName"),isSort:!0,sortProperty:"name"},{id:"description",label:s("rpm_Description"),isSort:!1,sortProperty:"description"},{id:"access_layer",label:s("rpm_AccessLevel"),isSort:!1,sortProperty:"access_layer"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}],we=[{id:"role_name",label:s("rpm_RoleName"),isSort:!0,sortProperty:"name"},{id:"description",label:s("rpm_Description"),isSort:!0,sortProperty:"description"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}];return We.useEffect(()=>{ce()},[W]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(oJ,{rootAccess:y,userData:p,user:z,role:$,nodata:D_,onCheck:e=>{if(Array.isArray(e))return q(e.map(e=>e.toString()));const t=e.target.name;U.includes(t)?q(U.filter(e=>e!==t)):q(e=>[...e,t])},isSelection:!1,order:h,orderBy:f,setOrder:m,setOrderBy:g,searchText:v,checkState:U,setSearchText:x,dataParameter:"id",deleteButton:e=>(0,Gt.jsx)(Yx,{title:s("rpm_RemoveProgram"),children:(0,Gt.jsx)(Eu,{component:"span",children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>J(e),disabled:!as(_),children:(0,Gt.jsx)(tJ,{fontSize:"small",sx:{width:20,height:20}})})})}),revokeAccess:e=>(0,Gt.jsx)(Vp,{color:"error",variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(UK.A,{}),onClick:()=>J(e),children:s("rpm_UnassignClient")}),toggleRoles:e=>{var t,n,r,i,o,a,l,c,d,u,p,h;return $===Gc.SYSTEM?(0,Gt.jsx)(Vp,{"data-id":e.id,color:null!==(t=N.system_roles)&&void 0!==t&&t.includes(e.id)?"error":"primary",variant:"contained",disableElevation:!0,startIcon:null!==(n=N.system_roles)&&void 0!==n&&n.includes(e.id)?(0,Gt.jsx)(UK.A,{}):(0,Gt.jsx)(BZ.A,{}),onClick:null!==(r=N.system_roles)&&void 0!==r&&r.includes(e.id)?()=>le(e):()=>se(e),children:null!==(i=N.system_roles)&&void 0!==i&&i.includes(e.id)?s("rpm_UnassignRole"):s("rpm_AssignRole")}):$===Gc.CUSTOM?(0,Gt.jsx)(Vp,{"data-id":e.id,color:null!==(o=N.custom_roles)&&void 0!==o&&o.includes(e.id)?"error":"primary",variant:"contained",disableElevation:!0,startIcon:null!==(a=N.custom_roles)&&void 0!==a&&a.includes(e.id)?(0,Gt.jsx)(UK.A,{}):(0,Gt.jsx)(BZ.A,{}),onClick:null!==(l=N.custom_roles)&&void 0!==l&&l.includes(e.id)?()=>le(e):()=>se(e),children:null!==(c=N.custom_roles)&&void 0!==c&&c.includes(e.id)?s("rpm_UnassignRole"):s("rpm_AssignRole")}):$===Gc.PREDEFINED?(0,Gt.jsx)(Vp,{"data-id":e.id,color:null!==(d=N.predefined_roles)&&void 0!==d&&d.includes(e.id)?"error":"primary",variant:"contained",disableElevation:!0,startIcon:null!==(u=N.predefined_roles)&&void 0!==u&&u.includes(e.id)?(0,Gt.jsx)(UK.A,{}):(0,Gt.jsx)(BZ.A,{}),onClick:null!==(p=N.predefined_roles)&&void 0!==p&&p.includes(e.id)?()=>le(e):()=>se(e),children:null!==(h=N.predefined_roles)&&void 0!==h&&h.includes(e.id)?s("rpm_UnassignRole"):s("rpm_AssignRole")}):void 0},pageDetails:Z,filterByProgram:W,onProgramChange:e=>{V("/RPMCORE/".concat(e))},handleChangeRole:e=>{B(e.target.value)},progPageDetails:r,assignProgramHead:be,assignProgramList:y?d:S,fetchAssignProgramList:n,assignCustomRoleHead:je,assignUserRoles:I,fetchAssignRoleList:ie,assignSystemRoleHead:we,roleCustomList:k,rolePredefinedList:D,fetchRoleCustomList:te,fetchRolePredefinedList:re,roleSystemList:E,fetchRoleSystemList:ne,onApplyFilter:ce,onResetFilter:()=>{V(null),te(),re()},attachProgram:async(e,t)=>{let{setErrors:n}=t;try{const t=e.program?"/RPMCORE/".concat(e.program,"/"):"/",n=[...N.system_roles,...N.custom_roles,...N.predefined_roles,null===e||void 0===e?void 0:e.role];await o(zg(c,t)),(null===e||void 0===e?void 0:e.role_level)===Zc.PROGRAM&&n.length>0&&await o(Ig(null===z||void 0===z?void 0:z.id,{role_ids:n})),oe(),ee(),l(s("message:rpm_ProgramAttachSuccess"),{variant:"success"})}catch(r){const e=ls(r,"response.data.field_errors",{}),t=ls(r,"response.data.code","");as(e)?as(t)?l(s("error:rpm_ProgramAttachFailed"),{variant:"error"}):l(s(bd(t)),{variant:"error"}):n(yd(e))}},isGroupRootAccess:_,groupsProgram:j,assignLevelModalOpen:G,handleAssignLevelModalToggle:ee,setUserPassword:async(e,t)=>{let{resetForm:n,setErrors:r}=t;const a=(0,i.A)({},e);try{await o(((e,t)=>async n=>{n(na(!0));const r="".concat(ma.USERS,"/").concat(e,"/set-password"),i={new_password:t.new_password};try{return await uu(r,i)}finally{n(na(!1))}})(c,a)),o(Zo({subTitle:"message:rpm_UpdatePasswordSuccessfully",severity:Bc})),n()}catch(s){const e=ls(s,"response.data.field_errors",{}),t=ls(s,"response.data.code","");as(e)?as(t)?o(Zo({subTitle:"error:rpm_PasswordResetFailed",severity:$c})):o(Zo({subTitle:bd(t,"error:rpm_PasswordResetFailed"),severity:$c})):r(yd(e))}},setHeadcells:function(e){fe(e),$o.setAssignedProgramsHeadcells(e)},settingModal:pe,initialHeadcells:me,handleSettingModalToggle:()=>{he(!pe)},allPrograms:u,setRolesHeadcells:function(e){ye(e),$o.setAssignedRolesHeadcells(e)},rolesSettingModal:ge,rolesInitialHeadcells:xe,handleRolesSettingModalToggle:()=>{ve(!ge)},customRoles:O}),(0,Gt.jsx)(PU,{openModal:X.open,onCloseModal:J,actionFunction:()=>{var e;return ae(null===X||void 0===X||null===(e=X.data)||void 0===e?void 0:e.path)},dataName:null===X||void 0===X||null===(t=X.data)||void 0===t?void 0:t.display_name,options:{primaryText:s("rpm_Confirm"),secondaryText:s("message:rpm_UnassignBodyText"),descText:"",btn:{primaryText:s("rpm_Confirm"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};function cJ(e){let{userList:t,order:n,orderBy:r,setOrder:o,setOrderBy:a,searchText:s,setSearchText:l,dataParameter:c,userHead:d,checkState:u,onCheck:p,isSelection:h,nodata:m,fetchUserList:f,pageDetails:g,viewButton:v,deleteButton:x,onProgramChange:y,onResetFilter:b,userData:j,setHeadcells:w,settingModal:_,initialHeadcells:C,handleSettingModalToggle:S,allPrograms:A}=e;const{t:k}=vg(),M=so(),O=[{name:k("rpm_Staff"),url:""}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",children:[(0,Gt.jsx)(kH,{labels:O}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:k("rpm_Staff")})})]}),(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:k("rpm_Staff")})})}),(null===j||void 0===j?void 0:j.showCreateUserBtn)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>M("add"),className:(null===j||void 0===j?void 0:j.showCreateUserBtn)&&"staff-tour-step2",children:k("rpm_CreateUser")})})]})}),(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,justifyContent:"space-between",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:5,lg:4,className:"staff-tour-step1",children:(0,Gt.jsx)(MZ,{fetchListFunction:f,searchText:s,setSearchText:l,pageDetails:g,searchInField:!0,placeHolder:"Search by username and email"})}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:8,container:!0,spacing:2,justifyContent:"flex-end",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,className:"staff-tour-step0",children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:as(A)?[]:A,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.display_name})})),onChange:async(e,t,n)=>{y(null===t||void 0===t?void 0:t.code),"clear"===n&&b()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:k("rpm_SelectProgram")+"..."}))})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:k("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:S,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:o,setOrderBy:a,data:t,headCells:null===d||void 0===d?void 0:d.filter(e=>C.includes(e.id)),dataParameter:c,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>{return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[h&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:p,checked:u.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),C.includes("username")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"edit/".concat(e.id),children:e.username})}),C.includes("full_name")&&(0,Gt.jsx)(rC,{width:"25%",children:e.first_name+" "+e.last_name}),C.includes("email")&&(0,Gt.jsx)(rC,{children:e.email}),C.includes("status")&&(0,Gt.jsx)(rC,{children:(t=e.active,t?(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Active"})}):(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Inactive"})}))}),C.includes("created_at")&&(0,Gt.jsx)(rC,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),C.includes("action")&&(0,Gt.jsxs)(rC,{children:[(null===j||void 0===j?void 0:j.showReadUserBtn)&&v(e),(null===j||void 0===j?void 0:j.showDeleteUserBtn)&&x(e)]})]},e.id);var t})})}),(0,Gt.jsx)(IO,{pageDetails:g,fetchListFunction:f}),(0,Gt.jsx)(fO,{open:_,allHeadCells:d,initialHeadcells:C,setHeadcells:w,onClose:S})]})]})]})})}cJ.defaultProps={userHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},searchText:"",setSearchText:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",userList:[],fetchUserList:()=>{},viewButton:()=>{},deleteButton:()=>{},filterByProgram:0,onProgramChange:()=>{},programList:[],onApplyFilter:()=>{},onResetFilter:()=>{},userData:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},allPrograms:[]};const dJ=cJ,uJ=["content"];const pJ=function(){const e=Nt(),t=so(),{t:n}=vg(),{userData:r}=(0,We.useContext)(Zg),o=Ct(qd),a=!("true"===ls(o,"user_principal.attributes.skip_tour[0]","")),{programList:s}=(0,We.useContext)(j_),l=Ct(Gd),c=Ct(Nd),d=We.useRef([]),[u,p]=(0,We.useState)("desc"),[h,m]=(0,We.useState)("updated_at"),[f,g]=We.useState(""),[v,x]=We.useState(null),[y,b]=(0,We.useState)([]),[j,w]=(0,We.useState)(null),[_,C]=(0,We.useState)((0,i.A)({},Fc)),[S,A]=We.useState({open:!1,data:{}}),[k,M]=We.useState(""),[O,T]=We.useState(!1),[E,P]=We.useState(as($o.getUsersHeadCells())?["username","full_name","email","status","created_at","action"]:$o.getUsersHeadCells()),D=e=>{if(S.open)d.current=[],A((0,i.A)((0,i.A)({},S),{},{open:!S.open}));else{const t=Array.isArray(event)?[...event]:[e.id];d.current=t,A((0,i.A)((0,i.A)({},S),{},{open:!S.open,data:e}))}},R=async function(){var t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,o={},a=(0,i.A)((0,i.A)({q:n},_),{},{sort_by:h,sort_order:u}),l=null!==j?j:null===(t=s[0])||void 0===t?void 0:t.code;const c=null!==j?j:null;null!==r&&void 0!==r&&r.isAdmin&&null===j?o=(0,i.A)((0,i.A)({},a),{},{programId:c}):null!==r&&void 0!==r&&r.showStaffMenu?(o=(0,i.A)((0,i.A)({},a),{},{programId:l}),w(l)):o=(0,i.A)((0,i.A)({},a),{},{programId:c});try{const{data:t}=await e(Lg(o)),n=t||{},{content:r}=n,a=Ko(n,uJ);x(r),C(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(d){const t=ls(d,"response.data.code","");as(t)?e(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:$c})):e(Zo({subTitle:bd(t,"error:rpm_FetchUsersFailed"),severity:$c}))}},N=()=>{null!==j&&R()};We.useEffect(()=>{N()},[j]),We.useEffect(()=>{!c||as(l)||as(r)||null===j&&R()},[c,u,h,l,r,j]),We.useEffect(()=>{e(w_({activeMenuItem:"users",heading:{}}))},[]);const L=[{id:"username",label:n("rpm_UserName"),isSort:!0,sortProperty:"username"},{id:"full_name",label:n("rpm_FullName"),isSort:!1,sortProperty:"full_name"},{id:"email",label:n("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"status",label:n("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"created_at",label:n("rpm_CreatedAt"),isSort:!0,sortProperty:"created_at"},{id:"action",label:n("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(dJ,{order:u,orderBy:h,setOrder:p,setOrderBy:m,searchText:f,setSearchText:g,dataParameter:"id",checkState:y,onCheck:e=>{if(Array.isArray(e))return b(e.map(e=>e.toString()));const t=e.target.name;y.includes(t)?b(y.filter(e=>e!==t)):b(e=>[...e,t])},isSelection:!1,nodata:D_,userHead:L,userList:v,fetchUserList:R,pageDetails:_,editButton:e=>(0,Gt.jsx)(Yx,{title:n("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,Gt.jsx)(Yx,{title:n("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>t("edit/".concat(e.id)),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,Gt.jsx)(Yx,{title:n("rpm_Delete"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>D(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})}),filterByProgram:j,onProgramChange:e=>{w(e)},programList:s,onApplyFilter:N,onResetFilter:()=>{w(null)},userData:r,setHeadcells:function(e){P(e),$o.setUsersHeadCells(e)},settingModal:O,initialHeadcells:E,handleSettingModalToggle:()=>{T(!O)},allPrograms:l}),(0,Gt.jsx)(PU,{openModal:S.open,onCloseModal:D,actionFunction:async()=>{try{if(await e(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return async t=>{if(!as(e)){t(na(!0));try{await Promise.all(e.map(e=>pu("".concat(ma.USERS,"/").concat(e))))}finally{t(na(!1))}}}}(d.current)),b([]),null!==r&&void 0!==r&&r.isAdmin)R();else if(null!==r&&void 0!==r&&r.showStaffMenu){var t,n;R("",null===(t=s[0])||void 0===t?void 0:t.code),w(null===(n=s[0])||void 0===n?void 0:n.code)}else R(),w(null);A((0,i.A)((0,i.A)({},S),{},{open:!S.open})),e(Zo({subTitle:"message:rpm_DeleteUserSuccess",severity:Bc}))}catch(o){const t=ls(o,"response.data.code","");as(t)?e(Zo({subTitle:"error:rpm_RoleDeleteFailed",severity:$c})):e(Zo({subTitle:bd(t,"error:rpm_UserDeleteFailed"),severity:$c}))}},dataName:S.data.username,options:{primaryText:n("message:rpm_DeleteTitle"),secondaryText:n("message:rpm_DeleteBodyText"),descText:n("message:rpm_DeleteSubText"),btn:{primaryText:n("rpm_Delete"),secondaryText:n("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),!as(r)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:a,path:"staffTour",setRenderer:M}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:k})]})]})};const hJ=function(e){let{showPassword:t,passwordFields:n,updateUserPassword:r,handleShowHidePassword:i}=e;const{t:o}=vg(),a=so(),s=[{id:1,info:o("rpm_passwordInstruction1")},{id:2,info:o("rpm_passwordInstruction2")},{id:3,info:o("rpm_passwordInstruction3")},{id:4,info:o("rpm_passwordInstruction4")},{id:5,info:o("rpm_passwordInstruction5")},{id:6,info:o("rpm_passwordInstruction6")}],l=[{name:o("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:o("rpm_ChangePassword"),url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:l})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Iz,{initialValues:n,validationSchema:gV.updatePassword,onSubmit:r,enableReinitialize:!0,children:()=>(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:o("rpm_ChangePassword")})})})})}),(0,Gt.jsx)(uH,{sx:{py:4,":last-child":{pb:4}},children:(0,Gt.jsxs)(df,{container:!0,spacing:4,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:6,children:[(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[o("rpm_CurrentPassword"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"currentPassword",name:"currentPassword",variant:"outlined",type:"password",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:o("message:rpm_CurrentPasswordHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"currentPassword",children:e=>(0,Gt.jsx)(iw,{error:!0,children:o(e,{field:o("rpm_CurrentPassword")})})})]})]})}),(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[o("rpm_NewPassword"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"password",name:"password",variant:"outlined",type:t?"password":"text",endAdornment:(0,Gt.jsxs)(H_,{position:"end",children:[(0,Gt.jsx)(Kp,{size:"small",onClick:i,children:t?(0,Gt.jsx)(ZQ.A,{fontSize:"small"}):(0,Gt.jsx)(Kl,{fontSize:"small"})}),(0,Gt.jsx)(Yx,{title:o("message:rpm_NewPasswordHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]})}),(0,Gt.jsx)(Xz,{name:"password",children:e=>(0,Gt.jsx)(iw,{error:!0,children:o(e,{field:o("rpm_NewPassword")})})})]})]})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[o("rpm_ConfirmPassword"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"confirmPassword",name:"confirmPassword",variant:"outlined",type:"password",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:o("message:rpm_ConfirmPasswordHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"confirmPassword",children:e=>(0,Gt.jsx)(iw,{error:!0,children:o(e,{field:o("rpm_ConfirmPassword")})})}),(0,Gt.jsx)(RH,{sx:{mt:4,p:0},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>a(-1),children:"Cancel"})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:"Save"})})]})})]})]})})]}),(0,Gt.jsx)(df,{item:!0,xs:!0,container:!0,justifyContent:"center",children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{mt:4,children:[(0,Gt.jsx)(Ym,{variant:"subtitle2",component:"h6",gutterBottom:!0,children:o("rpm_passwordStandards")+":"}),(0,Gt.jsx)(Eu,{component:"ul",sx:{p:0,pl:3,m:0},children:s.map(e=>(0,Gt.jsx)(Eu,{component:"li",children:(0,Gt.jsx)(Ym,{sx:{display:"inline"},component:"p",variant:"body2",color:"text.primary",children:e.info})},e.id))})]})})})]})})]})})})},"password_formik")})})]})},mJ={currentPassword:"",password:"",confirmPassword:""};const fJ=function(){const e=Nt(),[t,n]=We.useState(!0);return We.useEffect(()=>{e(w_({activeMenuItem:"change-password",heading:{}}))},[]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(hJ,{showPassword:t,passwordFields:mJ,updateUserPassword:async(t,n)=>{let{setErrors:r,resetForm:o}=n;const a=(0,i.A)({},t);try{await e((e=>async t=>{t(na(!0));const n="".concat(ma.UPDATEPASSWORD),r={current_password:e.currentPassword,new_password:e.password};try{return await uu(n,r)}finally{t(na(!1))}})(a)),o(),e(Zo({subTitle:"message:rpm_UpdatePasswordSuccessfully",severity:Bc}))}catch(s){const t=ls(s,"response.data.field_errors",{}),n=ls(s,"response.data.code","");as(t)?as(n)?e(Zo({subTitle:"error:rpm_PasswordFailure",severity:$c})):e(Zo({subTitle:bd(n,"error:rpm_PasswordFailure"),severity:$c})):r(yd(t))}},handleShowHidePassword:()=>{n(!t)}})})};function gJ(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=gJ(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const vJ=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=gJ(e))&&(r&&(r+=" "),r+=t);return r};var xJ=Object.getOwnPropertyNames,yJ=Object.getOwnPropertySymbols,bJ=Object.prototype.hasOwnProperty;function jJ(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function wJ(e){return function(t,n,r){if(!t||!n||"object"!==typeof t||"object"!==typeof n)return e(t,n,r);var i=r.cache,o=i.get(t),a=i.get(n);if(o&&a)return o===n&&a===t;i.set(t,n),i.set(n,t);var s=e(t,n,r);return i.delete(t),i.delete(n),s}}function _J(e){return xJ(e).concat(yJ(e))}var CJ=Object.hasOwn||function(e,t){return bJ.call(e,t)};function SJ(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var AJ=Object.getOwnPropertyDescriptor,kJ=Object.keys;function MJ(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function OJ(e,t){return SJ(e.getTime(),t.getTime())}function TJ(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function EJ(e,t){return e===t}function PJ(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i,o,a=new Array(r),s=e.entries(),l=0;(i=s.next())&&!i.done;){for(var c=t.entries(),d=!1,u=0;(o=c.next())&&!o.done;)if(a[u])u++;else{var p=i.value,h=o.value;if(n.equals(p[0],h[0],l,u,e,t,n)&&n.equals(p[1],h[1],p[0],h[0],e,t,n)){d=a[u]=!0;break}u++}if(!d)return!1;l++}return!0}var DJ=SJ;function RJ(e,t,n){var r=kJ(e),i=r.length;if(kJ(t).length!==i)return!1;for(;i-- >0;)if(!zJ(e,t,n,r[i]))return!1;return!0}function NJ(e,t,n){var r,i,o,a=_J(e),s=a.length;if(_J(t).length!==s)return!1;for(;s-- >0;){if(!zJ(e,t,n,r=a[s]))return!1;if(i=AJ(e,r),o=AJ(t,r),(i||o)&&(!i||!o||i.configurable!==o.configurable||i.enumerable!==o.enumerable||i.writable!==o.writable))return!1}return!0}function LJ(e,t){return SJ(e.valueOf(),t.valueOf())}function IJ(e,t){return e.source===t.source&&e.flags===t.flags}function FJ(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i,o,a=new Array(r),s=e.values();(i=s.next())&&!i.done;){for(var l=t.values(),c=!1,d=0;(o=l.next())&&!o.done;){if(!a[d]&&n.equals(i.value,o.value,i.value,o.value,e,t,n)){c=a[d]=!0;break}d++}if(!c)return!1}return!0}function $J(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function BJ(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function zJ(e,t,n,r){return!("_owner"!==r&&"__o"!==r&&"__v"!==r||!e.$$typeof&&!t.$$typeof)||CJ(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var HJ=Array.isArray,WJ="function"===typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,VJ=Object.assign,UJ=Object.prototype.toString.call.bind(Object.prototype.toString);function qJ(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,o=e.areMapsEqual,a=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,d=e.areSetsEqual,u=e.areTypedArraysEqual,p=e.areUrlsEqual,h=e.unknownTagComparators;return function(e,m,f){if(e===m)return!0;if(null==e||null==m)return!1;var g=typeof e;if(g!==typeof m)return!1;if("object"!==g)return"number"===g?a(e,m,f):"function"===g&&i(e,m,f);var v=e.constructor;if(v!==m.constructor)return!1;if(v===Object)return s(e,m,f);if(HJ(e))return t(e,m,f);if(null!=WJ&&WJ(e))return u(e,m,f);if(v===Date)return n(e,m,f);if(v===RegExp)return c(e,m,f);if(v===Map)return o(e,m,f);if(v===Set)return d(e,m,f);var x=UJ(e);if("[object Date]"===x)return n(e,m,f);if("[object RegExp]"===x)return c(e,m,f);if("[object Map]"===x)return o(e,m,f);if("[object Set]"===x)return d(e,m,f);if("[object Object]"===x)return"function"!==typeof e.then&&"function"!==typeof m.then&&s(e,m,f);if("[object URL]"===x)return p(e,m,f);if("[object Error]"===x)return r(e,m,f);if("[object Arguments]"===x)return s(e,m,f);if("[object Boolean]"===x||"[object Number]"===x||"[object String]"===x)return l(e,m,f);if(h){var y=h[x];if(!y){var b=function(e){return null!=e?e[Symbol.toStringTag]:void 0}(e);b&&(y=h[b])}if(y)return y(e,m,f)}return!1}}var GJ=YJ();YJ({strict:!0}),YJ({circular:!0}),YJ({circular:!0,strict:!0}),YJ({createInternalComparator:function(){return SJ}}),YJ({strict:!0,createInternalComparator:function(){return SJ}}),YJ({circular:!0,createInternalComparator:function(){return SJ}}),YJ({circular:!0,createInternalComparator:function(){return SJ},strict:!0});function YJ(e){void 0===e&&(e={});var t,n=e.circular,r=void 0!==n&&n,i=e.createInternalComparator,o=e.createState,a=e.strict,s=void 0!==a&&a,l=function(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?NJ:MJ,areDatesEqual:OJ,areErrorsEqual:TJ,areFunctionsEqual:EJ,areMapsEqual:r?jJ(PJ,NJ):PJ,areNumbersEqual:DJ,areObjectsEqual:r?NJ:RJ,arePrimitiveWrappersEqual:LJ,areRegExpsEqual:IJ,areSetsEqual:r?jJ(FJ,NJ):FJ,areTypedArraysEqual:r?NJ:$J,areUrlsEqual:BJ,unknownTagComparators:void 0};if(n&&(i=VJ({},i,n(i))),t){var o=wJ(i.areArraysEqual),a=wJ(i.areMapsEqual),s=wJ(i.areObjectsEqual),l=wJ(i.areSetsEqual);i=VJ({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return i}(e),c=qJ(l),d=i?i(c):(t=c,function(e,n,r,i,o,a,s){return t(e,n,s)});return function(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(e,a){var s=r(),l=s.cache,c=void 0===l?t?new WeakMap:void 0:l,d=s.meta;return n(e,a,{cache:c,equals:i,meta:d,strict:o})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(e,t){return n(e,t,a)}}({circular:r,comparator:c,createState:o,equals:d,strict:s})}function ZJ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame(function r(i){n<0&&(n=i),i-n>t?(e(i),n=-1):function(e){"undefined"!==typeof requestAnimationFrame&&requestAnimationFrame(e)}(r)})}function KJ(e){return KJ="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},KJ(e)}function XJ(e){return function(e){if(Array.isArray(e))return 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)return;if("string"===typeof e)return QJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QJ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QJ(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 JJ(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var i=XJ(r),o=i[0],a=i.slice(1);return"number"===typeof o?void ZJ(n.bind(null,a),o):(n(o),void ZJ(n.bind(null,a)))}"object"===KJ(r)&&e(r),"function"===typeof r&&r()}};return{stop:function(){t=!0},start:function(e){t=!1,n(e)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}function e0(e){return e0="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},e0(e)}function t0(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 n0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t0(Object(n),!0).forEach(function(t){r0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r0(e,t,n){return t=function(e){var t=function(e,t){if("object"!==e0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==e0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===e0(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i0=function(e){return e},o0=function(e,t){return Object.keys(t).reduce(function(n,r){return n0(n0({},n),{},r0({},r,e(r,t[r])))},{})},a0=function(e,t,n){return e.map(function(e){return"".concat((r=e,r.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}))," ").concat(t,"ms ").concat(n);var r}).join(",")};function s0(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||c0(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l0(e){return function(e){if(Array.isArray(e))return d0(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c0(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 c0(e,t){if(e){if("string"===typeof e)return d0(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)?d0(e,t):void 0}}function d0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u0=1e-4,p0=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},h0=function(e,t){return e.map(function(e,n){return e*Math.pow(t,n)}).reduce(function(e,t){return e+t})},m0=function(e,t){return function(n){var r=p0(e,t);return h0(r,n)}},f0=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],o=t[2],a=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,i=0,o=1,a=1;break;case"ease":r=.25,i=.1,o=.25,a=1;break;case"ease-in":r=.42,i=0,o=1,a=1;break;case"ease-out":r=.42,i=0,o=.58,a=1;break;case"ease-in-out":r=0,i=0,o=.58,a=1;break;default:var s=t[0].split("(");if("cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length){var l=s0(s[1].split(")")[0].split(",").map(function(e){return parseFloat(e)}),4);r=l[0],i=l[1],o=l[2],a=l[3]}}[r,o,i,a].every(function(e){return"number"===typeof e&&e>=0&&e<=1});var c,d,u=m0(r,o),p=m0(i,a),h=(c=r,d=o,function(e){var t=p0(c,d),n=[].concat(l0(t.map(function(e,t){return e*t}).slice(1)),[0]);return h0(n,e)}),m=function(e){return e>1?1:e<0?0:e},f=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=u(n)-t,o=h(n);if(Math.abs(i-t)<u0||o<u0)return p(n);n=m(n-i/o)}return p(n)};return f.isStepper=!1,f},g0=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"===typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return f0(r);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,i=void 0===r?8:r,o=e.dt,a=void 0===o?17:o,s=function(e,t,r){var o=r+(-(e-t)*n-r*i)*a/1e3,s=r*a/1e3+e;return Math.abs(s-t)<u0&&Math.abs(o)<u0?[t,0]:[s,o]};return s.isStepper=!0,s.dt=a,s}();default:if("cubic-bezier"===r.split("(")[0])return f0(r)}return"function"===typeof r?r:null};function v0(e){return v0="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},v0(e)}function x0(e){return function(e){if(Array.isArray(e))return C0(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_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 y0(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 b0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y0(Object(n),!0).forEach(function(t){j0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j0(e,t,n){return t=function(e){var t=function(e,t){if("object"!==v0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==v0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===v0(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w0(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||_0(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _0(e,t){if(e){if("string"===typeof e)return C0(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)?C0(e,t):void 0}}function C0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S0=function(e,t,n){return e+(t-e)*n},A0=function(e){return e.from!==e.to},k0=function e(t,n,r){var i=o0(function(e,n){if(A0(n)){var r=w0(t(n.from,n.to,n.velocity),2),i=r[0],o=r[1];return b0(b0({},n),{},{from:i,velocity:o})}return n},n);return r<1?o0(function(e,t){return A0(t)?b0(b0({},t),{},{velocity:S0(t.velocity,i[e].velocity,r),from:S0(t.from,i[e].from,r)}):t},n):e(t,i,r-1)};const M0=function(e,t,n,r,i){var o,a,s,l,c=(o=e,a=t,[Object.keys(o),Object.keys(a)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})),d=c.reduce(function(n,r){return b0(b0({},n),{},j0({},r,[e[r],t[r]]))},{}),u=c.reduce(function(n,r){return b0(b0({},n),{},j0({},r,{from:e[r],velocity:0,to:t[r]}))},{}),p=-1,h=function(){return null};return h=n.isStepper?function(r){s||(s=r);var o=(r-s)/n.dt;u=k0(n,u,o),i(b0(b0(b0({},e),t),o0(function(e,t){return t.from},u))),s=r,Object.values(u).filter(A0).length&&(p=requestAnimationFrame(h))}:function(o){l||(l=o);var a=(o-l)/r,s=o0(function(e,t){return S0.apply(void 0,x0(t).concat([n(a)]))},d);if(i(b0(b0(b0({},e),t),s)),a<1)p=requestAnimationFrame(h);else{var c=o0(function(e,t){return S0.apply(void 0,x0(t).concat([n(1)]))},d);i(b0(b0(b0({},e),t),c))}},function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(p)}}};function O0(e){return O0="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},O0(e)}var T0=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function E0(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function P0(e){return function(e){if(Array.isArray(e))return D0(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)return;if("string"===typeof e)return D0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D0(e,t)}(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 D0(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 R0(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 N0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R0(Object(n),!0).forEach(function(t){L0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function L0(e,t,n){return(t=F0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I0(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,F0(r.key),r)}}function F0(e){var t=function(e,t){if("object"!==O0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==O0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===O0(t)?t:String(t)}function $0(e,t){return $0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$0(e,t)}function B0(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(ba){return!1}}();return function(){var n,r=W0(e);if(t){var i=W0(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return z0(this,n)}}function z0(e,t){if(t&&("object"===O0(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return H0(e)}function H0(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W0(e){return W0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W0(e)}var V0=function(e){!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&&$0(e,t)}(o,e);var t,n,r,i=B0(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var r=(n=i.call(this,e,t)).props,a=r.isActive,s=r.attributeName,l=r.from,c=r.to,d=r.steps,u=r.children,p=r.duration;if(n.handleStyleChange=n.handleStyleChange.bind(H0(n)),n.changeStyle=n.changeStyle.bind(H0(n)),!a||p<=0)return n.state={style:{}},"function"===typeof u&&(n.state={style:c}),z0(n);if(d&&d.length)n.state={style:d[0].style};else if(l){if("function"===typeof u)return n.state={style:l},z0(n);n.state={style:s?L0({},s,l):l}}else n.state={style:{}};return n}return t=o,n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,i=t.attributeName,o=t.shouldReAnimate,a=t.to,s=t.from,l=this.state.style;if(r)if(n){if(!(GJ(e.to,a)&&e.canBegin&&e.isActive)){var c=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=c||o?s:e.to;if(this.state&&l){var u={style:i?L0({},i,d):d};(i&&l[i]!==d||!i&&l!==d)&&this.setState(u)}this.runAnimation(N0(N0({},this.props),{},{from:d,begin:0}))}}else{var p={style:i?L0({},i,a):a};this.state&&l&&(i&&l[i]!==a||!i&&l!==a)&&this.setState(p)}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,i=e.duration,o=e.easing,a=e.begin,s=e.onAnimationEnd,l=e.onAnimationStart,c=M0(n,r,g0(o),i,this.changeStyle);this.manager.start([l,a,function(){t.stopJSAnimation=c()},i,s])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,i=e.onAnimationStart,o=n[0],a=o.style,s=o.duration,l=void 0===s?0:s;return this.manager.start([i].concat(P0(n.reduce(function(e,r,i){if(0===i)return e;var o=r.duration,a=r.easing,s=void 0===a?"ease":a,l=r.style,c=r.properties,d=r.onAnimationEnd,u=i>0?n[i-1]:r,p=c||Object.keys(l);if("function"===typeof s||"spring"===s)return[].concat(P0(e),[t.runJSAnimation.bind(t,{from:u.style,to:l,duration:o,easing:s}),o]);var h=a0(p,o,s),m=N0(N0(N0({},u.style),l),{},{transition:h});return[].concat(P0(e),[m,o,d]).filter(i0)},[a,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=JJ());var t=e.begin,n=e.duration,r=e.attributeName,i=e.to,o=e.easing,a=e.onAnimationStart,s=e.onAnimationEnd,l=e.steps,c=e.children,d=this.manager;if(this.unSubscribe=d.subscribe(this.handleStyleChange),"function"!==typeof o&&"function"!==typeof c&&"spring"!==o)if(l.length>1)this.runStepAnimation(e);else{var u=r?L0({},r,i):i,p=a0(Object.keys(u),n,o);d.start([a,t,N0(N0({},u),{},{transition:p}),n,s])}else this.runJSAnimation(e)}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.begin,e.duration),r=(e.attributeName,e.easing,e.isActive),i=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,E0(e,T0)),o=We.Children.count(t),a=this.state.style;if("function"===typeof t)return t(a);if(!r||0===o||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=void 0===n?{}:n,o=t.className;return(0,We.cloneElement)(e,N0(N0({},i),{},{style:N0(N0({},r),a),className:o}))};return 1===o?s(We.Children.only(t)):We.createElement("div",null,We.Children.map(t,function(e){return s(e)}))}}],n&&I0(t.prototype,n),r&&I0(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(We.PureComponent);V0.displayName="Animate",V0.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},V0.propTypes={from:gu().oneOfType([gu().object,gu().string]),to:gu().oneOfType([gu().object,gu().string]),attributeName:gu().string,duration:gu().number,begin:gu().number,easing:gu().oneOfType([gu().string,gu().func]),steps:gu().arrayOf(gu().shape({duration:gu().number.isRequired,style:gu().object.isRequired,easing:gu().oneOfType([gu().oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),gu().func]),properties:gu().arrayOf("string"),onAnimationEnd:gu().func})),children:gu().oneOfType([gu().node,gu().func]),isActive:gu().bool,canBegin:gu().bool,onAnimationEnd:gu().func,shouldReAnimate:gu().bool,onAnimationStart:gu().func,onAnimationReStart:gu().func};const U0=V0;var q0=n(79686),G0=n.n(q0),Y0=n(90620),Z0=n.n(Y0),K0=n(11629),X0=n.n(K0),Q0=n(46686),J0=n.n(Q0),e1=n(69062),t1=n(35268),n1=n.n(t1),r1=n(79160),i1=n.n(r1),o1=function(e){return 0===e?0:e>0?1:-1},a1=function(e){return Z0()(e)&&e.indexOf("%")===e.length-1},s1=function(e){return i1()(e)&&!n1()(e)},l1=function(e){return s1(e)||Z0()(e)},c1=0,d1=function(e){var t=++c1;return"".concat(e||"").concat(t)},u1=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!s1(e)&&!Z0()(e))return r;if(a1(e)){var o=e.indexOf("%");n=t*parseFloat(e.slice(0,o))/100}else n=+e;return n1()(n)&&(n=r),i&&n>t&&(n=t),n},p1=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},h1=function(e,t){return s1(e)&&s1(t)?function(n){return e+n*(t-e)}:function(){return t}};function m1(e,t,n){return e&&e.length?e.find(function(e){return e&&("function"===typeof t?t(e):oa()(e,t))===n}):null}var f1=function(e,t){return s1(e)&&s1(t)?e-t:Z0()(e)&&Z0()(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))};function g1(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function v1(e){return v1="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},v1(e)}var x1=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],y1=["points","pathLength"],b1={svg:["viewBox","children"],polygon:y1,polyline:y1},j1=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],w1=function(e,t){if(!e||"function"===typeof e||"boolean"===typeof e)return null;var n=e;if((0,We.isValidElement)(e)&&(n=e.props),!J0()(n))return null;var r={};return Object.keys(n).forEach(function(e){j1.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})}),r},_1=function(e,t,n){if(!J0()(e)||"object"!==v1(e))return null;var r=null;return Object.keys(e).forEach(function(i){var o=e[i];j1.includes(i)&&"function"===typeof o&&(r||(r={}),r[i]=function(e,t,n){return function(r){return e(t,n,r),null}}(o,t,n))}),r},C1=["children"],S1=["children"];function A1(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function k1(e){return k1="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},k1(e)}var M1={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},O1=function(e){return"string"===typeof e?e:e?e.displayName||e.name||"Component":""},T1=null,E1=null,P1=function e(t){if(t===T1&&Array.isArray(E1))return E1;var n=[];return We.Children.forEach(t,function(t){G0()(t)||((0,e1.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),E1=n,T1=t,n};function D1(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return O1(e)}):[O1(t)],P1(e).forEach(function(e){var t=oa()(e,"type.displayName")||oa()(e,"type.name");-1!==r.indexOf(t)&&n.push(e)}),n}function R1(e,t){var n=D1(e,t);return n&&n[0]}var N1=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!s1(n)||n<=0||!s1(r)||r<=0)},L1=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],I1=function(e){return e&&e.type&&Z0()(e.type)&&L1.indexOf(e.type)>=0},F1=function(e,t,n){if(!e||"function"===typeof e||"boolean"===typeof e)return null;var r=e;if((0,We.isValidElement)(e)&&(r=e.props),!J0()(r))return null;var i={};return Object.keys(r).forEach(function(e){var o;(function(e,t,n,r){var i,o=null!==(i=null===b1||void 0===b1?void 0:b1[r])&&void 0!==i?i:[];return t.startsWith("data-")||!X0()(e)&&(r&&o.includes(t)||x1.includes(t))||n&&j1.includes(t)})(null===(o=r)||void 0===o?void 0:o[e],e,t,n)&&(i[e]=r[e])}),i},$1=function e(t,n){if(t===n)return!0;var r=We.Children.count(t);if(r!==We.Children.count(n))return!1;if(0===r)return!0;if(1===r)return B1(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=t[i],a=n[i];if(Array.isArray(o)||Array.isArray(a)){if(!e(o,a))return!1}else if(!B1(o,a))return!1}return!0},B1=function(e,t){if(G0()(e)&&G0()(t))return!0;if(!G0()(e)&&!G0()(t)){var n=e.props||{},r=n.children,i=A1(n,C1),o=t.props||{},a=o.children,s=A1(o,S1);return r&&a?g1(i,s)&&$1(r,a):!r&&!a&&g1(i,s)}return!1},z1=function(e,t){var n=[],r={};return P1(e).forEach(function(e,i){if(I1(e))n.push(e);else if(e){var o=O1(e.type),a=t[o]||{},s=a.handler,l=a.once;if(s&&(!l||!r[o])){var c=s(e,o,i);n.push(c),r[o]=!0}}}),n};function H1(e){return H1="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},H1(e)}function W1(){return W1=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},W1.apply(this,arguments)}function V1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return U1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U1(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U1(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 q1(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 G1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q1(Object(n),!0).forEach(function(t){Y1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Y1(e,t,n){return t=function(e){var t=function(e,t){if("object"!=H1(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=H1(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==H1(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z1=function(e,t,n,r,i){var o,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],u=0;u<4;u++)d[u]=i[u]>a?a:i[u];o="M".concat(e,",").concat(t+s*d[0]),d[0]>0&&(o+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(e+l*d[0],",").concat(t)),o+="L ".concat(e+n-l*d[1],",").concat(t),d[1]>0&&(o+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,",\n        ").concat(e+n,",").concat(t+s*d[1])),o+="L ".concat(e+n,",").concat(t+r-s*d[2]),d[2]>0&&(o+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,",\n        ").concat(e+n-l*d[2],",").concat(t+r)),o+="L ".concat(e+l*d[3],",").concat(t+r),d[3]>0&&(o+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,",\n        ").concat(e,",").concat(t+r-s*d[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var p=Math.min(a,i);o="M ".concat(e,",").concat(t+s*p,"\n            A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+l*p,",").concat(t,"\n            L ").concat(e+n-l*p,",").concat(t,"\n            A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*p,"\n            L ").concat(e+n,",").concat(t+r-s*p,"\n            A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n-l*p,",").concat(t+r,"\n            L ").concat(e+l*p,",").concat(t+r,"\n            A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*p," Z")}else o="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return o},K1=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,i=t.x,o=t.y,a=t.width,s=t.height;if(Math.abs(a)>0&&Math.abs(s)>0){var l=Math.min(i,i+a),c=Math.max(i,i+a),d=Math.min(o,o+s),u=Math.max(o,o+s);return n>=l&&n<=c&&r>=d&&r<=u}return!1},X1={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Q1=function(e){var t=G1(G1({},X1),e),n=(0,We.useRef)(),r=V1((0,We.useState)(-1),2),i=r[0],o=r[1];(0,We.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&o(e)}catch(t){}},[]);var a=t.x,s=t.y,l=t.width,c=t.height,d=t.radius,u=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,f=t.isAnimationActive,g=t.isUpdateAnimationActive;if(a!==+a||s!==+s||l!==+l||c!==+c||0===l||0===c)return null;var v=vJ("recharts-rectangle",u);return g?We.createElement(U0,{canBegin:i>0,from:{width:l,height:c,x:a,y:s},to:{width:l,height:c,x:a,y:s},duration:h,animationEasing:p,isActive:g},function(e){var r=e.width,o=e.height,a=e.x,s=e.y;return We.createElement(U0,{canBegin:i>0,from:"0px ".concat(-1===i?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,isActive:f,easing:p},We.createElement("path",W1({},F1(t,!0),{className:v,d:Z1(a,s,r,o,d),ref:n})))}):We.createElement("path",W1({},F1(t,!0),{className:v,d:Z1(a,s,l,c,d)}))},J1=n(79889),e2=n.n(J1),t2=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i]};function n2(e){return n2="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},n2(e)}function r2(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 i2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r2(Object(n),!0).forEach(function(t){o2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o2(e,t,n){return t=function(e){var t=function(e,t){if("object"!=n2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=n2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n2(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a2(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return s2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s2(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l2=(0,We.forwardRef)(function(e,t){var n=e.aspect,r=e.initialDimension,i=void 0===r?{width:-1,height:-1}:r,o=e.width,a=void 0===o?"100%":o,s=e.height,l=void 0===s?"100%":s,c=e.minWidth,d=void 0===c?0:c,u=e.minHeight,p=e.maxHeight,h=e.children,m=e.debounce,f=void 0===m?0:m,g=e.id,v=e.className,x=e.onResize,y=e.style,b=void 0===y?{}:y,j=(0,We.useRef)(null),w=(0,We.useRef)();w.current=x,(0,We.useImperativeHandle)(t,function(){return Object.defineProperty(j.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),j.current},configurable:!0})});var _=a2((0,We.useState)({containerWidth:i.width,containerHeight:i.height}),2),C=_[0],S=_[1],A=(0,We.useCallback)(function(e,t){S(function(n){var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,We.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,i=n.height;A(r,i),null===(t=w.current)||void 0===t||t.call(w,r,i)};f>0&&(e=e2()(e,f,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=j.current.getBoundingClientRect(),r=n.width,i=n.height;return A(r,i),t.observe(j.current),function(){t.disconnect()}},[A,f]);var k=(0,We.useMemo)(function(){var e=C.containerWidth,t=C.containerHeight;if(e<0||t<0)return null;t2(a1(a)||a1(l),"The width(%s) and height(%s) are both fixed numbers,\n       maybe you don't need to use a ResponsiveContainer.",a,l),t2(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=a1(a)?e:a,i=a1(l)?t:l;n&&n>0&&(r?i=r/n:i&&(r=i*n),p&&i>p&&(i=p)),t2(r>0||i>0,"The width(%s) and height(%s) of chart should be greater than 0,\n       please check the style of container, or the props width(%s) and height(%s),\n       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n       height and width.",r,i,a,l,d,u,n);var o=!Array.isArray(h)&&O1(h.type).endsWith("Chart");return We.Children.map(h,function(e){return We.isValidElement(e)?(0,We.cloneElement)(e,i2({width:r,height:i},o?{style:i2({height:"100%",width:"100%",maxHeight:i,maxWidth:r},e.props.style)}:{})):e})},[n,h,l,p,u,d,C,a]);return We.createElement("div",{id:g?"".concat(g):void 0,className:vJ("recharts-responsive-container",v),style:i2(i2({},b),{},{width:a,height:l,minWidth:d,minHeight:u,maxHeight:p}),ref:j},k)}),c2=n(87424),d2=n.n(c2),u2="Invariant failed";function p2(e,t){if(!e)throw new Error(u2)}var h2=["children","width","height","viewBox","className","style","title","desc"];function m2(){return m2=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},m2.apply(this,arguments)}function f2(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g2(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,c=f2(e,h2),d=i||{width:n,height:r,x:0,y:0},u=vJ("recharts-surface",o);return We.createElement("svg",m2({},F1(c,!0,"svg"),{className:u,width:n,height:r,style:a,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),We.createElement("title",null,s),We.createElement("desc",null,l),t)}var v2=["children","className"];function x2(){return x2=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},x2.apply(this,arguments)}function y2(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var b2=We.forwardRef(function(e,t){var n=e.children,r=e.className,i=y2(e,v2),o=vJ("recharts-layer",r);return We.createElement("g",x2({className:o},F1(i,!0),{ref:t}),n)});function j2(e){return j2="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},j2(e)}function w2(){return w2=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},w2.apply(this,arguments)}function _2(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return C2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C2(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C2(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 S2(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 A2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S2(Object(n),!0).forEach(function(t){k2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function k2(e,t,n){return t=function(e){var t=function(e,t){if("object"!=j2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=j2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==j2(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M2(e){return Array.isArray(e)&&l1(e[0])&&l1(e[1])?e.join(" ~ "):e}var O2=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,i=void 0===r?{}:r,o=e.itemStyle,a=void 0===o?{}:o,s=e.labelStyle,l=void 0===s?{}:s,c=e.payload,d=e.formatter,u=e.itemSorter,p=e.wrapperClassName,h=e.labelClassName,m=e.label,f=e.labelFormatter,g=e.accessibilityLayer,v=void 0!==g&&g,x=A2({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=A2({margin:0},l),b=!G0()(m),j=b?m:"",w=vJ("recharts-default-tooltip",p),_=vJ("recharts-tooltip-label",h);b&&f&&void 0!==c&&null!==c&&(j=f(m,c));var C=v?{role:"status","aria-live":"assertive"}:{};return We.createElement("div",w2({className:w,style:x},C),We.createElement("p",{className:_,style:y},We.isValidElement(j)?j:"".concat(j)),function(){if(c&&c.length){var e=(u?d2()(c,u):c).map(function(e,t){if("none"===e.type)return null;var r=A2({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),i=e.formatter||d||M2,o=e.value,s=e.name,l=o,u=s;if(i&&null!=l&&null!=u){var p=i(o,s,e,t,c);if(Array.isArray(p)){var h=_2(p,2);l=h[0],u=h[1]}else l=p}return We.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},l1(u)?We.createElement("span",{className:"recharts-tooltip-item-name"},u):null,l1(u)?We.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,We.createElement("span",{className:"recharts-tooltip-item-value"},l),We.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return We.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function T2(e){return T2="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},T2(e)}function E2(e,t,n){return t=function(e){var t=function(e,t){if("object"!=T2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=T2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==T2(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P2="recharts-tooltip-wrapper",D2={visibility:"hidden"};function R2(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return vJ(P2,E2(E2(E2(E2({},"".concat(P2,"-right"),s1(n)&&t&&s1(t.x)&&n>=t.x),"".concat(P2,"-left"),s1(n)&&t&&s1(t.x)&&n<t.x),"".concat(P2,"-bottom"),s1(r)&&t&&s1(t.y)&&r>=t.y),"".concat(P2,"-top"),s1(r)&&t&&s1(t.y)&&r<t.y))}function N2(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(o&&s1(o[r]))return o[r];var d=n[r]-s-i,u=n[r]+i;return t[r]?a[r]?d:u:a[r]?d<l[r]?Math.max(u,l[r]):Math.max(d,l[r]):u+s>l[r]+c?Math.max(d,l[r]):Math.max(u,l[r])}function L2(e){return L2="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},L2(e)}function I2(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 F2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I2(Object(n),!0).forEach(function(t){V2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $2(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,U2(r.key),r)}}function B2(e,t,n){return t=H2(t),function(e,t){if(t&&("object"===L2(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,z2()?Reflect.construct(t,n||[],H2(e).constructor):t.apply(e,n))}function z2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(z2=function(){return!!e})()}function H2(e){return H2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H2(e)}function W2(e,t){return W2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W2(e,t)}function V2(e,t,n){return(t=U2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U2(e){var t=function(e,t){if("object"!=L2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=L2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==L2(t)?t:t+""}var q2=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return V2(e=B2(this,t,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),V2(e,"handleKeyDown",function(t){var n,r,i,o;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(i=null===(o=e.props.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W2(e,t)}(t,e),n=t,r=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>1||Math.abs(e.height-this.state.lastBoundingBox.height)>1)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else-1===this.state.lastBoundingBox.width&&-1===this.state.lastBoundingBox.height||this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,o=t.animationEasing,a=t.children,s=t.coordinate,l=t.hasPayload,c=t.isAnimationActive,d=t.offset,u=t.position,p=t.reverseDirection,h=t.useTranslate3d,m=t.viewBox,f=t.wrapperStyle,g=function(e){var t,n,r=e.allowEscapeViewBox,i=e.coordinate,o=e.offsetTopLeft,a=e.position,s=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return{cssProperties:l.height>0&&l.width>0&&i?function(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:t=N2({allowEscapeViewBox:r,coordinate:i,key:"x",offsetTopLeft:o,position:a,reverseDirection:s,tooltipDimension:l.width,viewBox:d,viewBoxDimension:d.width}),translateY:n=N2({allowEscapeViewBox:r,coordinate:i,key:"y",offsetTopLeft:o,position:a,reverseDirection:s,tooltipDimension:l.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):D2,cssClasses:R2({translateX:t,translateY:n,coordinate:i})}}({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:d,position:u,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:h,viewBox:m}),v=g.cssClasses,x=g.cssProperties,y=F2(F2({transition:c&&n?"transform ".concat(i,"ms ").concat(o):void 0},x),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&l?"visible":"hidden",position:"absolute",top:0,left:0},f);return We.createElement("div",{tabIndex:-1,className:v,style:y,ref:function(t){e.wrapperNode=t}},a)}}],r&&$2(n.prototype,r),i&&$2(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent),G2={isSsr:!("undefined"!==typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return G2[e]},set:function(e,t){if("string"===typeof e)G2[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){G2[t]=e[t]})}}},Y2=n(20977),Z2=n.n(Y2);function K2(e,t,n){return!0===t?Z2()(e,n):X0()(t)?Z2()(e,t):e}function X2(e){return X2="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},X2(e)}function Q2(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 J2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q2(Object(n),!0).forEach(function(t){o5(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function e5(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,a5(r.key),r)}}function t5(e,t,n){return t=r5(t),function(e,t){if(t&&("object"===X2(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,n5()?Reflect.construct(t,n||[],r5(e).constructor):t.apply(e,n))}function n5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n5=function(){return!!e})()}function r5(e){return r5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r5(e)}function i5(e,t){return i5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i5(e,t)}function o5(e,t,n){return(t=a5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a5(e){var t=function(e,t){if("object"!=X2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=X2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==X2(t)?t:t+""}function s5(e){return e.dataKey}var l5=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),t5(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i5(e,t)}(t,e),n=t,r=[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,o=t.animationEasing,a=t.content,s=t.coordinate,l=t.filterNull,c=t.isAnimationActive,d=t.offset,u=t.payload,p=t.payloadUniqBy,h=t.position,m=t.reverseDirection,f=t.useTranslate3d,g=t.viewBox,v=t.wrapperStyle,x=null!==u&&void 0!==u?u:[];l&&x.length&&(x=K2(u.filter(function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)}),p,s5));var y=x.length>0;return We.createElement(q2,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:c,active:n,coordinate:s,hasPayload:y,offset:d,position:h,reverseDirection:m,useTranslate3d:f,viewBox:g,wrapperStyle:v},function(e,t){return We.isValidElement(e)?We.cloneElement(e,t):"function"===typeof e?We.createElement(e,t):We.createElement(O2,t)}(a,J2(J2({},this.props),{},{payload:x})))}}],r&&e5(n.prototype,r),i&&e5(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);o5(l5,"displayName","Tooltip"),o5(l5,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!G2.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var c5=n(643),d5=n.n(c5);Math.abs,Math.atan2;const u5=Math.cos,p5=(Math.max,Math.min,Math.sin),h5=Math.sqrt,m5=Math.PI,f5=2*m5;const g5={draw(e,t){const n=h5(t/m5);e.moveTo(n,0),e.arc(0,0,n,0,f5)}},v5={draw(e,t){const n=h5(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},x5=h5(1/3),y5=2*x5,b5={draw(e,t){const n=h5(t/y5),r=n*x5;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},j5={draw(e,t){const n=h5(t),r=-n/2;e.rect(r,r,n,n)}},w5=p5(m5/10)/p5(7*m5/10),_5=p5(f5/10)*w5,C5=-u5(f5/10)*w5,S5={draw(e,t){const n=h5(.8908130915292852*t),r=_5*n,i=C5*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const t=f5*o/5,a=u5(t),s=p5(t);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*i,s*r+a*i)}e.closePath()}},A5=h5(3),k5={draw(e,t){const n=-h5(t/(3*A5));e.moveTo(0,2*n),e.lineTo(-A5*n,-n),e.lineTo(A5*n,-n),e.closePath()}},M5=-.5,O5=h5(3)/2,T5=1/h5(12),E5=3*(T5/2+1),P5={draw(e,t){const n=h5(t/E5),r=n/2,i=n*T5,o=r,a=n*T5+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(M5*r-O5*i,O5*r+M5*i),e.lineTo(M5*o-O5*a,O5*o+M5*a),e.lineTo(M5*s-O5*l,O5*s+M5*l),e.lineTo(M5*r+O5*i,M5*i-O5*r),e.lineTo(M5*o+O5*a,M5*a-O5*o),e.lineTo(M5*s+O5*l,M5*l-O5*s),e.closePath()}};function D5(e){return function(){return e}}var R5,N5,L5,I5,F5,$5,B5,z5,H5,W5,V5,U5,q5,G5;const Y5=Math.PI,Z5=2*Y5,K5=1e-6,X5=Z5-K5;function Q5(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class J5{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Q5:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error("invalid digits: ".concat(e));if(t>15)return Q5;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append(R5||(R5=np(["M",",",""])),this._x0=this._x1=+e,this._y0=this._y1=+t)}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append(N5||(N5=np(["Z"]))))}lineTo(e,t){this._append(L5||(L5=np(["L",",",""])),this._x1=+e,this._y1=+t)}quadraticCurveTo(e,t,n,r){this._append(I5||(I5=np(["Q",",",",",",",""])),+e,+t,this._x1=+n,this._y1=+r)}bezierCurveTo(e,t,n,r,i,o){this._append(F5||(F5=np(["C",",",",",",",",",",",""])),+e,+t,+n,+r,this._x1=+i,this._y1=+o)}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: ".concat(i));let o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,d=a-t,u=c*c+d*d;if(null===this._x1)this._append($5||($5=np(["M",",",""])),this._x1=e,this._y1=t);else if(u>K5)if(Math.abs(d*s-l*c)>K5&&i){let p=n-o,h=r-a,m=s*s+l*l,f=p*p+h*h,g=Math.sqrt(m),v=Math.sqrt(u),x=i*Math.tan((Y5-Math.acos((m+u-f)/(2*g*v)))/2),y=x/v,b=x/g;Math.abs(y-1)>K5&&this._append(z5||(z5=np(["L",",",""])),e+y*c,t+y*d),this._append(H5||(H5=np(["A",",",",0,0,",",",",",""])),i,i,+(d*p>c*h),this._x1=e+b*s,this._y1=t+b*l)}else this._append(B5||(B5=np(["L",",",""])),this._x1=e,this._y1=t);else;}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error("negative radius: ".concat(n));let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,d=1^o,u=o?r-i:i-r;null===this._x1?this._append(W5||(W5=np(["M",",",""])),l,c):(Math.abs(this._x1-l)>K5||Math.abs(this._y1-c)>K5)&&this._append(V5||(V5=np(["L",",",""])),l,c),n&&(u<0&&(u=u%Z5+Z5),u>X5?this._append(U5||(U5=np(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),n,n,d,e-a,t-s,n,n,d,this._x1=l,this._y1=c):u>K5&&this._append(q5||(q5=np(["A",",",",0,",",",",",",",""])),n,n,+(u>=Y5),d,this._x1=e+n*Math.cos(i),this._y1=t+n*Math.sin(i)))}rect(e,t,n,r){this._append(G5||(G5=np(["M",",","h","v","h","Z"])),this._x0=this._x1=+e,this._y0=this._y1=+t,n=+n,+r,-n)}toString(){return this._}}function e3(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError("invalid digits: ".concat(n));t=e}return e},()=>new J5(t)}h5(3),h5(3);function t3(e){return t3="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},t3(e)}var n3=["type","size","sizeType"];function r3(){return r3=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},r3.apply(this,arguments)}function i3(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 o3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i3(Object(n),!0).forEach(function(t){a3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a3(e,t,n){return t=function(e){var t=function(e,t){if("object"!=t3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=t3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==t3(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s3(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l3={symbolCircle:g5,symbolCross:v5,symbolDiamond:b5,symbolSquare:j5,symbolStar:S5,symbolTriangle:k5,symbolWye:P5},c3=Math.PI/180,d3=function(e){var t=e.type,n=void 0===t?"circle":t,r=e.size,i=void 0===r?64:r,o=e.sizeType,a=void 0===o?"area":o,s=o3(o3({},s3(e,n3)),{},{type:n,size:i,sizeType:a}),l=s.className,c=s.cx,d=s.cy,u=F1(s,!0);return c===+c&&d===+d&&i===+i?We.createElement("path",r3({},u,{className:vJ("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(d,")"),d:function(){var e=function(e){var t="symbol".concat(d5()(e));return l3[t]||g5}(n),t=function(e,t){let n=null,r=e3(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"===typeof e?e:D5(e||g5),t="function"===typeof t?t:D5(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"===typeof t?t:D5(t),i):e},i.size=function(e){return arguments.length?(t="function"===typeof e?e:D5(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}().type(e).size(function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*c3;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(i,a,n));return t()}()})):null};function u3(e){return u3="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},u3(e)}function p3(){return p3=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},p3.apply(this,arguments)}function h3(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 m3(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,b3(r.key),r)}}function f3(e,t,n){return t=v3(t),function(e,t){if(t&&("object"===u3(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g3()?Reflect.construct(t,n||[],v3(e).constructor):t.apply(e,n))}function g3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g3=function(){return!!e})()}function v3(e){return v3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v3(e)}function x3(e,t){return x3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x3(e,t)}function y3(e,t,n){return(t=b3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b3(e){var t=function(e,t){if("object"!=u3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=u3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u3(t)?t:t+""}d3.registerSymbol=function(e,t){l3["symbol".concat(d5()(e))]=t};var j3=32,w3=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),f3(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x3(e,t)}(t,e),n=t,r=[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=16,r=5.333333333333333,i=10.666666666666666,o=e.inactive?t:e.color;if("plainline"===e.type)return We.createElement("line",{strokeWidth:4,fill:"none",stroke:o,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:j3,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return We.createElement("path",{strokeWidth:4,fill:"none",stroke:o,d:"M0,".concat(n,"h").concat(i,"\n            A").concat(r,",").concat(r,",0,1,1,").concat(2*i,",").concat(n,"\n            H").concat(j3,"M").concat(2*i,",").concat(n,"\n            A").concat(r,",").concat(r,",0,1,1,").concat(i,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return We.createElement("path",{stroke:"none",fill:o,d:"M0,".concat(4,"h").concat(j3,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(We.isValidElement(e.legendIcon)){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h3(Object(n),!0).forEach(function(t){y3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);return delete a.legendIcon,We.cloneElement(e.legendIcon,a)}return We.createElement(d3,{fill:o,cx:n,cy:n,size:j3,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,i=t.layout,o=t.formatter,a=t.inactiveColor,s={x:0,y:0,width:j3,height:j3},l={display:"horizontal"===i?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map(function(t,n){var i=t.formatter||o,d=vJ(y3(y3({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var u=X0()(t.value)?null:t.value;t2(!X0()(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var p=t.inactive?a:t.color;return We.createElement("li",p3({className:d,style:l,key:"legend-item-".concat(n)},_1(e.props,t,n)),We.createElement(g2,{width:r,height:r,viewBox:s,style:c},e.renderIcon(t)),We.createElement("span",{className:"recharts-legend-item-text",style:{color:p}},i?i(u,t,n):u))})}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return We.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}],r&&m3(n.prototype,r),i&&m3(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function _3(e){return _3="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},_3(e)}y3(w3,"displayName","Legend"),y3(w3,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var C3=["ref"];function S3(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 A3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S3(Object(n),!0).forEach(function(t){P3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function k3(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,D3(r.key),r)}}function M3(e,t,n){return t=T3(t),function(e,t){if(t&&("object"===_3(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O3()?Reflect.construct(t,n||[],T3(e).constructor):t.apply(e,n))}function O3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O3=function(){return!!e})()}function T3(e){return T3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T3(e)}function E3(e,t){return E3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E3(e,t)}function P3(e,t,n){return(t=D3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D3(e){var t=function(e,t){if("object"!=_3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_3(t)?t:t+""}function R3(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function N3(e){return e.value}var L3=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return P3(e=M3(this,t,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E3(e,t)}(t,e),n=t,r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?A3({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,i=r.layout,o=r.align,a=r.verticalAlign,s=r.margin,l=r.chartWidth,c=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===o&&"vertical"===i?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===o?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===a?{top:((c||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),A3(A3({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,i=t.height,o=t.wrapperStyle,a=t.payloadUniqBy,s=t.payload,l=A3(A3({position:"absolute",width:r||"auto",height:i||"auto"},this.getDefaultPosition(o)),o);return We.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(We.isValidElement(e))return We.cloneElement(e,t);if("function"===typeof e)return We.createElement(e,t);t.ref;var n=R3(t,C3);return We.createElement(w3,n)}(n,A3(A3({},this.props),{},{payload:K2(s,a,N3)})))}}],i=[{key:"getWithHeight",value:function(e,t){var n=A3(A3({},this.defaultProps),e.props).layout;return"vertical"===n&&s1(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}],r&&k3(n.prototype,r),i&&k3(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function I3(){return I3=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},I3.apply(this,arguments)}P3(L3,"displayName","Legend"),P3(L3,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var F3=function(e){var t=e.cx,n=e.cy,r=e.r,i=e.className,o=vJ("recharts-dot",i);return t===+t&&n===+n&&r===+r?We.createElement("circle",I3({},F1(e,!1),w1(e),{className:o,cx:t,cy:n,r:r})):null};function $3(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function B3(e,t){switch(arguments.length){case 0:break;case 1:"function"===typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"===typeof t?this.interpolator(t):this.range(t)}return this}class z3 extends Map{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U3;if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(H3(this,e))}has(e){return super.has(H3(this,e))}set(e,t){return super.set(W3(this,e),t)}delete(e){return super.delete(V3(this,e))}}Set;function H3(e,t){let{_intern:n,_key:r}=e;const i=r(t);return n.has(i)?n.get(i):t}function W3(e,t){let{_intern:n,_key:r}=e;const i=r(t);return n.has(i)?n.get(i):(n.set(i,t),t)}function V3(e,t){let{_intern:n,_key:r}=e;const i=r(t);return n.has(i)&&(t=n.get(i),n.delete(i)),t}function U3(e){return null!==e&&"object"===typeof e?e.valueOf():e}const q3=Symbol("implicit");function G3(){var e=new z3,t=[],n=[],r=q3;function i(i){let o=e.get(i);if(void 0===o){if(r!==q3)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new z3;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return G3(t,n).unknown(r)},$3.apply(i,arguments),i}function Y3(){var e,t,n=G3().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,d=.5;function u(){var n=r().length,u=a<o,p=u?a:o,h=u?o:a;e=(h-p)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),p+=(h-p-e*(n-l))*d,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var m=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map(function(t){return p+e*t});return i(u?m.reverse():m)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),u()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,u()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,u()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,u()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),u()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),u()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,u()):c},n.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),u()):d},n.copy=function(){return Y3(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(d)},$3.apply(u(),arguments)}function Z3(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Z3(t())},e}function K3(){return Z3(Y3.apply(null,arguments).paddingInner(1))}function X3(e){return X3="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},X3(e)}function Q3(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 J3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q3(Object(n),!0).forEach(function(t){e6(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function e6(e,t,n){return t=function(e){var t=function(e,t){if("object"!=X3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=X3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==X3(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var t6={widthCache:{},cacheCount:0},n6={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},r6="recharts_measurement_span";var i6=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===e||null===e||G2.isSsr)return{width:0,height:0};var n=function(e){var t=J3({},e);return Object.keys(t).forEach(function(e){t[e]||delete t[e]}),t}(t),r=JSON.stringify({text:e,copyStyle:n});if(t6.widthCache[r])return t6.widthCache[r];try{var i=document.getElementById(r6);i||((i=document.createElement("span")).setAttribute("id",r6),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=J3(J3({},n6),n);Object.assign(i.style,o),i.textContent="".concat(e);var a=i.getBoundingClientRect(),s={width:a.width,height:a.height};return t6.widthCache[r]=s,++t6.cacheCount>2e3&&(t6.cacheCount=0,t6.widthCache={}),s}catch(ba){return{width:0,height:0}}};function o6(e){return o6="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},o6(e)}function a6(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return s6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s6(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s6(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 l6(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,c6(r.key),r)}}function c6(e){var t=function(e,t){if("object"!=o6(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o6(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o6(t)?t:t+""}var d6=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,u6=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,p6=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,h6=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,m6={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},f6=Object.keys(m6),g6="NaN";var v6=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),""===n||p6.test(n)||(this.num=NaN,this.unit=""),f6.includes(n)&&(this.num=function(e,t){return e*m6[t]}(t,n),this.unit="px")}return t=e,r=[{key:"parse",value:function(t){var n,r=a6(null!==(n=h6.exec(t))&&void 0!==n?n:[],3),i=r[1],o=r[2];return new e(parseFloat(i),null!==o&&void 0!==o?o:"")}}],(n=[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}])&&l6(t.prototype,n),r&&l6(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function x6(e){if(e.includes(g6))return g6;for(var t=e;t.includes("*")||t.includes("/");){var n,r=a6(null!==(n=d6.exec(t))&&void 0!==n?n:[],4),i=r[1],o=r[2],a=r[3],s=v6.parse(null!==i&&void 0!==i?i:""),l=v6.parse(null!==a&&void 0!==a?a:""),c="*"===o?s.multiply(l):s.divide(l);if(c.isNaN())return g6;t=t.replace(d6,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,u=a6(null!==(d=u6.exec(t))&&void 0!==d?d:[],4),p=u[1],h=u[2],m=u[3],f=v6.parse(null!==p&&void 0!==p?p:""),g=v6.parse(null!==m&&void 0!==m?m:""),v="+"===h?f.add(g):f.subtract(g);if(v.isNaN())return g6;t=t.replace(u6,v.toString())}return t}var y6=/\(([^()]*)\)/;function b6(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var n=a6(y6.exec(t),2)[1];t=t.replace(y6,x6(n))}return t}(t),t=x6(t)}function j6(e){var t=function(e){try{return b6(e)}catch(ba){return g6}}(e.slice(5,-1));return t===g6?"":t}var w6=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],_6=["dx","dy","angle","className","breakAll"];function C6(){return C6=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},C6.apply(this,arguments)}function S6(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function A6(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return k6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k6(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M6=/[ \f\n\r\t\v\u2028\u2029]+/,O6=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return G0()(t)||(i=n?t.toString().split(""):t.toString().split(M6)),{wordsWithComputedWidth:i.map(function(e){return{word:e,width:i6(e,r).width}}),spaceWidth:n?0:i6("\xa0",r).width}}catch(ba){return null}},T6=function(e){return[{words:G0()(e)?[]:e.toString().split(M6)}]},E6=function(e){var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,o=e.breakAll,a=e.maxLines;if((t||n)&&!G2.isSsr){var s=O6({breakAll:o,children:r,style:i});return s?function(e,t,n,r,i){var o=e.maxLines,a=e.children,s=e.style,l=e.breakAll,c=s1(o),d=a,u=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t){var o=t.word,a=t.width,s=e[e.length-1];if(s&&(null==r||i||s.width+a+n<Number(r)))s.words.push(o),s.width+=a+n;else{var l={words:[o],width:a};e.push(l)}return e},[])},p=u(t);if(!c)return p;for(var h,m=function(e){var t=d.slice(0,e),n=O6({breakAll:l,style:s,children:t+"\u2026"}).wordsWithComputedWidth,i=u(n),a=i.length>o||function(e){return e.reduce(function(e,t){return e.width>t.width?e:t})}(i).width>Number(r);return[a,i]},f=0,g=d.length-1,v=0;f<=g&&v<=d.length-1;){var x=Math.floor((f+g)/2),y=A6(m(x-1),2),b=y[0],j=y[1],w=A6(m(x),1)[0];if(b||w||(f=x+1),b&&w&&(g=x-1),!b&&w){h=j;break}v++}return h||p}({breakAll:o,children:r,maxLines:a,style:i},s.wordsWithComputedWidth,s.spaceWidth,t,n):T6(r)}return T6(r)},P6="#808080",D6=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.lineHeight,a=void 0===o?"1em":o,s=e.capHeight,l=void 0===s?"0.71em":s,c=e.scaleToFit,d=void 0!==c&&c,u=e.textAnchor,p=void 0===u?"start":u,h=e.verticalAnchor,m=void 0===h?"end":h,f=e.fill,g=void 0===f?P6:f,v=S6(e,w6),x=(0,We.useMemo)(function(){return E6({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),y=v.dx,b=v.dy,j=v.angle,w=v.className,_=v.breakAll,C=S6(v,_6);if(!l1(n)||!l1(i))return null;var S,A=n+(s1(y)?y:0),k=i+(s1(b)?b:0);switch(m){case"start":S=j6("calc(".concat(l,")"));break;case"middle":S=j6("calc(".concat((x.length-1)/2," * -").concat(a," + (").concat(l," / 2))"));break;default:S=j6("calc(".concat(x.length-1," * -").concat(a,")"))}var M=[];if(d){var O=x[0].width,T=v.width;M.push("scale(".concat((s1(T)?T/O:1)/O,")"))}return j&&M.push("rotate(".concat(j,", ").concat(A,", ").concat(k,")")),M.length&&(C.transform=M.join(" ")),We.createElement("text",C6({},F1(C,!0),{x:A,y:k,className:vJ("recharts-text",w),textAnchor:p,fill:g.includes("url")?P6:g}),x.map(function(e,t){var n=e.words.join(_?"":" ");return We.createElement("tspan",{x:A,dy:0===t?S:a,key:"".concat(n,"-").concat(t)},n)}))};const R6=Math.sqrt(50),N6=Math.sqrt(10),L6=Math.sqrt(2);function I6(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=R6?10:o>=N6?5:o>=L6?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?I6(e,t,2*n):[s,l,c]}function F6(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?I6(t,e,n):I6(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function $6(e,t,n){return I6(e=+e,t=+t,n=+n)[2]}function B6(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?$6(t,e,n):$6(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function z6(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function H6(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function W6(e){let t,n,r;function i(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=z6,n=(t,n)=>z6(e(t),n),r=(t,n)=>e(t)-n):(t=e===z6||e===H6?e:V6,n=e,r=e),{left:i,center:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const o=i(e,t,n,(arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length)-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o},right:function(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function V6(){return 0}function U6(e){return null===e?NaN:+e}const q6=W6(z6),G6=q6.right,Y6=(q6.left,W6(U6).center,G6);function Z6(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function K6(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function X6(){}var Q6=.7,J6=1/Q6,e4="\\s*([+-]?\\d+)\\s*",t4="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n4="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",r4=/^#([0-9a-f]{3,8})$/,i4=new RegExp("^rgb\\(".concat(e4,",").concat(e4,",").concat(e4,"\\)$")),o4=new RegExp("^rgb\\(".concat(n4,",").concat(n4,",").concat(n4,"\\)$")),a4=new RegExp("^rgba\\(".concat(e4,",").concat(e4,",").concat(e4,",").concat(t4,"\\)$")),s4=new RegExp("^rgba\\(".concat(n4,",").concat(n4,",").concat(n4,",").concat(t4,"\\)$")),l4=new RegExp("^hsl\\(".concat(t4,",").concat(n4,",").concat(n4,"\\)$")),c4=new RegExp("^hsla\\(".concat(t4,",").concat(n4,",").concat(n4,",").concat(t4,"\\)$")),d4={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function u4(){return this.rgb().formatHex()}function p4(){return this.rgb().formatRgb()}function h4(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=r4.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?m4(t):3===n?new v4(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?f4(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?f4(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=i4.exec(e))?new v4(t[1],t[2],t[3],1):(t=o4.exec(e))?new v4(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=a4.exec(e))?f4(t[1],t[2],t[3],t[4]):(t=s4.exec(e))?f4(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=l4.exec(e))?_4(t[1],t[2]/100,t[3]/100,1):(t=c4.exec(e))?_4(t[1],t[2]/100,t[3]/100,t[4]):d4.hasOwnProperty(e)?m4(d4[e]):"transparent"===e?new v4(NaN,NaN,NaN,0):null}function m4(e){return new v4(e>>16&255,e>>8&255,255&e,1)}function f4(e,t,n,r){return r<=0&&(e=t=n=NaN),new v4(e,t,n,r)}function g4(e,t,n,r){return 1===arguments.length?function(e){return e instanceof X6||(e=h4(e)),e?new v4((e=e.rgb()).r,e.g,e.b,e.opacity):new v4}(e):new v4(e,t,n,null==r?1:r)}function v4(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function x4(){return"#".concat(w4(this.r)).concat(w4(this.g)).concat(w4(this.b))}function y4(){const e=b4(this.opacity);return"".concat(1===e?"rgb(":"rgba(").concat(j4(this.r),", ").concat(j4(this.g),", ").concat(j4(this.b)).concat(1===e?")":", ".concat(e,")"))}function b4(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function j4(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function w4(e){return((e=j4(e))<16?"0":"")+e.toString(16)}function _4(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new S4(e,t,n,r)}function C4(e){if(e instanceof S4)return new S4(e.h,e.s,e.l,e.opacity);if(e instanceof X6||(e=h4(e)),!e)return new S4;if(e instanceof S4)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new S4(a,s,l,e.opacity)}function S4(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function A4(e){return(e=(e||0)%360)<0?e+360:e}function k4(e){return Math.max(0,Math.min(1,e||0))}function M4(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function O4(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}Z6(X6,h4,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:u4,formatHex:u4,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return C4(this).formatHsl()},formatRgb:p4,toString:p4}),Z6(v4,g4,K6(X6,{brighter(e){return e=null==e?J6:Math.pow(J6,e),new v4(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Q6:Math.pow(Q6,e),new v4(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new v4(j4(this.r),j4(this.g),j4(this.b),b4(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:x4,formatHex:x4,formatHex8:function(){return"#".concat(w4(this.r)).concat(w4(this.g)).concat(w4(this.b)).concat(w4(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:y4,toString:y4})),Z6(S4,function(e,t,n,r){return 1===arguments.length?C4(e):new S4(e,t,n,null==r?1:r)},K6(X6,{brighter(e){return e=null==e?J6:Math.pow(J6,e),new S4(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Q6:Math.pow(Q6,e),new S4(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new v4(M4(e>=240?e-240:e+120,i,r),M4(e,i,r),M4(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new S4(A4(this.h),k4(this.s),k4(this.l),b4(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=b4(this.opacity);return"".concat(1===e?"hsl(":"hsla(").concat(A4(this.h),", ").concat(100*k4(this.s),"%, ").concat(100*k4(this.l),"%").concat(1===e?")":", ".concat(e,")"))}}));const T4=e=>()=>e;function E4(e,t){return function(n){return e+n*t}}function P4(e){return 1===(e=+e)?D4:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):T4(isNaN(t)?n:t)}}function D4(e,t){var n=t-e;return n?E4(e,n):T4(isNaN(e)?t:e)}const R4=function e(t){var n=P4(t);function r(e,t){var r=n((e=g4(e)).r,(t=g4(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=D4(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function N4(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=g4(t[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=e(o),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=o(e),r.g=a(e),r.b=s(e),r+""}}}N4(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return O4((n-r/t)*t,a,i,o,s)}}),N4(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return O4((n-r/t)*t,i,o,a,s)}});function L4(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=V4(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function I4(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function F4(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function $4(e,t){var n,r={},i={};for(n in null!==e&&"object"===typeof e||(e={}),null!==t&&"object"===typeof t||(t={}),t)n in e?r[n]=V4(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var B4=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,z4=new RegExp(B4.source,"g");function H4(e,t){var n,r,i,o=B4.lastIndex=z4.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=B4.exec(e))&&(r=z4.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:F4(n,r)})),o=z4.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function W4(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function V4(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?T4(t):("number"===i?F4:"string"===i?(n=h4(t))?(t=n,R4):H4:t instanceof h4?R4:t instanceof Date?I4:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?L4:"function"!==typeof t.valueOf&&"function"!==typeof t.toString||isNaN(t)?$4:F4:W4))(e,t)}function U4(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function q4(e){return+e}var G4=[0,1];function Y4(e){return e}function Z4(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function K4(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Z4(i,r),o=n(a,o)):(r=Z4(r,i),o=n(o,a)),function(e){return o(r(e))}}function X4(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Z4(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Y6(e,t,1,r)-1;return o[n](i[n](t))}}function Q4(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function J4(){var e,t,n,r,i,o,a=G4,s=G4,l=V4,c=Y4;function d(){var e=Math.min(a.length,s.length);return c!==Y4&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?X4:K4,i=o=null,u}function u(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return u.invert=function(n){return c(t((o||(o=r(s,a.map(e),F4)))(n)))},u.domain=function(e){return arguments.length?(a=Array.from(e,q4),d()):a.slice()},u.range=function(e){return arguments.length?(s=Array.from(e),d()):s.slice()},u.rangeRound=function(e){return s=Array.from(e),l=U4,d()},u.clamp=function(e){return arguments.length?(c=!!e||Y4,d()):c!==Y4},u.interpolate=function(e){return arguments.length?(l=e,d()):l},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,d()}}function e9(){return J4()(Y4,Y4)}var t9,n9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function r9(e){if(!(t=n9.exec(e)))throw new Error("invalid format: "+e);var t;return new i9({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function i9(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function o9(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function a9(e){return(e=o9(Math.abs(e)))?e[1]:NaN}function s9(e,t){var n=o9(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}r9.prototype=i9.prototype,i9.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const l9={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>s9(100*e,t),r:s9,s:function(e,t){var n=o9(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(t9=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+o9(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function c9(e){return e}var d9,u9,p9,h9=Array.prototype.map,m9=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function f9(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?c9:(t=h9.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?c9:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(h9.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"\u2212":e.minus+"",d=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=r9(e)).fill,n=e.align,u=e.sign,p=e.symbol,h=e.zero,m=e.width,f=e.comma,g=e.precision,v=e.trim,x=e.type;"n"===x?(f=!0,x="g"):l9[x]||(void 0===g&&(g=12),v=!0,x="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var y="$"===p?i:"#"===p&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",b="$"===p?o:/[%p]/.test(x)?l:"",j=l9[x],w=/[defgprs%]/.test(x);function _(e){var i,o,l,p=y,_=b;if("c"===x)_=j(e)+_,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?d:j(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==u&&(C=!1),p=(C?"("===u?u:c:"-"===u||"("===u?"":u)+p,_=("s"===x?m9[8+t9/3]:"")+_+(C&&"("===u?")":""),w)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){_=(46===l?a+e.slice(i+1):e.slice(i))+_,e=e.slice(0,i);break}}f&&!h&&(e=r(e,1/0));var S=p.length+e.length+_.length,A=S<m?new Array(m-S+1).join(t):"";switch(f&&h&&(e=r(A+e,A.length?m-_.length:1/0),A=""),n){case"<":e=p+e+_+A;break;case"=":e=p+A+e+_;break;case"^":e=A.slice(0,S=A.length>>1)+p+e+_+A.slice(S);break;default:e=A+p+e+_}return s(e)}return g=void 0===g?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),_.toString=function(){return e+""},_}return{format:u,formatPrefix:function(e,t){var n=u(((e=r9(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(a9(t)/3))),i=Math.pow(10,-r),o=m9[8+r/3];return function(e){return n(i*e)+o}}}}function g9(e,t,n,r){var i,o=B6(e,t,n);switch((r=r9(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(a9(t)/3)))-a9(Math.abs(e)))}(o,a))||(r.precision=i),p9(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,a9(t)-a9(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-a9(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return u9(r)}function v9(e){var t=e.domain;return e.ticks=function(e){var n=t();return F6(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return g9(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],d=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);d-- >0;){if((i=$6(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function x9(){var e=e9();return e.copy=function(){return Q4(e,x9())},$3.apply(e,arguments),v9(e)}function y9(e){var t;function n(e){return null==e||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,q4),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return y9(e).unknown(t)},e=arguments.length?Array.from(e,q4):[0,1],v9(n)}function b9(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function j9(e){return Math.log(e)}function w9(e){return Math.exp(e)}function _9(e){return-Math.log(-e)}function C9(e){return-Math.exp(-e)}function S9(e){return isFinite(e)?+("1e"+e):e<0?0:e}function A9(e){return(t,n)=>-e(-t,n)}function k9(e){const t=e(j9,w9),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?S9:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=A9(r),i=A9(i),e(_9,C9)):e(j9,w9),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,d,u=r(a),p=r(s);const h=null==e?10:+e;let m=[];if(!(o%1)&&p-u<h){if(u=Math.floor(u),p=Math.ceil(p),a>0){for(;u<=p;++u)for(c=1;c<o;++c)if(d=u<0?c/i(-u):c*i(u),!(d<a)){if(d>s)break;m.push(d)}}else for(;u<=p;++u)for(c=o-1;c>=1;--c)if(d=u>0?c/i(-u):c*i(u),!(d<a)){if(d>s)break;m.push(d)}2*m.length<h&&(m=F6(a,s,h))}else m=F6(u,p,Math.min(p-u,h)).map(i);return l?m.reverse():m},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!==typeof n&&(o%1||null!=(n=r9(n)).precision||(n.trim=!0),n=u9(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*o<o-.5&&(t*=o),t<=a?n(e):""}},t.nice=()=>n(b9(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function M9(){const e=k9(J4()).domain([1,10]);return e.copy=()=>Q4(e,M9()).base(e.base()),$3.apply(e,arguments),e}function O9(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function T9(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function E9(e){var t=1,n=e(O9(t),T9(t));return n.constant=function(n){return arguments.length?e(O9(t=+n),T9(t)):t},v9(n)}function P9(){var e=E9(J4());return e.copy=function(){return Q4(e,P9()).constant(e.constant())},$3.apply(e,arguments)}function D9(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function R9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function N9(e){return e<0?-e*e:e*e}function L9(e){var t=e(Y4,Y4),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(Y4,Y4):.5===n?e(R9,N9):e(D9(n),D9(1/n)):n},v9(t)}function I9(){var e=L9(J4());return e.copy=function(){return Q4(e,I9()).exponent(e.exponent())},$3.apply(e,arguments),e}function F9(){return I9.apply(null,arguments).exponent(.5)}function $9(e){return Math.sign(e)*e*e}function B9(){var e,t=e9(),n=[0,1],r=!1;function i(n){var i=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(t(n));return isNaN(i)?e:r?Math.round(i):i}return i.invert=function(e){return t.invert($9(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain()},i.range=function(e){return arguments.length?(t.range((n=Array.from(e,q4)).map($9)),i):n.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(r=!!e,i):r},i.clamp=function(e){return arguments.length?(t.clamp(e),i):t.clamp()},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return B9(t.domain(),n).round(r).clamp(t.clamp()).unknown(e)},$3.apply(i,arguments),v9(i)}function z9(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function H9(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function W9(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z6;if(e===z6)return V9;if("function"!==typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}function V9(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}function U9(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,i=arguments.length>4?arguments[4]:void 0;if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=void 0===i?V9:W9(i);r>n;){if(r-n>600){const o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);U9(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}const o=e[t];let a=n,s=r;for(q9(e,n,t),i(e[r],o)>0&&q9(e,n,r);a<s;){for(q9(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}0===i(e[n],o)?q9(e,n,s):(++s,q9(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function q9(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function G9(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let n of e)null!=n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return H9(e);if(t>=1)return z9(e);var r,i=(r-1)*t,o=Math.floor(i),a=z9(U9(e,o).subarray(0,o+1));return a+(H9(e.subarray(o+1))-a)*(i-o)}}function Y9(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:U6;if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}function Z9(){var e,t=[],n=[],r=[];function i(){var e=0,i=Math.max(1,n.length);for(r=new Array(i-1);++e<i;)r[e-1]=Y9(t,e/i);return o}function o(t){return null==t||isNaN(t=+t)?e:n[Y6(r,t)]}return o.invertExtent=function(e){var i=n.indexOf(e);return i<0?[NaN,NaN]:[i>0?r[i-1]:t[0],i<r.length?r[i]:t[t.length-1]]},o.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(z6),i()},o.range=function(e){return arguments.length?(n=Array.from(e),i()):n.slice()},o.unknown=function(t){return arguments.length?(e=t,o):e},o.quantiles=function(){return r.slice()},o.copy=function(){return Z9().domain(t).range(n).unknown(e)},$3.apply(o,arguments)}function K9(){var e,t=0,n=1,r=1,i=[.5],o=[0,1];function a(t){return null!=t&&t<=t?o[Y6(i,t,0,r)]:e}function s(){var e=-1;for(i=new Array(r);++e<r;)i[e]=((e+1)*n-(e-r)*t)/(r+1);return a}return a.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,s()):[t,n]},a.range=function(e){return arguments.length?(r=(o=Array.from(e)).length-1,s()):o.slice()},a.invertExtent=function(e){var a=o.indexOf(e);return a<0?[NaN,NaN]:a<1?[t,i[0]]:a>=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return K9().domain([t,n]).range(o).unknown(e)},$3.apply(v9(a),arguments)}function X9(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[Y6(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return X9().domain(t).range(n).unknown(e)},$3.apply(i,arguments)}d9=f9({thousands:",",grouping:[3],currency:["$",""]}),u9=d9.format,p9=d9.formatPrefix;const Q9=1e3,J9=6e4,e7=36e5,t7=864e5,n7=6048e5,r7=2592e6,i7=31536e6,o7=new Date,a7=new Date;function s7(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r)||!(o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>s7(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(o7.setTime(+t),a7.setTime(+r),e(o7),e(a7),Math.floor(n(o7,a7))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const l7=s7(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);l7.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?s7(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):l7:null);l7.range;const c7=s7(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Q9)},(e,t)=>(t-e)/Q9,e=>e.getUTCSeconds()),d7=(c7.range,s7(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Q9)},(e,t)=>{e.setTime(+e+t*J9)},(e,t)=>(t-e)/J9,e=>e.getMinutes())),u7=(d7.range,s7(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*J9)},(e,t)=>(t-e)/J9,e=>e.getUTCMinutes())),p7=(u7.range,s7(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Q9-e.getMinutes()*J9)},(e,t)=>{e.setTime(+e+t*e7)},(e,t)=>(t-e)/e7,e=>e.getHours())),h7=(p7.range,s7(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*e7)},(e,t)=>(t-e)/e7,e=>e.getUTCHours())),m7=(h7.range,s7(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*J9)/t7,e=>e.getDate()-1)),f7=(m7.range,s7(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/t7,e=>e.getUTCDate()-1)),g7=(f7.range,s7(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/t7,e=>Math.floor(e/t7)));g7.range;function v7(e){return s7(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*J9)/n7)}const x7=v7(0),y7=v7(1),b7=v7(2),j7=v7(3),w7=v7(4),_7=v7(5),C7=v7(6);x7.range,y7.range,b7.range,j7.range,w7.range,_7.range,C7.range;function S7(e){return s7(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/n7)}const A7=S7(0),k7=S7(1),M7=S7(2),O7=S7(3),T7=S7(4),E7=S7(5),P7=S7(6),D7=(A7.range,k7.range,M7.range,O7.range,T7.range,E7.range,P7.range,s7(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),R7=(D7.range,s7(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),N7=(R7.range,s7(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));N7.every=e=>isFinite(e=Math.floor(e))&&e>0?s7(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null;N7.range;const L7=s7(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());L7.every=e=>isFinite(e=Math.floor(e))&&e>0?s7(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null;L7.range;function I7(e,t,n,r,i,o){const a=[[c7,1,Q9],[c7,5,5e3],[c7,15,15e3],[c7,30,3e4],[o,1,J9],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,e7],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,t7],[r,2,1728e5],[n,1,n7],[t,1,r7],[t,3,7776e6],[e,1,i7]];function s(t,n,r){const i=Math.abs(n-t)/r,o=W6(e=>{let[,,t]=e;return t}).right(a,i);if(o===a.length)return e.every(B6(t/i7,n/i7,r));if(0===o)return l7.every(Math.max(B6(t,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"===typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}const[F7,$7]=I7(L7,R7,A7,g7,h7,u7),[B7,z7]=I7(N7,D7,x7,m7,p7,d7);function H7(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function W7(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function V7(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var U7,q7,G7,Y7={"-":"",_:" ",0:"0"},Z7=/^\s*\d+/,K7=/^%/,X7=/[\\^$*+?|[\]().{}]/g;function Q7(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function J7(e){return e.replace(X7,"\\$&")}function e8(e){return new RegExp("^(?:"+e.map(J7).join("|")+")","i")}function t8(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function n8(e,t,n){var r=Z7.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function r8(e,t,n){var r=Z7.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function i8(e,t,n){var r=Z7.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function o8(e,t,n){var r=Z7.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function a8(e,t,n){var r=Z7.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function s8(e,t,n){var r=Z7.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function l8(e,t,n){var r=Z7.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function c8(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function d8(e,t,n){var r=Z7.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function u8(e,t,n){var r=Z7.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function p8(e,t,n){var r=Z7.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function h8(e,t,n){var r=Z7.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function m8(e,t,n){var r=Z7.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function f8(e,t,n){var r=Z7.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function g8(e,t,n){var r=Z7.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function v8(e,t,n){var r=Z7.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function x8(e,t,n){var r=Z7.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function y8(e,t,n){var r=K7.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function b8(e,t,n){var r=Z7.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function j8(e,t,n){var r=Z7.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function w8(e,t){return Q7(e.getDate(),t,2)}function _8(e,t){return Q7(e.getHours(),t,2)}function C8(e,t){return Q7(e.getHours()%12||12,t,2)}function S8(e,t){return Q7(1+m7.count(N7(e),e),t,3)}function A8(e,t){return Q7(e.getMilliseconds(),t,3)}function k8(e,t){return A8(e,t)+"000"}function M8(e,t){return Q7(e.getMonth()+1,t,2)}function O8(e,t){return Q7(e.getMinutes(),t,2)}function T8(e,t){return Q7(e.getSeconds(),t,2)}function E8(e){var t=e.getDay();return 0===t?7:t}function P8(e,t){return Q7(x7.count(N7(e)-1,e),t,2)}function D8(e){var t=e.getDay();return t>=4||0===t?w7(e):w7.ceil(e)}function R8(e,t){return e=D8(e),Q7(w7.count(N7(e),e)+(4===N7(e).getDay()),t,2)}function N8(e){return e.getDay()}function L8(e,t){return Q7(y7.count(N7(e)-1,e),t,2)}function I8(e,t){return Q7(e.getFullYear()%100,t,2)}function F8(e,t){return Q7((e=D8(e)).getFullYear()%100,t,2)}function $8(e,t){return Q7(e.getFullYear()%1e4,t,4)}function B8(e,t){var n=e.getDay();return Q7((e=n>=4||0===n?w7(e):w7.ceil(e)).getFullYear()%1e4,t,4)}function z8(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Q7(t/60|0,"0",2)+Q7(t%60,"0",2)}function H8(e,t){return Q7(e.getUTCDate(),t,2)}function W8(e,t){return Q7(e.getUTCHours(),t,2)}function V8(e,t){return Q7(e.getUTCHours()%12||12,t,2)}function U8(e,t){return Q7(1+f7.count(L7(e),e),t,3)}function q8(e,t){return Q7(e.getUTCMilliseconds(),t,3)}function G8(e,t){return q8(e,t)+"000"}function Y8(e,t){return Q7(e.getUTCMonth()+1,t,2)}function Z8(e,t){return Q7(e.getUTCMinutes(),t,2)}function K8(e,t){return Q7(e.getUTCSeconds(),t,2)}function X8(e){var t=e.getUTCDay();return 0===t?7:t}function Q8(e,t){return Q7(A7.count(L7(e)-1,e),t,2)}function J8(e){var t=e.getUTCDay();return t>=4||0===t?T7(e):T7.ceil(e)}function eee(e,t){return e=J8(e),Q7(T7.count(L7(e),e)+(4===L7(e).getUTCDay()),t,2)}function tee(e){return e.getUTCDay()}function nee(e,t){return Q7(k7.count(L7(e)-1,e),t,2)}function ree(e,t){return Q7(e.getUTCFullYear()%100,t,2)}function iee(e,t){return Q7((e=J8(e)).getUTCFullYear()%100,t,2)}function oee(e,t){return Q7(e.getUTCFullYear()%1e4,t,4)}function aee(e,t){var n=e.getUTCDay();return Q7((e=n>=4||0===n?T7(e):T7.ceil(e)).getUTCFullYear()%1e4,t,4)}function see(){return"+0000"}function lee(){return"%"}function cee(e){return+e}function dee(e){return Math.floor(+e/1e3)}function uee(e){return new Date(e)}function pee(e){return e instanceof Date?+e:+new Date(+e)}function hee(e,t,n,r,i,o,a,s,l,c){var d=e9(),u=d.invert,p=d.domain,h=c(".%L"),m=c(":%S"),f=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),x=c("%b %d"),y=c("%B"),b=c("%Y");function j(e){return(l(e)<e?h:s(e)<e?m:a(e)<e?f:o(e)<e?g:r(e)<e?i(e)<e?v:x:n(e)<e?y:b)(e)}return d.invert=function(e){return new Date(u(e))},d.domain=function(e){return arguments.length?p(Array.from(e,pee)):p().map(uee)},d.ticks=function(t){var n=p();return e(n[0],n[n.length-1],null==t?10:t)},d.tickFormat=function(e,t){return null==t?j:c(t)},d.nice=function(e){var n=p();return e&&"function"===typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?p(b9(n,e)):d},d.copy=function(){return Q4(d,hee(e,t,n,r,i,o,a,s,l,c))},d}function mee(){return $3.apply(hee(B7,z7,N7,D7,x7,m7,p7,d7,c7,q7).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function fee(){return $3.apply(hee(F7,$7,L7,R7,A7,f7,h7,u7,c7,G7).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function gee(){var e,t,n,r,i,o=0,a=1,s=Y4,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function d(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=d(V4),c.rangeRound=d(U4),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),c}}function vee(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function xee(){var e=v9(gee()(Y4));return e.copy=function(){return vee(e,xee())},B3.apply(e,arguments)}function yee(){var e=k9(gee()).domain([1,10]);return e.copy=function(){return vee(e,yee()).base(e.base())},B3.apply(e,arguments)}function bee(){var e=E9(gee());return e.copy=function(){return vee(e,bee()).constant(e.constant())},B3.apply(e,arguments)}function jee(){var e=L9(gee());return e.copy=function(){return vee(e,jee()).exponent(e.exponent())},B3.apply(e,arguments)}function wee(){return jee.apply(null,arguments).exponent(.5)}function _ee(){var e=[],t=Y4;function n(n){if(null!=n&&!isNaN(n=+n))return t((Y6(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(z6),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>G9(e,r/t))},n.copy=function(){return _ee(t).domain(e)},B3.apply(n,arguments)}function Cee(){var e,t,n,r,i,o,a,s=0,l=.5,c=1,d=1,u=Y4,p=!1;function h(e){return isNaN(e=+e)?a:(e=.5+((e=+o(e))-t)*(d*e<d*t?r:i),u(p?Math.max(0,Math.min(1,e)):e))}function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,u=function(e,t){void 0===t&&(t=e,e=V4);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return o[t](e-t)}}(e,[n,r,i]),h):[u(0),u(.5),u(1)]}}return h.domain=function(a){return arguments.length?([s,l,c]=a,e=o(s=+s),t=o(l=+l),n=o(c=+c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),d=t<e?-1:1,h):[s,l,c]},h.clamp=function(e){return arguments.length?(p=!!e,h):p},h.interpolator=function(e){return arguments.length?(u=e,h):u},h.range=m(V4),h.rangeRound=m(U4),h.unknown=function(e){return arguments.length?(a=e,h):a},function(a){return o=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),d=t<e?-1:1,h}}function See(){var e=v9(Cee()(Y4));return e.copy=function(){return vee(e,See())},B3.apply(e,arguments)}function Aee(){var e=k9(Cee()).domain([.1,1,10]);return e.copy=function(){return vee(e,Aee()).base(e.base())},B3.apply(e,arguments)}function kee(){var e=E9(Cee());return e.copy=function(){return vee(e,kee()).constant(e.constant())},B3.apply(e,arguments)}function Mee(){var e=L9(Cee());return e.copy=function(){return vee(e,Mee()).exponent(e.exponent())},B3.apply(e,arguments)}function Oee(){return Mee.apply(null,arguments).exponent(.5)}function Tee(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}!function(e){U7=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=e8(i),d=t8(i),u=e8(o),p=t8(o),h=e8(a),m=t8(a),f=e8(s),g=t8(s),v=e8(l),x=t8(l),y={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:w8,e:w8,f:k8,g:F8,G:B8,H:_8,I:C8,j:S8,L:A8,m:M8,M:O8,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:cee,s:dee,S:T8,u:E8,U:P8,V:R8,w:N8,W:L8,x:null,X:null,y:I8,Y:$8,Z:z8,"%":lee},b={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:H8,e:H8,f:G8,g:iee,G:aee,H:W8,I:V8,j:U8,L:q8,m:Y8,M:Z8,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:cee,s:dee,S:K8,u:X8,U:Q8,V:eee,w:tee,W:nee,x:null,X:null,y:ree,Y:oee,Z:see,"%":lee},j={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=x.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:p8,e:p8,f:x8,g:l8,G:s8,H:m8,I:m8,j:h8,L:v8,m:u8,M:f8,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=d.get(r[0].toLowerCase()),n+r[0].length):-1},q:d8,Q:b8,s:j8,S:g8,u:r8,U:i8,V:o8,w:n8,W:a8,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:l8,Y:s8,Z:c8,"%":y8};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Y7[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function _(e,t){return function(n){var r,i,o=V7(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=W7(V7(o.y,0,1))).getUTCDay(),r=i>4||0===i?k7.ceil(r):k7(r),r=f7.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=H7(V7(o.y,0,1))).getDay(),r=i>4||0===i?y7.ceil(r):y7(r),r=m7.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?W7(V7(o.y,0,1)).getUTCDay():H7(V7(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,W7(o)):H7(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=j[i in Y7?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return y.x=w(n,y),y.X=w(r,y),y.c=w(t,y),b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),{format:function(e){var t=w(e+="",y);return t.toString=function(){return e},t},parse:function(e){var t=_(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=_(e+="",!0);return t.toString=function(){return e},t}}}(e),q7=U7.format,U7.parse,G7=U7.utcFormat,U7.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Array.prototype.slice;function Eee(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function Pee(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Dee(e,t){return e[t]}function Ree(e){const t=[];return t.key=e,t}var Nee=n(50539),Lee=n.n(Nee),Iee=n(76745),Fee=n.n(Iee),$ee=n(63538),Bee=n.n($ee),zee=n(19853),Hee=n.n(zee),Wee=n(98210),Vee=n.n(Wee);function Uee(e){return function(e){if(Array.isArray(e))return qee(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return qee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qee(e,t)}(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 qee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Gee=function(e){return e},Yee={"@@functional/placeholder":!0},Zee=function(e){return e===Yee},Kee=function(e){return function t(){return 0===arguments.length||1===arguments.length&&Zee(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},Xee=function e(t,n){return 1===t?n:Kee(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=i.filter(function(e){return e!==Yee}).length;return a>=t?n.apply(void 0,i):e(t-a,Kee(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=i.map(function(e){return Zee(e)?t.shift():e});return n.apply(void 0,Uee(o).concat(t))}))})},Qee=function(e){return Xee(e.length,e)},Jee=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},ete=Qee(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),tte=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return Gee;var r=t.reverse(),i=r[0],o=r.slice(1);return function(){return o.reduce(function(e,t){return t(e)},i.apply(void 0,arguments))}},nte=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},rte=function(e){var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every(function(e,n){return e===t[n]})?n:(t=i,n=e.apply(void 0,i))}};var ite=Qee(function(e,t,n){var r=+e;return r+n*(+t-r)}),ote=Qee(function(e,t,n){var r=t-+e;return(n-e)/(r=r||1/0)}),ate=Qee(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const ste={rangeStep:function(e,t,n){for(var r=new(Vee())(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o},getDigitCount:function(e){return 0===e?1:Math.floor(new(Vee())(e).abs().log(10).toNumber())+1},interpolateNumber:ite,uninterpolateNumber:ote,uninterpolateTruncation:ate};function lte(e){return function(e){if(Array.isArray(e))return ute(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||dte(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 cte(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||dte(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dte(e,t){if(e){if("string"===typeof e)return ute(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)?ute(e,t):void 0}}function ute(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 pte(e){var t=cte(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function hte(e,t,n){if(e.lte(0))return new(Vee())(0);var r=ste.getDigitCount(e.toNumber()),i=new(Vee())(10).pow(r),o=e.div(i),a=1!==r?.05:.1,s=new(Vee())(Math.ceil(o.div(a).toNumber())).add(n).mul(a).mul(i);return t?s:new(Vee())(Math.ceil(s))}function mte(e,t,n){var r=1,i=new(Vee())(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new(Vee())(10).pow(ste.getDigitCount(e)-1),i=new(Vee())(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new(Vee())(Math.floor(e)))}else 0===e?i=new(Vee())(Math.floor((t-1)/2)):n||(i=new(Vee())(Math.floor(e)));var a=Math.floor((t-1)/2),s=tte(ete(function(e){return i.add(new(Vee())(e-a).mul(r)).toNumber()}),Jee);return s(0,t)}function fte(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new(Vee())(0),tickMin:new(Vee())(0),tickMax:new(Vee())(0)};var o,a=hte(new(Vee())(t).sub(e).div(n-1),r,i);o=e<=0&&t>=0?new(Vee())(0):(o=new(Vee())(e).add(t).div(2)).sub(new(Vee())(o).mod(a));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new(Vee())(t).sub(o).div(a).toNumber()),c=s+l+1;return c>n?fte(e,t,n,r,i+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:a,tickMin:o.sub(new(Vee())(s).mul(a)),tickMax:o.add(new(Vee())(l).mul(a))})}var gte=rte(function(e){var t=cte(e,2),n=t[0],r=t[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(i,2),s=cte(pte([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var d=c===1/0?[l].concat(lte(Jee(0,i-1).map(function(){return 1/0}))):[].concat(lte(Jee(0,i-1).map(function(){return-1/0})),[c]);return n>r?nte(d):d}if(l===c)return mte(l,i,o);var u=fte(l,c,a,o),p=u.step,h=u.tickMin,m=u.tickMax,f=ste.rangeStep(h,m.add(new(Vee())(.1).mul(p)),p);return n>r?nte(f):f}),vte=(rte(function(e){var t=cte(e,2),n=t[0],r=t[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(i,2),s=cte(pte([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[n,r];if(l===c)return mte(l,i,o);var d=hte(new(Vee())(c).sub(l).div(a-1),o,0),u=tte(ete(function(e){return new(Vee())(l).add(new(Vee())(e).mul(d)).toNumber()}),Jee),p=u(0,a).filter(function(e){return e>=l&&e<=c});return n>r?nte(p):p}),rte(function(e,t){var n=cte(e,2),r=n[0],i=n[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=cte(pte([r,i]),2),s=a[0],l=a[1];if(s===-1/0||l===1/0)return[r,i];if(s===l)return[s];var c=Math.max(t,2),d=hte(new(Vee())(l).sub(s).div(c-1),o,0),u=[].concat(lte(ste.rangeStep(new(Vee())(s),new(Vee())(l).sub(new(Vee())(.99).mul(d)),d)),[l]);return r>i?nte(u):u})),xte=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function yte(e){return yte="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},yte(e)}function bte(){return bte=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},bte.apply(this,arguments)}function jte(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return wte(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wte(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wte(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 _te(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Cte(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,Tte(r.key),r)}}function Ste(e,t,n){return t=kte(t),function(e,t){if(t&&("object"===yte(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ate()?Reflect.construct(t,n||[],kte(e).constructor):t.apply(e,n))}function Ate(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ate=function(){return!!e})()}function kte(e){return kte=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kte(e)}function Mte(e,t){return Mte=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mte(e,t)}function Ote(e,t,n){return(t=Tte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tte(e){var t=function(e,t){if("object"!=yte(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=yte(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yte(t)?t:t+""}var Ete=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ste(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mte(e,t)}(t,e),n=t,r=[{key:"render",value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,i=e.dataKey,o=e.data,a=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,c=_te(e,xte),d=F1(c,!1);"x"===this.props.direction&&"number"!==s.type&&p2(!1);var u=o.map(function(e){var o=a(e,i),c=o.x,u=o.y,p=o.value,h=o.errorVal;if(!h)return null;var m,f,g=[];if(Array.isArray(h)){var v=jte(h,2);m=v[0],f=v[1]}else m=f=h;if("vertical"===n){var x=s.scale,y=u+t,b=y+r,j=y-r,w=x(p-m),_=x(p+f);g.push({x1:_,y1:b,x2:_,y2:j}),g.push({x1:w,y1:y,x2:_,y2:y}),g.push({x1:w,y1:b,x2:w,y2:j})}else if("horizontal"===n){var C=l.scale,S=c+t,A=S-r,k=S+r,M=C(p-m),O=C(p+f);g.push({x1:A,y1:O,x2:k,y2:O}),g.push({x1:S,y1:M,x2:S,y2:O}),g.push({x1:A,y1:M,x2:k,y2:M})}return We.createElement(b2,bte({className:"recharts-errorBar",key:"bar-".concat(g.map(function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))},d),g.map(function(e){return We.createElement("line",bte({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))}))});return We.createElement(b2,{className:"recharts-errorBars"},u)}}],r&&Cte(n.prototype,r),i&&Cte(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function Pte(e){return Pte="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},Pte(e)}function Dte(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 Rte(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dte(Object(n),!0).forEach(function(t){Nte(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dte(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nte(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Pte(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pte(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pte(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ote(Ete,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),Ote(Ete,"displayName","ErrorBar");var Lte=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,i=e.legendContent,o=R1(t,L3);if(!o)return null;var a,s=L3.defaultProps,l=void 0!==s?Rte(Rte({},s),o.props):{};return a=o.props&&o.props.payload?o.props&&o.props.payload:"children"===i?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,i=r.sectors||r.data||[];return e.concat(i.map(function(e){return{type:o.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.type.defaultProps,r=void 0!==n?Rte(Rte({},n),t.props):{},i=r.dataKey,o=r.name,a=r.legendType;return{inactive:r.hide,dataKey:i,type:l.iconType||a||"square",color:Ute(t),value:o||i,payload:r}}),Rte(Rte(Rte({},l),L3.getWithHeight(o,r)),{},{payload:a,item:o})};function Ite(e){return Ite="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},Ite(e)}function Fte(e){return function(e){if(Array.isArray(e))return $te(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)return;if("string"===typeof e)return $te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $te(e,t)}(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 $te(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 Bte(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 zte(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bte(Object(n),!0).forEach(function(t){Hte(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bte(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Hte(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Ite(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ite(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ite(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wte(e,t,n){return G0()(e)||G0()(t)?n:l1(t)?oa()(e,t,n):X0()(t)?t(e):n}function Vte(e,t,n,r){var i=Bee()(e,function(e){return Wte(e,t)});if("number"===n){var o=i.filter(function(e){return s1(e)||parseFloat(e)});return o.length?[Fee()(o),Lee()(o)]:[1/0,-1/0]}return(r?i.filter(function(e){return!G0()(e)}):i).map(function(e){return l1(e)||e instanceof Date?e:""})}var Ute=function(e){var t,n,r=e.type.displayName,i=null!==(t=e.type)&&void 0!==t&&t.defaultProps?zte(zte({},e.type.defaultProps),e.props):e.props,o=i.stroke,a=i.fill;switch(r){case"Line":n=o;break;case"Area":case"Radar":n=o&&"none"!==o?o:a;break;default:n=a}return n},qte=function(e,t,n,r,i){var o=D1(t.props.children,Ete).filter(function(e){return function(e,t,n){return!!G0()(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===n?"xAxis"===t:"y"!==n||"yAxis"===t)}(r,i,e.props.direction)});if(o&&o.length){var a=o.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=Wte(t,n);if(G0()(r))return e;var i=Array.isArray(r)?[Fee()(r),Lee()(r)]:[r,r],o=a.reduce(function(e,n){var r=Wte(t,n,0),o=i[0]-Math.abs(Array.isArray(r)?r[0]:r),a=i[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(o,e[0]),Math.max(a,e[1])]},[1/0,-1/0]);return[Math.min(o[0],e[0]),Math.max(o[1],e[1])]},[1/0,-1/0])}return null},Gte=function(e,t,n,r,i){var o=t.map(function(t){var o=t.props.dataKey;return"number"===n&&o&&qte(e,t,o,r)||Vte(e,o,n,i)});if("number"===n)return o.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var a={};return o.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)a[t[n]]||(a[t[n]]=!0,e.push(t[n]));return e},[])},Yte=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},Zte=function(e,t,n,r){if(r)return e.map(function(e){return e.coordinate});var i,o,a=e.map(function(e){return e.coordinate===t&&(i=!0),e.coordinate===n&&(o=!0),e.coordinate});return i||a.push(t),o||a.push(n),a},Kte=function(e,t,n){if(!e)return null;var r=e.scale,i=e.duplicateDomain,o=e.type,a=e.range,s="scaleBand"===e.realScaleType?r.bandwidth()/2:2,l=(t||n)&&"category"===o&&r.bandwidth?r.bandwidth()/s:0;return l="angleAxis"===e.axisType&&(null===a||void 0===a?void 0:a.length)>=2?2*o1(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){var t=i?i.indexOf(e):e;return{coordinate:r(t)+l,value:e,offset:l}}).filter(function(e){return!n1()(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+l,value:e,index:t,offset:l}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+l,value:e,offset:l}}):r.domain().map(function(e,t){return{coordinate:r(e)+l,value:i?i[e]:e,index:t,offset:l}})},Xte=new WeakMap,Qte=function(e,t){if("function"!==typeof t)return e;Xte.has(e)||Xte.set(e,new WeakMap);var n=Xte.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},Jte=function(e,n,r){var i=e.scale,o=e.type,a=e.layout,s=e.axisType;if("auto"===i)return"radial"===a&&"radiusAxis"===s?{scale:Y3(),realScaleType:"band"}:"radial"===a&&"angleAxis"===s?{scale:x9(),realScaleType:"linear"}:"category"===o&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:K3(),realScaleType:"point"}:"category"===o?{scale:Y3(),realScaleType:"band"}:{scale:x9(),realScaleType:"linear"};if(Z0()(i)){var l="scale".concat(d5()(i));return{scale:(t[l]||K3)(),realScaleType:t[l]?l:"point"}}return X0()(i)?{scale:i}:{scale:K3(),realScaleType:"point"}},ene=1e-4,tne=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-ene,o=Math.max(r[0],r[1])+ene,a=e(t[0]),s=e(t[n-1]);(a<i||a>o||s<i||s>o)&&e.domain([t[0],t[n-1]])}},nne={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0,a=0;a<t;++a){var s=n1()(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1]):(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}Tee(e,t)}},none:Tee,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}Tee(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var d=e[t[s]],u=d[a][1]||0,p=(u-(d[a-1][1]||0))/2,h=0;h<s;++h){var m=e[t[h]];p+=(m[a][1]||0)-(m[a-1][1]||0)}l+=u,c+=p*u}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,Tee(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0;o<t;++o){var a=n1()(e[o][n][1])?e[o][n][0]:e[o][n][1];a>=0?(e[o][n][0]=i,e[o][n][1]=i+a,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}}},rne=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),i=nne[n],o=function(){var e=D5([]),t=Pee,n=Tee,r=Dee;function i(i){var o,a,s=Array.from(e.apply(this,arguments),Ree),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=Eee(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"===typeof t?t:D5(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"===typeof e?e:D5(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?Pee:"function"===typeof e?e:D5(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?Tee:e,i):n},i}().keys(r).value(function(e,t){return+Wte(e,t,0)}).order(Pee).offset(i);return o(e)},ine=function(e,t){var n=t.realScaleType,r=t.type,i=t.tickCount,o=t.originalDomain,a=t.allowDecimals,s=n||t.scale;if("auto"!==s&&"linear"!==s)return null;if(i&&"number"===r&&o&&("auto"===o[0]||"auto"===o[1])){var l=e.domain();if(!l.length)return null;var c=gte(l,i,a);return e.domain([Fee()(c),Lee()(c)]),{niceTicks:c}}if(i&&"number"===r){var d=e.domain();return{niceTicks:vte(d,i,a)}}return null};function one(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!G0()(i[t.dataKey])){var s=m1(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=Wte(i,G0()(a)?t.dataKey:a);return G0()(l)?null:t.scale(l)}var ane=function(e){var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,o=e.entry,a=e.index;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var s=Wte(o,t.dataKey,t.domain[a]);return G0()(s)?null:t.scale(s)-i/2+r},sne=function(e,t,n){return Object.keys(e).reduce(function(r,i){var o=e[i].stackedData.reduce(function(e,r){var i=function(e){return e.reduce(function(e,t){return[Fee()(t.concat([e[0]]).filter(s1)),Lee()(t.concat([e[1]]).filter(s1))]},[1/0,-1/0])}(r.slice(t,n+1));return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},lne=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cne=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dne=function(e,t,n){if(X0()(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(s1(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(lne.test(e[0])){var i=+lne.exec(e[0])[1];r[0]=t[0]-i}else X0()(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(s1(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(cne.test(e[1])){var o=+cne.exec(e[1])[1];r[1]=t[1]+o}else X0()(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},une=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=d2()(t,function(e){return e.coordinate}),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},pne=function(e,t,n){return e&&e.length?Hee()(e,oa()(n,"type.defaultProps.domain"))?t:e:t},hne=function(e,t){var n=e.type.defaultProps?zte(zte({},e.type.defaultProps),e.props):e.props,r=n.dataKey,i=n.name,o=n.unit,a=n.formatter,s=n.tooltipType,l=n.chartType,c=n.hide;return zte(zte({},F1(e,!1)),{},{dataKey:r,unit:o,formatter:a,name:i||r,color:Ute(e),value:Wte(t,r),type:s,payload:t,chartType:l,hide:c})};function mne(e){return mne="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},mne(e)}function fne(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 gne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fne(Object(n),!0).forEach(function(t){vne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fne(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vne(e,t,n){return t=function(e){var t=function(e,t){if("object"!=mne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=mne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==mne(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xne=["Webkit","Moz","O","ms"];function yne(e){return yne="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},yne(e)}function bne(){return bne=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},bne.apply(this,arguments)}function jne(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 wne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jne(Object(n),!0).forEach(function(t){Mne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jne(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _ne(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,One(r.key),r)}}function Cne(e,t,n){return t=Ane(t),function(e,t){if(t&&("object"===yne(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sne()?Reflect.construct(t,n||[],Ane(e).constructor):t.apply(e,n))}function Sne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sne=function(){return!!e})()}function Ane(e){return Ane=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ane(e)}function kne(e,t){return kne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kne(e,t)}function Mne(e,t,n){return(t=One(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function One(e){var t=function(e,t){if("object"!=yne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=yne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yne(t)?t:t+""}var Tne=function(e){return e.changedTouches&&!!e.changedTouches.length},Ene=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Mne(n=Cne(this,t,[e]),"handleDrag",function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),Mne(n,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),Mne(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,i=e.startIndex;null===r||void 0===r||r({endIndex:t,startIndex:i})}),n.detachDragEndListener()}),Mne(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Mne(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Mne(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Mne(n,"handleSlideDragStart",function(e){var t=Tne(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kne(e,t)}(t,e),n=t,r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var n=e.startX,r=e.endX,i=this.state.scaleValues,o=this.props,a=o.gap,s=o.data.length-1,l=Math.min(n,r),c=Math.max(n,r),d=t.getIndexInRange(i,l),u=t.getIndexInRange(i,c);return{startIndex:d-d%a,endIndex:u===s?s:u-u%a}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,i=t.dataKey,o=Wte(n[e],i,e);return X0()(r)?r(o,e):o}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,i=t.endX,o=this.props,a=o.x,s=o.width,l=o.travellerWidth,c=o.startIndex,d=o.endIndex,u=o.onChange,p=e.pageX-n;p>0?p=Math.min(p,a+s-l-i,a+s-l-r):p<0&&(p=Math.max(p,a-r,a-i));var h=this.getIndex({startX:r+p,endX:i+p});h.startIndex===c&&h.endIndex===d||!u||u(h),this.setState({startX:r+p,endX:i+p,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=Tne(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,i=t.endX,o=t.startX,a=this.state[r],s=this.props,l=s.x,c=s.width,d=s.travellerWidth,u=s.onChange,p=s.gap,h=s.data,m={startX:this.state.startX,endX:this.state.endX},f=e.pageX-n;f>0?f=Math.min(f,l+c-d-a):f<0&&(f=Math.max(f,l-a)),m[r]=a+f;var g=this.getIndex(m),v=g.startIndex,x=g.endIndex;this.setState(Mne(Mne({},r,a+f),"brushMoveStartX",e.pageX),function(){u&&function(){var e=h.length-1;return"startX"===r&&(i>o?v%p===0:x%p===0)||i<o&&x===e||"endX"===r&&(i>o?x%p===0:v%p===0)||i>o&&x===e}()&&u(g)})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,i=r.scaleValues,o=r.startX,a=r.endX,s=this.state[t],l=i.indexOf(s);if(-1!==l){var c=l+e;if(!(-1===c||c>=i.length)){var d=i[c];"startX"===t&&d>=a||"endX"===t&&d<=o||this.setState(Mne({},t,d),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,o=e.fill,a=e.stroke;return We.createElement("rect",{stroke:a,fill:o,x:t,y:n,width:r,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,o=e.data,a=e.children,s=e.padding,l=We.Children.only(a);return l?We.cloneElement(l,{x:t,y:n,width:r,height:i,margin:s,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(e,n){var r,i,o=this,a=this.props,s=a.y,l=a.travellerWidth,c=a.height,d=a.traveller,u=a.ariaLabel,p=a.data,h=a.startIndex,m=a.endIndex,f=Math.max(e,this.props.x),g=wne(wne({},F1(this.props,!1)),{},{x:f,y:s,width:l,height:c}),v=u||"Min value: ".concat(null===(r=p[h])||void 0===r?void 0:r.name,", Max value: ").concat(null===(i=p[m])||void 0===i?void 0:i.name);return We.createElement(b2,{tabIndex:0,role:"slider","aria-label":v,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),o.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,n))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,g))}},{key:"renderSlide",value:function(e,t){var n=this.props,r=n.y,i=n.height,o=n.stroke,a=n.travellerWidth,s=Math.min(e,t)+a,l=Math.max(Math.abs(t-e)-a,0);return We.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:o,fillOpacity:.2,x:s,y:r,width:l,height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,i=e.height,o=e.travellerWidth,a=e.stroke,s=this.state,l=s.startX,c=s.endX,d={pointerEvents:"none",fill:a};return We.createElement(b2,{className:"recharts-brush-texts"},We.createElement(D6,bne({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,c)-5,y:r+i/2},d),this.getTextOfTick(t)),We.createElement(D6,bne({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,c)+o+5,y:r+i/2},d),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,i=e.x,o=e.y,a=e.width,s=e.height,l=e.alwaysShowText,c=this.state,d=c.startX,u=c.endX,p=c.isTextActive,h=c.isSlideMoving,m=c.isTravellerMoving,f=c.isTravellerFocused;if(!t||!t.length||!s1(i)||!s1(o)||!s1(a)||!s1(s)||a<=0||s<=0)return null;var g=vJ("recharts-brush",n),v=1===We.Children.count(r),x=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=xne.reduce(function(e,r){return gne(gne({},e),{},vne({},r+n,t))},{});return r[e]=t,r}("userSelect","none");return We.createElement(b2,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:x},this.renderBackground(),v&&this.renderPanorama(),this.renderSlide(d,u),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(u,"endX"),(p||h||m||f||l)&&this.renderText())}}],i=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=e.stroke,a=Math.floor(n+i/2)-1;return We.createElement(We.Fragment,null,We.createElement("rect",{x:t,y:n,width:r,height:i,fill:o,stroke:"none"}),We.createElement("line",{x1:t+1,y1:a,x2:t+r-1,y2:a,fill:"none",stroke:"#fff"}),We.createElement("line",{x1:t+1,y1:a+2,x2:t+r-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,n){return We.isValidElement(e)?We.cloneElement(e,n):X0()(e)?e(n):t.renderDefaultTraveller(n)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,i=e.x,o=e.travellerWidth,a=e.updateId,s=e.startIndex,l=e.endIndex;if(n!==t.prevData||a!==t.prevUpdateId)return wne({prevData:n,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,i=e.x,o=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,l=K3().domain(uS()(0,s)).range([i,i+o-a]),c=l.domain().map(function(e){return l(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(r),scale:l,scaleValues:c}}({data:n,width:r,x:i,travellerWidth:o,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||i!==t.prevX||o!==t.prevTravellerWidth)){t.scale.range([i,i+r-o]);var c=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var i=Math.floor((n+r)/2);e[i]>t?r=i:n=i}return t>=e[r]?r:n}}],r&&_ne(n.prototype,r),i&&_ne(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function Pne(e){return Pne="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},Pne(e)}function Dne(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 Rne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dne(Object(n),!0).forEach(function(t){Nne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dne(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nne(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Pne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pne(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Ine(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ine(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ine(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}Mne(Ene,"displayName","Brush"),Mne(Ene,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Fne=Math.PI/180,$ne=function(e){return 180*e/Math.PI},Bne=function(e,t,n,r){return{x:e+Math.cos(-Fne*r)*n,y:t+Math.sin(-Fne*r)*n}},zne=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},Hne=function(e,t){var n=e.x,r=e.y,i=t.cx,o=t.cy,a=function(e,t){var n=e.x,r=e.y,i=t.x,o=t.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(r-o,2))}({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:$ne(l),angleInRadian:l}},Wne=function(e,t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360);return e+360*Math.min(i,o)},Vne=function(e,t){var n=e.x,r=e.y,i=Hne({x:n,y:r},t),o=i.radius,a=i.angle,s=t.innerRadius,l=t.outerRadius;if(o<s||o>l)return!1;if(0===o)return!0;var c,d=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-360*o,endAngle:n-360*o}}(t),u=d.startAngle,p=d.endAngle,h=a;if(u<=p){for(;h>p;)h-=360;for(;h<u;)h+=360;c=h>=u&&h<=p}else{for(;h>u;)h-=360;for(;h<p;)h+=360;c=h>=p&&h<=u}return c?Rne(Rne({},t),{},{radius:o,angle:Wne(h,t)}):null},Une=function(e){return(0,We.isValidElement)(e)||X0()(e)||"boolean"===typeof e?"":e.className};function qne(e){return qne="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},qne(e)}var Gne=["offset"];function Yne(e){return function(e){if(Array.isArray(e))return Zne(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)return;if("string"===typeof e)return Zne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zne(e,t)}(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 Zne(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 Kne(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xne(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 Qne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xne(Object(n),!0).forEach(function(t){Jne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xne(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jne(e,t,n){return t=function(e){var t=function(e,t){if("object"!=qne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qne(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ere(){return ere=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},ere.apply(this,arguments)}var tre=function(e,t,n){var r,i,o=e.position,a=e.viewBox,s=e.offset,l=e.className,c=a,d=c.cx,u=c.cy,p=c.innerRadius,h=c.outerRadius,m=c.startAngle,f=c.endAngle,g=c.clockWise,v=(p+h)/2,x=function(e,t){return o1(t-e)*Math.min(Math.abs(t-e),360)}(m,f),y=x>=0?1:-1;"insideStart"===o?(r=m+y*s,i=g):"insideEnd"===o?(r=f-y*s,i=!g):"end"===o&&(r=f+y*s,i=g),i=x<=0?i:!i;var b=Bne(d,u,v,r),j=Bne(d,u,v,r+359*(i?1:-1)),w="M".concat(b.x,",").concat(b.y,"\n    A").concat(v,",").concat(v,",0,1,").concat(i?0:1,",\n    ").concat(j.x,",").concat(j.y),_=G0()(e.id)?d1("recharts-radial-line-"):e.id;return We.createElement("text",ere({},n,{dominantBaseline:"central",className:vJ("recharts-radial-bar-label",l)}),We.createElement("defs",null,We.createElement("path",{id:_,d:w})),We.createElement("textPath",{xlinkHref:"#".concat(_)},t))};function nre(e){var t,n=e.offset,r=Qne({offset:void 0===n?5:n},Kne(e,Gne)),i=r.viewBox,o=r.position,a=r.value,s=r.children,l=r.content,c=r.className,d=void 0===c?"":c,u=r.textBreakAll;if(!i||G0()(a)&&G0()(s)&&!(0,We.isValidElement)(l)&&!X0()(l))return null;if((0,We.isValidElement)(l))return(0,We.cloneElement)(l,r);if(X0()(l)){if(t=(0,We.createElement)(l,r),(0,We.isValidElement)(t))return t}else t=function(e){var t=e.value,n=e.formatter,r=G0()(e.children)?t:e.children;return X0()(n)?n(r):r}(r);var p=function(e){return"cx"in e&&s1(e.cx)}(i),h=F1(r,!0);if(p&&("insideStart"===o||"insideEnd"===o||"end"===o))return tre(r,t,h);var m=p?function(e){var t=e.viewBox,n=e.offset,r=e.position,i=t,o=i.cx,a=i.cy,s=i.innerRadius,l=i.outerRadius,c=(i.startAngle+i.endAngle)/2;if("outside"===r){var d=Bne(o,a,l+n,c),u=d.x;return{x:u,y:d.y,textAnchor:u>=o?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:o,y:a,textAnchor:"middle",verticalAnchor:"end"};var p=Bne(o,a,(s+l)/2,c);return{x:p.x,y:p.y,textAnchor:"middle",verticalAnchor:"middle"}}(r):function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,i=e.position,o=t,a=o.x,s=o.y,l=o.width,c=o.height,d=c>=0?1:-1,u=d*r,p=d>0?"end":"start",h=d>0?"start":"end",m=l>=0?1:-1,f=m*r,g=m>0?"end":"start",v=m>0?"start":"end";if("top"===i)return Qne(Qne({},{x:a+l/2,y:s-d*r,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(s-n.y,0),width:l}:{});if("bottom"===i)return Qne(Qne({},{x:a+l/2,y:s+c+u,textAnchor:"middle",verticalAnchor:h}),n?{height:Math.max(n.y+n.height-(s+c),0),width:l}:{});if("left"===i){var x={x:a-f,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return Qne(Qne({},x),n?{width:Math.max(x.x-n.x,0),height:c}:{})}if("right"===i){var y={x:a+l+f,y:s+c/2,textAnchor:v,verticalAnchor:"middle"};return Qne(Qne({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:c}:{})}var b=n?{width:l,height:c}:{};return"insideLeft"===i?Qne({x:a+f,y:s+c/2,textAnchor:v,verticalAnchor:"middle"},b):"insideRight"===i?Qne({x:a+l-f,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},b):"insideTop"===i?Qne({x:a+l/2,y:s+u,textAnchor:"middle",verticalAnchor:h},b):"insideBottom"===i?Qne({x:a+l/2,y:s+c-u,textAnchor:"middle",verticalAnchor:p},b):"insideTopLeft"===i?Qne({x:a+f,y:s+u,textAnchor:v,verticalAnchor:h},b):"insideTopRight"===i?Qne({x:a+l-f,y:s+u,textAnchor:g,verticalAnchor:h},b):"insideBottomLeft"===i?Qne({x:a+f,y:s+c-u,textAnchor:v,verticalAnchor:p},b):"insideBottomRight"===i?Qne({x:a+l-f,y:s+c-u,textAnchor:g,verticalAnchor:p},b):J0()(i)&&(s1(i.x)||a1(i.x))&&(s1(i.y)||a1(i.y))?Qne({x:a+u1(i.x,l),y:s+u1(i.y,c),textAnchor:"end",verticalAnchor:"end"},b):Qne({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},b)}(r);return We.createElement(D6,ere({className:vJ("recharts-label",d)},h,m,{breakAll:u}),t)}nre.displayName="Label";var rre=function(e){var t=e.cx,n=e.cy,r=e.angle,i=e.startAngle,o=e.endAngle,a=e.r,s=e.radius,l=e.innerRadius,c=e.outerRadius,d=e.x,u=e.y,p=e.top,h=e.left,m=e.width,f=e.height,g=e.clockWise,v=e.labelViewBox;if(v)return v;if(s1(m)&&s1(f)){if(s1(d)&&s1(u))return{x:d,y:u,width:m,height:f};if(s1(p)&&s1(h))return{x:p,y:h,width:m,height:f}}return s1(d)&&s1(u)?{x:d,y:u,width:0,height:0}:s1(t)&&s1(n)?{cx:t,cy:n,startAngle:i||r||0,endAngle:o||r||0,innerRadius:l||0,outerRadius:c||s||a||0,clockWise:g}:e.viewBox?e.viewBox:{}};nre.parseViewBox=rre,nre.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=rre(e),o=D1(r,nre).map(function(e,n){return(0,We.cloneElement)(e,{viewBox:t||i,key:"label-".concat(n)})});if(!n)return o;var a=function(e,t){return e?!0===e?We.createElement(nre,{key:"label-implicit",viewBox:t}):l1(e)?We.createElement(nre,{key:"label-implicit",viewBox:t,value:e}):(0,We.isValidElement)(e)?e.type===nre?(0,We.cloneElement)(e,{key:"label-implicit",viewBox:t}):We.createElement(nre,{key:"label-implicit",content:e,viewBox:t}):X0()(e)?We.createElement(nre,{key:"label-implicit",content:e,viewBox:t}):J0()(e)?We.createElement(nre,ere({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||i);return[a].concat(Yne(o))};var ire=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},ore=n(17002),are=n.n(ore),sre=function(e){return null};sre.displayName="Cell";var lre=n(74065),cre=n.n(lre);function dre(e){return dre="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},dre(e)}var ure=["valueAccessor"],pre=["data","dataKey","clockWise","id","textBreakAll"];function hre(e){return function(e){if(Array.isArray(e))return mre(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)return;if("string"===typeof e)return mre(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mre(e,t)}(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 mre(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 fre(){return fre=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},fre.apply(this,arguments)}function gre(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 vre(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gre(Object(n),!0).forEach(function(t){xre(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gre(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xre(e,t,n){return t=function(e){var t=function(e,t){if("object"!=dre(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=dre(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dre(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yre(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var bre=function(e){return Array.isArray(e.value)?cre()(e.value):e.value};function jre(e){var t=e.valueAccessor,n=void 0===t?bre:t,r=yre(e,ure),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=yre(r,pre);return i&&i.length?We.createElement(b2,{className:"recharts-label-list"},i.map(function(e,t){var r=G0()(o)?n(e,t):Wte(e&&e.payload,o),i=G0()(s)?{}:{id:"".concat(s,"-").concat(t)};return We.createElement(nre,fre({},F1(e,!0),c,i,{parentViewBox:e.parentViewBox,value:r,textBreakAll:l,viewBox:nre.parseViewBox(G0()(a)?e:vre(vre({},e),{},{clockWise:a})),key:"label-".concat(t),index:t}))})):null}jre.displayName="LabelList",jre.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=D1(e.children,jre).map(function(e,n){return(0,We.cloneElement)(e,{data:t,key:"labelList-".concat(n)})});if(!n)return r;var i=function(e,t){return e?!0===e?We.createElement(jre,{key:"labelList-implicit",data:t}):We.isValidElement(e)||X0()(e)?We.createElement(jre,{key:"labelList-implicit",data:t,content:e}):J0()(e)?We.createElement(jre,fre({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t);return[i].concat(hre(r))};var wre=n(12322),_re=n.n(wre),Cre=n(96361),Sre=n.n(Cre);function Are(e){return Are="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},Are(e)}function kre(){return kre=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},kre.apply(this,arguments)}function Mre(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Ore(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ore(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ore(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 Tre(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 Ere(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tre(Object(n),!0).forEach(function(t){Pre(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tre(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pre(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Are(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Are(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Are(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dre=function(e,t,n,r,i){var o,a=n-r;return o="M ".concat(e,",").concat(t),o+="L ".concat(e+n,",").concat(t),o+="L ".concat(e+n-a/2,",").concat(t+i),o+="L ".concat(e+n-a/2-r,",").concat(t+i),o+="L ".concat(e,",").concat(t," Z")},Rre={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Nre=function(e){var t=Ere(Ere({},Rre),e),n=(0,We.useRef)(),r=Mre((0,We.useState)(-1),2),i=r[0],o=r[1];(0,We.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&o(e)}catch(t){}},[]);var a=t.x,s=t.y,l=t.upperWidth,c=t.lowerWidth,d=t.height,u=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,f=t.isUpdateAnimationActive;if(a!==+a||s!==+s||l!==+l||c!==+c||d!==+d||0===l&&0===c||0===d)return null;var g=vJ("recharts-trapezoid",u);return f?We.createElement(U0,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:d,x:a,y:s},to:{upperWidth:l,lowerWidth:c,height:d,x:a,y:s},duration:h,animationEasing:p,isActive:f},function(e){var r=e.upperWidth,o=e.lowerWidth,a=e.height,s=e.x,l=e.y;return We.createElement(U0,{canBegin:i>0,from:"0px ".concat(-1===i?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,easing:p},We.createElement("path",kre({},F1(t,!0),{className:g,d:Dre(s,l,r,o,a),ref:n})))}):We.createElement("g",null,We.createElement("path",kre({},F1(t,!0),{className:g,d:Dre(a,s,l,c,d)})))};function Lre(e){return Lre="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},Lre(e)}function Ire(){return Ire=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},Ire.apply(this,arguments)}function Fre(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fre(Object(n),!0).forEach(function(t){Bre(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fre(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bre(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Lre(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Lre(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Lre(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zre=function(e){var t=e.cx,n=e.cy,r=e.radius,i=e.angle,o=e.sign,a=e.isExternal,s=e.cornerRadius,l=e.cornerIsExternal,c=s*(a?1:-1)+r,d=Math.asin(s/c)/Fne,u=l?i:i+o*d,p=l?i-o*d:i;return{center:Bne(t,n,c,u),circleTangency:Bne(t,n,r,u),lineTangency:Bne(t,n,c*Math.cos(d*Fne),p),theta:d}},Hre=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,o=e.startAngle,a=function(e,t){return o1(t-e)*Math.min(Math.abs(t-e),359.999)}(o,e.endAngle),s=o+a,l=Bne(t,n,i,o),c=Bne(t,n,i,s),d="M ".concat(l.x,",").concat(l.y,"\n    A ").concat(i,",").concat(i,",0,\n    ").concat(+(Math.abs(a)>180),",").concat(+(o>s),",\n    ").concat(c.x,",").concat(c.y,"\n  ");if(r>0){var u=Bne(t,n,r,o),p=Bne(t,n,r,s);d+="L ".concat(p.x,",").concat(p.y,"\n            A ").concat(r,",").concat(r,",0,\n            ").concat(+(Math.abs(a)>180),",").concat(+(o<=s),",\n            ").concat(u.x,",").concat(u.y," Z")}else d+="L ".concat(t,",").concat(n," Z");return d},Wre={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Vre=function(e){var t=$re($re({},Wre),e),n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,d=t.endAngle,u=t.className;if(o<i||c===d)return null;var p,h=vJ("recharts-sector",u),m=o-i,f=u1(a,m,0,!0);return p=f>0&&Math.abs(c-d)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,d=o1(c-l),u=zre({cx:t,cy:n,radius:i,angle:l,sign:d,cornerRadius:o,cornerIsExternal:s}),p=u.circleTangency,h=u.lineTangency,m=u.theta,f=zre({cx:t,cy:n,radius:i,angle:c,sign:-d,cornerRadius:o,cornerIsExternal:s}),g=f.circleTangency,v=f.lineTangency,x=f.theta,y=s?Math.abs(l-c):Math.abs(l-c)-m-x;if(y<0)return a?"M ".concat(h.x,",").concat(h.y,"\n        a").concat(o,",").concat(o,",0,0,1,").concat(2*o,",0\n        a").concat(o,",").concat(o,",0,0,1,").concat(2*-o,",0\n      "):Hre({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:c});var b="M ".concat(h.x,",").concat(h.y,"\n    A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,"\n    A").concat(i,",").concat(i,",0,").concat(+(y>180),",").concat(+(d<0),",").concat(g.x,",").concat(g.y,"\n    A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,"\n  ");if(r>0){var j=zre({cx:t,cy:n,radius:r,angle:l,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),w=j.circleTangency,_=j.lineTangency,C=j.theta,S=zre({cx:t,cy:n,radius:r,angle:c,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),A=S.circleTangency,k=S.lineTangency,M=S.theta,O=s?Math.abs(l-c):Math.abs(l-c)-C-M;if(O<0&&0===o)return"".concat(b,"L").concat(t,",").concat(n,"Z");b+="L".concat(k.x,",").concat(k.y,"\n      A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,"\n      A").concat(r,",").concat(r,",0,").concat(+(O>180),",").concat(+(d>0),",").concat(w.x,",").concat(w.y,"\n      A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(_.x,",").concat(_.y,"Z")}else b+="L".concat(t,",").concat(n,"Z");return b}({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(f,m/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:d}):Hre({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:d}),We.createElement("path",Ire({},F1(t,!0),{className:h,d:p,role:"img"}))},Ure=["option","shapeType","propTransformer","activeClassName","isActive"];function qre(e){return qre="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},qre(e)}function Gre(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yre(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 Zre(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yre(Object(n),!0).forEach(function(t){Kre(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yre(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kre(e,t,n){return t=function(e){var t=function(e,t){if("object"!=qre(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qre(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qre(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xre(e,t){return Zre(Zre({},t),e)}function Qre(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return We.createElement(Q1,n);case"trapezoid":return We.createElement(Nre,n);case"sector":return We.createElement(Vre,n);case"symbols":if(function(e){return"symbols"===e}(t))return We.createElement(d3,n);break;default:return null}}function Jre(e){var t,n=e.option,r=e.shapeType,i=e.propTransformer,o=void 0===i?Xre:i,a=e.activeClassName,s=void 0===a?"recharts-active-shape":a,l=e.isActive,c=Gre(e,Ure);if((0,We.isValidElement)(n))t=(0,We.cloneElement)(n,Zre(Zre({},c),function(e){return(0,We.isValidElement)(e)?e.props:e}(n)));else if(X0()(n))t=n(c);else if(_re()(n)&&!Sre()(n)){var d=o(n,c);t=We.createElement(Qre,{shapeType:r,elementProps:d})}else{var u=c;t=We.createElement(Qre,{shapeType:r,elementProps:u})}return l?We.createElement(b2,{className:s},t):t}function eie(e,t){return null!=t&&"trapezoids"in e.props}function tie(e,t){return null!=t&&"sectors"in e.props}function nie(e,t){return null!=t&&"points"in e.props}function rie(e,t){var n,r,i=e.x===(null===t||void 0===t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,o=e.y===(null===t||void 0===t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return i&&o}function iie(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function oie(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function aie(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=function(e,t){var n;return eie(e,t)?n="trapezoids":tie(e,t)?n="sectors":nie(e,t)&&(n="points"),n}(n,t),o=function(e,t){var n,r;return eie(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:tie(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:nie(e,t)?t.payload:{}}(n,t),a=r.filter(function(e,r){var a=Hee()(o,e),s=n.props[i].filter(function(e){var r=function(e,t){var n;return eie(e,t)?n=rie:tie(e,t)?n=iie:nie(e,t)&&(n=oie),n}(n,t);return r(e,t)}),l=n.props[i].indexOf(s[s.length-1]);return a&&r===l});return r.indexOf(a[a.length-1])}var sie=["x","y"];function lie(e){return lie="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},lie(e)}function cie(){return cie=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},cie.apply(this,arguments)}function die(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 uie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?die(Object(n),!0).forEach(function(t){pie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):die(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pie(e,t,n){return t=function(e){var t=function(e,t){if("object"!=lie(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lie(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hie(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mie(e,t){var n=e.x,r=e.y,i=hie(e,sie),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),d=parseInt(c,10),u="".concat(t.width||i.width),p=parseInt(u,10);return uie(uie(uie(uie(uie({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:d,width:p,name:t.name,radius:t.radius})}function fie(e){return We.createElement(Jre,cie({shapeType:"rectangle",propTransformer:mie,activeClassName:"recharts-active-bar"},e))}var gie,vie=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n,r){if("number"===typeof e)return e;var i=s1(n)||function(e){return G0()(e)}(n);return i?e(n,r):(i||p2(!1),t)}},xie=["value","background"];function yie(e){return yie="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},yie(e)}function bie(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jie(){return jie=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},jie.apply(this,arguments)}function wie(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 _ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wie(Object(n),!0).forEach(function(t){Oie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cie(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,Tie(r.key),r)}}function Sie(e,t,n){return t=kie(t),function(e,t){if(t&&("object"===yie(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Aie()?Reflect.construct(t,n||[],kie(e).constructor):t.apply(e,n))}function Aie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Aie=function(){return!!e})()}function kie(e){return kie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kie(e)}function Mie(e,t){return Mie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mie(e,t)}function Oie(e,t,n){return(t=Tie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tie(e){var t=function(e,t){if("object"!=yie(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=yie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yie(t)?t:t+""}var Eie=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Oie(e=Sie(this,t,[].concat(r)),"state",{isAnimationFinished:!1}),Oie(e,"id",d1("recharts-bar-")),Oie(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),Oie(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mie(e,t)}(t,e),n=t,r=[{key:"renderRectanglesStatically",value:function(e){var t=this,n=this.props,r=n.shape,i=n.dataKey,o=n.activeIndex,a=n.activeBar,s=F1(this.props,!1);return e&&e.map(function(e,n){var l=n===o,c=l?a:r,d=_ie(_ie(_ie({},s),e),{},{isActive:l,option:c,index:n,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return We.createElement(b2,jie({className:"recharts-bar-rectangle"},_1(t.props,e,n),{key:"rectangle-".concat(null===e||void 0===e?void 0:e.x,"-").concat(null===e||void 0===e?void 0:e.y,"-").concat(null===e||void 0===e?void 0:e.value,"-").concat(n)}),We.createElement(fie,d))})}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,n=t.data,r=t.layout,i=t.isAnimationActive,o=t.animationBegin,a=t.animationDuration,s=t.animationEasing,l=t.animationId,c=this.state.prevData;return We.createElement(U0,{begin:o,duration:a,isActive:i,easing:s,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,o=n.map(function(e,t){var n=c&&c[t];if(n){var o=h1(n.x,e.x),a=h1(n.y,e.y),s=h1(n.width,e.width),l=h1(n.height,e.height);return _ie(_ie({},e),{},{x:o(i),y:a(i),width:s(i),height:l(i)})}if("horizontal"===r){var d=h1(0,e.height)(i);return _ie(_ie({},e),{},{y:e.y+e.height-d,height:d})}var u=h1(0,e.width)(i);return _ie(_ie({},e),{},{width:u})});return We.createElement(b2,null,e.renderRectanglesStatically(o))})}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&Hee()(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,i=t.activeIndex,o=F1(this.props.background,!1);return n.map(function(t,n){t.value;var a=t.background,s=bie(t,xie);if(!a)return null;var l=_ie(_ie(_ie(_ie(_ie({},s),{},{fill:"#eee"},a),o),_1(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:"recharts-bar-background-rectangle"});return We.createElement(fie,jie({key:"background-bar-".concat(n),option:e.props.background,isActive:n===i},l))})}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,i=n.xAxis,o=n.yAxis,a=n.layout,s=D1(n.children,Ete);if(!s)return null;var l="vertical"===a?r[0].height/2:r[0].width/2,c=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Wte(e,t)}},d={clipPath:e?"url(#clipPath-".concat(t,")"):null};return We.createElement(b2,d,s.map(function(e){return We.cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:r,xAxis:i,yAxis:o,layout:a,offset:l,dataPointFormatter:c})}))}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,i=e.xAxis,o=e.yAxis,a=e.left,s=e.top,l=e.width,c=e.height,d=e.isAnimationActive,u=e.background,p=e.id;if(t||!n||!n.length)return null;var h=this.state.isAnimationFinished,m=vJ("recharts-bar",r),f=i&&i.allowDataOverflow,g=o&&o.allowDataOverflow,v=f||g,x=G0()(p)?this.id:p;return We.createElement(b2,{className:m},f||g?We.createElement("defs",null,We.createElement("clipPath",{id:"clipPath-".concat(x)},We.createElement("rect",{x:f?a:a-l/2,y:g?s:s-c/2,width:f?l:2*l,height:g?c:2*c}))):null,We.createElement(b2,{className:"recharts-bar-rectangles",clipPath:v?"url(#clipPath-".concat(x,")"):null},u?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(v,x),(!d||h)&&jre.renderCallByParent(this.props,n))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],r&&Cie(n.prototype,r),i&&Cie(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function Pie(e){return Pie="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},Pie(e)}function Die(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,Iie(r.key),r)}}function Rie(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 Nie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rie(Object(n),!0).forEach(function(t){Lie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lie(e,t,n){return(t=Iie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iie(e){var t=function(e,t){if("object"!=Pie(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pie(t)?t:t+""}gie=Eie,Oie(Eie,"displayName","Bar"),Oie(Eie,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!G2.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Oie(Eie,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,o=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,d=e.dataStartIndex,u=e.displayedData,p=e.offset,h=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null}(r,n);if(!h)return null;var m=t.layout,f=n.type.defaultProps,g=void 0!==f?_ie(_ie({},f),n.props):n.props,v=g.dataKey,x=g.children,y=g.minPointSize,b="horizontal"===m?a:o,j=c?b.scale.domain():null,w=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]}({numericAxis:b}),_=D1(x,sre),C=u.map(function(e,t){var r,u,p,f,g,x;c?r=function(e,t){if(!t||2!==t.length||!s1(t[0])||!s1(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!s1(e[0])||e[0]<n)&&(i[0]=n),(!s1(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i}(c[d+t],j):(r=Wte(e,v),Array.isArray(r)||(r=[w,r]));var b=vie(y,gie.defaultProps.minPointSize)(r[1],t);if("horizontal"===m){var C,S=[a.scale(r[0]),a.scale(r[1])],A=S[0],k=S[1];u=ane({axis:o,ticks:s,bandSize:i,offset:h.offset,entry:e,index:t}),p=null!==(C=null!==k&&void 0!==k?k:A)&&void 0!==C?C:void 0,f=h.size;var M=A-k;if(g=Number.isNaN(M)?0:M,x={x:u,y:a.y,width:f,height:a.height},Math.abs(b)>0&&Math.abs(g)<Math.abs(b)){var O=o1(g||b)*(Math.abs(b)-Math.abs(g));p-=O,g+=O}}else{var T=[o.scale(r[0]),o.scale(r[1])],E=T[0],P=T[1];if(u=E,p=ane({axis:a,ticks:l,bandSize:i,offset:h.offset,entry:e,index:t}),f=P-E,g=h.size,x={x:o.x,y:p,width:o.width,height:g},Math.abs(b)>0&&Math.abs(f)<Math.abs(b))f+=o1(f||b)*(Math.abs(b)-Math.abs(f))}return _ie(_ie(_ie({},e),{},{x:u,y:p,width:f,height:g,value:c?r:r[1],payload:e,background:x},_&&_[t]&&_[t].props),{},{tooltipPayload:[hne(n,e)],tooltipPosition:{x:u+f/2,y:p+g/2}})});return _ie({data:C,layout:m},p)});var Fie=function(e,t,n,r,i){var o=e.width,a=e.height,s=e.layout,l=e.children,c=Object.keys(t),d={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:a-n.bottom,bottomMirror:a-n.bottom},u=!!R1(l,Eie);return c.reduce(function(o,a){var l,c,p,h,m,f=t[a],g=f.orientation,v=f.domain,x=f.padding,y=void 0===x?{}:x,b=f.mirror,j=f.reversed,w="".concat(g).concat(b?"Mirror":"");if("number"===f.type&&("gap"===f.padding||"no-gap"===f.padding)){var _=v[1]-v[0],C=1/0,S=f.categoricalDomain.sort(f1);if(S.forEach(function(e,t){t>0&&(C=Math.min((e||0)-(S[t-1]||0),C))}),Number.isFinite(C)){var A=C/_,k="vertical"===f.layout?n.height:n.width;if("gap"===f.padding&&(l=A*k/2),"no-gap"===f.padding){var M=u1(e.barCategoryGap,A*k),O=A*k/2;l=O-M-(O-M)/k*M}}}c="xAxis"===r?[n.left+(y.left||0)+(l||0),n.left+n.width-(y.right||0)-(l||0)]:"yAxis"===r?"horizontal"===s?[n.top+n.height-(y.bottom||0),n.top+(y.top||0)]:[n.top+(y.top||0)+(l||0),n.top+n.height-(y.bottom||0)-(l||0)]:f.range,j&&(c=[c[1],c[0]]);var T=Jte(f,i,u),E=T.scale,P=T.realScaleType;E.domain(v).range(c),tne(E);var D=ine(E,Nie(Nie({},f),{},{realScaleType:P}));"xAxis"===r?(m="top"===g&&!b||"bottom"===g&&b,p=n.left,h=d[w]-m*f.height):"yAxis"===r&&(m="left"===g&&!b||"right"===g&&b,p=d[w]-m*f.width,h=n.top);var R=Nie(Nie(Nie({},f),D),{},{realScaleType:P,x:p,y:h,scale:E,width:"xAxis"===r?n.width:f.width,height:"yAxis"===r?n.height:f.height});return R.bandSize=une(R,D),f.hide||"xAxis"!==r?f.hide||(d[w]+=(m?-1:1)*R.width):d[w]+=(m?-1:1)*R.height,Nie(Nie({},o),{},Lie({},a,R))},{})},$ie=function(e,t){var n=e.x,r=e.y,i=t.x,o=t.y;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}},Bie=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}return t=e,n=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case"end":var o=this.bandwidth?this.bandwidth():0;return this.scale(e)+o}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],r=[{key:"create",value:function(t){return new e(t)}}],n&&Die(t.prototype,n),r&&Die(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();Lie(Bie,"EPS",1e-4);var zie=function(e){var t=Object.keys(e).reduce(function(t,n){return Nie(Nie({},t),{},Lie({},n,Bie.create(e[n])))},{});return Nie(Nie({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,i=n.position;return gW()(e,function(e,n){return t[n].apply(e,{bandAware:r,position:i})})},isInRange:function(e){return are()(e,function(e,n){return t[n].isInRange(e)})}})};function Hie(){return Hie=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},Hie.apply(this,arguments)}function Wie(e){return Wie="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},Wie(e)}function Vie(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 Uie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vie(Object(n),!0).forEach(function(t){Xie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qie(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,Qie(r.key),r)}}function Gie(e,t,n){return t=Zie(t),function(e,t){if(t&&("object"===Wie(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yie()?Reflect.construct(t,n||[],Zie(e).constructor):t.apply(e,n))}function Yie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yie=function(){return!!e})()}function Zie(e){return Zie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zie(e)}function Kie(e,t){return Kie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kie(e,t)}function Xie(e,t,n){return(t=Qie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qie(e){var t=function(e,t){if("object"!=Wie(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Wie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wie(t)?t:t+""}var Jie=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gie(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kie(e,t)}(t,e),n=t,r=[{key:"render",value:function(){var e=this.props,n=e.x,r=e.y,i=e.r,o=e.alwaysShow,a=e.clipPathId,s=l1(n),l=l1(r);if(t2(void 0===o,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!s||!l)return null;var c=function(e){var t=e.x,n=e.y,r=e.xAxis,i=e.yAxis,o=zie({x:r.scale,y:i.scale}),a=o.apply({x:t,y:n},{bandAware:!0});return ire(e,"discard")&&!o.isInRange(a)?null:a}(this.props);if(!c)return null;var d=c.x,u=c.y,p=this.props,h=p.shape,m=p.className,f=Uie(Uie({clipPath:ire(this.props,"hidden")?"url(#".concat(a,")"):void 0},F1(this.props,!0)),{},{cx:d,cy:u});return We.createElement(b2,{className:vJ("recharts-reference-dot",m)},t.renderDot(h,f),nre.renderCallByParent(this.props,{x:d-i,y:u-i,width:2*i,height:2*i}))}}],r&&qie(n.prototype,r),i&&qie(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);Xie(Jie,"displayName","ReferenceDot"),Xie(Jie,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),Xie(Jie,"renderDot",function(e,t){return We.isValidElement(e)?We.cloneElement(e,t):X0()(e)?e(t):We.createElement(F3,Hie({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))});var eoe=n(24597),toe=n.n(eoe),noe=n(98990),roe=n.n(noe),ioe=n(15797),ooe=n.n(ioe)()(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});var aoe=(0,We.createContext)(void 0),soe=(0,We.createContext)(void 0),loe=(0,We.createContext)(void 0),coe=(0,We.createContext)({}),doe=(0,We.createContext)(void 0),uoe=(0,We.createContext)(0),poe=(0,We.createContext)(0),hoe=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,i=t.offset,o=e.clipPathId,a=e.children,s=e.width,l=e.height,c=ooe(i);return We.createElement(aoe.Provider,{value:n},We.createElement(soe.Provider,{value:r},We.createElement(coe.Provider,{value:i},We.createElement(loe.Provider,{value:c},We.createElement(doe.Provider,{value:o},We.createElement(uoe.Provider,{value:l},We.createElement(poe.Provider,{value:s},a)))))))};var moe=function(e){var t=(0,We.useContext)(aoe);null==t&&p2(!1);var n=t[e];return null==n&&p2(!1),n},foe=function(e){var t=(0,We.useContext)(soe);null==t&&p2(!1);var n=t[e];return null==n&&p2(!1),n},goe=function(){return(0,We.useContext)(poe)},voe=function(){return(0,We.useContext)(uoe)};function xoe(e){return xoe="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},xoe(e)}function yoe(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,koe(r.key),r)}}function boe(e,t,n){return t=woe(t),function(e,t){if(t&&("object"===xoe(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,joe()?Reflect.construct(t,n||[],woe(e).constructor):t.apply(e,n))}function joe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(joe=function(){return!!e})()}function woe(e){return woe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},woe(e)}function _oe(e,t){return _oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_oe(e,t)}function Coe(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 Soe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Coe(Object(n),!0).forEach(function(t){Aoe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Coe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Aoe(e,t,n){return(t=koe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function koe(e){var t=function(e,t){if("object"!=xoe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xoe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xoe(t)?t:t+""}function Moe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Ooe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ooe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ooe(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 Toe(){return Toe=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},Toe.apply(this,arguments)}function Eoe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,a=e.shape,s=e.className,l=e.alwaysShow,c=(0,We.useContext)(doe),d=moe(i),u=foe(o),p=(0,We.useContext)(loe);if(!c||!p)return null;t2(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=function(e,t,n,r,i,o,a,s,l){var c=i.x,d=i.y,u=i.width,p=i.height;if(n){var h=l.y,m=e.y.apply(h,{position:o});if(ire(l,"discard")&&!e.y.isInRange(m))return null;var f=[{x:c+u,y:m},{x:c,y:m}];return"left"===s?f.reverse():f}if(t){var g=l.x,v=e.x.apply(g,{position:o});if(ire(l,"discard")&&!e.x.isInRange(v))return null;var x=[{x:v,y:d+p},{x:v,y:d}];return"top"===a?x.reverse():x}if(r){var y=l.segment.map(function(t){return e.apply(t,{position:o})});return ire(l,"discard")&&toe()(y,function(t){return!e.isInRange(t)})?null:y}return null}(zie({x:d.scale,y:u.scale}),l1(t),l1(n),r&&2===r.length,p,e.position,d.orientation,u.orientation,e);if(!h)return null;var m=Moe(h,2),f=m[0],g=f.x,v=f.y,x=m[1],y=x.x,b=x.y,j=Soe(Soe({clipPath:ire(e,"hidden")?"url(#".concat(c,")"):void 0},F1(e,!0)),{},{x1:g,y1:v,x2:y,y2:b});return We.createElement(b2,{className:vJ("recharts-reference-line",s)},function(e,t){return We.isValidElement(e)?We.cloneElement(e,t):X0()(e)?e(t):We.createElement("line",Toe({},t,{className:"recharts-reference-line-line"}))}(a,j),nre.renderCallByParent(e,function(e){var t=e.x1,n=e.y1,r=e.x2,i=e.y2;return $ie({x:t,y:n},{x:r,y:i})}({x1:g,y1:v,x2:y,y2:b})))}var Poe=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),boe(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_oe(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return We.createElement(Eoe,this.props)}}])&&yoe(n.prototype,r),i&&yoe(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function Doe(){return Doe=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},Doe.apply(this,arguments)}function Roe(e){return Roe="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},Roe(e)}function Noe(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 Loe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Noe(Object(n),!0).forEach(function(t){Hoe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Noe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ioe(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,Woe(r.key),r)}}function Foe(e,t,n){return t=Boe(t),function(e,t){if(t&&("object"===Roe(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$oe()?Reflect.construct(t,n||[],Boe(e).constructor):t.apply(e,n))}function $oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($oe=function(){return!!e})()}function Boe(e){return Boe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Boe(e)}function zoe(e,t){return zoe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zoe(e,t)}function Hoe(e,t,n){return(t=Woe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Woe(e){var t=function(e,t){if("object"!=Roe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Roe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Roe(t)?t:t+""}Aoe(Poe,"displayName","ReferenceLine"),Aoe(Poe,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var Voe=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Foe(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zoe(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props,n=e.x1,r=e.x2,i=e.y1,o=e.y2,a=e.className,s=e.alwaysShow,l=e.clipPathId;t2(void 0===s,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var c=l1(n),d=l1(r),u=l1(i),p=l1(o),h=this.props.shape;if(!c&&!d&&!u&&!p&&!h)return null;var m=function(e,t,n,r,i){var o=i.x1,a=i.x2,s=i.y1,l=i.y2,c=i.xAxis,d=i.yAxis;if(!c||!d)return null;var u=zie({x:c.scale,y:d.scale}),p={x:e?u.x.apply(o,{position:"start"}):u.x.rangeMin,y:n?u.y.apply(s,{position:"start"}):u.y.rangeMin},h={x:t?u.x.apply(a,{position:"end"}):u.x.rangeMax,y:r?u.y.apply(l,{position:"end"}):u.y.rangeMax};return!ire(i,"discard")||u.isInRange(p)&&u.isInRange(h)?$ie(p,h):null}(c,d,u,p,this.props);if(!m&&!h)return null;var f=ire(this.props,"hidden")?"url(#".concat(l,")"):void 0;return We.createElement(b2,{className:vJ("recharts-reference-area",a)},t.renderRect(h,Loe(Loe({clipPath:f},F1(this.props,!0)),m)),nre.renderCallByParent(this.props,m))}}])&&Ioe(n.prototype,r),i&&Ioe(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function Uoe(e){return function(e){if(Array.isArray(e))return qoe(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)return;if("string"===typeof e)return qoe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qoe(e,t)}(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 qoe(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}Hoe(Voe,"displayName","ReferenceArea"),Hoe(Voe,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),Hoe(Voe,"renderRect",function(e,t){return We.isValidElement(e)?We.cloneElement(e,t):X0()(e)?e(t):We.createElement(Q1,Doe({},t,{className:"recharts-reference-area-rect"}))});var Goe=function(e,t,n,r,i){var o=D1(e,Poe),a=D1(e,Jie),s=[].concat(Uoe(o),Uoe(a)),l=D1(e,Voe),c="".concat(r,"Id"),d=r[0],u=t;if(s.length&&(u=s.reduce(function(e,t){if(t.props[c]===n&&ire(t.props,"extendDomain")&&s1(t.props[d])){var r=t.props[d];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},u)),l.length){var p="".concat(d,"1"),h="".concat(d,"2");u=l.reduce(function(e,t){if(t.props[c]===n&&ire(t.props,"extendDomain")&&s1(t.props[p])&&s1(t.props[h])){var r=t.props[p],i=t.props[h];return[Math.min(e[0],r,i),Math.max(e[1],r,i)]}return e},u)}return i&&i.length&&(u=i.reduce(function(e,t){return s1(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},u)),u},Yoe=n(38499),Zoe=new(n.n(Yoe)()),Koe="recharts.syncMouseEvents";function Xoe(e){return Xoe="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},Xoe(e)}function Qoe(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,eae(r.key),r)}}function Joe(e,t,n){return(t=eae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eae(e){var t=function(e,t){if("object"!=Xoe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xoe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xoe(t)?t:t+""}var tae=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Joe(this,"activeIndex",0),Joe(this,"coordinateList",[]),Joe(this,"layout","horizontal")},t=[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,i=e.container,o=void 0===i?null:i,a=e.layout,s=void 0===a?null:a,l=e.offset,c=void 0===l?null:l,d=e.mouseHandlerCallback,u=void 0===d?null:d;this.coordinateList=null!==(t=null!==r&&void 0!==r?r:this.coordinateList)&&void 0!==t?t:[],this.container=null!==o&&void 0!==o?o:this.container,this.layout=null!==s&&void 0!==s?s:this.layout,this.offset=null!==c&&void 0!==c?c:this.offset,this.mouseHandlerCallback=null!==u&&void 0!==u?u:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var n=this.container.getBoundingClientRect(),r=n.x,i=n.y,o=n.height,a=this.coordinateList[this.activeIndex].coordinate,s=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,c=r+a+s,d=i+this.offset.top+o/2+l;this.mouseHandlerCallback({pageX:c,pageY:d})}}}],t&&Qoe(e.prototype,t),n&&Qoe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function nae(){}function rae(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function iae(e){this._context=e}function oae(e){this._context=e}function aae(e){this._context=e}iae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:rae(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:rae(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},oae.prototype={areaStart:nae,areaEnd:nae,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:rae(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},aae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:rae(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class sae{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function lae(e){this._context=e}function cae(e){this._context=e}function dae(e){return new cae(e)}function uae(e){return e<0?-1:1}function pae(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(uae(o)+uae(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function hae(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function mae(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function fae(e){this._context=e}function gae(e){this._context=new vae(e)}function vae(e){this._context=e}function xae(e){this._context=e}function yae(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function bae(e,t){this._context=e,this._t=t}function jae(e){return e[0]}function wae(e){return e[1]}function _ae(e,t){var n=D5(!0),r=null,i=dae,o=null,a=e3(s);function s(s){var l,c,d,u=(s=Eee(s)).length,p=!1;for(null==r&&(o=i(d=a())),l=0;l<=u;++l)!(l<u&&n(c=s[l],l,s))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+e(c,l,s),+t(c,l,s));if(d)return o=null,d+""||null}return e="function"===typeof e?e:void 0===e?jae:D5(e),t="function"===typeof t?t:void 0===t?wae:D5(t),s.x=function(t){return arguments.length?(e="function"===typeof t?t:D5(+t),s):e},s.y=function(e){return arguments.length?(t="function"===typeof e?e:D5(+e),s):t},s.defined=function(e){return arguments.length?(n="function"===typeof e?e:D5(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function Cae(e,t,n){var r=null,i=D5(!0),o=null,a=dae,s=null,l=e3(c);function c(c){var d,u,p,h,m,f=(c=Eee(c)).length,g=!1,v=new Array(f),x=new Array(f);for(null==o&&(s=a(m=l())),d=0;d<=f;++d){if(!(d<f&&i(h=c[d],d,c))===g)if(g=!g)u=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=u;--p)s.point(v[p],x[p]);s.lineEnd(),s.areaEnd()}g&&(v[d]=+e(h,d,c),x[d]=+t(h,d,c),s.point(r?+r(h,d,c):v[d],n?+n(h,d,c):x[d]))}if(m)return s=null,m+""||null}function d(){return _ae().defined(i).curve(a).context(o)}return e="function"===typeof e?e:void 0===e?jae:D5(+e),t="function"===typeof t?t:D5(void 0===t?0:+t),n="function"===typeof n?n:void 0===n?wae:D5(+n),c.x=function(t){return arguments.length?(e="function"===typeof t?t:D5(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"===typeof t?t:D5(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"===typeof e?e:D5(+e),c):r},c.y=function(e){return arguments.length?(t="function"===typeof e?e:D5(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"===typeof e?e:D5(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"===typeof e?e:D5(+e),c):n},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(n)},c.lineX1=function(){return d().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"===typeof e?e:D5(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function Sae(e){return Sae="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},Sae(e)}function Aae(){return Aae=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},Aae.apply(this,arguments)}function kae(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 Mae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kae(Object(n),!0).forEach(function(t){Oae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kae(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Oae(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Sae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Sae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Sae(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}lae.prototype={areaStart:nae,areaEnd:nae,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},cae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},fae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mae(this,this._t0,hae(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mae(this,hae(this,n=pae(this,e,t)),n);break;default:mae(this,this._t0,n=pae(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(gae.prototype=Object.create(fae.prototype)).point=function(e,t){fae.prototype.point.call(this,t,e)},vae.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},xae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=yae(e),i=yae(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},bae.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Tae={curveBasisClosed:function(e){return new oae(e)},curveBasisOpen:function(e){return new aae(e)},curveBasis:function(e){return new iae(e)},curveBumpX:function(e){return new sae(e,!0)},curveBumpY:function(e){return new sae(e,!1)},curveLinearClosed:function(e){return new lae(e)},curveLinear:dae,curveMonotoneX:function(e){return new fae(e)},curveMonotoneY:function(e){return new gae(e)},curveNatural:function(e){return new xae(e)},curveStep:function(e){return new bae(e,.5)},curveStepAfter:function(e){return new bae(e,1)},curveStepBefore:function(e){return new bae(e,0)}},Eae=function(e){return e.x===+e.x&&e.y===+e.y},Pae=function(e){return e.x},Dae=function(e){return e.y},Rae=function(e){var t,n=e.type,r=void 0===n?"linear":n,i=e.points,o=void 0===i?[]:i,a=e.baseLine,s=e.layout,l=e.connectNulls,c=void 0!==l&&l,d=function(e,t){if(X0()(e))return e;var n="curve".concat(d5()(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?Tae[n]||dae:Tae["".concat(n).concat("vertical"===t?"Y":"X")]}(r,s),u=c?o.filter(function(e){return Eae(e)}):o;if(Array.isArray(a)){var p=c?a.filter(function(e){return Eae(e)}):a,h=u.map(function(e,t){return Mae(Mae({},e),{},{base:p[t]})});return(t="vertical"===s?Cae().y(Dae).x1(Pae).x0(function(e){return e.base.x}):Cae().x(Pae).y1(Dae).y0(function(e){return e.base.y})).defined(Eae).curve(d),t(h)}return(t="vertical"===s&&s1(a)?Cae().y(Dae).x1(Pae).x0(a):s1(a)?Cae().x(Pae).y1(Dae).y0(a):_ae().x(Pae).y(Dae)).defined(Eae).curve(d),t(u)},Nae=function(e){var t=e.className,n=e.points,r=e.path,i=e.pathRef;if((!n||!n.length)&&!r)return null;var o=n&&n.length?Rae(e):r;return We.createElement("path",Aae({},F1(e,!1),w1(e),{className:vJ("recharts-curve",t),d:o,ref:i}))};function Lae(e){return Lae="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},Lae(e)}var Iae=["x","y","top","left","width","height","className"];function Fae(){return Fae=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},Fae.apply(this,arguments)}function $ae(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 Bae(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Lae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Lae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Lae(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zae(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Hae=function(e,t,n,r,i,o){return"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n)},Wae=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.top,a=void 0===o?0:o,s=e.left,l=void 0===s?0:s,c=e.width,d=void 0===c?0:c,u=e.height,p=void 0===u?0:u,h=e.className,m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$ae(Object(n),!0).forEach(function(t){Bae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$ae(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:n,y:i,top:a,left:l,width:d,height:p},zae(e,Iae));return s1(n)&&s1(i)&&s1(d)&&s1(p)&&s1(a)&&s1(l)?We.createElement("path",Fae({},F1(m,!0),{className:vJ("recharts-cross",h),d:Hae(n,i,d,p,a,l)})):null};function Vae(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle;return{points:[Bne(t,n,r,i),Bne(t,n,r,o)],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function Uae(e,t,n){var r,i,o,a;if("horizontal"===e)o=r=t.x,i=n.top,a=n.top+n.height;else if("vertical"===e)a=i=t.y,r=n.left,o=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return Vae(t);var s=t.cx,l=t.cy,c=t.innerRadius,d=t.outerRadius,u=t.angle,p=Bne(s,l,c,u),h=Bne(s,l,d,u);r=p.x,i=p.y,o=h.x,a=h.y}return[{x:r,y:i},{x:o,y:a}]}function qae(e){return qae="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},qae(e)}function Gae(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 Yae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gae(Object(n),!0).forEach(function(t){Zae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gae(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zae(e,t,n){return t=function(e){var t=function(e,t){if("object"!=qae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qae(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kae(e){var t,n,r,i=e.element,o=e.tooltipEventType,a=e.isActive,s=e.activeCoordinate,l=e.activePayload,c=e.offset,d=e.activeTooltipIndex,u=e.tooltipAxisBandSize,p=e.layout,h=e.chartName,m=null!==(t=i.props.cursor)&&void 0!==t?t:null===(n=i.type.defaultProps)||void 0===n?void 0:n.cursor;if(!i||!m||!a||!s||"ScatterChart"!==h&&"axis"!==o)return null;var f=Nae;if("ScatterChart"===h)r=s,f=Wae;else if("BarChart"===h)r=function(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-i,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(p,s,c,u),f=Q1;else if("radial"===p){var g=Vae(s),v=g.cx,x=g.cy,y=g.radius;r={cx:v,cy:x,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:y,outerRadius:y},f=Vre}else r={points:Uae(p,s,c)},f=Nae;var b=Yae(Yae(Yae(Yae({stroke:"#ccc",pointerEvents:"none"},c),r),F1(m,!1)),{},{payload:l,payloadIndex:d,className:vJ("recharts-tooltip-cursor",m.className)});return(0,We.isValidElement)(m)?(0,We.cloneElement)(m,b):(0,We.createElement)(f,b)}var Xae=["item"],Qae=["children","className","width","height","style","compact","title","desc"];function Jae(e){return Jae="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},Jae(e)}function ese(){return ese=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},ese.apply(this,arguments)}function tse(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||cse(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nse(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function rse(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,mse(r.key),r)}}function ise(e,t,n){return t=ase(t),function(e,t){if(t&&("object"===Jae(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ose()?Reflect.construct(t,n||[],ase(e).constructor):t.apply(e,n))}function ose(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ose=function(){return!!e})()}function ase(e){return ase=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ase(e)}function sse(e,t){return sse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sse(e,t)}function lse(e){return function(e){if(Array.isArray(e))return dse(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||cse(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 cse(e,t){if(e){if("string"===typeof e)return dse(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)?dse(e,t):void 0}}function dse(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 use(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 pse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?use(Object(n),!0).forEach(function(t){hse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):use(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hse(e,t,n){return(t=mse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mse(e){var t=function(e,t){if("object"!=Jae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Jae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jae(t)?t:t+""}var fse={xAxis:["bottom","top"],yAxis:["left","right"]},gse={width:"100%",height:"100%"},vse={x:0,y:0};function xse(e){return e}var yse=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,i=t.dataEndIndex,o=(null!==n&&void 0!==n?n:[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(lse(e),lse(n)):e},[]);return o.length>0?o:e&&e.length&&s1(r)&&s1(i)?e.slice(r,i+1):[]};function bse(e){return"number"===e?[0,"auto"]:void 0}var jse=function(e,t,n,r){var i=e.graphicalItems,o=e.tooltipAxis,a=yse(t,e);return n<0||!i||!i.length||n>=a.length?null:i.reduce(function(i,s){var l,c,d=null!==(l=s.props.data)&&void 0!==l?l:t;(d&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(d=d.slice(e.dataStartIndex,e.dataEndIndex+1)),o.dataKey&&!o.allowDuplicatedCategory)?c=m1(void 0===d?a:d,o.dataKey,r):c=d&&d[n]||a[n];return c?[].concat(lse(i),[hne(s,c)]):i},[])},wse=function(e,t,n,r){var i=r||{x:e.chartX,y:e.chartY},o=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(i,n),a=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,a=null!==(t=null===n||void 0===n?void 0:n.length)&&void 0!==t?t:0;if(a<=1)return 0;if(i&&"angleAxis"===i.axisType&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var s=i.range,l=0;l<a;l++){var c=l>0?r[l-1].coordinate:r[a-1].coordinate,d=r[l].coordinate,u=l>=a-1?r[0].coordinate:r[l+1].coordinate,p=void 0;if(o1(d-c)!==o1(u-d)){var h=[];if(o1(u-d)===o1(s[1]-s[0])){p=u;var m=d+s[1]-s[0];h[0]=Math.min(m,(m+c)/2),h[1]=Math.max(m,(m+c)/2)}else{p=c;var f=u+s[1]-s[0];h[0]=Math.min(d,(f+d)/2),h[1]=Math.max(d,(f+d)/2)}var g=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(e>g[0]&&e<=g[1]||e>=h[0]&&e<=h[1]){o=r[l].index;break}}else{var v=Math.min(c,u),x=Math.max(c,u);if(e>(v+d)/2&&e<=(x+d)/2){o=r[l].index;break}}}else for(var y=0;y<a;y++)if(0===y&&e<=(n[y].coordinate+n[y+1].coordinate)/2||y>0&&y<a-1&&e>(n[y].coordinate+n[y-1].coordinate)/2&&e<=(n[y].coordinate+n[y+1].coordinate)/2||y===a-1&&e>(n[y].coordinate+n[y-1].coordinate)/2){o=n[y].index;break}return o}(o,a,l,s);if(c>=0&&l){var d=l[c]&&l[c].value,u=jse(e,t,c,d),p=function(e,t,n,r){var i=t.find(function(e){return e&&e.index===n});if(i){if("horizontal"===e)return{x:i.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:i.coordinate};if("centric"===e){var o=i.coordinate,a=r.radius;return pse(pse(pse({},r),Bne(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,l=r.angle;return pse(pse(pse({},r),Bne(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return vse}(n,a,c,i);return{activeTooltipIndex:c,activeLabel:d,activePayload:u,activeCoordinate:p}}return null},_se=function(e,t){var n=t.axes,r=t.graphicalItems,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,d=e.children,u=e.stackOffset,p=Yte(c,i);return n.reduce(function(t,n){var h,m=void 0!==n.type.defaultProps?pse(pse({},n.type.defaultProps),n.props):n.props,f=m.type,g=m.dataKey,v=m.allowDataOverflow,x=m.allowDuplicatedCategory,y=m.scale,b=m.ticks,j=m.includeHidden,w=m[o];if(t[w])return t;var _,C,S,A=yse(e.data,{graphicalItems:r.filter(function(e){var t;return(o in e.props?e.props[o]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[o])===w}),dataStartIndex:s,dataEndIndex:l}),k=A.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null===e||void 0===e?void 0:e[0],i=null===e||void 0===e?void 0:e[1];if(r&&i&&s1(r)&&s1(i))return!0}return!1})(m.domain,v,f)&&(_=dne(m.domain,null,v),!p||"number"!==f&&"auto"===y||(S=Vte(A,g,"category")));var M=bse(f);if(!_||0===_.length){var O,T=null!==(O=m.domain)&&void 0!==O?O:M;if(g){if(_=Vte(A,g,f),"category"===f&&p){var E=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(_);x&&E?(C=_,_=uS()(0,k)):x||(_=pne(T,_,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(lse(e),[t])},[]))}else if("category"===f)_=x?_.filter(function(e){return""!==e&&!G0()(e)}):pne(T,_,n).reduce(function(e,t){return e.indexOf(t)>=0||""===t||G0()(t)?e:[].concat(lse(e),[t])},[]);else if("number"===f){var P=function(e,t,n,r,i){var o=t.map(function(t){return qte(e,t,n,i,r)}).filter(function(e){return!G0()(e)});return o&&o.length?o.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null}(A,r.filter(function(e){var t,n,r=o in e.props?e.props[o]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[o],i="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===w&&(j||!i)}),g,i,c);P&&(_=P)}!p||"number"!==f&&"auto"===y||(S=Vte(A,g,"category"))}else _=p?uS()(0,k):a&&a[w]&&a[w].hasStack&&"number"===f?"expand"===u?[0,1]:sne(a[w].stackGroups,s,l):Gte(A,r.filter(function(e){var t=o in e.props?e.props[o]:e.type.defaultProps[o],n="hide"in e.props?e.props.hide:e.type.defaultProps.hide;return t===w&&(j||!n)}),f,c,!0);if("number"===f)_=Goe(d,_,w,i,b),T&&(_=dne(T,_,v));else if("category"===f&&T){var D=T;_.every(function(e){return D.indexOf(e)>=0})&&(_=D)}}return pse(pse({},t),{},hse({},w,pse(pse({},m),{},{axisType:i,domain:_,categoricalDomain:S,duplicateDomain:C,originalDomain:null!==(h=m.domain)&&void 0!==h?h:M,isCategorical:p,layout:c})))},{})},Cse=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,i=t.AxisComp,o=t.graphicalItems,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,d="".concat(r,"Id"),u=D1(c,i),p={};return u&&u.length?p=_se(e,{axes:u,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:a,dataStartIndex:s,dataEndIndex:l}):o&&o.length&&(p=function(e,t){var n=t.graphicalItems,r=t.Axis,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,d=e.children,u=yse(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),p=u.length,h=Yte(c,i),m=-1;return n.reduce(function(e,t){var f,g=(void 0!==t.type.defaultProps?pse(pse({},t.type.defaultProps),t.props):t.props)[o],v=bse("number");return e[g]?e:(m++,h?f=uS()(0,p):a&&a[g]&&a[g].hasStack?(f=sne(a[g].stackGroups,s,l),f=Goe(d,f,g,i)):(f=dne(v,Gte(u,n.filter(function(e){var t,n,r=o in e.props?e.props[o]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[o],i="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===g&&!i}),"number",c),r.defaultProps.allowDataOverflow),f=Goe(d,f,g,i)),pse(pse({},e),{},hse({},g,pse(pse({axisType:i},r.defaultProps),{},{hide:!0,orientation:oa()(fse,"".concat(i,".").concat(m%2),null),domain:f,originalDomain:v,isCategorical:h,layout:c}))))},{})}(e,{Axis:i,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:a,dataStartIndex:s,dataEndIndex:l})),p},Sse=function(e){var t=e.children,n=e.defaultShowTooltip,r=R1(t,Ene),i=0,o=0;return e.data&&0!==e.data.length&&(o=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(i=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:Boolean(n)}},Ase=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},kse=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),i=void 0===r?{}:r,o=e.yAxisMap,a=void 0===o?{}:o,s=n.width,l=n.height,c=n.children,d=n.margin||{},u=R1(c,Ene),p=R1(c,L3),h=Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:pse(pse({},e),{},hse({},r,e[r]+n.width))},{left:d.left||0,right:d.right||0}),m=Object.keys(i).reduce(function(e,t){var n=i[t],r=n.orientation;return n.mirror||n.hide?e:pse(pse({},e),{},hse({},r,oa()(e,"".concat(r))+n.height))},{top:d.top||0,bottom:d.bottom||0}),f=pse(pse({},m),h),g=f.bottom;u&&(f.bottom+=u.props.height||Ene.defaultProps.height),p&&t&&(f=function(e,t,n,r){var i=n.children,o=n.width,a=n.margin,s=o-(a.left||0)-(a.right||0),l=Lte({children:i,legendWidth:s});if(l){var c=r||{},d=c.width,u=c.height,p=l.align,h=l.verticalAlign,m=l.layout;if(("vertical"===m||"horizontal"===m&&"middle"===h)&&"center"!==p&&s1(e[p]))return zte(zte({},e),{},Hte({},p,e[p]+(d||0)));if(("horizontal"===m||"vertical"===m&&"center"===p)&&"middle"!==h&&s1(e[h]))return zte(zte({},e),{},Hte({},h,e[h]+(u||0)))}return e}(f,0,n,t));var v=s-f.left-f.right,x=l-f.top-f.bottom;return pse(pse({brushBottom:g},f),{},{width:Math.max(v,0),height:Math.max(x,0)})},Mse=function(e,t){return"xAxis"===t?e[t].width:"yAxis"===t?e[t].height:void 0},Ose=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,i=void 0===r?"axis":r,o=e.validateTooltipEventTypes,a=void 0===o?["axis"]:o,s=e.axisComponents,l=e.legendContent,c=e.formatAxisMap,d=e.defaultProps,u=function(e,t){var n=t.graphicalItems,r=t.stackGroups,i=t.offset,o=t.updateId,a=t.dataStartIndex,l=t.dataEndIndex,c=e.barSize,d=e.layout,u=e.barGap,p=e.barCategoryGap,h=e.maxBarSize,m=Ase(d),f=m.numericAxisName,g=m.cateAxisName,v=function(e){return!(!e||!e.length)&&e.some(function(e){var t=O1(e&&e.type);return t&&t.indexOf("Bar")>=0})}(n),x=[];return n.forEach(function(n,m){var y=yse(e.data,{graphicalItems:[n],dataStartIndex:a,dataEndIndex:l}),b=void 0!==n.type.defaultProps?pse(pse({},n.type.defaultProps),n.props):n.props,j=b.dataKey,w=b.maxBarSize,_=b["".concat(f,"Id")],C=b["".concat(g,"Id")],S=s.reduce(function(e,n){var r=t["".concat(n.axisType,"Map")],i=b["".concat(n.axisType,"Id")];r&&r[i]||"zAxis"===n.axisType||p2(!1);var o=r[i];return pse(pse({},e),{},hse(hse({},n.axisType,o),"".concat(n.axisType,"Ticks"),Kte(o)))},{}),A=S[g],k=S["".concat(g,"Ticks")],M=r&&r[_]&&r[_].hasStack&&function(e,t){var n,r=(null!==(n=e.type)&&void 0!==n&&n.defaultProps?zte(zte({},e.type.defaultProps),e.props):e.props).stackId;if(l1(r)){var i=t[r];if(i){var o=i.items.indexOf(e);return o>=0?i.stackedData[o]:null}}return null}(n,r[_].stackGroups),O=O1(n.type).indexOf("Bar")>=0,T=une(A,k),E=[],P=v&&function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,i=void 0===r?{}:r;if(!i)return{};for(var o={},a=Object.keys(i),s=0,l=a.length;s<l;s++)for(var c=i[a[s]].stackGroups,d=Object.keys(c),u=0,p=d.length;u<p;u++){var h=c[d[u]],m=h.items,f=h.cateAxisId,g=m.filter(function(e){return O1(e.type).indexOf("Bar")>=0});if(g&&g.length){var v=g[0].type.defaultProps,x=void 0!==v?zte(zte({},v),g[0].props):g[0].props,y=x.barSize,b=x[f];o[b]||(o[b]=[]);var j=G0()(y)?t:y;o[b].push({item:g[0],stackList:g.slice(1),barSize:G0()(j)?void 0:u1(j,n,0)})}}return o}({barSize:c,stackGroups:r,totalSize:Mse(S,g)});if(O){var D,R,N=G0()(w)?h:w,L=null!==(D=null!==(R=une(A,k,!0))&&void 0!==R?R:N)&&void 0!==D?D:0;E=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,i=e.sizeList,o=void 0===i?[]:i,a=e.maxBarSize,s=o.length;if(s<1)return null;var l,c=u1(t,r,0,!0),d=[];if(o[0].barSize===+o[0].barSize){var u=!1,p=r/s,h=o.reduce(function(e,t){return e+t.barSize||0},0);(h+=(s-1)*c)>=r&&(h-=(s-1)*c,c=0),h>=r&&p>0&&(u=!0,h=s*(p*=.9));var m={offset:((r-h)/2|0)-c,size:0};l=o.reduce(function(e,t){var n={item:t.item,position:{offset:m.offset+m.size+c,size:u?p:t.barSize}},r=[].concat(Fte(e),[n]);return m=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:m})}),r},d)}else{var f=u1(n,r,0,!0);r-2*f-(s-1)*c<=0&&(c=0);var g=(r-2*f-(s-1)*c)/s;g>1&&(g>>=0);var v=a===+a?Math.min(g,a):g;l=o.reduce(function(e,t,n){var r=[].concat(Fte(e),[{item:t.item,position:{offset:f+(g+c)*n+(g-v)/2,size:v}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},d)}return l}({barGap:u,barCategoryGap:p,bandSize:L!==T?L:T,sizeList:P[C],maxBarSize:N}),L!==T&&(E=E.map(function(e){return pse(pse({},e),{},{position:pse(pse({},e.position),{},{offset:e.position.offset-L/2})})}))}var I,F,$=n&&n.type&&n.type.getComposedData;$&&x.push({props:pse(pse({},$(pse(pse({},S),{},{displayedData:y,props:e,dataKey:j,item:n,bandSize:T,barPosition:E,offset:i,stackedData:M,layout:d,dataStartIndex:a,dataEndIndex:l}))),{},hse(hse(hse({key:n.key||"item-".concat(m)},f,S[f]),g,S[g]),"animationId",o)),childIndex:(I=n,F=e.children,P1(F).indexOf(I)),item:n})}),x},p=function(e,r){var i=e.props,o=e.dataStartIndex,a=e.dataEndIndex,l=e.updateId;if(!N1({props:i}))return null;var d=i.children,p=i.layout,h=i.stackOffset,m=i.data,f=i.reverseStackOrder,g=Ase(p),v=g.numericAxisName,x=g.cateAxisName,y=D1(d,n),b=function(e,t,n,r,i,o){if(!e)return null;var a=(o?t.reverse():t).reduce(function(e,t){var i,o=null!==(i=t.type)&&void 0!==i&&i.defaultProps?zte(zte({},t.type.defaultProps),t.props):t.props,a=o.stackId;if(o.hide)return e;var s=o[n],l=e[s]||{hasStack:!1,stackGroups:{}};if(l1(a)){var c=l.stackGroups[a]||{numericAxisId:n,cateAxisId:r,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[a]=c}else l.stackGroups[d1("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return zte(zte({},e),{},Hte({},s,l))},{});return Object.keys(a).reduce(function(t,o){var s=a[o];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,o){var a=s.stackGroups[o];return zte(zte({},t),{},Hte({},o,{numericAxisId:n,cateAxisId:r,items:a.items,stackedData:rne(e,a.items,i)}))},{})),zte(zte({},t),{},Hte({},o,s))},{})}(m,y,"".concat(v,"Id"),"".concat(x,"Id"),h,f),j=s.reduce(function(e,t){var n="".concat(t.axisType,"Map");return pse(pse({},e),{},hse({},n,Cse(i,pse(pse({},t),{},{graphicalItems:y,stackGroups:t.axisType===v&&b,dataStartIndex:o,dataEndIndex:a}))))},{}),w=kse(pse(pse({},j),{},{props:i,graphicalItems:y}),null===r||void 0===r?void 0:r.legendBBox);Object.keys(j).forEach(function(e){j[e]=c(i,j[e],w,e.replace("Map",""),t)});var _=function(e){var t=p1(e),n=Kte(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:d2()(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:une(t,n)}}(j["".concat(x,"Map")]),C=u(i,pse(pse({},j),{},{dataStartIndex:o,dataEndIndex:a,updateId:l,graphicalItems:y,stackGroups:b,offset:w}));return pse(pse({formattedGraphicalItems:C,graphicalItems:y,offset:w,stackGroups:b},_),j)},h=function(e){function n(e){var r,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),hse(o=ise(this,n,[e]),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),hse(o,"accessibilityManager",new tae),hse(o,"handleLegendBBoxUpdate",function(e){if(e){var t=o.state,n=t.dataStartIndex,r=t.dataEndIndex,i=t.updateId;o.setState(pse({legendBBox:e},p({props:o.props,dataStartIndex:n,dataEndIndex:r,updateId:i},pse(pse({},o.state),{},{legendBBox:e}))))}}),hse(o,"handleReceiveSyncEvent",function(e,t,n){if(o.props.syncId===e){if(n===o.eventEmitterSymbol&&"function"!==typeof o.props.syncMethod)return;o.applySyncEvent(t)}}),hse(o,"handleBrushChange",function(e){var t=e.startIndex,n=e.endIndex;if(t!==o.state.dataStartIndex||n!==o.state.dataEndIndex){var r=o.state.updateId;o.setState(function(){return pse({dataStartIndex:t,dataEndIndex:n},p({props:o.props,dataStartIndex:t,dataEndIndex:n,updateId:r},o.state))}),o.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),hse(o,"handleMouseEnter",function(e){var t=o.getMouseInfo(e);if(t){var n=pse(pse({},t),{},{isTooltipActive:!0});o.setState(n),o.triggerSyncEvent(n);var r=o.props.onMouseEnter;X0()(r)&&r(n,e)}}),hse(o,"triggeredAfterMouseMove",function(e){var t=o.getMouseInfo(e),n=t?pse(pse({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};o.setState(n),o.triggerSyncEvent(n);var r=o.props.onMouseMove;X0()(r)&&r(n,e)}),hse(o,"handleItemMouseEnter",function(e){o.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),hse(o,"handleItemMouseLeave",function(){o.setState(function(){return{isTooltipActive:!1}})}),hse(o,"handleMouseMove",function(e){e.persist(),o.throttleTriggeredAfterMouseMove(e)}),hse(o,"handleMouseLeave",function(e){o.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};o.setState(t),o.triggerSyncEvent(t);var n=o.props.onMouseLeave;X0()(n)&&n(t,e)}),hse(o,"handleOuterEvent",function(e){var t,n=function(e){var t=e&&e.type;return t&&M1[t]?M1[t]:null}(e),r=oa()(o.props,"".concat(n));n&&X0()(r)&&r(null!==(t=/.*touch.*/i.test(n)?o.getMouseInfo(e.changedTouches[0]):o.getMouseInfo(e))&&void 0!==t?t:{},e)}),hse(o,"handleClick",function(e){var t=o.getMouseInfo(e);if(t){var n=pse(pse({},t),{},{isTooltipActive:!0});o.setState(n),o.triggerSyncEvent(n);var r=o.props.onClick;X0()(r)&&r(n,e)}}),hse(o,"handleMouseDown",function(e){var t=o.props.onMouseDown;X0()(t)&&t(o.getMouseInfo(e),e)}),hse(o,"handleMouseUp",function(e){var t=o.props.onMouseUp;X0()(t)&&t(o.getMouseInfo(e),e)}),hse(o,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&o.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),hse(o,"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&o.handleMouseDown(e.changedTouches[0])}),hse(o,"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&o.handleMouseUp(e.changedTouches[0])}),hse(o,"handleDoubleClick",function(e){var t=o.props.onDoubleClick;X0()(t)&&t(o.getMouseInfo(e),e)}),hse(o,"handleContextMenu",function(e){var t=o.props.onContextMenu;X0()(t)&&t(o.getMouseInfo(e),e)}),hse(o,"triggerSyncEvent",function(e){void 0!==o.props.syncId&&Zoe.emit(Koe,o.props.syncId,e,o.eventEmitterSymbol)}),hse(o,"applySyncEvent",function(e){var t=o.props,n=t.layout,r=t.syncMethod,i=o.state.updateId,a=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)o.setState(pse({dataStartIndex:a,dataEndIndex:s},p({props:o.props,dataStartIndex:a,dataEndIndex:s,updateId:i},o.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,d=e.activeTooltipIndex,u=o.state,h=u.offset,m=u.tooltipTicks;if(!h)return;if("function"===typeof r)d=r(m,e);else if("value"===r){d=-1;for(var f=0;f<m.length;f++)if(m[f].value===e.activeLabel){d=f;break}}var g=pse(pse({},h),{},{x:h.left,y:h.top}),v=Math.min(l,g.x+g.width),x=Math.min(c,g.y+g.height),y=m[d]&&m[d].value,b=jse(o.state,o.props.data,d),j=m[d]?{x:"horizontal"===n?m[d].coordinate:v,y:"horizontal"===n?x:m[d].coordinate}:vse;o.setState(pse(pse({},e),{},{activeLabel:y,activeCoordinate:j,activePayload:b,activeTooltipIndex:d}))}else o.setState(e)}),hse(o,"renderCursor",function(e){var n,r=o.state,i=r.isTooltipActive,a=r.activeCoordinate,s=r.activePayload,l=r.offset,c=r.activeTooltipIndex,d=r.tooltipAxisBandSize,u=o.getTooltipEventType(),p=null!==(n=e.props.active)&&void 0!==n?n:i,h=o.props.layout,m=e.key||"_recharts-cursor";return We.createElement(Kae,{key:m,activeCoordinate:a,activePayload:s,activeTooltipIndex:c,chartName:t,element:e,isActive:p,layout:h,offset:l,tooltipAxisBandSize:d,tooltipEventType:u})}),hse(o,"renderPolarAxis",function(e,t,n){var r=oa()(e,"type.axisType"),i=oa()(o.state,"".concat(r,"Map")),a=e.type.defaultProps,s=void 0!==a?pse(pse({},a),e.props):e.props,l=i&&i[s["".concat(r,"Id")]];return(0,We.cloneElement)(e,pse(pse({},l),{},{className:vJ(r,l.className),key:e.key||"".concat(t,"-").concat(n),ticks:Kte(l,!0)}))}),hse(o,"renderPolarGrid",function(e){var t=e.props,n=t.radialLines,r=t.polarAngles,i=t.polarRadius,a=o.state,s=a.radiusAxisMap,l=a.angleAxisMap,c=p1(s),d=p1(l),u=d.cx,p=d.cy,h=d.innerRadius,m=d.outerRadius;return(0,We.cloneElement)(e,{polarAngles:Array.isArray(r)?r:Kte(d,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(i)?i:Kte(c,!0).map(function(e){return e.coordinate}),cx:u,cy:p,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:n})}),hse(o,"renderLegend",function(){var e=o.state.formattedGraphicalItems,t=o.props,n=t.children,r=t.width,i=t.height,a=o.props.margin||{},s=r-(a.left||0)-(a.right||0),c=Lte({children:n,formattedGraphicalItems:e,legendWidth:s,legendContent:l});if(!c)return null;var d=c.item,u=nse(c,Xae);return(0,We.cloneElement)(d,pse(pse({},u),{},{chartWidth:r,chartHeight:i,margin:a,onBBoxUpdate:o.handleLegendBBoxUpdate}))}),hse(o,"renderTooltip",function(){var e,t=o.props,n=t.children,r=t.accessibilityLayer,i=R1(n,l5);if(!i)return null;var a=o.state,s=a.isTooltipActive,l=a.activeCoordinate,c=a.activePayload,d=a.activeLabel,u=a.offset,p=null!==(e=i.props.active)&&void 0!==e?e:s;return(0,We.cloneElement)(i,{viewBox:pse(pse({},u),{},{x:u.left,y:u.top}),active:p,label:d,payload:p?c:[],coordinate:l,accessibilityLayer:r})}),hse(o,"renderBrush",function(e){var t=o.props,n=t.margin,r=t.data,i=o.state,a=i.offset,s=i.dataStartIndex,l=i.dataEndIndex,c=i.updateId;return(0,We.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:Qte(o.handleBrushChange,e.props.onChange),data:r,x:s1(e.props.x)?e.props.x:a.left,y:s1(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(n.bottom||0),width:s1(e.props.width)?e.props.width:a.width,startIndex:s,endIndex:l,updateId:"brush-".concat(c)})}),hse(o,"renderReferenceElement",function(e,t,n){if(!e)return null;var r=o.clipPathId,i=o.state,a=i.xAxisMap,s=i.yAxisMap,l=i.offset,c=e.type.defaultProps||{},d=e.props,u=d.xAxisId,p=void 0===u?c.xAxisId:u,h=d.yAxisId,m=void 0===h?c.yAxisId:h;return(0,We.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(n),xAxis:a[p],yAxis:s[m],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:r})}),hse(o,"renderActivePoints",function(e){var t=e.item,r=e.activePoint,i=e.basePoint,o=e.childIndex,a=e.isRange,s=[],l=t.props.key,c=void 0!==t.item.type.defaultProps?pse(pse({},t.item.type.defaultProps),t.item.props):t.item.props,d=c.activeDot,u=pse(pse({index:o,dataKey:c.dataKey,cx:r.x,cy:r.y,r:4,fill:Ute(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value},F1(d,!1)),w1(d));return s.push(n.renderActiveDot(d,u,"".concat(l,"-activePoint-").concat(o))),i?s.push(n.renderActiveDot(d,pse(pse({},u),{},{cx:i.x,cy:i.y}),"".concat(l,"-basePoint-").concat(o))):a&&s.push(null),s}),hse(o,"renderGraphicChild",function(e,t,n){var r=o.filterFormatItem(e,t,n);if(!r)return null;var i=o.getTooltipEventType(),a=o.state,s=a.isTooltipActive,l=a.tooltipAxis,c=a.activeTooltipIndex,d=a.activeLabel,u=R1(o.props.children,l5),p=r.props,h=p.points,m=p.isRange,f=p.baseLine,g=void 0!==r.item.type.defaultProps?pse(pse({},r.item.type.defaultProps),r.item.props):r.item.props,v=g.activeDot,x=g.hide,y=g.activeBar,b=g.activeShape,j=Boolean(!x&&s&&u&&(v||y||b)),w={};"axis"!==i&&u&&"click"===u.props.trigger?w={onClick:Qte(o.handleItemMouseEnter,e.props.onClick)}:"axis"!==i&&(w={onMouseLeave:Qte(o.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:Qte(o.handleItemMouseEnter,e.props.onMouseEnter)});var _=(0,We.cloneElement)(e,pse(pse({},r.props),w));if(j){if(!(c>=0)){var C,S=(null!==(C=o.getItemByXY(o.state.activeCoordinate))&&void 0!==C?C:{graphicalItem:_}).graphicalItem,A=S.item,k=void 0===A?e:A,M=S.childIndex,O=pse(pse(pse({},r.props),w),{},{activeIndex:M});return[(0,We.cloneElement)(k,O),null,null]}var T,E;if(l.dataKey&&!l.allowDuplicatedCategory){var P="function"===typeof l.dataKey?function(e){return"function"===typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());T=m1(h,P,d),E=m&&f&&m1(f,P,d)}else T=null===h||void 0===h?void 0:h[c],E=m&&f&&f[c];if(b||y){var D=void 0!==e.props.activeIndex?e.props.activeIndex:c;return[(0,We.cloneElement)(e,pse(pse(pse({},r.props),w),{},{activeIndex:D})),null,null]}if(!G0()(T))return[_].concat(lse(o.renderActivePoints({item:r,activePoint:T,basePoint:E,childIndex:c,isRange:m})))}return m?[_,null,null]:[_,null]}),hse(o,"renderCustomized",function(e,t,n){return(0,We.cloneElement)(e,pse(pse({key:"recharts-customized-".concat(n)},o.props),o.state))}),hse(o,"renderMap",{CartesianGrid:{handler:xse,once:!0},ReferenceArea:{handler:o.renderReferenceElement},ReferenceLine:{handler:xse},ReferenceDot:{handler:o.renderReferenceElement},XAxis:{handler:xse},YAxis:{handler:xse},Brush:{handler:o.renderBrush,once:!0},Bar:{handler:o.renderGraphicChild},Line:{handler:o.renderGraphicChild},Area:{handler:o.renderGraphicChild},Radar:{handler:o.renderGraphicChild},RadialBar:{handler:o.renderGraphicChild},Scatter:{handler:o.renderGraphicChild},Pie:{handler:o.renderGraphicChild},Funnel:{handler:o.renderGraphicChild},Tooltip:{handler:o.renderCursor,once:!0},PolarGrid:{handler:o.renderPolarGrid,once:!0},PolarAngleAxis:{handler:o.renderPolarAxis},PolarRadiusAxis:{handler:o.renderPolarAxis},Customized:{handler:o.renderCustomized}}),o.clipPathId="".concat(null!==(r=e.id)&&void 0!==r?r:d1("recharts"),"-clip"),o.throttleTriggeredAfterMouseMove=e2()(o.triggeredAfterMouseMove,null!==(i=e.throttleDelay)&&void 0!==i?i:1e3/60),o.state={},o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sse(e,t)}(n,e),r=n,o=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,i=e.layout,o=R1(t,l5);if(o){var a=o.props.defaultIndex;if(!("number"!==typeof a||a<0||a>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,l=jse(this.state,n,a,s),c=this.state.tooltipTicks[a].coordinate,d=(this.state.offset.top+r)/2,u="horizontal"===i?{x:c,y:d}:{y:c,x:d},p=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});p&&(u=pse(pse({},u),p.props.points[a].tooltipPosition),l=p.props.points[a].tooltipPayload);var h={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:u};this.setState(h),this.renderCursor(o),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}}),null):null;var n,r}},{key:"componentDidUpdate",value:function(e){$1([R1(e.children,l5)],[R1(this.props.children,l5)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=R1(this.props.children,l5);if(e&&"boolean"===typeof e.props.shared){var t=e.props.shared?"axis":"item";return a.indexOf(t)>=0?t:i}return i}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,n=this.container,r=n.getBoundingClientRect(),i={top:(t=r).top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft},o={chartX:Math.round(e.pageX-i.left),chartY:Math.round(e.pageY-i.top)},a=r.width/n.offsetWidth||1,s=this.inRange(o.chartX,o.chartY,a);if(!s)return null;var l=this.state,c=l.xAxisMap,d=l.yAxisMap,u=this.getTooltipEventType(),p=wse(this.state,this.props.data,this.props.layout,s);if("axis"!==u&&c&&d){var h=p1(c).scale,m=p1(d).scale,f=h&&h.invert?h.invert(o.chartX):null,g=m&&m.invert?m.invert(o.chartY):null;return pse(pse({},o),{},{xValue:f,yValue:g},p)}return p?pse(pse({},o),p):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,i=e/n,o=t/n;if("horizontal"===r||"vertical"===r){var a=this.state.offset;return i>=a.left&&i<=a.left+a.width&&o>=a.top&&o<=a.top+a.height?{x:i,y:o}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;if(l&&c){var d=p1(l);return Vne({x:i,y:o},d)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=R1(e,l5),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),pse(pse({},w1(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){Zoe.on(Koe,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Zoe.removeListener(Koe,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,i=0,o=r.length;i<o;i++){var a=r[i];if(a.item===e||a.props.key===e.key||t===O1(a.item.type)&&n===a.childIndex)return a}return null}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,i=t.height,o=t.width;return We.createElement("defs",null,We.createElement("clipPath",{id:e},We.createElement("rect",{x:n,y:r,height:i,width:o})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=tse(t,2),r=n[0],i=n[1];return pse(pse({},e),{},hse({},r,i.scale))},{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=tse(t,2),r=n[0],i=n[1];return pse(pse({},e),{},hse({},r,i.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var i=0,o=n.length;i<o;i++){var a=n[i],s=a.props,l=a.item,c=void 0!==l.type.defaultProps?pse(pse({},l.type.defaultProps),l.props):l.props,d=O1(l.type);if("Bar"===d){var u=(s.data||[]).find(function(t){return K1(e,t)});if(u)return{graphicalItem:a,payload:u}}else if("RadialBar"===d){var p=(s.data||[]).find(function(t){return Vne(e,t)});if(p)return{graphicalItem:a,payload:p}}else if(eie(a,r)||tie(a,r)||nie(a,r)){var h=aie({graphicalItem:a,activeTooltipItem:r,itemData:c.data}),m=void 0===c.activeIndex?h:c.activeIndex;return{graphicalItem:pse(pse({},a),{},{childIndex:m}),payload:nie(a,r)?c.data[h]:a.props.data[h]}}}return null}},{key:"render",value:function(){var e=this;if(!N1(this))return null;var t,n,r=this.props,i=r.children,o=r.className,a=r.width,s=r.height,l=r.style,c=r.compact,d=r.title,u=r.desc,p=nse(r,Qae),h=F1(p,!1);if(c)return We.createElement(hoe,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},We.createElement(g2,ese({},h,{width:a,height:s,title:d,desc:u}),this.renderClipPath(),z1(i,this.renderMap)));this.props.accessibilityLayer&&(h.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,h.role=null!==(n=this.props.role)&&void 0!==n?n:"application",h.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},h.onFocus=function(){e.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return We.createElement(hoe,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},We.createElement("div",ese({className:vJ("recharts-wrapper",o),style:pse({position:"relative",cursor:"default",width:a,height:s},l)},m,{ref:function(t){e.container=t}}),We.createElement(g2,ese({},h,{width:a,height:s,title:d,desc:u,style:gse}),this.renderClipPath(),z1(i,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}],o&&rse(r.prototype,o),s&&rse(r,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,s}(We.Component);hse(h,"displayName",t),hse(h,"defaultProps",pse({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),hse(h,"getDerivedStateFromProps",function(e,t){var n=e.dataKey,r=e.data,i=e.children,o=e.width,a=e.height,s=e.layout,l=e.stackOffset,c=e.margin,d=t.dataStartIndex,u=t.dataEndIndex;if(void 0===t.updateId){var h=Sse(e);return pse(pse(pse({},h),{},{updateId:0},p(pse(pse({props:e},h),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:o,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:i})}if(n!==t.prevDataKey||r!==t.prevData||o!==t.prevWidth||a!==t.prevHeight||s!==t.prevLayout||l!==t.prevStackOffset||!g1(c,t.prevMargin)){var m=Sse(e),f={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=pse(pse({},wse(t,r,s)),{},{updateId:t.updateId+1}),v=pse(pse(pse({},m),f),g);return pse(pse(pse({},v),p(pse({props:e},v),t)),{},{prevDataKey:n,prevData:r,prevWidth:o,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:i})}if(!$1(i,t.prevChildren)){var x,y,b,j,w=R1(i,Ene),_=w&&null!==(x=null===(y=w.props)||void 0===y?void 0:y.startIndex)&&void 0!==x?x:d,C=w&&null!==(b=null===(j=w.props)||void 0===j?void 0:j.endIndex)&&void 0!==b?b:u,S=_!==d||C!==u,A=!G0()(r)&&!S?t.updateId:t.updateId+1;return pse(pse({updateId:A},p(pse(pse({props:e},t),{},{updateId:A,dataStartIndex:_,dataEndIndex:C}),t)),{},{prevChildren:i,dataStartIndex:_,dataEndIndex:C})}return null}),hse(h,"renderActiveDot",function(e,t,n){var r;return r=(0,We.isValidElement)(e)?(0,We.cloneElement)(e,t):X0()(e)?e(t):We.createElement(F3,t),We.createElement(b2,{className:"recharts-active-dot",key:n},r)});var m=(0,We.forwardRef)(function(e,t){return We.createElement(h,ese({},e,{ref:t}))});return m.displayName=h.displayName,m},Tse=["type","layout","connectNulls","ref"],Ese=["key"];function Pse(e){return Pse="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},Pse(e)}function Dse(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rse(){return Rse=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},Rse.apply(this,arguments)}function Nse(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 Lse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nse(Object(n),!0).forEach(function(t){Vse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nse(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ise(e){return function(e){if(Array.isArray(e))return Fse(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)return;if("string"===typeof e)return Fse(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fse(e,t)}(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 Fse(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 $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,Use(r.key),r)}}function Bse(e,t,n){return t=Hse(t),function(e,t){if(t&&("object"===Pse(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,zse()?Reflect.construct(t,n||[],Hse(e).constructor):t.apply(e,n))}function zse(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zse=function(){return!!e})()}function Hse(e){return Hse=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hse(e)}function Wse(e,t){return Wse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wse(e,t)}function Vse(e,t,n){return(t=Use(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Use(e){var t=function(e,t){if("object"!=Pse(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pse(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pse(t)?t:t+""}var qse=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vse(e=Bse(this,t,[].concat(r)),"state",{isAnimationFinished:!0,totalLength:0}),Vse(e,"generateSimpleStrokeDasharray",function(e,t){return"".concat(t,"px ").concat(e-t,"px")}),Vse(e,"getStrokeDasharray",function(n,r,i){var o=i.reduce(function(e,t){return e+t});if(!o)return e.generateSimpleStrokeDasharray(r,n);for(var a=Math.floor(n/o),s=n%o,l=r-n,c=[],d=0,u=0;d<i.length;u+=i[d],++d)if(u+i[d]>s){c=[].concat(Ise(i.slice(0,d)),[s-u]);break}var p=c.length%2===0?[0,l]:[l];return[].concat(Ise(t.repeat(i,a)),Ise(c),p).map(function(e){return"".concat(e,"px")}).join(", ")}),Vse(e,"id",d1("recharts-line-")),Vse(e,"pathRef",function(t){e.mainCurve=t}),Vse(e,"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),Vse(e,"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wse(e,t)}(t,e),n=t,r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(t){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.points,i=n.xAxis,o=n.yAxis,a=n.layout,s=D1(n.children,Ete);if(!s)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:Wte(e.payload,t)}},c={clipPath:e?"url(#clipPath-".concat(t,")"):null};return We.createElement(b2,c,s.map(function(e){return We.cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:r,xAxis:i,yAxis:o,layout:a,dataPointFormatter:l})}))}},{key:"renderDots",value:function(e,n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.dot,a=i.points,s=i.dataKey,l=F1(this.props,!1),c=F1(o,!0),d=a.map(function(e,n){var r=Lse(Lse(Lse({key:"dot-".concat(n),r:3},l),c),{},{index:n,cx:e.x,cy:e.y,value:e.value,dataKey:s,payload:e.payload,points:a});return t.renderDotItem(o,r)}),u={clipPath:e?"url(#clipPath-".concat(n?"":"dots-").concat(r,")"):null};return We.createElement(b2,Rse({className:"recharts-line-dots",key:"dots"},u),d)}},{key:"renderCurveStatically",value:function(e,t,n,r){var i=this.props,o=i.type,a=i.layout,s=i.connectNulls,l=(i.ref,Dse(i,Tse)),c=Lse(Lse(Lse({},F1(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(n,")"):null,points:e},r),{},{type:o,layout:a,connectNulls:s});return We.createElement(Nae,Rse({},c,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var n=this,r=this.props,i=r.points,o=r.strokeDasharray,a=r.isAnimationActive,s=r.animationBegin,l=r.animationDuration,c=r.animationEasing,d=r.animationId,u=r.animateNewValues,p=r.width,h=r.height,m=this.state,f=m.prevPoints,g=m.totalLength;return We.createElement(U0,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var a=r.t;if(f){var s=f.length/i.length,l=i.map(function(e,t){var n=Math.floor(t*s);if(f[n]){var r=f[n],i=h1(r.x,e.x),o=h1(r.y,e.y);return Lse(Lse({},e),{},{x:i(a),y:o(a)})}if(u){var l=h1(2*p,e.x),c=h1(h/2,e.y);return Lse(Lse({},e),{},{x:l(a),y:c(a)})}return Lse(Lse({},e),{},{x:e.x,y:e.y})});return n.renderCurveStatically(l,e,t)}var c,d=h1(0,g)(a);if(o){var m="".concat(o).split(/[,\s]+/gim).map(function(e){return parseFloat(e)});c=n.getStrokeDasharray(d,g,m)}else c=n.generateSimpleStrokeDasharray(g,d);return n.renderCurveStatically(i,e,t,{strokeDasharray:c})})}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,i=n.isAnimationActive,o=this.state,a=o.prevPoints,s=o.totalLength;return i&&r&&r.length&&(!a&&s>0||!Hee()(a,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,i=t.points,o=t.className,a=t.xAxis,s=t.yAxis,l=t.top,c=t.left,d=t.width,u=t.height,p=t.isAnimationActive,h=t.id;if(n||!i||!i.length)return null;var m=this.state.isAnimationFinished,f=1===i.length,g=vJ("recharts-line",o),v=a&&a.allowDataOverflow,x=s&&s.allowDataOverflow,y=v||x,b=G0()(h)?this.id:h,j=null!==(e=F1(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},w=j.r,_=void 0===w?3:w,C=j.strokeWidth,S=void 0===C?2:C,A=(function(e){return e&&"object"===k1(e)&&"clipDot"in e}(r)?r:{}).clipDot,k=void 0===A||A,M=2*_+S;return We.createElement(b2,{className:g},v||x?We.createElement("defs",null,We.createElement("clipPath",{id:"clipPath-".concat(b)},We.createElement("rect",{x:v?c:c-d/2,y:x?l:l-u/2,width:v?d:2*d,height:x?u:2*u})),!k&&We.createElement("clipPath",{id:"clipPath-dots-".concat(b)},We.createElement("rect",{x:c-M/2,y:l-M/2,width:d+M,height:u+M}))):null,!f&&this.renderCurve(y,b),this.renderErrorBar(y,b),(f||r)&&this.renderDots(y,k,b),(!p||m)&&jre.renderCallByParent(this.props,i))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!==0?[].concat(Ise(e),[0]):e,r=[],i=0;i<t;++i)r=[].concat(Ise(r),Ise(n));return r}},{key:"renderDotItem",value:function(e,t){var n;if(We.isValidElement(e))n=We.cloneElement(e,t);else if(X0()(e))n=e(t);else{var r=t.key,i=Dse(t,Ese),o=vJ("recharts-line-dot","boolean"!==typeof e?e.className:"");n=We.createElement(F3,Rse({key:r},i,{className:o}))}return n}}],r&&$se(n.prototype,r),i&&$se(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function Gse(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],i=0;i<e.length;i+=t){if(void 0!==n&&!0!==n(e[i]))return;r.push(e[i])}return r}function Yse(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),i=r*Math.PI/180,o=Math.atan(n/t),a=i>o&&i<Math.PI-o?n/Math.sin(i):t/Math.cos(i);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}function Zse(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function Kse(e){return Kse="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},Kse(e)}function Xse(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 Qse(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xse(Object(n),!0).forEach(function(t){Jse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xse(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jse(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Kse(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Kse(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kse(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ele(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,a=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,d=e.unit,u=e.angle;if(!i||!i.length||!r)return[];if(s1(l)||G2.isSsr)return function(e,t){return Gse(e,t+1)}(i,"number"===typeof l&&s1(l)?l:0);var p=[],h="top"===s||"bottom"===s?"width":"height",m=d&&"width"===h?i6(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},f=function(e,r){var i=X0()(c)?c(e.value,r):e.value;return"width"===h?Yse(i6(i,{fontSize:t,letterSpacing:n}),m,u):i6(i,{fontSize:t,letterSpacing:n})[h]},g=i.length>=2?o1(i[1].coordinate-i[0].coordinate):1,v=function(e,t,n){var r="width"===n,i=e.x,o=e.y,a=e.width,s=e.height;return 1===t?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}(o,g,h);return"equidistantPreserveStart"===l?function(e,t,n,r,i){for(var o,a=(r||[]).slice(),s=t.start,l=t.end,c=0,d=1,u=s,p=function(){var t=null===r||void 0===r?void 0:r[c];if(void 0===t)return{v:Gse(r,d)};var o,a=c,p=function(){return void 0===o&&(o=n(t,a)),o},h=t.coordinate,m=0===c||Zse(e,h,p,u,l);m||(c=0,u=s,d+=1),m&&(u=h+e*(p()/2+i),c+=d)};d<=a.length;)if(o=p())return o.v;return[]}(g,v,f,i,a):(p="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(o){var d=r[s-1],u=n(d,s-1),p=e*(d.coordinate+e*u/2-c);a[s-1]=d=Qse(Qse({},d),{},{tickCoord:p>0?d.coordinate-p*e:d.coordinate}),Zse(e,d.tickCoord,function(){return u},l,c)&&(c=d.tickCoord-e*(u/2+i),a[s-1]=Qse(Qse({},d),{},{isShow:!0}))}for(var h=o?s-1:s,m=function(t){var r,o=a[t],s=function(){return void 0===r&&(r=n(o,t)),r};if(0===t){var d=e*(o.coordinate-e*s()/2-l);a[t]=o=Qse(Qse({},o),{},{tickCoord:d<0?o.coordinate-d*e:o.coordinate})}else a[t]=o=Qse(Qse({},o),{},{tickCoord:o.coordinate});Zse(e,o.tickCoord,s,l,c)&&(l=o.tickCoord+e*(s()/2+i),a[t]=Qse(Qse({},o),{},{isShow:!0}))},f=0;f<h;f++)m(f);return a}(g,v,f,i,a,"preserveStartEnd"===l):function(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,s=t.start,l=t.end,c=function(t){var r,c=o[t],d=function(){return void 0===r&&(r=n(c,t)),r};if(t===a-1){var u=e*(c.coordinate+e*d()/2-l);o[t]=c=Qse(Qse({},c),{},{tickCoord:u>0?c.coordinate-u*e:c.coordinate})}else o[t]=c=Qse(Qse({},c),{},{tickCoord:c.coordinate});Zse(e,c.tickCoord,d,s,l)&&(l=c.tickCoord-e*(d()/2+i),o[t]=Qse(Qse({},c),{},{isShow:!0}))},d=a-1;d>=0;d--)c(d);return o}(g,v,f,i,a),p.filter(function(e){return e.isShow}))}Vse(qse,"displayName","Line"),Vse(qse,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!G2.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Vse(qse,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,a=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,d=t.layout,u=l.map(function(e,t){var l=Wte(e,a);return"horizontal"===d?{x:one({axis:n,ticks:i,bandSize:s,entry:e,index:t}),y:G0()(l)?null:r.scale(l),value:l,payload:e}:{x:G0()(l)?null:n.scale(l),y:one({axis:r,ticks:o,bandSize:s,entry:e,index:t}),value:l,payload:e}});return Lse({points:u,layout:d},c)});var tle=["viewBox"],nle=["viewBox"],rle=["ticks"];function ile(e){return ile="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},ile(e)}function ole(){return ole=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},ole.apply(this,arguments)}function ale(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 sle(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ale(Object(n),!0).forEach(function(t){mle(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ale(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lle(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cle(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,fle(r.key),r)}}function dle(e,t,n){return t=ple(t),function(e,t){if(t&&("object"===ile(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ule()?Reflect.construct(t,n||[],ple(e).constructor):t.apply(e,n))}function ule(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ule=function(){return!!e})()}function ple(e){return ple=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ple(e)}function hle(e,t){return hle=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hle(e,t)}function mle(e,t,n){return(t=fle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fle(e){var t=function(e,t){if("object"!=ile(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ile(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ile(t)?t:t+""}var gle=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=dle(this,t,[e])).state={fontSize:"",letterSpacing:""},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hle(e,t)}(t,e),n=t,r=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=lle(e,tle),i=this.props,o=i.viewBox,a=lle(i,nle);return!g1(n,o)||!g1(r,a)||!g1(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,i,o,a,s=this.props,l=s.x,c=s.y,d=s.width,u=s.height,p=s.orientation,h=s.tickSize,m=s.mirror,f=s.tickMargin,g=m?-1:1,v=e.tickSize||h,x=s1(e.tickCoord)?e.tickCoord:e.coordinate;switch(p){case"top":t=n=e.coordinate,a=(r=(i=c+ +!m*u)-g*v)-g*f,o=x;break;case"left":r=i=e.coordinate,o=(t=(n=l+ +!m*d)-g*v)-g*f,a=x;break;case"right":r=i=e.coordinate,o=(t=(n=l+ +m*d)+g*v)+g*f,a=x;break;default:t=n=e.coordinate,a=(r=(i=c+ +m*u)+g*v)+g*f,o=x}return{line:{x1:t,y1:r,x2:n,y2:i},tick:{x:o,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,o=e.orientation,a=e.mirror,s=e.axisLine,l=sle(sle(sle({},F1(this.props,!1)),F1(s,!1)),{},{fill:"none"});if("top"===o||"bottom"===o){var c=+("top"===o&&!a||"bottom"===o&&a);l=sle(sle({},l),{},{x1:t,y1:n+c*i,x2:t+r,y2:n+c*i})}else{var d=+("left"===o&&!a||"right"===o&&a);l=sle(sle({},l),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return We.createElement("line",ole({},l,{className:vJ("recharts-cartesian-axis-line",oa()(s,"className"))}))}},{key:"renderTicks",value:function(e,n,r){var i=this,o=this.props,a=o.tickLine,s=o.stroke,l=o.tick,c=o.tickFormatter,d=o.unit,u=ele(sle(sle({},this.props),{},{ticks:e}),n,r),p=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),m=F1(this.props,!1),f=F1(l,!1),g=sle(sle({},m),{},{fill:"none"},F1(a,!1)),v=u.map(function(e,n){var r=i.getTickLineCoord(e),o=r.line,v=r.tick,x=sle(sle(sle(sle({textAnchor:p,verticalAnchor:h},m),{},{stroke:"none",fill:s},f),v),{},{index:n,payload:e,visibleTicksCount:u.length,tickFormatter:c});return We.createElement(b2,ole({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},_1(i.props,e,n)),a&&We.createElement("line",ole({},g,o,{className:vJ("recharts-cartesian-axis-tick-line",oa()(a,"className"))})),l&&t.renderTickItem(l,x,"".concat(X0()(c)?c(e.value,n):e.value).concat(d||"")))});return We.createElement("g",{className:"recharts-cartesian-axis-ticks"},v)}},{key:"render",value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,i=t.height,o=t.ticksGenerator,a=t.className;if(t.hide)return null;var s=this.props,l=s.ticks,c=lle(s,rle),d=l;return X0()(o)&&(d=l&&l.length>0?o(this.props):o(c)),r<=0||i<=0||!d||!d.length?null:We.createElement(b2,{className:vJ("recharts-cartesian-axis",a),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(d,this.state.fontSize,this.state.letterSpacing),nre.renderCallByParent(this.props))}}],i=[{key:"renderTickItem",value:function(e,t,n){var r=vJ(t.className,"recharts-cartesian-axis-tick-value");return We.isValidElement(e)?We.cloneElement(e,sle(sle({},t),{},{className:r})):X0()(e)?e(sle(sle({},t),{},{className:r})):We.createElement(D6,ole({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}}],r&&cle(n.prototype,r),i&&cle(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function vle(e){return vle="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},vle(e)}function xle(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,Cle(r.key),r)}}function yle(e,t,n){return t=jle(t),function(e,t){if(t&&("object"===vle(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ble()?Reflect.construct(t,n||[],jle(e).constructor):t.apply(e,n))}function ble(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ble=function(){return!!e})()}function jle(e){return jle=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jle(e)}function wle(e,t){return wle=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wle(e,t)}function _le(e,t,n){return(t=Cle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cle(e){var t=function(e,t){if("object"!=vle(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=vle(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==vle(t)?t:t+""}function Sle(){return Sle=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},Sle.apply(this,arguments)}function Ale(e){var t=e.xAxisId,n=goe(),r=voe(),i=moe(t);return null==i?null:We.createElement(gle,Sle({},i,{className:vJ("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return Kte(e,!0)}}))}mle(gle,"displayName","CartesianAxis"),mle(gle,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var kle=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),yle(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wle(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return We.createElement(Ale,this.props)}}])&&xle(n.prototype,r),i&&xle(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);function Mle(e){return Mle="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},Mle(e)}function Ole(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,Nle(r.key),r)}}function Tle(e,t,n){return t=Ple(t),function(e,t){if(t&&("object"===Mle(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ele()?Reflect.construct(t,n||[],Ple(e).constructor):t.apply(e,n))}function Ele(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ele=function(){return!!e})()}function Ple(e){return Ple=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ple(e)}function Dle(e,t){return Dle=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dle(e,t)}function Rle(e,t,n){return(t=Nle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nle(e){var t=function(e,t){if("object"!=Mle(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Mle(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mle(t)?t:t+""}function Lle(){return Lle=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},Lle.apply(this,arguments)}_le(kle,"displayName","XAxis"),_le(kle,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var Ile=function(e){var t=e.yAxisId,n=goe(),r=voe(),i=foe(t);return null==i?null:We.createElement(gle,Lle({},i,{className:vJ("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return Kte(e,!0)}}))},Fle=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Tle(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dle(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return We.createElement(Ile,this.props)}}])&&Ole(n.prototype,r),i&&Ole(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.Component);Rle(Fle,"displayName","YAxis"),Rle(Fle,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var $le=Ose({chartName:"LineChart",GraphicalChild:qse,axisComponents:[{axisType:"xAxis",AxisComp:kle},{axisType:"yAxis",AxisComp:Fle}],formatAxisMap:Fie}),Ble=["x1","y1","x2","y2","key"],zle=["offset"];function Hle(e){return Hle="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},Hle(e)}function Wle(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 Vle(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wle(Object(n),!0).forEach(function(t){Ule(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wle(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ule(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Hle(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Hle(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hle(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qle(){return qle=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},qle.apply(this,arguments)}function Gle(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Yle=function(e){var t=e.fill;if(!t||"none"===t)return null;var n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.ry;return We.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Zle(e,t){var n;if(We.isValidElement(e))n=We.cloneElement(e,t);else if(X0()(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=Gle(t,Ble),c=F1(l,!1),d=(c.offset,Gle(c,zle));n=We.createElement("line",qle({},d,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function Kle(e){var t=e.x,n=e.width,r=e.horizontal,i=void 0===r||r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(r,o){var a=Vle(Vle({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:"line-".concat(o),index:o});return Zle(i,a)});return We.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function Xle(e){var t=e.y,n=e.height,r=e.vertical,i=void 0===r||r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(r,o){var a=Vle(Vle({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:"line-".concat(o),index:o});return Zle(i,a)});return We.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function Qle(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal;if(!(void 0===l||l)||!t||!t.length)return null;var c=s.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==c[0]&&c.unshift(0);var d=c.map(function(e,s){var l=!c[s+1]?i+a-e:c[s+1]-e;if(l<=0)return null;var d=s%t.length;return We.createElement("rect",{key:"react-".concat(s),y:e,x:r,height:l,width:o,stroke:"none",fill:t[d],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return We.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function Jle(e){var t=e.vertical,n=void 0===t||t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var d=c.map(function(e){return Math.round(e+o-o)}).sort(function(e,t){return e-t});o!==d[0]&&d.unshift(0);var u=d.map(function(e,t){var n=!d[t+1]?o+s-e:d[t+1]-e;if(n<=0)return null;var c=t%r.length;return We.createElement("rect",{key:"react-".concat(t),x:e,y:a,width:n,height:l,stroke:"none",fill:r[c],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return We.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var ece=function(e,t){var n=e.xAxis,r=e.width,i=e.height,o=e.offset;return Zte(ele(Vle(Vle(Vle({},gle.defaultProps),n),{},{ticks:Kte(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},tce=function(e,t){var n=e.yAxis,r=e.width,i=e.height,o=e.offset;return Zte(ele(Vle(Vle(Vle({},gle.defaultProps),n),{},{ticks:Kte(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},nce={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function rce(e){var t,n,r,i,o,a,s=goe(),l=voe(),c=(0,We.useContext)(coe),d=Vle(Vle({},e),{},{stroke:null!==(t=e.stroke)&&void 0!==t?t:nce.stroke,fill:null!==(n=e.fill)&&void 0!==n?n:nce.fill,horizontal:null!==(r=e.horizontal)&&void 0!==r?r:nce.horizontal,horizontalFill:null!==(i=e.horizontalFill)&&void 0!==i?i:nce.horizontalFill,vertical:null!==(o=e.vertical)&&void 0!==o?o:nce.vertical,verticalFill:null!==(a=e.verticalFill)&&void 0!==a?a:nce.verticalFill,x:s1(e.x)?e.x:c.left,y:s1(e.y)?e.y:c.top,width:s1(e.width)?e.width:c.width,height:s1(e.height)?e.height:c.height}),u=d.x,p=d.y,h=d.width,m=d.height,f=d.syncWithTicks,g=d.horizontalValues,v=d.verticalValues,x=function(){var e=(0,We.useContext)(aoe);return p1(e)}(),y=function(){var e=(0,We.useContext)(soe);return roe()(e,function(e){return are()(e.domain,Number.isFinite)})||p1(e)}();if(!s1(h)||h<=0||!s1(m)||m<=0||!s1(u)||u!==+u||!s1(p)||p!==+p)return null;var b=d.verticalCoordinatesGenerator||ece,j=d.horizontalCoordinatesGenerator||tce,w=d.horizontalPoints,_=d.verticalPoints;if((!w||!w.length)&&X0()(j)){var C=g&&g.length,S=j({yAxis:y?Vle(Vle({},y),{},{ticks:C?g:y.ticks}):void 0,width:s,height:l,offset:c},!!C||f);t2(Array.isArray(S),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Hle(S),"]")),Array.isArray(S)&&(w=S)}if((!_||!_.length)&&X0()(b)){var A=v&&v.length,k=b({xAxis:x?Vle(Vle({},x),{},{ticks:A?v:x.ticks}):void 0,width:s,height:l,offset:c},!!A||f);t2(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Hle(k),"]")),Array.isArray(k)&&(_=k)}return We.createElement("g",{className:"recharts-cartesian-grid"},We.createElement(Yle,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),We.createElement(Kle,qle({},d,{offset:c,horizontalPoints:w,xAxis:x,yAxis:y})),We.createElement(Xle,qle({},d,{offset:c,verticalPoints:_,xAxis:x,yAxis:y})),We.createElement(Qle,qle({},d,{horizontalPoints:w})),We.createElement(Jle,qle({},d,{verticalPoints:_})))}rce.displayName="CartesianGrid";var ice=["component"];function oce(e){return oce="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},oce(e)}function ace(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sce(e){var t,n=e.component,r=ace(e,ice);return(0,We.isValidElement)(n)?t=(0,We.cloneElement)(n,r):X0()(n)?t=(0,We.createElement)(n,r):t2(!1,"Customized's props `component` must be React.element or Function, but got %s.",oce(n)),We.createElement(b2,{className:"recharts-customized-wrapper"},t)}sce.displayName="Customized";var lce=n(26480),cce=n(76378),dce=n(60991),uce=n(56893),pce=n(40995),hce=n(63102),mce=Ose({chartName:"BarChart",GraphicalChild:Eie,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:kle},{axisType:"yAxis",AxisComp:Fle}],formatAxisMap:Fie}),fce=["points","className","baseLinePoints","connectNulls"];function gce(){return gce=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},gce.apply(this,arguments)}function vce(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xce(e){return function(e){if(Array.isArray(e))return yce(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)return;if("string"===typeof e)return yce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yce(e,t)}(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 yce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bce=function(e){return e&&e.x===+e.x&&e.y===+e.y},jce=function(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach(function(e){bce(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),bce(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t}(e);t&&(n=[n.reduce(function(e,t){return[].concat(xce(e),xce(t))},[])]);var r=n.map(function(e){return e.reduce(function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)},"")}).join("");return 1===n.length?"".concat(r,"Z"):r},wce=function(e){var t=e.points,n=e.className,r=e.baseLinePoints,i=e.connectNulls,o=vce(e,fce);if(!t||!t.length)return null;var a=vJ("recharts-polygon",n);if(r&&r.length){var s=o.stroke&&"none"!==o.stroke,l=function(e,t,n){var r=jce(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(jce(t.reverse(),n).slice(1))}(t,r,i);return We.createElement("g",{className:a},We.createElement("path",gce({},F1(o,!0),{fill:"Z"===l.slice(-1)?o.fill:"none",stroke:"none",d:l})),s?We.createElement("path",gce({},F1(o,!0),{fill:"none",d:jce(t,i)})):null,s?We.createElement("path",gce({},F1(o,!0),{fill:"none",d:jce(r,i)})):null)}var c=jce(t,i);return We.createElement("path",gce({},F1(o,!0),{fill:"Z"===c.slice(-1)?o.fill:"none",className:a,d:c}))};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},_ce(e)}function Cce(){return Cce=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},Cce.apply(this,arguments)}function Sce(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 Ace(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sce(Object(n),!0).forEach(function(t){Pce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sce(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kce(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,Dce(r.key),r)}}function Mce(e,t,n){return t=Tce(t),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)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oce()?Reflect.construct(t,n||[],Tce(e).constructor):t.apply(e,n))}function Oce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oce=function(){return!!e})()}function Tce(e){return Tce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tce(e)}function Ece(e,t){return Ece=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ece(e,t)}function Pce(e,t,n){return(t=Dce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dce(e){var t=function(e,t){if("object"!=_ce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_ce(t)?t:t+""}var Rce=Math.PI/180,Nce=1e-5,Lce=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Mce(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ece(e,t)}(t,e),n=t,r=[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,i=t.radius,o=t.orientation,a=t.tickSize||8,s=Bne(n,r,i,e.coordinate),l=Bne(n,r,i+("inner"===o?-1:1)*a,e.coordinate);return{x1:s.x,y1:s.y,x2:l.x,y2:l.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*Rce);return n>Nce?"outer"===t?"start":"end":n<-Nce?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,i=e.axisLine,o=e.axisLineType,a=Ace(Ace({},F1(this.props,!1)),{},{fill:"none"},F1(i,!1));if("circle"===o)return We.createElement(F3,Cce({className:"recharts-polar-angle-axis-line"},a,{cx:t,cy:n,r:r}));var s=this.props.ticks.map(function(e){return Bne(t,n,r,e.coordinate)});return We.createElement(wce,Cce({className:"recharts-polar-angle-axis-line"},a,{points:s}))}},{key:"renderTicks",value:function(){var e=this,n=this.props,r=n.ticks,i=n.tick,o=n.tickLine,a=n.tickFormatter,s=n.stroke,l=F1(this.props,!1),c=F1(i,!1),d=Ace(Ace({},l),{},{fill:"none"},F1(o,!1)),u=r.map(function(n,r){var u=e.getTickLineCoord(n),p=Ace(Ace(Ace({textAnchor:e.getTickTextAnchor(n)},l),{},{stroke:"none",fill:s},c),{},{index:r,payload:n,x:u.x2,y:u.y2});return We.createElement(b2,Cce({className:vJ("recharts-polar-angle-axis-tick",Une(i)),key:"tick-".concat(n.coordinate)},_1(e.props,n,r)),o&&We.createElement("line",Cce({className:"recharts-polar-angle-axis-tick-line"},d,u)),i&&t.renderTickItem(i,p,a?a(n.value,r):n.value))});return We.createElement(b2,{className:"recharts-polar-angle-axis-ticks"},u)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return n<=0||!t||!t.length?null:We.createElement(b2,{className:vJ("recharts-polar-angle-axis",this.props.className)},r&&this.renderAxisLine(),this.renderTicks())}}],i=[{key:"renderTickItem",value:function(e,t,n){return We.isValidElement(e)?We.cloneElement(e,t):X0()(e)?e(t):We.createElement(D6,Cce({},t,{className:"recharts-polar-angle-axis-tick-value"}),n)}}],r&&kce(n.prototype,r),i&&kce(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);Pce(Lce,"displayName","PolarAngleAxis"),Pce(Lce,"axisType","angleAxis"),Pce(Lce,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Ice=n(22794),Fce=n.n(Ice),$ce=n(59364),Bce=n.n($ce),zce=["cx","cy","angle","ticks","axisLine"],Hce=["ticks","tick","angle","tickFormatter","stroke"];function Wce(e){return Wce="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},Wce(e)}function Vce(){return Vce=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},Vce.apply(this,arguments)}function Uce(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 qce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uce(Object(n),!0).forEach(function(t){Jce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uce(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gce(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yce(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,ede(r.key),r)}}function Zce(e,t,n){return t=Xce(t),function(e,t){if(t&&("object"===Wce(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Kce()?Reflect.construct(t,n||[],Xce(e).constructor):t.apply(e,n))}function Kce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kce=function(){return!!e})()}function Xce(e){return Xce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xce(e)}function Qce(e,t){return Qce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qce(e,t)}function Jce(e,t,n){return(t=ede(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ede(e){var t=function(e,t){if("object"!=Wce(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Wce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wce(t)?t:t+""}var tde,nde=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Zce(this,t,arguments)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qce(e,t)}(t,e),n=t,r=[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,i=n.cx,o=n.cy;return Bne(i,o,t,r)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,i=e.ticks,o=Fce()(i,function(e){return e.coordinate||0});return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:Bce()(i,function(e){return e.coordinate||0}).coordinate||0,outerRadius:o.coordinate||0}}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,i=e.ticks,o=e.axisLine,a=Gce(e,zce),s=i.reduce(function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]},[1/0,-1/0]),l=Bne(t,n,s[0],r),c=Bne(t,n,s[1],r),d=qce(qce(qce({},F1(a,!1)),{},{fill:"none"},F1(o,!1)),{},{x1:l.x,y1:l.y,x2:c.x,y2:c.y});return We.createElement("line",Vce({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var e=this,n=this.props,r=n.ticks,i=n.tick,o=n.angle,a=n.tickFormatter,s=n.stroke,l=Gce(n,Hce),c=this.getTickTextAnchor(),d=F1(l,!1),u=F1(i,!1),p=r.map(function(n,r){var l=e.getTickValueCoord(n),p=qce(qce(qce(qce({textAnchor:c,transform:"rotate(".concat(90-o,", ").concat(l.x,", ").concat(l.y,")")},d),{},{stroke:"none",fill:s},u),{},{index:r},l),{},{payload:n});return We.createElement(b2,Vce({className:vJ("recharts-polar-radius-axis-tick",Une(i)),key:"tick-".concat(n.coordinate)},_1(e.props,n,r)),t.renderTickItem(i,p,a?a(n.value,r):n.value))});return We.createElement(b2,{className:"recharts-polar-radius-axis-ticks"},p)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.axisLine,r=e.tick;return t&&t.length?We.createElement(b2,{className:vJ("recharts-polar-radius-axis",this.props.className)},n&&this.renderAxisLine(),r&&this.renderTicks(),nre.renderCallByParent(this.props,this.getViewBox())):null}}],i=[{key:"renderTickItem",value:function(e,t,n){return We.isValidElement(e)?We.cloneElement(e,t):X0()(e)?e(t):We.createElement(D6,Vce({},t,{className:"recharts-polar-radius-axis-tick-value"}),n)}}],r&&Yce(n.prototype,r),i&&Yce(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);function rde(e){return rde="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},rde(e)}function ide(){return ide=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},ide.apply(this,arguments)}function ode(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 ade(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ode(Object(n),!0).forEach(function(t){pde(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ode(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sde(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,hde(r.key),r)}}function lde(e,t,n){return t=dde(t),function(e,t){if(t&&("object"===rde(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cde()?Reflect.construct(t,n||[],dde(e).constructor):t.apply(e,n))}function cde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cde=function(){return!!e})()}function dde(e){return dde=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dde(e)}function ude(e,t){return ude=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ude(e,t)}function pde(e,t,n){return(t=hde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hde(e){var t=function(e,t){if("object"!=rde(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rde(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rde(t)?t:t+""}Jce(nde,"displayName","PolarRadiusAxis"),Jce(nde,"axisType","radiusAxis"),Jce(nde,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var mde=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),pde(n=lde(this,t,[e]),"pieRef",null),pde(n,"sectorRefs",[]),pde(n,"id",d1("recharts-pie-")),pde(n,"handleAnimationEnd",function(){var e=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),X0()(e)&&e()}),pde(n,"handleAnimationStart",function(){var e=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),X0()(e)&&e()}),n.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ude(e,t)}(t,e),n=t,r=[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.label,i=n.labelLine,o=n.dataKey,a=n.valueKey,s=F1(this.props,!1),l=F1(r,!1),c=F1(i,!1),d=r&&r.offsetRadius||20,u=e.map(function(e,n){var u=(e.startAngle+e.endAngle)/2,p=Bne(e.cx,e.cy,e.outerRadius+d,u),h=ade(ade(ade(ade({},s),e),{},{stroke:"none"},l),{},{index:n,textAnchor:t.getTextAnchor(p.x,e.cx)},p),m=ade(ade(ade(ade({},s),e),{},{fill:"none",stroke:e.fill},c),{},{index:n,points:[Bne(e.cx,e.cy,e.outerRadius,u),p]}),f=o;return G0()(o)&&G0()(a)?f="value":G0()(o)&&(f=a),We.createElement(b2,{key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(n)},i&&t.renderLabelLineItem(i,m,"line"),t.renderLabelItem(r,h,Wte(e,f)))});return We.createElement(b2,{className:"recharts-pie-labels"},u)}},{key:"renderSectorsStatically",value:function(e){var t=this,n=this.props,r=n.activeShape,i=n.blendStroke,o=n.inactiveShape;return e.map(function(n,a){if(0===(null===n||void 0===n?void 0:n.startAngle)&&0===(null===n||void 0===n?void 0:n.endAngle)&&1!==e.length)return null;var s=t.isActiveIndex(a),l=o&&t.hasActiveIndex()?o:null,c=s?r:l,d=ade(ade({},n),{},{stroke:i?n.fill:n.stroke,tabIndex:-1});return We.createElement(b2,ide({ref:function(e){e&&!t.sectorRefs.includes(e)&&t.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},_1(t.props,n,a),{key:"sector-".concat(null===n||void 0===n?void 0:n.startAngle,"-").concat(null===n||void 0===n?void 0:n.endAngle,"-").concat(n.midAngle,"-").concat(a)}),We.createElement(Jre,ide({option:c,isActive:s,shapeType:"sector"},d)))})}},{key:"renderSectorsWithAnimation",value:function(){var e=this,t=this.props,n=t.sectors,r=t.isAnimationActive,i=t.animationBegin,o=t.animationDuration,a=t.animationEasing,s=t.animationId,l=this.state,c=l.prevSectors,d=l.prevIsAnimationActive;return We.createElement(U0,{begin:i,duration:o,isActive:r,easing:a,from:{t:0},to:{t:1},key:"pie-".concat(s,"-").concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(t){var r=t.t,i=[],o=(n&&n[0]).startAngle;return n.forEach(function(e,t){var n=c&&c[t],a=t>0?oa()(e,"paddingAngle",0):0;if(n){var s=h1(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=ade(ade({},e),{},{startAngle:o+a,endAngle:o+s(r)+a});i.push(l),o=l.endAngle}else{var d=e.endAngle,u=e.startAngle,p=h1(0,d-u)(r),h=ade(ade({},e),{},{startAngle:o+a,endAngle:o+p+a});i.push(h),o=h.endAngle}}),We.createElement(b2,null,e.renderSectorsStatically(i))})}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&Hee()(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var e=this,t=this.props,n=t.hide,r=t.sectors,i=t.className,o=t.label,a=t.cx,s=t.cy,l=t.innerRadius,c=t.outerRadius,d=t.isAnimationActive,u=this.state.isAnimationFinished;if(n||!r||!r.length||!s1(a)||!s1(s)||!s1(l)||!s1(c))return null;var p=vJ("recharts-pie",i);return We.createElement(b2,{tabIndex:this.props.rootTabIndex,className:p,ref:function(t){e.pieRef=t}},this.renderSectors(),o&&this.renderLabels(r),nre.renderCallByParent(this.props,null,!1),(!d||u)&&jre.renderCallByParent(this.props,r,!1))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(e,t,n){if(We.isValidElement(e))return We.cloneElement(e,t);if(X0()(e))return e(t);var r=vJ("recharts-pie-label-line","boolean"!==typeof e?e.className:"");return We.createElement(Nae,ide({},t,{key:n,type:"linear",className:r}))}},{key:"renderLabelItem",value:function(e,t,n){if(We.isValidElement(e))return We.cloneElement(e,t);var r=n;if(X0()(e)&&(r=e(t),We.isValidElement(r)))return r;var i=vJ("recharts-pie-label-text","boolean"===typeof e||X0()(e)?"":e.className);return We.createElement(D6,ide({},t,{alignmentBaseline:"middle",className:i}),r)}}],r&&sde(n.prototype,r),i&&sde(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(We.PureComponent);tde=mde,pde(mde,"displayName","Pie"),pde(mde,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!G2.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),pde(mde,"parseDeltaAngle",function(e,t){return o1(t-e)*Math.min(Math.abs(t-e),360)}),pde(mde,"getRealPieData",function(e){var t=e.data,n=e.children,r=F1(e,!1),i=D1(n,sre);return t&&t.length?t.map(function(e,t){return ade(ade(ade({payload:e},r),e),i&&i[t]&&i[t].props)}):i&&i.length?i.map(function(e){return ade(ade({},r),e.props)}):[]}),pde(mde,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,o=t.height,a=zne(i,o);return{cx:r+u1(e.cx,i,i/2),cy:n+u1(e.cy,o,o/2),innerRadius:u1(e.innerRadius,a,0),outerRadius:u1(e.outerRadius,a,.8*a),maxRadius:e.maxRadius||Math.sqrt(i*i+o*o)/2}}),pde(mde,"getComposedData",function(e){var t=e.item,n=e.offset,r=void 0!==t.type.defaultProps?ade(ade({},t.type.defaultProps),t.props):t.props,i=tde.getRealPieData(r);if(!i||!i.length)return null;var o=r.cornerRadius,a=r.startAngle,s=r.endAngle,l=r.paddingAngle,c=r.dataKey,d=r.nameKey,u=r.valueKey,p=r.tooltipType,h=Math.abs(r.minAngle),m=tde.parseCoordinateOfPie(r,n),f=tde.parseDeltaAngle(a,s),g=Math.abs(f),v=c;G0()(c)&&G0()(u)?(t2(!1,'Use "dataKey" to specify the value of pie,\n      the props "valueKey" will be deprecated in 1.1.0'),v="value"):G0()(c)&&(t2(!1,'Use "dataKey" to specify the value of pie,\n      the props "valueKey" will be deprecated in 1.1.0'),v=u);var x,y,b=i.filter(function(e){return 0!==Wte(e,v,0)}).length,j=g-b*h-(g>=360?b:b-1)*l,w=i.reduce(function(e,t){var n=Wte(t,v,0);return e+(s1(n)?n:0)},0);w>0&&(x=i.map(function(e,t){var n,r=Wte(e,v,0),i=Wte(e,d,t),s=(s1(r)?r:0)/w,c=(n=t?y.endAngle+o1(f)*l*(0!==r?1:0):a)+o1(f)*((0!==r?h:0)+s*j),u=(n+c)/2,g=(m.innerRadius+m.outerRadius)/2,x=[{name:i,value:r,payload:e,dataKey:v,type:p}],b=Bne(m.cx,m.cy,g,u);return y=ade(ade(ade({percent:s,cornerRadius:o,name:i,tooltipPayload:x,midAngle:u,middleRadius:g,tooltipPosition:b},e),m),{},{value:Wte(e,v),startAngle:n,endAngle:c,payload:e,paddingAngle:o1(f)*l})}));return ade(ade({},m),{},{sectors:x,data:i})});var fde=Ose({chartName:"PieChart",GraphicalChild:mde,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Lce},{axisType:"radiusAxis",AxisComp:nde}],formatAxisMap:function(e,t,n,r,i){var o=e.width,a=e.height,s=e.startAngle,l=e.endAngle,c=u1(e.cx,o,o/2),d=u1(e.cy,a,a/2),u=zne(o,a,n),p=u1(e.innerRadius,u,0),h=u1(e.outerRadius,u,.8*u);return Object.keys(t).reduce(function(e,n){var o,a=t[n],u=a.domain,m=a.reversed;if(G0()(a.range))"angleAxis"===r?o=[s,l]:"radiusAxis"===r&&(o=[p,h]),m&&(o=[o[1],o[0]]);else{var f=Lne(o=a.range,2);s=f[0],l=f[1]}var g=Jte(a,i),v=g.realScaleType,x=g.scale;x.domain(u).range(o),tne(x);var y=ine(x,Rne(Rne({},a),{},{realScaleType:v})),b=Rne(Rne(Rne({},a),y),{},{range:o,radius:h,realScaleType:v,scale:x,cx:c,cy:d,innerRadius:p,outerRadius:h,startAngle:s,endAngle:l});return Rne(Rne({},e),{},Nne({},n,b))},{})},defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const gde={30:"#F9F9FF",50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},vde={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00"},xde={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00"},yde={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},bde={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64"},jde={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037"},wde={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4"},_de={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",A800:"#CD75AF",A900:"#932474"},Cde={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Sde={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Ade={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},kde={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17"},Mde={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"},Ode={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Tde={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#CD75AF",900:"#932474",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Ede={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Pde={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Dde={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"},Rde={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"};let Nde=gde;window.changeTheme=e=>{Nde=r[e]};const Lde=(0,Mu.A)({palette:{primary:{main:Nde[500],theme:Nde},secondary:{main:bde[500],theme:bde},customClr:{bp:"#3f51b5",glucose:"#AF9300",others:"#AF9300",pulse:"#B94FBB",fastingBg:"#DCEBF0",fastingText:"#167B97",nonfastingBg:"#E2E4F2",nonfastingText:"#3B49A6",fastingBar:"#CD75AF",nonfastingBar:"#932474"},amber:xde,blue:yde,blueGrey:bde,brown:jde,cyan:wde,deepPurple:_de,green:Cde,grey:Sde,lightBlue:Ade,lightGreen:kde,lime:Mde,orange:Ode,pink:Tde,purple:Ede,red:Pde,teal:Dde,yellow:Rde},typography:{fontFamily:['"Quicksand", sans-serif'].join(",")},components:{MuiDrawer:{styleOverrides:{paper:e=>{var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y;let{theme:b}=e;return{backgroundColor:null===b||void 0===b||null===(t=b.palette)||void 0===t||null===(n=t.common)||void 0===n?void 0:n.white,color:b.palette.grey[800],"& .MuiSvgIcon-root":{color:b.palette.grey[800]},"& ul":{paddingTop:10,paddingBottom:20,overflow:"hidden",overflowY:"auto","& li":{padding:10,paddingTop:0,"& a, & div.MuiListItemButton-root":{backgroundColor:null===b||void 0===b||null===(r=b.palette)||void 0===r||null===(i=r.common)||void 0===i?void 0:i.white,borderRadius:2*(null===b||void 0===b||null===(o=b.shape)||void 0===o?void 0:o.borderRadius),boxShadow:"0px 4px 24px 10px rgba(0, 0, 0, 0.06)","&.Mui-selected":{color:null===b||void 0===b||null===(a=b.palette)||void 0===a||null===(s=a.common)||void 0===s?void 0:s.white,backgroundColor:null===b||void 0===b||null===(l=b.palette)||void 0===l||null===(c=l.primary)||void 0===c?void 0:c.main,"& .MuiSvgIcon-root":{color:null===b||void 0===b||null===(d=b.palette)||void 0===d||null===(u=d.common)||void 0===u?void 0:u.white},"&:hover":{backgroundColor:null===b||void 0===b||null===(p=b.palette)||void 0===p||null===(h=p.primary)||void 0===h?void 0:h.main}}},"& a":{"&:hover":{color:null===b||void 0===b||null===(m=b.palette)||void 0===m||null===(f=m.common)||void 0===f?void 0:f.white,backgroundColor:null===b||void 0===b||null===(g=b.palette)||void 0===g||null===(v=g.primary)||void 0===v?void 0:v.main,"& .MuiSvgIcon-root":{color:null===b||void 0===b||null===(x=b.palette)||void 0===x||null===(y=x.common)||void 0===y?void 0:y.white}}},"& div.patientHeader":{backgroundColor:Nde[100]}}}}}}},MuiAppBar:{styleOverrides:{root:e=>{var t,n;let{ownerState:r,theme:o}=e;return(0,i.A)({},"fixed"===r.position&&{boxShadow:"none",color:Sde[900],backgroundColor:null===o||void 0===o||null===(t=o.palette)||void 0===t||null===(n=t.common)||void 0===n?void 0:n.white})}}},MuiToolbar:{styleOverrides:{root:e=>{var t;let{theme:n}=e;return{[null===n||void 0===n||null===(t=n.breakpoints)||void 0===t?void 0:t.up("md")]:{minHeight:80}}}}},MuiTableCell:{styleOverrides:{root:{whiteSpace:"nowrap"}}},MuiButton:{styleOverrides:{root:{textTransform:"capitalize"}}},MuiOutlinedInput:{styleOverrides:{root:e=>{var t;let{theme:n}=e;return{borderRadius:2*(null===n||void 0===n||null===(t=n.shape)||void 0===t?void 0:t.borderRadius)}}}},MuiTooltip:{defaultProps:{enterTouchDelay:0}}}}),Ide=[{name:"Page A",uv:4e3,pv:2400,cv:2100,amt:2400},{name:"Page B",uv:3e3,pv:1398,cv:2e3,amt:2210},{name:"Page C",uv:2e3,pv:9800,cv:5e3,amt:2290},{name:"Page D",uv:2780,pv:3908,cv:2500,amt:2e3},{name:"Page E",uv:1890,pv:4800,cv:2300,amt:2181},{name:"Page F",uv:2390,pv:3800,cv:4e3,amt:2500},{name:"Page G",uv:3490,pv:4300,cv:5e3,amt:2100}];function Fde(){const e=[Lde.palette.deepPurple[500],Lde.palette.blue[500],Lde.palette.primary.main],t=Math.PI/180;return(0,Gt.jsx)(l2,{width:"100%",height:"100%",children:(0,Gt.jsxs)(fde,{width:400,height:400,children:[(0,Gt.jsx)(mde,{data:[{name:"Male",value:3e3},{name:"Female",value:1200},{name:"Other",value:2400}],cx:"50%",cy:"50%",labelLine:!1,label:e=>{let{cx:n,cy:r,midAngle:i,innerRadius:o,outerRadius:a,percent:s}=e;const l=o+.5*(a-o),c=n+l*Math.cos(-i*t),d=r+l*Math.sin(-i*t);return(0,Gt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>n?"start":"end",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},outerRadius:120,fill:"#8884d8",dataKey:"value",children:Ide.map((t,n)=>(0,Gt.jsx)(sre,{fill:e[n%e.length]},"cell-".concat(n)))}),(0,Gt.jsx)(l5,{}),(0,Gt.jsx)(L3,{})]})})}function $de(){const e=[Lde.palette.deepPurple[500],Lde.palette.blue[500],Lde.palette.primary.main,Lde.palette.blueGrey[500]],t=Math.PI/180;return(0,Gt.jsx)(l2,{width:"100%",height:"100%",children:(0,Gt.jsxs)(fde,{width:400,height:400,children:[(0,Gt.jsx)(mde,{data:[{name:"40 yrs",value:3e3},{name:"50-60 yrs",value:1200},{name:"60-75 yrs",value:2400},{name:"75+ yrs",value:2e3}],cx:"50%",cy:"50%",labelLine:!1,label:e=>{let{cx:n,cy:r,midAngle:i,innerRadius:o,outerRadius:a,percent:s}=e;const l=o+.5*(a-o),c=n+l*Math.cos(-i*t),d=r+l*Math.sin(-i*t);return(0,Gt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>n?"start":"end",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},outerRadius:120,fill:"#8884d8",dataKey:"value",children:Ide.map((t,n)=>(0,Gt.jsx)(sre,{fill:e[n%e.length]},"cell-".concat(n)))}),(0,Gt.jsx)(l5,{}),(0,Gt.jsx)(L3,{})]})})}Fde.defaultProps={data:[]},$de.defaultProps={data:[]};const Bde=["children","value","index"];function zde(e){const{children:t,value:n,index:r}=e,o=Ko(e,Bde);return(0,Gt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function Hde(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}function Wde(e){let{populationbyCond:t,populationbyAge:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,headCellsItemsPopCond:c,headCellsItemsPopAge:d,checkState:u,onCheck:p,isSelection:h,nodata:m,fetchPopulationList:f,pageDetails:g,Example:v}=e;const{t:x}=vg(),y=so(),[b,j]=We.useState(0),[w,_]=We.useState(0);return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(Uu,{elevation:0,sx:{p:2.5,bgcolor:"primary.theme.100",cursor:"pointer"},onClick:()=>y("".concat(Lc.DOCTOR.PATIENT)),children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.500",borderRadius:1},children:(0,Gt.jsx)(lce.A,{fontSize:"large",sx:{color:"primary.theme.50"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:x("rpm_TotalPatient")}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:500,children:"1500"})]})]})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(Uu,{elevation:0,sx:{p:2.5,bgcolor:"red.100",cursor:"pointer"},onClick:()=>y("".concat(Lc.DOCTOR.PATIENT)),children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"red.500",borderRadius:1},children:(0,Gt.jsx)(hce.A,{fontSize:"large",sx:{color:"red.50"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:x("rpm_AlertPatient")}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:"50"})]})]})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(Uu,{elevation:0,sx:{p:2.5,bgcolor:"blueGrey.100",cursor:"pointer"},onClick:()=>y("".concat(Lc.DOCTOR.PATIENT)),children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"blueGrey.500",borderRadius:1},children:(0,Gt.jsx)(dce.A,{fontSize:"large",sx:{color:"blueGrey.50"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:x("rpm_NonActivePatient")}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:500,children:"750"})]})]})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(Uu,{elevation:0,sx:{p:2.5,bgcolor:"deepPurple.100",cursor:"pointer"},onClick:()=>y("".concat(Lc.DOCTOR.PATIENT)),children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"deepPurple.500",borderRadius:1},children:(0,Gt.jsx)(cce.A,{fontSize:"large",sx:{color:"deepPurple.50"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:x("rpm_ActivePatient")}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:500,children:"750"})]})]})})}),!1]}),(0,Gt.jsxs)(df,{container:!0,spacing:2.5,sx:{mt:.01},children:[(0,Gt.jsx)(df,{item:!0,xs:!0,md:6,children:(0,Gt.jsxs)(Uu,{variant:"outlined",children:[(0,Gt.jsx)(Eu,{sx:{px:2.5,py:1.5,bgcolor:"primary.theme.50"},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:12,sm:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"Population by Gender"})})})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(Eu,{sx:{borderBottom:1,borderColor:"divider"},children:(0,Gt.jsxs)(eU,{value:b,onChange:(e,t)=>{j(t)},"aria-label":"basic tabs example",children:[(0,Gt.jsx)(AV,(0,i.A)({label:"Stats"},Hde(0))),(0,Gt.jsx)(AV,(0,i.A)({label:"List"},Hde(1)))]})}),(0,Gt.jsxs)(Eu,{sx:{p:2.5},children:[(0,Gt.jsx)(zde,{value:b,index:0,children:(0,Gt.jsx)(Eu,{sx:{height:"300px"},children:(0,Gt.jsx)(Fde,{})})}),(0,Gt.jsx)(zde,{value:b,index:1,children:(0,Gt.jsx)(EM,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:t,headCells:c,dataParameter:l,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,children:t.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{children:e.gender}),(0,Gt.jsx)(rC,{children:e.population})]},e.id))})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:!0,md:6,children:(0,Gt.jsxs)(Uu,{variant:"outlined",children:[(0,Gt.jsx)(Eu,{sx:{px:2.5,py:1.5,bgcolor:"primary.theme.50"},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:12,sm:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"Population by Age Group"})})})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(Eu,{sx:{borderBottom:1,borderColor:"divider"},children:(0,Gt.jsxs)(eU,{value:w,onChange:(e,t)=>{_(t)},"aria-label":"basic tabs example",children:[(0,Gt.jsx)(AV,(0,i.A)({label:"Stats"},Hde(0))),(0,Gt.jsx)(AV,(0,i.A)({label:"List"},Hde(1)))]})}),(0,Gt.jsxs)(Eu,{sx:{p:2.5},children:[(0,Gt.jsx)(zde,{value:w,index:0,children:(0,Gt.jsx)(Eu,{sx:{height:"300px"},children:(0,Gt.jsx)($de,{})})}),(0,Gt.jsx)(zde,{value:w,index:1,children:(0,Gt.jsx)(EM,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:n,headCells:d,dataParameter:l,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,children:n.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{children:e.age_group}),(0,Gt.jsx)(rC,{children:e.population})]},e.id))})})]})]})})]}),(0,Gt.jsxs)(df,{container:!0,spacing:2,sx:{mt:3},children:[(0,Gt.jsx)(df,{item:!0,xs:!0,md:6,children:(0,Gt.jsxs)(Uu,{variant:"outlined",children:[(0,Gt.jsx)(Eu,{sx:{px:2.5,py:1.5,bgcolor:"primary.theme.50"},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"Population by Condition"})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(Eu,{sx:{p:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)(pce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:x("rpm_bp")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"3000"})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)(pce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:"Diabetes"}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"1200"})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)(pce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:"Obesity"}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"2400"})]})]})})]})})]})}),(0,Gt.jsx)(df,{item:!0,xs:!0,md:6,children:(0,Gt.jsxs)(Uu,{variant:"outlined",children:[(0,Gt.jsx)(Eu,{sx:{px:2.5,py:1.5,bgcolor:"primary.theme.50"},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"Population by Age Group"})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(Eu,{sx:{p:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)(uce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:"40"}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"3000"})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)(uce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:"50-60"}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"1200"})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)(uce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:"60-75"}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"2400"})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)(uce.A,{fontSize:"large",sx:{color:"primary.theme.300"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:"75+"}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"2400"})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Eu,{sx:{height:"250px"},children:(0,Gt.jsx)($de,{})})})]})})]})}),(0,Gt.jsx)(df,{item:!0,xs:!0,md:12,children:(0,Gt.jsx)(Uu,{variant:"outlined",sx:{p:3},children:(0,Gt.jsx)(v,{})})})]})]})}Wde.defaultProps={headCellsItemsPopCond:[],headCellsItemsOxy:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",populationbyCond:{},patientOxyReport:{},fetchPopulationList:()=>{}};const Vde=["content"],Ude=[{id:"#p245890",gender:"Male",population:"3000",variant:"gender"},{id:"#p245891",gender:"Female",population:"1200",variant:"gender"},{id:"#p245892",gender:"Other",population:"2400",variant:"gender"},{id:"#p245893",age_group:"40 yrs",population:"3000",variant:"age"},{id:"#p245894",age_group:"50-60 yrs",population:"1200",variant:"age"},{id:"#p245895",age_group:"60-75 yrs",population:"2400",variant:"age"},{id:"#p245896",age_group:"75+ yrs",population:"2800",variant:"age"}];const qde=function(){const e=Nt(),{t:t}=vg(),[n,r]=(0,We.useState)("desc"),[o,a]=(0,We.useState)("updated_at"),[s,l]=We.useState([]),[c,d]=We.useState([]),[u,p]=(0,We.useState)([]),[h,m]=(0,We.useState)((0,i.A)({},Fc));return t("rpm_Gender"),t("rpm_Population"),t("rpm_AgeGroup"),t("rpm_Population"),We.useEffect(()=>{(async()=>{const e={content:Ude,from:1,last_page:1,per_page:30,to:3,total:3,current_page:1}||{},{content:t}=e,n=Ko(e,Vde),r=t.filter(e=>"gender"===e.variant),o=t.filter(e=>"age"===e.variant);l(r),d(o),m(e=>(0,i.A)((0,i.A)({},e),{},{last_page:n.last_page,current_page:n.current_page,from:n.from,per_page:n.per_page,to:n.to,total:n.total}))})();e(w_({activeMenuItem:"dashboard",heading:""}))},[]),!1};const Gde=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O;let{user:T}=e;const{t:E}=vg(),P=so(),D=[{name:E("rpm_Profile"),url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:D})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:E("rpm_Profile")})}),(0,Gt.jsx)(df,{item:!0,className:"profile-tour-step0",children:(0,Gt.jsx)(Vp,{color:"primary",variant:"contained",disableElevation:!0,onClick:()=>P("edit/".concat(null===T||void 0===T?void 0:T.id)),children:E("rpm_EditProfile")})})]})})}),(0,Gt.jsx)(uH,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"flex-start",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:4,children:(0,Gt.jsxs)(Eu,{sx:{px:2,py:{xs:4,md:10},bgcolor:"primary.theme.50",textAlign:"center",borderRadius:1},children:[(0,Gt.jsx)(Eu,{mb:1,children:(0,Gt.jsx)(wy,{sx:{bgcolor:"secondary.main",width:140,height:140,fontSize:64,mx:"auto"},children:null===T||void 0===T||null===(t=T.first_name)||void 0===t||null===(n=t.charAt(0))||void 0===n?void 0:n.toLocaleUpperCase()})}),ta()(T)?(0,Gt.jsx)(ZC,{width:150,sx:{mx:"auto"}}):(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:(null===T||void 0===T?void 0:T.first_name)+" "+(null===T||void 0===T?void 0:T.last_name)}),ta()(T)?(0,Gt.jsx)(ZC,{width:150,sx:{mx:"auto"}}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:null===T||void 0===T?void 0:T.email}),(0,Gt.jsx)(JM,{sx:{mt:3},flexDirection:"row",gap:1,alignItems:"center",justifyContent:"center",children:ta()(T)?(0,Gt.jsx)(ZC,{width:60,height:48}):null!==T&&void 0!==T&&T.active?(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,Gt.jsx)("strong",{children:"Active"})}):(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.75),"& .MuiAlert-message":{p:e.spacing(1)}}),children:(0,Gt.jsx)("strong",{children:"Inactive"})})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,lg:8,container:!0,spacing:4,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:E("rpm_GeneralInformation")})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"First Name"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null===T||void 0===T?void 0:T.first_name})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Last Name"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null===T||void 0===T?void 0:T.last_name})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Email"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null===T||void 0===T?void 0:T.email})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Mobile"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null===T||void 0===T||null===(r=T.attributes)||void 0===r?void 0:r.mobile})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"DOB"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(i=T.attributes)&&void 0!==i&&i.dob?sa()(null===T||void 0===T||null===(o=T.attributes)||void 0===o?void 0:o.dob).format("DD/MM/YYYY"):""})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Gender"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null===T||void 0===T||null===(a=T.attributes)||void 0===a?void 0:a.gender})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Created Date"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:sa()(null===T||void 0===T?void 0:T.created_at).format("DD MMM YYYY hh:mm A")})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:E("rpm_ProfessionalDetail")})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_Speciality")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(s=T.attributes)&&void 0!==s&&s.speciality?null===T||void 0===T||null===(l=T.attributes)||void 0===l?void 0:l.speciality:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_Experience")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(c=T.attributes)&&void 0!==c&&c.experience?null===T||void 0===T||null===(d=T.attributes)||void 0===d?void 0:d.experience:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_ConsultingLanguage")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(u=T.attributes)&&void 0!==u&&u.consulting_language?null===T||void 0===T||null===(p=T.attributes)||void 0===p?void 0:p.consulting_language:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_ProfessionalBio")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==T&&void 0!==T&&null!==(h=T.attributes)&&void 0!==h&&h.professional_bio?null===T||void 0===T||null===(m=T.attributes)||void 0===m?void 0:m.professional_bio:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_HighestQualifications")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(f=T.attributes)&&void 0!==f&&f.qualification?null===T||void 0===T||null===(g=T.attributes)||void 0===g?void 0:g.qualification:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:"Registration Number"}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:(null===T||void 0===T||null===(v=T.attributes)||void 0===v?void 0:v.registration)||"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:E("rpm_AddressInformation")})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_Address1")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(x=T.attributes)&&void 0!==x&&x.adr_address1?null===T||void 0===T||null===(y=T.attributes)||void 0===y?void 0:y.adr_address1:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_Address2")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(b=T.attributes)&&void 0!==b&&b.adr_address2?null===T||void 0===T||null===(j=T.attributes)||void 0===j?void 0:j.adr_address2:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_Country")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(w=T.attributes)&&void 0!==w&&w.adr_country_name?null===T||void 0===T||null===(_=T.attributes)||void 0===_?void 0:_.adr_country_name:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_State")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(C=T.attributes)&&void 0!==C&&C.adr_state_name?null===T||void 0===T||null===(S=T.attributes)||void 0===S?void 0:S.adr_state_name:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_City")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(A=T.attributes)&&void 0!==A&&A.adr_city?null===T||void 0===T||null===(k=T.attributes)||void 0===k?void 0:k.adr_city:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:E("rpm_Pin")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:ta()(T)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",component:"p",color:"primary",children:null!==T&&void 0!==T&&null!==(M=T.attributes)&&void 0!==M&&M.adr_zipcode?null===T||void 0===T||null===(O=T.attributes)||void 0===O?void 0:O.adr_zipcode:"NA"})})]})})]})]})})]})})})]})};const Yde=function(){var e;const{userData:t}=(0,We.useContext)(Zg),n=null===t||void 0===t||null===(e=t.user_principal)||void 0===e?void 0:e.id,r=Nt(),{enqueueSnackbar:i}=hi(),[o,a]=We.useState({});return We.useEffect(()=>{as(t)||(async()=>{try{const{data:e}=await r(Fg(n));a(e)}catch(e){i(e.message,{variant:"error"})}})()},[t]),We.useEffect(()=>{r(w_({activeMenuItem:"profile",heading:{}}))},[]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Gde,{user:o})})},Zde=(e,t,n,r)=>async o=>{o(na(!0));const a="".concat(ya,"mds/").concat(t,"/country?per_page=10000&page=1"),s="".concat(ya,"api/countries?sort_by=").concat(e.sort_by||"","&sort_order=").concat(e.sort_order||"","&per_page=10000&page=").concat(e.page||"","&q=").concat(e.q||""),l="".concat(ya,"mds/").concat(t,"/country/").concat(e.countryCode,"/state?per_page=10000&page=1"),c="".concat(ya,"api/countries/").concat(e.countryCode,"/state?sort_by=").concat(e.sort_by||"","&sort_order=").concat(e.sort_order||"","&per_page=10000&page=").concat(e.page||"","&q=").concat(e.q||"");try{let[e,t,r,o]=await Promise.all([cu(s),cu(a),cu(c),cu(l)]);e=oa()(e,"data",{}),t=oa()(t,"data.content",[]);const d=t.map(e=>e.isoCode),u=oa()(t.find(e=>e.isDefaultCountry),"isoCode",""),p=oa()(t.find(e=>e.isDefaultPhonePrefix),"isoCode",""),h=oa()(e,"content",[]).map(e=>(0,i.A)((0,i.A)({},e),{},{id:e.isoCode,isEnabled:d.includes(e.isoCode)}));Oa()(e,"content",h),r=oa()(r,"data",{}),o=oa()(o,"data.content",[]);const m=o.map(e=>e.isoCode),f=oa()(r,"content",[]).map(e=>(0,i.A)((0,i.A)({},e),{},{id:e.isoCode,isEnabled:m.includes(e.isoCode)}));Oa()(r,"content",f),"function"===typeof n&&n({countries:e,states:r,defaultCountryCode:u,defaultPhoneCode:p})}catch(d){"function"!==typeof r||[404,403,401,408,409,500].includes(d.response.status)||r(d)}finally{o(na(!1))}},Kde=(e,t,n,r)=>async o=>{o(na(!0));const a="".concat(ya,"mds/").concat(t,"/country?per_page=10000&page=1"),s="".concat(ya,"api/countries?sort_by=").concat(e.sort_by||"","&sort_order=").concat(e.sort_order||"","&per_page=10000&page=").concat(e.page||"","&q=").concat(e.q||"");try{let[e,t]=await Promise.all([cu(s),cu(a)]);e=oa()(e,"data",{}),t=oa()(t,"data.content",[]);const r=t.map(e=>e.isoCode),o=oa()(t.find(e=>e.isDefaultCountry),"isoCode",""),l=oa()(t.find(e=>e.isDefaultPhonePrefix),"isoCode",""),c=oa()(e,"content",[]).map(e=>(0,i.A)((0,i.A)({},e),{},{id:e.isoCode,isEnabled:r.includes(e.isoCode)}));Oa()(e,"content",c),"function"===typeof n&&n({countries:e,defaultCountryCode:o,defaultPhoneCode:l})}catch(c){var l;"function"!==typeof r||[404,403,401,408,409,500].includes(null===c||void 0===c||null===(l=c.response)||void 0===l?void 0:l.status)||r(c)}finally{o(na(!1))}},Xde=(e,t,n,r,o)=>async a=>{a(na(!0));const s="".concat(ya,"mds/").concat(n,"/country/").concat(e,"/state?per_page=10000&page=1"),l="".concat(ya,"api/countries/").concat(e,"/state?sort_by=").concat(t.sort_by||"","&sort_order=").concat(t.sort_order||"","&per_page=10000&page=").concat(t.page||"","&q=").concat(t.q||"");try{let[e,t]=await Promise.all([cu(l),cu(s)]);e=oa()(e,"data",{}),t=oa()(t,"data.content",[]);const n=t.map(e=>e.isoCode),o=oa()(t.find(e=>e.isDefaultState),"isoCode",""),a=oa()(e,"content",[]).map(e=>(0,i.A)((0,i.A)({},e),{},{id:e.isoCode,isEnabled:n.includes(e.isoCode)}));Oa()(e,"content",a),"function"===typeof r&&r({states:e,defaultStateCode:o})}catch(c){"function"!==typeof o||[404,403,401,408,409,500].includes(c.response.status)||o(c)}finally{a(na(!1))}};function Qde(e){const[t]=function(e){var t=_z(),n=t.getFieldProps,r=t.getFieldMeta,i=t.getFieldHelpers,o=t.registerField,a=t.unregisterField,s=Az(e)?e:{name:e},l=s.name,c=s.validate;(0,We.useEffect)(function(){return l&&o(l,{validate:c}),function(){l&&a(l)}},[o,a,l,c]),l||JB(!1);var d=(0,We.useMemo)(function(){return i(l)},[i,l]);return[n(s),r(l),d]}(e.name);return(0,Gt.jsx)(uO,{value:t.value,control:(0,Gt.jsx)(jC,(0,i.A)({inputProps:{"aria-label":"Keep Active"},checked:t.value,color:"primary",disabled:t.disabled},t)),label:e.label,labelPlacement:"end"})}Qde.defaultProps={name:"",label:"",checked:!0,disabled:!1};const Jde=Qde;const eue=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T,E;let{user:P,editUser:D,showAdminDetails:R,countries:N}=e;const{t:L}=vg(),I=so(),[F,$]=We.useState(null),B={active:!(null===P||void 0===P||!P.active)&&(null===P||void 0===P?void 0:P.active),first_name:null!==P&&void 0!==P&&P.first_name?null===P||void 0===P?void 0:P.first_name:"",last_name:null!==P&&void 0!==P&&P.last_name?null===P||void 0===P?void 0:P.last_name:"",email:null!==P&&void 0!==P&&P.email?null===P||void 0===P?void 0:P.email:"",mobile:null!==P&&void 0!==P&&P.phone_number?null===(t=GQ(P.phone_number))||void 0===t?void 0:t.nationalNumber:"",gender:null!==P&&void 0!==P&&null!==(n=P.attributes)&&void 0!==n&&n.gender?null===P||void 0===P||null===(r=P.attributes)||void 0===r?void 0:r.gender:"",dob:null!==P&&void 0!==P&&null!==(o=P.attributes)&&void 0!==o&&o.dob?null===P||void 0===P||null===(a=P.attributes)||void 0===a?void 0:a.dob:null,adr_address1:null!==P&&void 0!==P&&null!==(s=P.attributes)&&void 0!==s&&s.adr_address1?null===P||void 0===P||null===(l=P.attributes)||void 0===l?void 0:l.adr_address1:"",adr_address2:null!==P&&void 0!==P&&null!==(c=P.attributes)&&void 0!==c&&c.adr_address2?null===P||void 0===P||null===(d=P.attributes)||void 0===d?void 0:d.adr_address2:"",adr_country_name:null!==P&&void 0!==P&&null!==(u=P.attributes)&&void 0!==u&&u.adr_country_name?null===P||void 0===P||null===(p=P.attributes)||void 0===p?void 0:p.adr_country_name:"",adr_state_name:null!==P&&void 0!==P&&null!==(h=P.attributes)&&void 0!==h&&h.adr_state_name?null===P||void 0===P||null===(m=P.attributes)||void 0===m?void 0:m.adr_state_name:"",adr_city:null!==P&&void 0!==P&&null!==(f=P.attributes)&&void 0!==f&&f.adr_city?null===P||void 0===P||null===(g=P.attributes)||void 0===g?void 0:g.adr_city:"",adr_zipcode:null!==P&&void 0!==P&&null!==(v=P.attributes)&&void 0!==v&&v.adr_zipcode?null===P||void 0===P||null===(x=P.attributes)||void 0===x?void 0:x.adr_zipcode:"",speciality:null!==P&&void 0!==P&&null!==(y=P.attributes)&&void 0!==y&&y.speciality?null===P||void 0===P||null===(b=P.attributes)||void 0===b?void 0:b.speciality:"",consulting_language:null!==P&&void 0!==P&&null!==(j=P.attributes)&&void 0!==j&&j.consulting_language?null===P||void 0===P||null===(w=P.attributes)||void 0===w?void 0:w.consulting_language:"",experience:null!==P&&void 0!==P&&null!==(_=P.attributes)&&void 0!==_&&_.experience?null===P||void 0===P||null===(C=P.attributes)||void 0===C?void 0:C.experience:"",professional_bio:null!==P&&void 0!==P&&null!==(S=P.attributes)&&void 0!==S&&S.professional_bio?null===P||void 0===P||null===(A=P.attributes)||void 0===A?void 0:A.professional_bio:"",qualification:null!==P&&void 0!==P&&null!==(k=P.attributes)&&void 0!==k&&k.qualification?null===P||void 0===P||null===(M=P.attributes)||void 0===M?void 0:M.qualification:"",registration:null!==P&&void 0!==P&&null!==(O=P.attributes)&&void 0!==O&&O.registration?null===P||void 0===P||null===(T=P.attributes)||void 0===T?void 0:T.registration:"",mobile_code:null!==P&&void 0!==P&&P.phone_number?"+".concat(null===(E=GQ(null===P||void 0===P?void 0:P.phone_number))||void 0===E?void 0:E.countryCallingCode):"+91"},z=[{name:L("rpm_Profile"),url:Lc.DOCTOR.PROFILE},{name:L("rpm_EditProfile"),url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:z})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsx)(Iz,{initialValues:B,validationSchema:vV.userProfileUpdate,onSubmit:F?()=>{}:D,enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:o}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:L("rpm_Profile")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>I(-1),children:L("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:L("rpm_Save")})})]})})}),(0,Gt.jsx)(uH,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"flex-start",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:4,children:(0,Gt.jsxs)(Eu,{sx:{px:2,py:{xs:4,md:10},bgcolor:"primary.theme.50",textAlign:"center",borderRadius:1},children:[(0,Gt.jsx)(Eu,{mb:1,children:(0,Gt.jsx)(wy,{sx:{bgcolor:"secondary.main",width:140,height:140,fontSize:64,mx:"auto"},children:null===P||void 0===P||null===(t=P.first_name)||void 0===t||null===(n=t.charAt(0))||void 0===n?void 0:n.toLocaleUpperCase()})}),as(P)?(0,Gt.jsx)(ZC,{width:150,sx:{mx:"auto"}}):(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:(null===P||void 0===P?void 0:P.first_name)+" "+(null===P||void 0===P?void 0:P.last_name)}),as(P)?(0,Gt.jsx)(ZC,{width:150,sx:{mx:"auto"}}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:null===P||void 0===P?void 0:P.email})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,lg:8,container:!0,spacing:4,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:L("rpm_GeneralInformation")})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:[L("rpm_FirstName"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"first_name",name:"first_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_FirstNameDrHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"first_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_FirstName")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:[L("rpm_LastName"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"last_name",name:"last_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_LastNameDrHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"last_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_LastName")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:[L("rpm_Email"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"email",name:"email",variant:"outlined",disabled:!0,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_EmailDrHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"email",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_Email")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_CountryCode")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",optionId:"phoneCode",id:"mobile_code",name:"mobile_code",options:N,browserAutocomplete:!1,valueKey:"phoneCode",nameKey:"phoneCode",variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Xz,{name:"mobile_code",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_CountryCode")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Mobile")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"mobile",name:"mobile",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_MobileDrHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"mobile",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_Mobile")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:[L("rpm_DOB")," \xa0",(0,Gt.jsx)(Yx,{title:L("message:rpm_DOBDrHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",id:"dob",name:"dob",value:r.dob,onChange:e=>o("dob",e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({fullWidth:!0},e)),maxDate:ps(18,11,31),inputFormat:"dd/MM/yyyy",defaultCalendarMonth:ps(18,11,31),onError:e=>$(e)})}),("minDate"===F||"maxDate"===F)&&(0,Gt.jsx)(iw,{error:!0,children:L("error:rpm_minMaxDateErr")}),"invalidDate"===F&&(0,Gt.jsx)(iw,{error:!0,children:L("error:rpm_invailidDateErr")})]}),(0,Gt.jsx)(Xz,{name:"dob",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_DOB")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Gender")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"gender",name:"gender",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:L("message:rpm_GenderDrHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"Male",children:"Male"}),(0,Gt.jsx)($m,{value:"Female",children:"Female"})]}),(0,Gt.jsx)(Xz,{name:"gender",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_Gender")})})})]})]})}),R&&(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsx)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:(0,Gt.jsx)(Jde,{checked:r.active,id:"active",name:"active",color:"primary",label:(0,Gt.jsx)(Ym,{component:"p",variant:"body1",fontWeight:500,children:L("rpm_Active")})})})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:L("rpm_ProfessionalDetail")})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Speciality")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"speciality",name:"speciality",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:L("message:rpm_SpecialityHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:Xc.map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))}),(0,Gt.jsx)(Xz,{name:"speciality",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_Speciality")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Experience")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"experience",name:"experience",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_ExperienceHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"experience",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_Experience")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_ConsultingLanguage")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"consulting_language",name:"consulting_language",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_ConsultingLanguageHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"consulting_language",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_ConsultingLanguage")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_ProfessionalBio")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"professional_bio",name:"professional_bio",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_ProfessionalBioHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"professional_bio",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_ProfessionalBio")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_HighestQualifications")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"qualification",name:"qualification",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_HighestQualificationsHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"qualification",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_HighestQualifications")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_Registration")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"registration",name:"registration",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_RegistrationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"qualification",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_Registration")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:1.5,bgcolor:"primary.theme.100",borderRadius:1},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:L("rpm_AddressInformation")})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_AddressLine1")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_address1",name:"adr_address1",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_AddressLine1Help"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_address1",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_AddressLine1")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_AddressLine2")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_address2",name:"adr_address2",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_AddressLine2Help"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_address2",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_AddressLine2")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_CountryRegion")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_country_name",name:"adr_country_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_CountryDrHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_country_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_CountryRegion")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_StateProvince")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_state_name",name:"adr_state_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_StateDrHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_state_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_StateProvince")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_City")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_city",name:"adr_city",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_CityDrHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_city",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_City")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:L("rpm_PostalCodeZip")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_zipcode",name:"adr_zipcode",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:L("message:rpm_PostalCodeZipHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_zipcode",children:e=>(0,Gt.jsx)(iw,{error:!0,children:L(e,{field:L("rpm_PostalCodeZip")})})})]})]})}),!1]})]})})]})})})}},"profile_formik")})})]})},tue=["active","first_name","last_name","email","mobile","mobile_code"];const nue=function(){const e=Ct(Nd),{userId:t}=lo(),n=t,r=Nt(),{t:i}=vg(),{enqueueSnackbar:o}=hi(),a=so(),[s,l]=We.useState([]),[c,d]=We.useState({});return We.useEffect(()=>{e&&t&&(async()=>{try{const{data:e}=await r(Fg(n));d(e)}catch(e){o(e.message,{variant:"error"})}})()},[e,t]),We.useEffect(()=>{e&&async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:""};await r(Kde(e,"RPM",e=>{let{countries:t}=e;l(t.content)},()=>{}))}()},[e]),We.useEffect(()=>{r(w_({activeMenuItem:"account"}))},[]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(eue,{user:c,editUser:async(e,t)=>{let{setErrors:s}=t;const{active:l,first_name:c,last_name:d,email:u,mobile:p,mobile_code:h}=e,m=Ko(e,tue),f={active:l,first_name:c,last_name:d,email:u,phone_number:"".concat(h).concat(p),attributes:Object.keys(m).reduce((e,t)=>(e[t]=Array.isArray(m[t])?m[t]:[m[t]],e),{})};try{await r(((e,t)=>async n=>{n(na(!0));const r="".concat(ma.USERS,"/").concat(e);try{return await uu(r,t)}finally{n(na(!1))}})(n,f)),o(i("message:rpm_UpdateSuccessUserProfile"),{variant:"success"}),a(-1)}catch(g){const e=ls(g,"response.data.field_errors",{}),t=ls(g,"response.data.code","");as(e)?as(t)?r(Zo({subTitle:"error:rpm_ProfileUpdationFailed",severity:$c})):r(Zo({subTitle:bd(t,"error:rpm_PasswordResetFailed"),severity:$c})):s(yd(e))}},showAdminDetails:!1,countries:s})})};var rue=n(18851),iue=n(55722),oue=n(11227);const aue=(0,dy.A)((0,Gt.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),sue=(0,dy.A)((0,Gt.jsx)("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}),"Upload"),lue=["children","onClose"],cue=e=>{const{children:t,onClose:n}=e,r=Ko(e,lue);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null,(0,Gt.jsxs)(Eu,{display:"flex",gap:.5,children:[(0,Gt.jsx)(Ym,{component:"span",sx:{color:"grey.400"},children:(0,Gt.jsx)(aue,{sx:{fontSize:"14px"}})}),(0,Gt.jsx)(Ym,{sx:{color:"grey.600",fontSize:"14px"},children:"A program is a hospital or clinic that is running in the same or different cities under one name."})]})]}))};function due(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g;let{openModal:v,onCloseModal:x,addNewProgram:y,editProgram:b,fetchStates:j,countries:w,states:_}=e;const{t:C}=vg(),S=Ct(Id),[A]=We.useState({display_name:null!==v&&void 0!==v&&null!==(t=v.data)&&void 0!==t&&t.display_name?null===v||void 0===v||null===(n=v.data)||void 0===n?void 0:n.display_name:"",city:null!==v&&void 0!==v&&null!==(r=v.data)&&void 0!==r&&r.city?null===v||void 0===v||null===(i=v.data)||void 0===i?void 0:i.city:"",country:null!==v&&void 0!==v&&null!==(o=v.data)&&void 0!==o&&o.country?null===v||void 0===v||null===(a=v.data)||void 0===a?void 0:a.country:"IN",state:null!==v&&void 0!==v&&null!==(s=v.data)&&void 0!==s&&s.state?null===v||void 0===v||null===(l=v.data)||void 0===l?void 0:l.state:"",address:null!==v&&void 0!==v&&null!==(c=v.data)&&void 0!==c&&c.address?null===v||void 0===v||null===(d=v.data)||void 0===d?void 0:d.address:"",image:null!==v&&void 0!==v&&null!==(u=v.data)&&void 0!==u&&u.image?null===v||void 0===v||null===(p=v.data)||void 0===p?void 0:p.image:"",def:!(null===v||void 0===v||null===(h=v.data)||void 0===h||!h.def)&&(null===v||void 0===v||null===(m=v.data)||void 0===m?void 0:m.def),facility_type:null!==v&&void 0!==v&&null!==(f=v.data)&&void 0!==f&&f.facility_type?null===v||void 0===v||null===(g=v.data)||void 0===g?void 0:g.facility_type:""});return(0,We.useEffect)(()=>{var e,t;j(null!==v&&void 0!==v&&null!==(e=v.data)&&void 0!==e&&e.country?null===v||void 0===v||null===(t=v.data)||void 0===t?void 0:t.country:"IN")},[]),(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(Kw,{fullWidth:!0,maxWidth:"sm",open:v.open,onClose:x,children:(0,Gt.jsx)(Iz,{initialValues:A,validationSchema:vV.addNewProgram,onSubmit:(e,t)=>{var n;let{setErrors:r,resetForm:i}=t;return as(null===v||void 0===v||null===(n=v.data)||void 0===n?void 0:n.id)?y(e,{setErrors:r,resetForm:i},!1):b(e,{setErrors:r,resetForm:i},!0)},enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:i}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(cue,{sx:{px:4},onClose:x,children:as(null===v||void 0===v||null===(t=v.data)||void 0===t?void 0:t.id)?C("rpm_AddNewProgram"):C("rpm_EditProgram")}),(0,Gt.jsx)(s_,{sx:{p:4,pt:2},dividers:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,direction:"column",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsx)(Eu,{className:"upload-input-text",children:(0,Gt.jsxs)(Eu,{children:[cs(null===r||void 0===r?void 0:r.image)?(0,Gt.jsxs)(Eu,{className:"upload-input-text",sx:{bgcolor:"primary.theme.50",border:"1px solid #3f51b5",borderRadius:"4px",padding:"0 8px",width:"fit-content",fontSize:"14px"},children:[(0,Gt.jsx)("input",{id:"image",name:"image",type:"file",onChange:e=>{i("image",e.currentTarget.files[0])}}),(0,Gt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:C("uploadImage")}),(0,Gt.jsx)(Eu,{clone:!0,color:"primary",height:"26px",ml:1,children:(0,Gt.jsx)(sue,{width:22,height:22,sx:{color:"primary.theme.500"}})})]})]}):(0,Gt.jsxs)(Eu,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",children:null===r||void 0===r||null===(n=r.image)||void 0===n?void 0:n.name}),(0,Gt.jsx)(Eu,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,Gt.jsx)(Kp,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{i("image","")},children:(0,Gt.jsx)(Ql,{width:22,height:22})})})]}),(0,Gt.jsx)(Xz,{name:"image",children:e=>(0,Gt.jsx)(iw,{error:!0,children:C(e,{field:C("rpm_image")})})})]})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"display_name",required:!0,sx:{mb:.75},children:C("rpm_DisplayName")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"display_name",name:"display_name",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:C("message:rpm_DisplayNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"display_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:C(e,{field:C("rpm_DisplayName")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"address",sx:{mb:.75},children:C("rpm_Address")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"address",name:"address",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:C("message:rpm_AddressHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"country",required:!0,sx:{mb:.75},children:C("rpm_ProgramCountry")}),(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"country",optionId:"isoCode",name:"country",options:w,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{i("state",""),j(t||"IN")},variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:C("message:rpm_ProgramCountryHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"country",children:e=>(0,Gt.jsx)(iw,{error:!0,children:C(e,{field:C("rpm_ProgramCountry")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"state",required:!0,sx:{mb:.75},children:C("rpm_ProgramState")}),(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"state",optionId:"isoCode",name:"state",options:_,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:C("message:rpm_ProgramStateHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"state",children:e=>(0,Gt.jsx)(iw,{error:!0,children:C(e,{field:C("rpm_ProgramState")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"city",required:!0,sx:{mb:.75},children:C("rpm_ProgramCity")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"city",name:"city",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:C("message:rpm_ProgramCityHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"city",children:e=>(0,Gt.jsx)(iw,{error:!0,children:C(e,{field:C("rpm_ProgramCity")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"state",required:!0,sx:{mb:.75},children:C("rpm_facility_type")}),(0,Gt.jsx)(Eu,{className:"autocomplete",sx:{position:"relative"},children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,className:"select-custom-field",size:"small",id:"facility_type",name:"facility_type",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"19px"},children:(0,Gt.jsx)(Yx,{title:C("message:rpm_FacilityHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:Od.map(e=>(0,Gt.jsx)($m,{value:null===e||void 0===e?void 0:e.value,children:C("rpm_".concat(null===e||void 0===e?void 0:e.name))},null===e||void 0===e?void 0:e.value))})}),(0,Gt.jsx)(Xz,{name:"facility_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:C(e,{field:C("rpm_facility_type")})})})]})})]})}),(0,Gt.jsx)(iO,{sx:{py:3,px:4},children:(0,Gt.jsxs)(Eu,{width:"100%",display:{xs:"block",sm:"flex"},justifyContent:"space-between",alignItems:"center",children:[(0,Gt.jsx)(Eu,{py:3,children:(0,Gt.jsx)(uO,{fontSize:18,label:C("rpm_defaultProgram"),sx:{"& .MuiTypography-root":{whiteSpace:{xs:"wrap",sm:"nowrap"},fontSize:"15px"}},control:(0,Gt.jsx)(Hz,{as:jC,checked:r.def,type:"checkbox",id:"reading_reminder_enabled",name:"reading_reminder_enabled",onChange:()=>i("def",!r.def)})})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:x,children:C("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(CT,{loading:S,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:C("rpm_Submit")})})]})})]})})]})})}},"program_formik")})})}const uue=ss((e,t)=>{e({programName:t})},500);function pue(e,t){const n=null===e||void 0===e?void 0:e.split(new RegExp("(".concat(t,")"),"gi"));return(0,Gt.jsx)(Gt.Fragment,{children:n.map((e,n)=>(null===e||void 0===e?void 0:e.toLowerCase())===(null===t||void 0===t?void 0:t.toLowerCase())?(0,Gt.jsx)("span",{style:{fontWeight:"bold"},children:e},n):(0,Gt.jsx)("span",{children:e},n))})}const hue=function(e){let{pageDetails:t,fetchListFunction:n,filterState:r,setFilterState:o,programSuggestions:a,fetchProgramListSuggestions:s,placeholder:l}=e;const{t:c}=vg(),[d,u]=(0,We.useState)([]);(0,We.useEffect)(()=>{u(a)},[a]);const p=(0,We.useCallback)((e,t)=>{uue(s,t)},[s]),h=()=>{t.current_page=1,o({programName:""}),n({programName:""}),p(null,"")},m=e=>{t.current_page=1,o((0,i.A)((0,i.A)({},r),{},{programName:"".concat(e.display_name)})),n((0,i.A)((0,i.A)({},r),{},{programName:"".concat(e.display_name)})),u([])};return(0,Gt.jsx)(Iz,{initialValues:{programName:""},onSubmit:()=>console.log("PatientFilter"),enableReinitialize:!0,children:()=>(0,Gt.jsx)(Wz,{style:{flex:"1"},children:(0,Gt.jsx)(Eu,{sx:{borderRadius:"8px"},py:.2,pl:1,mr:2,className:"course_filter WhiteBG",children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",position:"relative",width:"100%",children:(0,Gt.jsxs)(df,{item:!0,width:"100%",className:"globalSearchBox",sm:8,children:[(0,Gt.jsxs)(Eu,{py:.2,display:"flex",alignItems:"center",position:"relative",width:"100%",children:[(0,Gt.jsx)(Rj,{sx:{position:"relative"},fullWidth:!0,size:"small",className:"program-tour-step3",placeholder:l,value:null===r||void 0===r?void 0:r.programName,onKeyDown:e=>{var t;"Enter"===e.key&&(null===d||void 0===d?void 0:d.length)>=0&&(o((0,i.A)((0,i.A)({},r),{},{programName:null===(t=d[0])||void 0===t?void 0:t.display_name})),m(d[0]))},onChange:e=>{const t=e.target.value;o((0,i.A)((0,i.A)({},r),{},{programName:t})),p(null,t)},endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_SearchProgramNameSearchBar"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Eu,{position:"absolute",right:"23px",children:!as(null===r||void 0===r?void 0:r.programName)&&(0,Gt.jsx)(Vp,{variant:"text",disableElevation:!0,type:"reset",onClick:h,sx:{"&.MuiButtonBase-root:hover":{bgcolor:"transparent"}},children:(0,Gt.jsx)(Bw.A,{})})})]}),(0,Gt.jsx)(Eu,{className:"globalSearchParent",sx:{position:"absolute",width:"100%",background:"#ffffff",zIndex:"1",borderBottom:"1px solid #efefef",maxHeight:"350px",overflow:"auto",scrollbarWidth:"thin","&::-webkit-scrollbar":{width:"0.2em"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"}},children:(null===d||void 0===d?void 0:d.length)>0&&(0,Gt.jsx)(hh,{dense:!0,children:d.map((e,t)=>(0,Gt.jsx)(Qf,{button:!0,onClick:()=>m(e),children:(0,Gt.jsx)(ag,{onKey:e=>console.log(e),primary:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",children:(0,Gt.jsx)("span",{children:pue("".concat(null===e||void 0===e?void 0:e.display_name),null===r||void 0===r?void 0:r.programName)})})})})},t))})})]})})})})},"filter_formik")},mue=n.p+"static/media/defaultIcon.e88799ac34b526d941f9.png";function fue(e){let{userData:t,programList:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,programHead:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchProgramList:h,pageDetails:m,viewButton:f,editButton:g,scheduleButton:v,programModal:x,handleProgramModalToggle:y,addNewProgram:b,editProgram:j,ruleButton:w,fetchStates:_,countries:C,states:S,setHeadcells:A,settingModal:k,initialHeadcells:M,handleSettingModalToggle:O,filterState:T,setFilterState:E,programSuggestions:P,fetchProgramListSuggestions:D}=e;const{t:R}=vg();return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:R("rpm_Programs")})}),(null===t||void 0===t?void 0:t.showAddProgramBtn)&&(null===t||void 0===t?void 0:t.isAdmin)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{y({})},className:(null===t||void 0===t?void 0:t.showAddProgramBtn)&&"program-tour-step2",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:R("rpm_AddProgram")})]})})]})}),(0,Gt.jsx)(Eu,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,lg:7,md:9,sm:9,xs:10,children:(0,Gt.jsx)(hue,{pageDetails:m,fetchListFunction:h,filterState:T,setFilterState:E,programSuggestions:P,fetchProgramListSuggestions:D,placeholder:"Search by program name"})}),(0,Gt.jsx)(df,{item:!0,sx:{ml:"auto"},sm:3,xs:2,textAlign:"end",children:(0,Gt.jsx)(Yx,{title:R("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:O,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:n,headCells:null===l||void 0===l?void 0:l.filter(e=>M.includes(e.id)),dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.map(e=>{var t,n,r,i;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},className:"program-tour-step0",children:[u&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:d,checked:c.includes(e.code),name:e.code,color:"primary"})}),M.includes("name")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",children:[(0,Gt.jsx)(Lo,{className:"linkClr",to:"".concat(e.code,"/patients"),children:e.display_name}),(null===e||void 0===e?void 0:e.def)&&(0,Gt.jsx)(Eu,{ml:1.5,mt:1,children:(0,Gt.jsx)("img",{src:mue,height:20,width:20})})]})}),M.includes("location")&&(0,Gt.jsx)(rC,{children:e.city}),M.includes("updated_at")&&(0,Gt.jsx)(rC,{children:e.updated_at}),M.includes("updated_by")&&(0,Gt.jsx)(rC,{children:e.updated_by}),M.includes("action")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Eu,{className:"program-tour-step1",width:"fit-content",children:[(null===(t=e.permissions)||void 0===t?void 0:t.showEditProgramBtn)&&g(e),(null===(n=e.permissions)||void 0===n?void 0:n.showViewProgramBtn)&&f(e),(null===(r=e.permissions)||void 0===r?void 0:r.showRuleList)&&w(e),(null===(i=e.permissions)||void 0===i?void 0:i.showCourseList)&&v(e)]})})]},e.code)})})}),(0,Gt.jsx)(IO,{pageDetails:m,fetchListFunction:h})]})]})}),x.open&&(0,Gt.jsx)(due,{openModal:x,onCloseModal:y,addNewProgram:b,editProgram:j,fetchStates:_,countries:C,states:S}),(0,Gt.jsx)(fO,{open:k,allHeadCells:l,initialHeadcells:M,setHeadcells:A,onClose:O})]})}fue.defaultProps={programHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",programList:[],fetchProgramList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},programModal:!1,handleProgramModalToggle:()=>{},addNewProgram:()=>{},editProgram:()=>{},ruleButton:()=>{},scheduleButton:()=>{},fetchCountries:()=>{},fetchStates:()=>{},countries:[],states:[],initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},programSuggestions:[],fetchProgramListSuggestions:()=>{}};const gue=fue;const vue=function(e){let{fetchProgramList:t,pageDetails:n,userData:r,fetchAllProgramList:o}=e;const a=Nt(),s=so(),l=P_(BA().breakpoints.down("sm")),{t:c}=vg(),{programList:d}=(0,We.useContext)(j_),[u,p]=We.useState(""),h=Ct(qd),m=!("true"===ls(h,"user_principal.attributes.skip_tour[0]","")),[f,g]=(0,We.useState)("desc"),[v,x]=(0,We.useState)("updated_at"),[y,b]=(0,We.useState)([]),[j,w]=(0,We.useState)([]),[_,C]=(0,We.useState)([]),[S,A]=We.useState({open:!1,data:{}}),[k,M]=We.useState({open:!1,data:{}}),[O,T]=We.useState(!1),[E,P]=We.useState(null),[D,R]=We.useState({programName:""}),[N,L]=We.useState(""),[I,F]=(0,We.useState)(!1),[$,B]=(0,We.useState)(null),z=l?["name","action"]:["name","location","updated_at","updated_by","action"],H=e=>{M((0,i.A)((0,i.A)({},k),{},{open:!k.open,data:e}))},W=e=>{S.open?(w([]),C([]),A({})):Q(e)},[V,U]=We.useState(!1),[q,G]=We.useState(as($o.getAllProgramsCells())?z:$o.getAllProgramsCells()),Y=function(e){G(e),$o.setAllProgramsCells(e)};We.useEffect(()=>{Y(z)},[l]);const Z=async(e,t,n)=>{try{const{data:n}=await a(Rl());if(n){if(n===S.data.display_name)return K(e,t);L(n),F(!!n)}}catch(r){return n?K(e,t):bg(e)}},K=async(e,n)=>{let{setErrors:r,resetForm:s}=n;const l=(0,i.A)((0,i.A)({id:S.data.id},e),{},{country:e.country,state:e.state});try{await a(jg(l)),s(),a(Zo({subTitle:"message:rpm_ProgramUpdatedSuccessfully",severity:Bc})),o(),t(),A({open:!1,data:{}}),B(null),X()}catch(c){const e=ls(c,"response.data.field_errors",{}),t=ls(c,"response.data.code","");as(e)?as(t)?a(Zo({subTitle:c.message,severity:$c})):a(Zo({subTitle:bd(t,"error:rpm_ProgramUpdateFailed"),severity:$c})):r(yd(e))}},X=()=>{F(!1)},Q=async e=>{const t=await _s(null===e||void 0===e?void 0:e.image,null===e||void 0===e?void 0:e.display_name);await a(Zde((0,i.A)((0,i.A)({},n),{},{countryCode:e.country}),"RPM",n=>{let{countries:r,states:o}=n;w(r.content),C(o.content),A({open:!S.open,data:(0,i.A)((0,i.A)({},e),{},{image:t})})},()=>{}))};We.useEffect(()=>{a(w_({activeMenuItem:"programs",heading:{}}))},[]);const J=[{id:"name",label:c("rpm_Name"),isSort:!1,sortProperty:"name"},{id:"location",label:c("rpm_Location"),isSort:!1,sortProperty:"location"},{id:"updated_at",label:c("rpm_DateModified"),isSort:!1,sortProperty:"updated_at"},{id:"updated_by",label:c("rpm_ModifiedBy"),isSort:!1,sortProperty:"updated_by"},{id:"action",label:c("rpm_Actions"),isSort:!1,sortProperty:"action"}];return We.useEffect(()=>()=>{t()},[]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(gue,{userData:r,order:f,orderBy:v,setOrder:g,setOrderBy:x,dataParameter:"code",checkState:y,onCheck:e=>{if(Array.isArray(e))return b(e.map(e=>e));const t=e.target.name;y.includes(t)?b(y.filter(e=>e!==t)):b(e=>[...e,t])},isSelection:!1,nodata:D_,programHead:J,programList:d,fetchProgramList:t,pageDetails:n,editButton:e=>(0,Gt.jsx)(Yx,{title:c("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>W(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,Gt.jsx)(Yx,{title:c("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(e.code,"/patients")),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>H(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),scheduleButton:e=>(0,Gt.jsx)(Yx,{title:c("rpm_Schedule"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(e.code,"/course")),children:(0,Gt.jsx)(iue.A,{fontSize:"small",sx:{width:16,height:16}})})}),programModal:S,handleProgramModalToggle:W,addNewProgram:async(e,n)=>{let{setErrors:r,resetForm:l}=n;const c=(0,i.A)((0,i.A)({},e),{},{country:e.country,state:e.state});try{const{data:e}=await a(bg(c));l(),await a(Og(null===e||void 0===e?void 0:e.code,Qc)),a(Zo({subTitle:"message:rpm_ProgramCreatedSuccessfully",severity:Bc})),s("".concat(null===e||void 0===e?void 0:e.code,"/course")),o(),t(),A({open:!1,data:{}})}catch(d){const e=ls(d,"response.data.field_errors",{}),t=ls(d,"response.data.code","");as(e)?as(t)?a(Zo({subTitle:d.message,severity:$c})):a(Zo({subTitle:bd(t,"error:rpm_ProgramCreateFailed"),severity:$c})):r(yd(e))}},editProgram:(e,t,n)=>{let{setErrors:r,resetForm:i}=t;null!==e&&void 0!==e&&e.def?(B({setErrors:r,resetForm:i,values:e}),Z(e,{setErrors:r,resetForm:i},n)):n?K(e,{setErrors:r,resetForm:i}):bg(e)},ruleButton:e=>(0,Gt.jsx)(Yx,{title:c("rpm_Rule"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(e.code,"/rules")),children:(0,Gt.jsx)(rue.A,{fontSize:"small",sx:{width:16,height:16}})})}),fetchStates:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await a(Xde(e,t,"RPM",e=>{let{states:t}=e;C(t.content)},()=>{}))},countries:j,states:_,setHeadcells:Y,settingModal:V,initialHeadcells:q,handleSettingModalToggle:()=>{U(!V)},showFilterColor:O,setShowFilterColor:T,filterState:D,setFilterState:R,programSuggestions:E,fetchProgramListSuggestions:async e=>{if(null!==e&&void 0!==e&&e.programName){if(null!==e&&void 0!==e&&e.programName.trim())try{const{data:t}=await a(wg((0,i.A)((0,i.A)({},n),{},{current_page:1}),e)),{content:r}=t||{};P(r)}catch(r){console.log(r)}}else P([]),t()}}),(0,Gt.jsx)(PU,{openModal:k.open,onCloseModal:H,actionFunction:()=>console.log(k),dataName:k.data.display_name,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),descText:c("message:rpm_DeleteSubText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(PU,{openModal:I,onCloseModal:X,actionFunction:()=>K($.values,{setErrors:$.setErrors,resetForm:$.resetForm}),options:{primaryText:c("message:rpm_confirmation"),secondaryText:c("message:rpm_defaultProgramConfirm",{program:N}),btn:{primaryText:c("rpm_continue"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),!as(d)&&!as(r)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:m,path:"programsTour",setRenderer:p}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:u})]})]})},xue=ss((e,t)=>{console.log(t);/^\++$/.test(t.trim())||e({patientName:t})},500);function yue(e,t){const n=null===e||void 0===e?void 0:e.split(new RegExp("(".concat(t,")"),"gi"));return(0,Gt.jsx)(Gt.Fragment,{children:null===n||void 0===n?void 0:n.map((e,n)=>(null===e||void 0===e?void 0:e.toLowerCase())===(null===t||void 0===t?void 0:t.toLowerCase())?(0,Gt.jsx)("span",{style:{fontWeight:"bold"},children:e},n):(0,Gt.jsx)("span",{children:e},n))})}const bue=function(e){let{pageDetails:t,fetchListFunction:n,filterState:r,setFilterState:o,patientSuggestions:a,fetchPatientListSuggestions:s,placeholder:l,helpText:c}=e;const{t:d}=vg(),[u,p]=(0,We.useState)([]);(0,We.useEffect)(()=>{p(a)},[a]);const h=(0,We.useCallback)((e,t)=>{xue(s,t)},[s]),m=()=>{t.current_page=1,o({patientName:"",urn:""}),n({patientName:""}),h(null,"")},f=e=>{var a;t.current_page=1,o((0,i.A)((0,i.A)({},r),{},{patientName:"".concat(e.first_name," ").concat(e.last_name),urn:(null===e||void 0===e?void 0:e.urn)||""})),n((0,i.A)((0,i.A)({},r),{},{patientName:"".concat(null===(a=GQ(e.mobile))||void 0===a?void 0:a.nationalNumber)})),p([])};return(0,Gt.jsx)(Iz,{initialValues:{patientName:""},onSubmit:()=>console.log("PatientFilter"),enableReinitialize:!0,children:()=>(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{sx:{borderRadius:"8px",width:"100%"},py:.2,pl:1,mr:2,className:"course_filter WhiteBG",children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",position:"relative",children:(0,Gt.jsxs)(df,{item:!0,width:"100%",className:"globalSearchBox",children:[(0,Gt.jsxs)(Eu,{py:.2,display:"flex",alignItems:"center",position:"relative",width:"100%",children:[(0,Gt.jsx)(Rj,{sx:{position:"relative"},fullWidth:!0,size:"medium",className:"patients-tour-step0",placeholder:l,value:r.patientName,onKeyDown:e=>{if("Enter"===e.key&&(null===u||void 0===u?void 0:u.length)>0){const e=u[0];o((0,i.A)((0,i.A)({},r),{},{programName:null===e||void 0===e?void 0:e.display_name})),f(e)}},onChange:e=>{let t=e.target.value;o((0,i.A)((0,i.A)({},r),{},{patientName:t})),h(null,t)},endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:d(c||"message:rpm_SearchPatientFilterBar"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Eu,{position:"absolute",right:"23px",children:!as(null===r||void 0===r?void 0:r.patientName)&&(0,Gt.jsx)(Vp,{variant:"text",disableElevation:!0,type:"reset",onClick:m,sx:{"&.MuiButtonBase-root:hover":{bgcolor:"transparent"}},children:(0,Gt.jsx)(Bw.A,{})})})]}),(0,Gt.jsx)(Eu,{className:"globalSearchParent",sx:{position:"absolute",width:"100%",background:"#ffffff",zIndex:"1",borderBottom:"1px solid #efefef",maxHeight:"350px",overflow:"auto",scrollbarWidth:"thin","&::-webkit-scrollbar":{width:"0.2em"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"}},children:(null===u||void 0===u?void 0:u.length)>0&&(0,Gt.jsx)(hh,{dense:!0,children:null===u||void 0===u?void 0:u.map((e,t)=>(0,Gt.jsx)(Qf,{button:!0,onClick:()=>f(e),children:(0,Gt.jsx)(ag,{primary:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,Gt.jsx)("span",{children:yue("".concat(null===e||void 0===e?void 0:e.first_name," ").concat(null===e||void 0===e?void 0:e.last_name),null===r||void 0===r?void 0:r.patientName)}),(0,Gt.jsx)("span",{children:yue(null===e||void 0===e?void 0:e.mobile,null===r||void 0===r?void 0:r.patientName)})]})})})},t))})})]})})})})},"filter_formik")},jue=["children","onClose"],wue=e=>{const{children:t,onClose:n}=e,r=Ko(e,jue);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{paddingY:"13px",fontWeight:600}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:16,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))},_ue=e=>{let{programDialogOpen:t,handleCloseProgramDialog:n,selectedPrograms:r}=e;const{t:i}=vg(),o=e=>"fitnessCenter"===e?"#FED7AA":"wellnessCenter"===e?"#BBF7D0":"hospital"===e?" #BFDBFE":"clinic"===e?"#c4eff1":void 0;return(0,Gt.jsxs)(Kw,{open:t,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,Gt.jsx)(wue,{onClose:n,children:i("rpm_assignedPrograms")}),(0,Gt.jsx)(Af,{fullWidth:!0,orientation:"horizontal"}),(0,Gt.jsx)(Eu,{maxHeight:"400px",overflow:"auto",children:(0,Gt.jsx)(hh,{children:r.map((e,t)=>{var n;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Qf,{sx:{minWidth:"380px"},children:[(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"#ebebff",color:"grey.800",fontWeight:700,borderRadius:"50%",width:40,height:40,fontSize:"16px",mr:1,children:null===e||void 0===e||null===(n=e.display_name)||void 0===n?void 0:n.charAt(0).toUpperCase()}),(0,Gt.jsx)(ag,{primary:(0,Gt.jsx)(Eu,{fontSize:"16px",fontWeight:500,children:e.display_name})}),(0,Gt.jsx)(Eu,{bgcolor:o(e.facility_type),component:"span",fontSize:"13px",padding:"2px 8px 2px 8px",borderRadius:"16px",marginLeft:{xs:"0px",sm:"8px"},fontWeight:500,alignItems:"center",children:i("".concat(e.facility_type))})]},e.id),t!==r.length-1&&(0,Gt.jsx)(Af,{fullWidth:!0,orientation:"horizontal"})]})})})})]})};const Cue=function(e){let{allUserList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,initialHeadcells:s,headCellsItems:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchPatientList:h,newPageDetails:m,fetchAllPatientsListSuggestions:f,allpatientSuggestions:g,filterState:v,setFilterState:x}=e;const{t:y}=vg(),[b,j]=We.useState(!1),[w,_]=We.useState([]);return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{mb:3.5},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:y("rpm_AllUsersList")})})})}),(0,Gt.jsx)(Uu,{elevation:0,children:(0,Gt.jsxs)(df,{container:!0,alignItems:"center",spacing:2,className:"all-users-search",children:[(0,Gt.jsx)(df,{item:!0,lg:7,md:9,xs:10,sm:10,children:(0,Gt.jsx)(bue,{pageDetails:m,fetchListFunction:h,filterState:v,setFilterState:x,patientSuggestions:g,fetchPatientListSuggestions:f,placeholder:"Search by name or phone number",helpText:"Enter name of the user"})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{marginTop:"-6px",children:(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:l.filter(e=>s.includes(e.id)),dataParameter:a,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:(t||[]).map(e=>{const{years:t}=hs(null===e||void 0===e?void 0:e.birth_date);return(0,Gt.jsxs)(K_,{hover:!0,selected:c.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:d,checked:c.includes(e.id.toString()),name:e.id,color:"primary"})}),s.includes("patient_name")&&(0,Gt.jsx)(rC,{children:e.first_name+" "+e.last_name}),s.includes("email")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{to:"mailto:".concat(e.email),children:e.email})}),s.includes("age")&&(0,Gt.jsx)(rC,{children:t}),s.includes("mobile_no")&&(0,Gt.jsx)(rC,{children:e.mobile}),s.includes("actions")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Eu,{className:"patients-tour-step3",width:"fit-content",children:(0,Gt.jsx)(Vp,{"data-id":e.id,color:"primary",variant:"contained",disableElevation:!0,onClick:()=>{return t=e.program_details,_(t||[]),void j(!0);var t},children:y("rpm_viewPrograms")})})})]},e.id)})})}),(0,Gt.jsx)(IO,{pageDetails:m,fetchListFunction:h}),(0,Gt.jsx)(_ue,{programDialogOpen:b,handleCloseProgramDialog:()=>{j(!1),_([])},selectedPrograms:w})]})]})})]})},Sue=["content"];const Aue=function(){const e=Nt(),t=Ct(Nd),n=Ct(qd),r=!("true"===ls(n,"user_principal.attributes.skip_tour[0]","")),{t:o}=vg(),a="000000",[s,l]=(0,We.useState)("desc"),[c,d]=(0,We.useState)("created_at"),[u,p]=(0,We.useState)([]),[h,m]=(0,We.useState)([]),[f,g]=(0,We.useState)([]),[v,x]=We.useState(""),[y,b]=We.useState({patientName:""}),[j,w]=(0,We.useState)((0,i.A)({},Fc)),_=["patient_name","email","age","mobile_no","actions"],C=[{id:"patient_name",label:o("rpm_AllUsers"),isSort:!0,sortProperty:"first_name"},{id:"email",label:o("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"age",label:o("rpm_Age"),isSort:!0,sortProperty:"dob"},{id:"mobile_no",label:o("rpm_MobileNumber"),isSort:!0,sortProperty:"mobile_no"},{id:"actions",label:o("rpm_Actions"),isSort:!1,sortProperty:"actions"}],[S,A]=We.useState(ta()($o.getHeadCellsPatient())?_:$o.getHeadCellsPatient()),k=async t=>{const n=(0,i.A)((0,i.A)({sort_by:c,sort_order:s},j),{},{newFilterState:t});try{const{data:t}=await e(zs(a,n)),r=t||{},{content:o}=r,s=Ko(r,Sue);m(o),w(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(r){console.log(r)}};return We.useEffect(()=>{var e;A(e=_),$o.setHeadCellsPatient(e)},[]),We.useEffect(()=>{e(w_({activeMenuItem:"allusers",heading:{}})),k()},[]),We.useEffect(()=>{t&&k()},[t]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Cue,{allUserList:h,order:s,orderBy:c,setOrder:l,setOrderBy:d,dataParameter:"id",initialHeadcells:S,headCellsItems:C,checkState:u,onCheck:e=>{if(Array.isArray(e))return p(e.map(e=>e.toString()));const t=e.target.name;u.includes(t)?p(u.filter(e=>e!==t)):p(e=>[...e,t])},isSelection:!1,nodata:D_,fetchPatientList:k,newPageDetails:j,fetchAllPatientsListSuggestions:async t=>{const n=(0,i.A)((0,i.A)({sort_by:c,sort_order:s,newFilterState:t},j),{},{current_page:1});if(t.patientName){if(null!==t&&void 0!==t&&t.patientName.trim())try{const{data:t}=await e(zs(a,n)),{content:r}=t||{};g(r)}catch(r){console.log(r)}}else g([]),k()},allpatientSuggestions:f,filterState:y,setFilterState:b}),(0,Gt.jsx)(AZ,{isTour:r,path:"allPatientsTour",setRenderer:x}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:v})]})};function kue(e){return(0,sr.Ay)("MuiFormGroup",e)}(0,ar.A)("MuiFormGroup",["root","row","error"]);const Mue=["className","row"],Oue=(0,Un.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})}),Tue=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiFormGroup"}),{className:r,row:i=!1}=n,o=(0,nn.A)(n,Mue),a=nj({props:n,muiFormControl:ij(),states:["error"]}),s=(0,Ft.A)({},n,{row:i,error:a.error}),l=(e=>{const{classes:t,row:n,error:r}=e,i={root:["root",n&&"row",r&&"error"]};return(0,ir.A)(i,kue,t)})(s);return(0,Gt.jsx)(Oue,(0,Ft.A)({className:(0,nr.A)(l.root,r),ownerState:s,ref:t},o))}),Eue=Tue,Pue=(0,dy.A)((0,Gt.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Due=(0,dy.A)((0,Gt.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var Rue=n(50805),Nue=We.createContext(null);var Lue=function(e){e()};function Iue(){var e=Lue,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var e=t;e;)e.callback(),e=e.next})},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Fue={notify:function(){},get:function(){return[]}};function $ue(e,t){var n,r=Fue;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=Iue())}var a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=Fue)},getListeners:function(){return r}};return a}var Bue="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?We.useLayoutEffect:We.useEffect;const zue=function(e){var t=e.store,n=e.context,r=e.children,i=(0,We.useMemo)(function(){var e=$ue(t);return{store:t,subscription:e}},[t]),o=(0,We.useMemo)(function(){return t.getState()},[t]);Bue(function(){var e=i.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[i,o]);var a=n||Nue;return We.createElement(a.Provider,{value:i},r)};var Hue=n(42348),Wue=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Vue=["reactReduxForwardedRef"],Uue=[],que=[null,null];function Gue(e,t){var n=e[1];return[t.payload,n+1]}function Yue(e,t,n){Bue(function(){return e.apply(void 0,t)},n)}function Zue(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function Kue(e,t,n,r,i,o,a,s,l,c){if(e){var d=!1,u=null,p=function(){if(!d){var e,n,p=t.getState();try{e=r(p,i.current)}catch(ba){n=ba,u=ba}n||(u=null),e===o.current?a.current||l():(o.current=e,s.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=p,n.trySubscribe(),p();return function(){if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u}}}var Xue=function(){return[null,0]};function Que(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,i=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,o=n.methodName,a=void 0===o?"connectAdvanced":o,s=n.renderCountProp,l=void 0===s?void 0:s,c=n.shouldHandleStateChanges,d=void 0===c||c,u=n.storeKey,p=void 0===u?"store":u,h=(n.withRef,n.forwardRef),m=void 0!==h&&h,f=n.context,g=void 0===f?Nue:f,v=(0,nn.A)(n,Wue),x=g;return function(t){var n=t.displayName||t.name||"Component",r=i(n),o=(0,Ft.A)({},v,{getDisplayName:i,methodName:a,renderCountProp:l,shouldHandleStateChanges:d,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure;var c=s?We.useMemo:function(e){return e()};function u(n){var r=(0,We.useMemo)(function(){var e=n.reactReduxForwardedRef,t=(0,nn.A)(n,Vue);return[n.context,e,t]},[n]),i=r[0],a=r[1],s=r[2],l=(0,We.useMemo)(function(){return i&&i.Consumer&&(0,Hue.isContextConsumer)(We.createElement(i.Consumer,null))?i:x},[i,x]),u=(0,We.useContext)(l),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(u)&&Boolean(u.store);var h=p?n.store:u.store,m=(0,We.useMemo)(function(){return function(t){return e(t.dispatch,o)}(h)},[h]),f=(0,We.useMemo)(function(){if(!d)return que;var e=$ue(h,p?null:u.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[h,p,u]),g=f[0],v=f[1],y=(0,We.useMemo)(function(){return p?u:(0,Ft.A)({},u,{subscription:g})},[p,u,g]),b=(0,We.useReducer)(Gue,Uue,Xue),j=b[0][0],w=b[1];if(j&&j.error)throw j.error;var _=(0,We.useRef)(),C=(0,We.useRef)(s),S=(0,We.useRef)(),A=(0,We.useRef)(!1),k=c(function(){return S.current&&s===C.current?S.current:m(h.getState(),s)},[h,j,s]);Yue(Zue,[C,_,A,s,k,S,v]),Yue(Kue,[d,h,g,m,C,_,A,S,v,w],[h,g,m]);var M=(0,We.useMemo)(function(){return We.createElement(t,(0,Ft.A)({},k,{ref:a}))},[a,t,k]);return(0,We.useMemo)(function(){return d?We.createElement(l.Provider,{value:y},M):M},[l,M,y])}var h=s?We.memo(u):u;if(h.WrappedComponent=t,h.displayName=u.displayName=r,m){var f=We.forwardRef(function(e,t){return We.createElement(h,(0,Ft.A)({},e,{reactReduxForwardedRef:t}))});return f.displayName=r,f.WrappedComponent=t,At()(f,t)}return At()(h,t)}}function Jue(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function epe(e,t){if(Jue(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Jue(e[n[i]],t[n[i]]))return!1;return!0}function tpe(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function npe(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function rpe(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=npe(e);var i=r(t,n);return"function"===typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=npe(i),i=r(t,n)),i},r}}const ipe=[function(e){return"function"===typeof e?rpe(e):void 0},function(e){return e?void 0:tpe(function(e){return{dispatch:e}})},function(e){return e&&"object"===typeof e?tpe(function(t){return function(e,t){var n={},r=function(r){var i=e[r];"function"===typeof i&&(n[r]=function(){return t(i.apply(void 0,arguments))})};for(var i in e)r(i);return n}(e,t)}):void 0}];const ope=[function(e){return"function"===typeof e?rpe(e):void 0},function(e){return e?void 0:tpe(function(){return{}})}];function ape(e,t,n){return(0,Ft.A)({},n,e,t)}const spe=[function(e){return"function"===typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,o=n.areMergedPropsEqual,a=!1;return function(t,n,s){var l=e(t,n,s);return a?i&&o(l,r)||(r=l):(a=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return ape}}];var lpe=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function cpe(e,t,n,r){return function(i,o){return n(e(i,o),t(r,o),o)}}function dpe(e,t,n,r,i){var o,a,s,l,c,d=i.areStatesEqual,u=i.areOwnPropsEqual,p=i.areStatePropsEqual,h=!1;function m(i,h){var m=!u(h,a),f=!d(i,o,h,a);return o=i,a=h,m&&f?(s=e(o,a),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):m?(e.dependsOnOwnProps&&(s=e(o,a)),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):f?function(){var t=e(o,a),r=!p(t,s);return s=t,r&&(c=n(s,l,a)),c}():c}return function(i,d){return h?m(i,d):(s=e(o=i,a=d),l=t(r,a),c=n(s,l,a),h=!0,c)}}function upe(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=(0,nn.A)(t,lpe),a=n(e,o),s=r(e,o),l=i(e,o);return(o.pure?dpe:cpe)(a,s,l,e,o)}var ppe=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function hpe(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function mpe(e,t){return e===t}function fpe(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Que:n,i=t.mapStateToPropsFactories,o=void 0===i?ope:i,a=t.mapDispatchToPropsFactories,s=void 0===a?ipe:a,l=t.mergePropsFactories,c=void 0===l?spe:l,d=t.selectorFactory,u=void 0===d?upe:d;return function(e,t,n,i){void 0===i&&(i={});var a=i,l=a.pure,d=void 0===l||l,p=a.areStatesEqual,h=void 0===p?mpe:p,m=a.areOwnPropsEqual,f=void 0===m?epe:m,g=a.areStatePropsEqual,v=void 0===g?epe:g,x=a.areMergedPropsEqual,y=void 0===x?epe:x,b=(0,nn.A)(a,ppe),j=hpe(e,o,"mapStateToProps"),w=hpe(t,s,"mapDispatchToProps"),_=hpe(n,c,"mergeProps");return r(u,(0,Ft.A)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:j,initMapDispatchToProps:w,initMergeProps:_,pure:d,areStatesEqual:h,areOwnPropsEqual:f,areStatePropsEqual:v,areMergedPropsEqual:y},b))}}const gpe=fpe();function vpe(e,t){var n=(0,We.useState)(function(){return{inputs:t,result:e()}})[0],r=(0,We.useRef)(!0),i=(0,We.useRef)(n),o=r.current||Boolean(t&&i.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.current.inputs))?i.current:{inputs:t,result:e()};return(0,We.useEffect)(function(){r.current=!1,i.current=o},[o]),o.result}!function(e){Lue=e}(ut.unstable_batchedUpdates);var xpe=vpe,ype=function(e,t){return vpe(function(){return e},t)},bpe=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},jpe=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},wpe=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},_pe={top:0,right:0,bottom:0,left:0},Cpe=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?_pe:n,i=e.border,o=void 0===i?_pe:i,a=e.padding,s=void 0===a?_pe:a,l=bpe(jpe(t,r)),c=bpe(wpe(t,o)),d=bpe(wpe(c,s));return{marginBox:l,borderBox:bpe(t),paddingBox:c,contentBox:d,margin:r,border:o,padding:s}},Spe=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&p2(!1),n},Ape=function(e,t){var n,r,i=e.borderBox,o=e.border,a=e.margin,s=e.padding,l=(r=t,{top:(n=i).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return Cpe({borderBox:l,border:o,margin:a,padding:s})},kpe=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Ape(e,t)},Mpe=function(e,t){var n={top:Spe(t.marginTop),right:Spe(t.marginRight),bottom:Spe(t.marginBottom),left:Spe(t.marginLeft)},r={top:Spe(t.paddingTop),right:Spe(t.paddingRight),bottom:Spe(t.paddingBottom),left:Spe(t.paddingLeft)},i={top:Spe(t.borderTopWidth),right:Spe(t.borderRightWidth),bottom:Spe(t.borderBottomWidth),left:Spe(t.borderLeftWidth)};return Cpe({borderBox:e,margin:n,padding:r,border:i})},Ope=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return Mpe(t,n)},Tpe=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function Epe(e,t){return e===t||!(!Tpe(e)||!Tpe(t))}function Ppe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Epe(e[n],t[n]))return!1;return!0}const Dpe=function(e,t){var n;void 0===t&&(t=Ppe);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}};const Rpe=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t=i,n||(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function Npe(e,t){}Npe.bind(null,"warn"),Npe.bind(null,"error");function Lpe(){}function Ipe(e,t,n){var r=t.map(function(t){var r=function(e,t){return(0,Ft.A)({},e,{},t)}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(function(e){e()})}}var Fpe="Invariant failed";function $pe(e){this.message=e}function Bpe(e,t){if(!e)throw new $pe(Fpe)}$pe.prototype.toString=function(){return this.message};var zpe=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).callbacks=null,t.unbind=Lpe,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof $pe&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}wn(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=Ipe(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(e){if(!(e instanceof $pe))throw e;this.setState({})},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(We.Component),Hpe=function(e){return e+1},Wpe=function(e,t){var n=e.droppableId===t.droppableId,r=Hpe(e.index),i=Hpe(t.index);return n?"\n      You have moved the item from position "+r+"\n      to position "+i+"\n    ":"\n    You have moved the item from position "+r+"\n    in list "+e.droppableId+"\n    to list "+t.droppableId+"\n    in position "+i+"\n  "},Vpe=function(e,t,n){return t.droppableId===n.droppableId?"\n      The item "+e+"\n      has been combined with "+n.draggableId:"\n      The item "+e+"\n      in list "+t.droppableId+"\n      has been combined with "+n.draggableId+"\n      in list "+n.droppableId+"\n    "},Upe=function(e){return"\n  The item has returned to its starting position\n  of "+Hpe(e.index)+"\n"},qpe="\n  Press space bar to start a drag.\n  When dragging you can use the arrow keys to move the item around and escape to cancel.\n  Some screen readers may require you to be in focus mode or to use your pass through key\n",Gpe=function(e){return"\n  You have lifted an item in position "+Hpe(e.source.index)+"\n"},Ype=function(e){var t=e.destination;if(t)return Wpe(e.source,t);var n=e.combine;return n?Vpe(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},Zpe=function(e){if("CANCEL"===e.reason)return"\n      Movement cancelled.\n      "+Upe(e.source)+"\n    ";var t=e.destination,n=e.combine;return t?"\n      You have dropped the item.\n      "+Wpe(e.source,t)+"\n    ":n?"\n      You have dropped the item.\n      "+Vpe(e.draggableId,e.source,n)+"\n    ":"\n    The item has been dropped while not over a drop area.\n    "+Upe(e.source)+"\n  "},Kpe={x:0,y:0},Xpe=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},Qpe=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},Jpe=function(e,t){return e.x===t.x&&e.y===t.y},ehe=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},the=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},nhe=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},rhe=function(e,t){return Math.min.apply(Math,t.map(function(t){return nhe(e,t)}))},ihe=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},ohe=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},ahe=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},she=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=bpe({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):bpe(e)},lhe=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=function(e,t){return t?ohe(e,t.scroll.diff.displacement):e}(t.marginBox,i),a=function(e,t,n){var r;return n&&n.increasedBy?(0,Ft.A)({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e}(o,r,n);return{page:t,withPlaceholder:n,active:she(a,i)}},che=function(e,t){e.frame||Bpe(!1);var n=e.frame,r=Qpe(t,n.scroll.initial),i=ehe(r),o=(0,Ft.A)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),a=lhe({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o});return(0,Ft.A)({},e,{frame:o,subject:a})};function dhe(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function uhe(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function phe(e,t){if(e.find)return e.find(t);var n=uhe(e,t);return-1!==n?e[n]:void 0}function hhe(e){return Array.prototype.slice.call(e)}var mhe=Dpe(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),fhe=Dpe(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),ghe=Dpe(function(e){return dhe(e)}),vhe=Dpe(function(e){return dhe(e)}),xhe=Dpe(function(e,t){var n=vhe(t).filter(function(t){return e===t.descriptor.droppableId}).sort(function(e,t){return e.descriptor.index-t.descriptor.index});return n});function yhe(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function bhe(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var jhe=Dpe(function(e,t){return t.filter(function(t){return t.descriptor.id!==e.descriptor.id})}),whe=function(e,t){return e.descriptor.droppableId===t.descriptor.id},_he={point:Kpe,value:0},Che={invisible:{},visible:{},all:[]},She={displaced:Che,displacedBy:_he,at:null},Ahe=function(e,t){return function(n){return e<=n&&n<=t}},khe=function(e){var t=Ahe(e.top,e.bottom),n=Ahe(e.left,e.right);return function(r){if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;var i=t(r.top)||t(r.bottom),o=n(r.left)||n(r.right);if(i&&o)return!0;var a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return!(!a||!s)||(a&&o||s&&i)}},Mhe=function(e){var t=Ahe(e.top,e.bottom),n=Ahe(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},Ohe={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},The={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Ehe=function(e){var t=e.target,n=e.destination,r=e.viewport,i=e.withDroppableDisplacement,o=e.isVisibleThroughFrameFn,a=i?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:Kpe;return ohe(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,o)&&function(e,t,n){return n(t)(e)}(a,r,o)},Phe=function(e){return Ehe((0,Ft.A)({},e,{isVisibleThroughFrameFn:Mhe}))};function Dhe(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return t.reduce(function(e,t){var s=function(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return bpe(jpe(n,r))}(t,r),l=t.descriptor.id;e.all.push(l);var c=function(e){return Ehe((0,Ft.A)({},e,{isVisibleThroughFrameFn:khe}))}({target:s,destination:n,viewport:i,withDroppableDisplacement:!0});if(!c)return e.invisible[t.descriptor.id]=!0,e;var d=function(e,t,n){if("boolean"===typeof n)return n;if(!t)return!0;var r=t.invisible,i=t.visible;if(r[e])return!1;var o=i[e];return!o||o.shouldAnimate}(l,a,o),u={draggableId:l,shouldAnimate:d};return e.visible[l]=u,e},{all:[],visible:{},invisible:{}})}function Rhe(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:Che,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Nhe(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,s=e.index,l=e.forceShouldAnimate,c=whe(t,r);if(null==s)return Rhe({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var d=phe(n,function(e){return e.descriptor.index===s});if(!d)return Rhe({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});var u=jhe(t,n),p=n.indexOf(d);return{displaced:Dhe({afterDragging:u.slice(p),destination:r,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:l}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:s}}}}function Lhe(e,t){return Boolean(t.effected[e])}var Ihe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,d=s.at;if(d||Bpe(!1),"REORDER"===d.type){var u=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,a=t?o+1:o-1,s=r[0].descriptor.index,l=r[r.length-1].descriptor.index;return a<s||a>(n?l:l+1)?null:a}({isMovingForward:t,isInHomeList:n,location:d.destination,insideDestination:a});return null==u?null:Nhe({draggable:r,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:u})}var p=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var a=i.draggableId,s=r[a].descriptor.index;return Lhe(a,o)?t?s:s-1:t?s+1:s}({isMovingForward:t,destination:o,displaced:s.displaced,draggables:i,combine:d.combine,afterCritical:c});return null==p?null:Nhe({draggable:r,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:p})},Fhe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=bhe(n);i||Bpe(!1);var o=i.draggableId,a=r[o].page.borderBox.center,s=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=Boolean(t.visible[r]||t.invisible[r]);return Lhe(r,n)?o?Kpe:ehe(i.point):o?i.point:Kpe}({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Xpe(a,s)},$he=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},Bhe=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},zhe=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return the(t.line,n.marginBox[t.end]+$he(t,r),Bhe(t,n.marginBox,r))},Hhe=function(e){var t=e.axis,n=e.moveRelativeTo,r=e.isMoving;return the(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,r),Bhe(t,n.marginBox,r))},Whe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,a=xhe(i.descriptor.id,r),s=n.page,l=i.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,r=e.isMoving;return the(t.line,n.contentBox[t.start]+$he(t,r),Bhe(t,n.contentBox,r))}({axis:l,moveInto:i.page,isMoving:s});var c=t.displaced,d=t.displacedBy,u=c.all[0];if(u){var p=r[u];if(Lhe(u,o))return Hhe({axis:l,moveRelativeTo:p.page,isMoving:s});var h=Ape(p.page,d.point);return Hhe({axis:l,moveRelativeTo:h,isMoving:s})}var m=a[a.length-1];if(m.descriptor.id===n.descriptor.id)return s.borderBox.center;if(Lhe(m.descriptor.id,o)){var f=Ape(m.page,ehe(o.displacedBy.point));return zhe({axis:l,moveRelativeTo:f,isMoving:s})}return zhe({axis:l,moveRelativeTo:m.page,isMoving:s})},Vhe=function(e,t){var n=e.frame;return n?Xpe(t,n.scroll.diff.displacement):t},Uhe=function(e){var t=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.afterCritical,a=n.page.borderBox.center,s=t.at;return r&&s?"REORDER"===s.type?Whe({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:o}):Fhe({impact:t,draggables:i,afterCritical:o}):a}(e),n=e.droppable;return n?Vhe(n,t):t},qhe=function(e,t){var n=Qpe(t,e.scroll.initial),r=ehe(n);return{frame:bpe({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function Ghe(e,t){return e.map(function(e){return t[e]})}var Yhe=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=function(e,t){return Xpe(e.scroll.diff.displacement,t)}(e.viewport,t),i=Qpe(r,n.page.borderBox.center);return Xpe(n.client.borderBox.center,i)},Zhe=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,s=void 0!==a&&a,l=Qpe(r,t.page.borderBox.center),c={target:ohe(t.page.borderBox,l),destination:n,withDroppableDisplacement:o,viewport:i};return s?function(e){return Ehe((0,Ft.A)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=Ahe(e.top,e.bottom),r=Ahe(e.left,e.right);return function(e){return t===Ohe?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)}})}));var t}(c):Phe(c)},Khe=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,s=e.previousPageBorderBoxCenter,l=e.previousClientSelection,c=e.afterCritical;if(!r.isEnabled)return null;var d=xhe(r.descriptor.id,i),u=whe(n,r),p=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;if(!yhe(o))return null;function a(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return(0,Ft.A)({},o,{at:t})}var s=o.displaced.all,l=s.length?s[0]:null;if(t)return l?a(l):null;var c=jhe(n,i);if(!l)return c.length?a(c[c.length-1].descriptor.id):null;var d=uhe(c,function(e){return e.descriptor.id===l});-1===d&&Bpe(!1);var u=d-1;return u<0?null:a(c[u].descriptor.id)}({isMovingForward:t,draggable:n,destination:r,insideDestination:d,previousImpact:o})||Ihe({isMovingForward:t,isInHomeList:u,draggable:n,draggables:i,destination:r,insideDestination:d,previousImpact:o,viewport:a,afterCritical:c});if(!p)return null;var h=Uhe({impact:p,draggable:n,droppable:r,draggables:i,afterCritical:c});if(Zhe({draggable:n,destination:r,newPageBorderBoxCenter:h,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Yhe({pageBorderBoxCenter:h,draggable:n,viewport:a}),impact:p,scrollJumpRequest:null};var m=Qpe(h,s),f=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,o=e.maxScrollChange,a=qhe(n,Xpe(n.scroll.current,o)),s=r.frame?che(r,Xpe(r.frame.scroll.current,o)):r,l=t.displaced,c=Dhe({afterDragging:Ghe(l.all,i),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:l,forceShouldAnimate:!1}),d=Dhe({afterDragging:Ghe(l.all,i),destination:s,displacedBy:t.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),u={},p={},h=[l,c,d];return l.all.forEach(function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}(e,h);t?p[e]=t:u[e]=!0}),(0,Ft.A)({},t,{displaced:{all:l.all,invisible:u,visible:p}})}({impact:p,viewport:a,destination:r,draggables:i,maxScrollChange:m});return{clientSelection:l,impact:f,scrollJumpRequest:m}},Xhe=function(e){var t=e.subject.active;return t||Bpe(!1),t},Qhe=function(e,t){var n=e.page.borderBox.center;return Lhe(e.descriptor.id,t)?Qpe(n,t.displacedBy.point):n},Jhe=function(e,t){var n=e.page.borderBox;return Lhe(e.descriptor.id,t)?ohe(n,ehe(t.displacedBy.point)):n},eme=Dpe(function(e,t){var n=t[e.line];return{value:n,point:the(e.line,n)}}),tme=function(e,t){return(0,Ft.A)({},e,{scroll:(0,Ft.A)({},e.scroll,{max:t})})},nme=function(e,t,n){var r=e.frame;whe(t,e)&&Bpe(!1),e.subject.withPlaceholder&&Bpe(!1);var i=eme(e.axis,t.displaceBy).point,o=function(e,t,n){var r=e.axis;if("virtual"===e.descriptor.mode)return the(r.line,t[r.line]);var i=e.subject.page.contentBox[r.size],o=xhe(e.descriptor.id,n).reduce(function(e,t){return e+t.client.marginBox[r.size]},0)+t[r.line]-i;return o<=0?null:the(r.line,o)}(e,i,n),a={placeholderSize:i,increasedBy:o,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){var s=lhe({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return(0,Ft.A)({},e,{subject:s})}var l=o?Xpe(r.scroll.max,o):r.scroll.max,c=tme(r,l),d=lhe({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:c});return(0,Ft.A)({},e,{subject:d,frame:c})},rme=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,s=e.viewport,l=e.afterCritical,c=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,o=e.viewport,a=r.subject.active;if(!a)return null;var s=r.axis,l=Ahe(a[s.start],a[s.end]),c=ghe(i).filter(function(e){return e!==r}).filter(function(e){return e.isEnabled}).filter(function(e){return Boolean(e.subject.active)}).filter(function(e){return khe(o.frame)(Xhe(e))}).filter(function(e){var n=Xhe(e);return t?a[s.crossAxisEnd]<n[s.crossAxisEnd]:n[s.crossAxisStart]<a[s.crossAxisStart]}).filter(function(e){var t=Xhe(e),n=Ahe(t[s.start],t[s.end]);return l(t[s.start])||l(t[s.end])||n(a[s.start])||n(a[s.end])}).sort(function(e,n){var r=Xhe(e)[s.crossAxisStart],i=Xhe(n)[s.crossAxisStart];return t?r-i:i-r}).filter(function(e,t,n){return Xhe(e)[s.crossAxisStart]===Xhe(n[0])[s.crossAxisStart]});if(!c.length)return null;if(1===c.length)return c[0];var d=c.filter(function(e){return Ahe(Xhe(e)[s.start],Xhe(e)[s.end])(n[s.line])});return 1===d.length?d[0]:d.length>1?d.sort(function(e,t){return Xhe(e)[s.start]-Xhe(t)[s.start]})[0]:c.sort(function(e,t){var r=rhe(n,ahe(Xhe(e))),i=rhe(n,ahe(Xhe(t)));return r!==i?r-i:Xhe(e)[s.start]-Xhe(t)[s.start]})[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:s});if(!c)return null;var d=xhe(c.descriptor.id,o),u=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,a=i.filter(function(e){return Phe({target:Jhe(e,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(e,n){var i=nhe(t,Vhe(r,Qhe(e,o))),a=nhe(t,Vhe(r,Qhe(n,o)));return i<a?-1:a<i?1:e.descriptor.index-n.descriptor.index});return a[0]||null}({pageBorderBoxCenter:n,viewport:s,destination:c,insideDestination:d,afterCritical:l}),p=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,s=e.viewport,l=e.afterCritical;if(!n){if(r.length)return null;var c={displaced:Che,displacedBy:_he,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},d=Uhe({impact:c,draggable:i,droppable:a,draggables:o,afterCritical:l}),u=whe(i,a)?a:nme(a,i,o);return Zhe({draggable:i,destination:u,newPageBorderBoxCenter:d,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var p=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),h=function(){var e=n.descriptor.index;return n.descriptor.id===i.descriptor.id||p?e:e+1}(),m=eme(a.axis,i.displaceBy);return Nhe({draggable:i,insideDestination:r,destination:a,viewport:s,displacedBy:m,last:Che,index:h})}({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:o,moveRelativeTo:u,insideDestination:d,viewport:s,afterCritical:l});if(!p)return null;var h=Uhe({impact:p,draggable:r,droppable:c,draggables:o,afterCritical:l});return{clientSelection:Yhe({pageBorderBoxCenter:h,draggable:r,viewport:s}),impact:p,scrollJumpRequest:null}},ime=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},ome=function(e){var t=e.state,n=e.type,r=function(e,t){var n=ime(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),i=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],a=r||o,s=a.axis.direction,l="vertical"===s&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===s&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(l&&!i)return null;var c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,d=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,p=t.dimensions,h=p.draggables,m=p.droppables;return l?Khe({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:d,destination:a,draggables:h,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):rme({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:d,isOver:a,draggables:h,droppables:m,viewport:t.viewport,afterCritical:t.afterCritical})};function ame(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function sme(e){var t=Ahe(e.top,e.bottom),n=Ahe(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function lme(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=ghe(r).filter(function(e){if(!e.isEnabled)return!1;var n=e.subject.active;if(!n)return!1;if(!function(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}(t,n))return!1;if(sme(n)(t.center))return!0;var r=e.axis,i=n.center[r.crossAxisLine],o=t[r.crossAxisStart],a=t[r.crossAxisEnd],s=Ahe(n[r.crossAxisStart],n[r.crossAxisEnd]),l=s(o),c=s(a);return!l&&!c||(l?o<i:a>i)});return i.length?1===i.length?i[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(e){var n=e.axis,r=the(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:nhe(i,r)}}).sort(function(e,t){return t.distance-e.distance});return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:i}):null}var cme=function(e,t){return bpe(ohe(e,t))};function dme(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var ume=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,s=e.afterCritical,l=cme(n.page.borderBox,t),c=lme({pageBorderBox:l,draggable:n,droppables:i});if(!c)return She;var d=i[c],u=xhe(d.descriptor.id,r),p=function(e,t){var n=e.frame;return n?cme(t,n.scroll.diff.value):t}(d,l);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var s=i.axis,l=eme(i.axis,t.displaceBy),c=l.value,d=n[s.start],u=n[s.end],p=phe(jhe(t,o),function(e){var t=e.descriptor.id,n=e.page.borderBox,i=n[s.size]/4,o=Lhe(t,a),l=dme({displaced:r.displaced,id:t});return o?l?u>n[s.start]+i&&u<n[s.end]-i:d>n[s.start]-c+i&&d<n[s.end]-c-i:l?u>n[s.start]+c+i&&u<n[s.end]+c-i:d>n[s.start]+i&&d<n[s.end]-i});return p?{displacedBy:l,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:i.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:p,draggable:n,previousImpact:o,destination:d,insideDestination:u,afterCritical:s})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,s=e.afterCritical,l=r.axis,c=eme(r.axis,n.displaceBy),d=c.value,u=t[l.start],p=t[l.end],h=function(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:phe(jhe(n,i),function(e){var t=e.descriptor.id,n=e.page.borderBox.center[l.line],r=Lhe(t,s),i=dme({displaced:o,id:t});return r?i?p<=n:u<n-d:i?p<=n+d:u<n}),inHomeList:whe(n,r)});return Nhe({draggable:n,insideDestination:i,destination:r,viewport:a,last:o,displacedBy:c,index:h})}({pageBorderBoxWithDroppableScroll:p,draggable:n,destination:d,insideDestination:u,last:o.displaced,viewport:a,afterCritical:s})},pme=function(e,t){var n;return(0,Ft.A)({},e,((n={})[t.descriptor.id]=t,n))},hme=function(e){var t=e.previousImpact,n=e.impact,r=e.droppables,i=ime(t),o=ime(n);if(!i)return r;if(i===o)return r;var a=r[i];if(!a.subject.withPlaceholder)return r;var s=function(e){var t=e.subject.withPlaceholder;t||Bpe(!1);var n=e.frame;if(!n){var r=lhe({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return(0,Ft.A)({},e,{subject:r})}var i=t.oldFrameMaxScroll;i||Bpe(!1);var o=tme(n,i),a=lhe({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return(0,Ft.A)({},e,{subject:a,frame:o})}(a);return pme(r,s)},mme=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,s=i||t.viewport,l=r||t.dimensions,c=n||t.current.client.selection,d=Qpe(c,t.initial.client.selection),u={offset:d,selection:c,borderBoxCenter:Xpe(t.initial.client.borderBoxCenter,d)},p={selection:Xpe(u.selection,s.scroll.current),borderBoxCenter:Xpe(u.borderBoxCenter,s.scroll.current),offset:Xpe(u.offset,s.scroll.diff.value)},h={client:u,page:p};if("COLLECTING"===t.phase)return(0,Ft.A)({phase:"COLLECTING"},t,{dimensions:l,viewport:s,current:h});var m=l.draggables[t.critical.draggable.id],f=o||ume({pageOffset:p.offset,draggable:m,draggables:l.draggables,droppables:l.droppables,previousImpact:t.impact,viewport:s,afterCritical:t.afterCritical}),g=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,a=hme({previousImpact:i,impact:o,droppables:r}),s=ime(o);if(!s)return a;var l=r[s];if(whe(t,l))return a;if(l.subject.withPlaceholder)return a;var c=nme(l,t,n);return pme(a,c)}({draggable:m,impact:f,previousImpact:t.impact,draggables:l.draggables,droppables:l.droppables});return(0,Ft.A)({},t,{current:h,dimensions:{draggables:l.draggables,droppables:g},impact:f,viewport:s,scrollJumpRequest:a||null,forceShouldAnimate:!a&&null})};var fme=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=t.displaced,s=function(e,t){return e.map(function(e){return t[e]})}(a.all,r),l=Dhe({afterDragging:s,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:a});return(0,Ft.A)({},t,{displaced:l})},gme=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,s=Uhe({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a});return Yhe({pageBorderBoxCenter:s,draggable:n,viewport:o})},vme=function(e){var t=e.state,n=e.dimensions,r=e.viewport;"SNAP"!==t.movementMode&&Bpe(!1);var i=t.impact,o=r||t.viewport,a=n||t.dimensions,s=a.draggables,l=a.droppables,c=s[t.critical.draggable.id],d=ime(i);d||Bpe(!1);var u=l[d],p=fme({impact:i,viewport:o,destination:u,draggables:s}),h=gme({impact:p,draggable:c,droppable:u,draggables:s,viewport:o,afterCritical:t.afterCritical});return mme({impact:p,clientSelection:h,state:t,dimensions:a,viewport:o})},xme=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=eme(n.axis,t.displaceBy),a=xhe(n.descriptor.id,r),s=a.indexOf(t);-1===s&&Bpe(!1);var l,c=a.slice(s+1),d=c.reduce(function(e,t){return e[t.descriptor.id]=!0,e},{}),u={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:o,effected:d};return{impact:{displaced:Dhe({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(l=t.descriptor,{index:l.index,droppableId:l.droppableId})}},afterCritical:u}},yme=function(e){0},bme=function(e){0},jme=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(e){var t=e.descriptor.droppableId,o=function(e){var t=e.frame;return t||Bpe(!1),t}(n[t]),a=o.scroll.diff.value,s=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=Ape(t.client,n),o=kpe(i,r);return(0,Ft.A)({},t,{placeholder:(0,Ft.A)({},t.placeholder,{client:i}),client:i,page:o})}({draggable:e,offset:Xpe(i,a),initialWindowScroll:r.scroll.initial});return s})},wme=function(e){return"SNAP"===e.movementMode},_me=function(e,t,n){var r=function(e,t){return{draggables:e.draggables,droppables:pme(e.droppables,t)}}(e.dimensions,t);return!wme(e)||n?mme({state:e,dimensions:r}):vme({state:e,dimensions:r})};function Cme(e){return e.isDragging&&"SNAP"===e.movementMode?(0,Ft.A)({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var Sme={phase:"IDLE",completed:null,shouldFlush:!1},Ame=function(e,t){if(void 0===e&&(e=Sme),"FLUSH"===t.type)return(0,Ft.A)({},Sme,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&Bpe(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,a=n.dimensions,s=n.movementMode,l=a.draggables[r.draggable.id],c=a.droppables[r.droppable.id],d={selection:i,borderBoxCenter:l.client.borderBox.center,offset:Kpe},u={client:d,page:{selection:Xpe(d.selection,o.scroll.initial),borderBoxCenter:Xpe(d.selection,o.scroll.initial),offset:Xpe(d.selection,o.scroll.diff.value)}},p=ghe(a.droppables).every(function(e){return!e.isFixedOnPage}),h=xme({draggable:l,home:c,draggables:a.draggables,viewport:o}),m=h.impact;return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:s,dimensions:a,initial:u,current:u,isWindowScrollAllowed:p,impact:m,afterCritical:h.afterCritical,onLiftImpact:m,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&Bpe(!1),(0,Ft.A)({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&Bpe(!1),function(e){var t=e.state,n=e.published;yme();var r=n.modified.map(function(e){var n=t.dimensions.droppables[e.droppableId];return che(n,e.scroll)}),i=(0,Ft.A)({},t.dimensions.droppables,{},mhe(r)),o=fhe(jme({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),a=(0,Ft.A)({},t.dimensions.draggables,{},o);n.removals.forEach(function(e){delete a[e]});var s={droppables:i,draggables:a},l=ime(t.impact),c=l?s.droppables[l]:null,d=s.draggables[t.critical.draggable.id],u=s.droppables[t.critical.droppable.id],p=xme({draggable:d,home:u,draggables:a,viewport:t.viewport}),h=p.impact,m=p.afterCritical,f=c&&c.isCombineEnabled?t.impact:h,g=ume({pageOffset:t.current.page.offset,draggable:s.draggables[t.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:f,viewport:t.viewport,afterCritical:m});bme();var v=(0,Ft.A)({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:g,onLiftImpact:h,dimensions:s,afterCritical:m,forceShouldAnimate:!1});return"COLLECTING"===t.phase?v:(0,Ft.A)({phase:"DROP_PENDING"},v,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;ame(e)||Bpe(!1);var f=t.payload.client;return Jpe(f,e.current.client.selection)?e:mme({state:e,clientSelection:f,impact:wme(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return Cme(e);if("COLLECTING"===e.phase)return Cme(e);ame(e)||Bpe(!1);var g=t.payload,v=g.id,x=g.newScroll,y=e.dimensions.droppables[v];if(!y)return e;var b=che(y,x);return _me(e,b,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;ame(e)||Bpe(!1);var j=t.payload,w=j.id,_=j.isEnabled,C=e.dimensions.droppables[w];C||Bpe(!1),C.isEnabled===_&&Bpe(!1);var S=(0,Ft.A)({},C,{isEnabled:_});return _me(e,S,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;ame(e)||Bpe(!1);var A=t.payload,k=A.id,M=A.isCombineEnabled,O=e.dimensions.droppables[k];O||Bpe(!1),O.isCombineEnabled===M&&Bpe(!1);var T=(0,Ft.A)({},O,{isCombineEnabled:M});return _me(e,T,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;ame(e)||Bpe(!1),e.isWindowScrollAllowed||Bpe(!1);var E=t.payload.newScroll;if(Jpe(e.viewport.scroll.current,E))return Cme(e);var P=qhe(e.viewport,E);return wme(e)?vme({state:e,viewport:P}):mme({state:e,viewport:P})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!ame(e))return e;var D=t.payload.maxScroll;if(Jpe(D,e.viewport.scroll.max))return e;var R=(0,Ft.A)({},e.viewport,{scroll:(0,Ft.A)({},e.viewport.scroll,{max:D})});return(0,Ft.A)({phase:"DRAGGING"},e,{viewport:R})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&Bpe(!1);var N=ome({state:e,type:t.type});return N?mme({state:e,impact:N.impact,clientSelection:N.clientSelection,scrollJumpRequest:N.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var L=t.payload.reason;return"COLLECTING"!==e.phase&&Bpe(!1),(0,Ft.A)({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:L})}if("DROP_ANIMATE"===t.type){var I=t.payload,F=I.completed,$=I.dropDuration,B=I.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&Bpe(!1),{phase:"DROP_ANIMATING",completed:F,dropDuration:$,newHomeClientOffset:B,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},kme=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},Mme=function(){return{type:"COLLECTION_STARTING",payload:null}},Ome=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},Tme=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},Eme=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},Pme=function(e){return{type:"MOVE",payload:e}},Dme=function(){return{type:"MOVE_UP",payload:null}},Rme=function(){return{type:"MOVE_DOWN",payload:null}},Nme=function(){return{type:"MOVE_RIGHT",payload:null}},Lme=function(){return{type:"MOVE_LEFT",payload:null}},Ime=function(e){return{type:"DROP_COMPLETE",payload:e}},Fme=function(e){return{type:"DROP",payload:e}},$me=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};var Bme="cubic-bezier(.2,1,.1,1)",zme={drop:0,combining:.7},Hme={drop:.75},Wme=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",Vme={fluid:"opacity "+Wme,snap:"transform "+Wme+", opacity "+Wme,drop:function(e){var t=e+"s "+Bme;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+Wme,placeholder:"height "+Wme+", width "+Wme+", margin "+Wme},Ume=function(e){return Jpe(e,Kpe)?null:"translate("+e.x+"px, "+e.y+"px)"},qme=Ume,Gme=function(e,t){var n=Ume(e);return n?t?n+" scale("+Hme.drop+")":n:null},Yme=.33,Zme=.55,Kme=Zme-Yme,Xme=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if("DROP"===r.type){var i=t(),o=r.payload.reason;if("COLLECTING"!==i.phase){if("IDLE"!==i.phase){"DROP_PENDING"===i.phase&&i.isWaiting&&Bpe(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&Bpe(!1);var a=i.critical,s=i.dimensions,l=s.draggables[i.critical.draggable.id],c=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:(0,Ft.A)({},r,{displaced:Che}),didDropInsideDroppable:!0}:{impact:fme({draggables:t,impact:a,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:o,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),d=c.impact,u=c.didDropInsideDroppable,p=u?yhe(d):null,h=u?bhe(d):null,m={index:a.draggable.index,droppableId:a.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:m,reason:o,mode:i.movementMode,destination:p,combine:h},g=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,a=r.draggables,s=r.droppables,l=ime(t),c=l?s[l]:null,d=s[n.descriptor.droppableId],u=gme({impact:t,draggable:n,draggables:a,afterCritical:o,droppable:c||d,viewport:i});return Qpe(u,n.client.borderBox.center)}({impact:d,draggable:l,dimensions:s,viewport:i.viewport,afterCritical:i.afterCritical}),v={critical:i.critical,afterCritical:i.afterCritical,result:f,impact:d};if(!Jpe(i.current.client.offset,g)||Boolean(f.combine)){var x=function(e){var t=e.current,n=e.destination,r=e.reason,i=nhe(t,n);if(i<=0)return Yme;if(i>=1500)return Zme;var o=Yme+Kme*(i/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))}({current:i.current.client.offset,destination:g,reason:o});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:g,dropDuration:x,completed:v}))}else n(Ime({completed:v}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:o}))}else e(r)}}},Qme=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Jme(e){var t=e.onWindowScroll;var n=Rpe(function(){t(Qme())}),r=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),i=Lpe;function o(){return i!==Lpe}return{start:function(){o()&&Bpe(!1),i=Ipe(window,[r])},stop:function(){o()||Bpe(!1),n.cancel(),i(),i=Lpe},isActive:o}}var efe=function(e){var t=Jme({onWindowScroll:function(t){e.dispatch(function(e){return{type:"MOVE_BY_WINDOW_SCROLL",payload:e}}({newScroll:t}))}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},tfe=function(){var e=[];return{add:function(t){var n=setTimeout(function(){return function(t){var n=uhe(e,function(e){return e.timerId===t});-1===n&&Bpe(!1),e.splice(n,1)[0].callback()}(n)}),r={timerId:n,callback:t};e.push(r)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach(function(e){clearTimeout(e.timerId),e.callback()})}}}},nfe=function(e,t){yme(),t(),bme()},rfe=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},ife=function(e,t,n,r){if(e){var i=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(i){t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=function(){return t},i}(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}else n(r(t))},ofe=function(e,t){var n=function(e,t){var n=tfe(),r=null,i=function(n){r||Bpe(!1),r=null,nfe(0,function(){return ife(e().onDragEnd,n,t,Zpe)})};return{beforeCapture:function(t,n){r&&Bpe(!1),nfe(0,function(){var r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:function(t,n){r&&Bpe(!1),nfe(0,function(){var r=e().onBeforeDragStart;r&&r(rfe(t,n))})},start:function(i,o){r&&Bpe(!1);var a=rfe(i,o);r={mode:o,lastCritical:i,lastLocation:a.source,lastCombine:null},n.add(function(){nfe(0,function(){return ife(e().onDragStart,a,t,Gpe)})})},update:function(i,o){var a=yhe(o),s=bhe(o);r||Bpe(!1);var l=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r}(i,r.lastCritical);l&&(r.lastCritical=i);var c=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.droppableId===t.droppableId&&e.index===t.index}(r.lastLocation,a);c&&(r.lastLocation=a);var d=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(r.lastCombine,s);if(d&&(r.lastCombine=s),l||c||d){var u=(0,Ft.A)({},rfe(i,r.mode),{combine:s,destination:a});n.add(function(){nfe(0,function(){return ife(e().onDragUpdate,u,t,Ype)})})}},flush:function(){r||Bpe(!1),n.flush()},drop:i,abort:function(){if(r){var e=(0,Ft.A)({},rfe(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(r){if("BEFORE_INITIAL_CAPTURE"!==r.type){if("INITIAL_PUBLISH"===r.type){var i=r.payload.critical;return n.beforeStart(i,r.payload.movementMode),t(r),void n.start(i,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){var o=r.payload.completed.result;return n.flush(),t(r),void n.drop(o)}if(t(r),"FLUSH"!==r.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(r.payload.draggableId,r.payload.movementMode)}}}},afe=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var r=e.getState();"DROP_ANIMATING"!==r.phase&&Bpe(!1),e.dispatch(Ime({completed:r.completed}))}else t(n)}}},sfe=function(e){var t=null,n=null;return function(r){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(i),"DROP_ANIMATE"===i.type){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame(function(){n=null,t=Ipe(window,[o])})}}}},lfe=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(Fme({reason:r.reason})))}}}},cfe=Rue.Zz,dfe=function(e){var t,n=e.dimensionMarshal,r=e.focusMarshal,i=e.styleMarshal,o=e.getResponders,a=e.announce,s=e.autoScroller;return(0,Rue.y$)(Ame,cfe((0,Rue.Tw)((t=i,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,r=t.dispatch;return function(t){return function(i){if("LIFT"===i.type){var o=i.payload,a=o.id,s=o.clientSelection,l=o.movementMode,c=n();"DROP_ANIMATING"===c.phase&&r(Ime({completed:c.completed})),"IDLE"!==n().phase&&Bpe(!1),r({type:"FLUSH",payload:null}),r(function(e){return{type:"BEFORE_INITIAL_CAPTURE",payload:e}}({draggableId:a,movementMode:l}));var d={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===l}},u=e.startPublishing(d),p=u.critical,h=u.dimensions,m=u.viewport;r(function(e){return{type:"INITIAL_PUBLISH",payload:e}}({critical:p,dimensions:h,clientSelection:s,movementMode:l,viewport:m}))}else t(i)}}}}(n),Xme,afe,sfe,lfe,function(e){return function(t){return function(n){return function(r){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);var i=t.getState();return"DRAGGING"!==i.phase&&Bpe(!1),void e.start(i)}n(r),e.scroll(t.getState())}}}}(s),efe,function(e){var t=!1;return function(){return function(n){return function(r){if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(r),ofe(o,a))))};var ufe=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Qpe({x:n,y:t},{x:i,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},pfe=function(){var e=document.documentElement;return e||Bpe(!1),e},hfe=function(){var e=pfe();return ufe({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},mfe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;yme();var i=function(){var e=Qme(),t=hfe(),n=e.y,r=e.x,i=pfe(),o=i.clientWidth,a=i.clientHeight;return{frame:bpe({top:n,left:r,right:r+o,bottom:n+a}),scroll:{initial:e,current:e,max:t,diff:{value:Kpe,displacement:Kpe}}}}(),o=i.scroll.current,a=t.droppable,s=r.droppable.getAllByType(a.type).map(function(e){return e.callbacks.getDimensionAndWatchScroll(o,n)}),l=r.draggable.getAllByType(t.draggable.type).map(function(e){return e.getDimension(o)}),c={draggables:fhe(l),droppables:mhe(s)};return bme(),{dimensions:c,critical:t,viewport:i}};function ffe(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var gfe=function(e,t){var n=null,r=function(e){var t=e.registry,n=e.callbacks,r={additions:{},removals:{},modified:{}},i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null,yme();var e=r,o=e.additions,a=e.removals,s=e.modified,l=Object.keys(o).map(function(e){return t.draggable.getById(e).getDimension(Kpe)}).sort(function(e,t){return e.descriptor.index-t.descriptor.index}),c=Object.keys(s).map(function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}}),d={additions:l,removals:Object.keys(a),modified:c};r={additions:{},removals:{},modified:{}},bme(),n.publish(d)}))};return{add:function(e){var t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:function(e){var t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:function(){i&&(cancelAnimationFrame(i),i=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(t){n||Bpe(!1);var i=n.critical.draggable;"ADDITION"===t.type&&ffe(e,i,t.value)&&r.add(t.value),"REMOVAL"===t.type&&ffe(e,i,t.value)&&r.remove(t.value)},o={updateDroppableIsEnabled:function(r,i){e.droppable.exists(r)||Bpe(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:function(r,i){n&&(e.droppable.exists(r)||Bpe(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},scrollDroppable:function(t,r){n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:function(r,i){n&&(e.droppable.exists(r)||Bpe(!1),t.updateDroppableScroll({id:r,newScroll:i}))},startPublishing:function(t){n&&Bpe(!1);var r=e.draggable.getById(t.draggableId),o=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:o.descriptor},s=e.subscribe(i);return n={critical:a,unsubscribe:s},mfe({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){r.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach(function(e){return e.callbacks.dragStopped()}),n.unsubscribe(),n=null}}};return o},vfe=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},xfe=function(e){window.scrollBy(e.x,e.y)},yfe=Dpe(function(e){return ghe(e).filter(function(e){return!!e.isEnabled&&!!e.frame})}),bfe=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=function(e,t){var n=phe(yfe(t),function(t){return t.frame||Bpe(!1),sme(t.frame.pageMarginBox)(e)});return n}(t,r);return o},jfe=.25,wfe=.05,_fe=28,Cfe=function(e){return Math.pow(e,2)},Sfe={stopDampeningAt:1200,accelerateAt:360},Afe=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;return 0===i?0:(r-t)/i},kfe=Sfe.accelerateAt,Mfe=Sfe.stopDampeningAt,Ofe=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,o=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return _fe;if(e===t.startScrollingFrom)return 1;var n=Afe({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=_fe*Cfe(1-n);return Math.ceil(r)}(t,n);return 0===o?0:i?Math.max(function(e,t){var n=t,r=Mfe,i=Date.now()-n;if(i>=Mfe)return e;if(i<kfe)return 1;var o=Afe({startOfRange:kfe,endOfRange:r,current:i}),a=e*Cfe(o);return Math.ceil(a)}(o,r),1):o},Tfe=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:e[t.size]*jfe,maxScrollValueAt:e[t.size]*wfe}}(t,i);return n[i.end]<n[i.start]?Ofe({distanceToEdge:n[i.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o}):-1*Ofe({distanceToEdge:n[i.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o})},Efe=ihe(function(e){return 0===e?0:e}),Pfe=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},s=Tfe({container:n,distanceToEdges:a,dragStartTime:t,axis:Ohe,shouldUseTimeDampening:o}),l=Tfe({container:n,distanceToEdges:a,dragStartTime:t,axis:The,shouldUseTimeDampening:o}),c=Efe({x:l,y:s});if(Jpe(c,Kpe))return null;var d=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,o=n.width>t.width;return o||i?o&&i?null:{x:o?0:r.x,y:i?0:r.y}:r}({container:n,subject:r,proposedScroll:c});return d?Jpe(d,Kpe)?null:d:null},Dfe=ihe(function(e){return 0===e?0:e>0?1:-1}),Rfe=function(){var e=function(e,t){return e<0?e:e>t?e-t:0};return function(t){var n=t.current,r=t.max,i=t.change,o=Xpe(n,i),a={x:e(o.x,r.x),y:e(o.y,r.y)};return Jpe(a,Kpe)?null:a}}(),Nfe=function(e){var t=e.max,n=e.current,r=e.change,i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},o=Dfe(r),a=Rfe({max:i,current:n,change:o});return!a||(0!==o.x&&0===a.x||0!==o.y&&0===a.y)},Lfe=function(e,t){return Nfe({current:e.scroll.current,max:e.scroll.max,change:t})},Ife=function(e,t){var n=e.frame;return!!n&&Nfe({current:n.scroll.current,max:n.scroll.max,change:t})},Ffe=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var l=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=Pfe({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return a&&Lfe(t,a)?a:null}({dragStartTime:n,viewport:t.viewport,subject:s,center:a,shouldUseTimeDampening:r});if(l)return void i(l)}var c=bfe({center:a,destination:ime(t.impact),droppables:t.dimensions.droppables});if(c){var d=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var s=Pfe({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return s&&Ife(t,s)?s:null}({dragStartTime:n,droppable:c,subject:s,center:a,shouldUseTimeDampening:r});d&&o(c.descriptor.id,d)}},$fe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(e,t){if(!Ife(e,t))return t;var r=function(e,t){var n=e.frame;return n&&Ife(e,t)?Rfe({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!r)return n(e.descriptor.id,t),null;var i=Qpe(t,r);return n(e.descriptor.id,i),Qpe(t,i)},o=function(e,t,n){if(!e)return n;if(!Lfe(t,n))return n;var i=function(e,t){if(!Lfe(e,t))return null;var n=e.scroll.max,r=e.scroll.current;return Rfe({current:r,max:n,change:t})}(t,n);if(!i)return r(n),null;var o=Qpe(n,i);return r(o),Qpe(n,o)};return function(e){var n=e.scrollJumpRequest;if(n){var r=ime(e.impact);r||Bpe(!1);var a=i(e.dimensions.droppables[r],n);if(a){var s=e.viewport,l=o(e.isWindowScrollAllowed,s,a);l&&function(e,n){var r=Xpe(e.current.client.selection,n);t({client:r})}(e,l)}}}},Bfe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Rpe(t),i=Rpe(n),o=null,a=function(e){o||Bpe(!1);var t=o,n=t.shouldUseTimeDampening,a=t.dragStartTime;Ffe({state:e,scrollWindow:r,scrollDroppable:i,dragStartTime:a,shouldUseTimeDampening:n})};return{start:function(e){yme(),o&&Bpe(!1);var t=Date.now(),n=!1,r=function(){n=!0};Ffe({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r}),o={dragStartTime:t,shouldUseTimeDampening:n},bme(),n&&a(e)},stop:function(){o&&(r.cancel(),i.cancel(),o=null)},scroll:a}}({scrollWindow:n,scrollDroppable:t}),o=$fe({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):i.scroll(e))},start:i.start,stop:i.stop}},zfe="data-rbd",Hfe=function(){var e=zfe+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Wfe=function(){var e=zfe+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Vfe=function(){var e=zfe+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),Ufe={contextId:zfe+"-scroll-container-context-id"},qfe=function(e,t){return e.map(function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""}).join(" ")},Gfe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?We.useLayoutEffect:We.useEffect,Yfe=function(){var e=document.querySelector("head");return e||Bpe(!1),e},Zfe=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Kfe(e,t){var n=xpe(function(){return function(e){var t,n=(t=e,function(e){return"["+e+'="'+t+'"]'}),r=function(){var e="\n      cursor: -webkit-grab;\n      cursor: grab;\n    ";return{selector:n(Hfe.contextId),styles:{always:"\n          -webkit-touch-callout: none;\n          -webkit-tap-highlight-color: rgba(0,0,0,0);\n          touch-action: manipulation;\n        ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}}(),i=function(){var e="\n      transition: "+Vme.outOfTheWay+";\n    ";return{selector:n(Wfe.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}}(),o=[i,r,{selector:n(Vfe.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n        cursor: grabbing;\n        cursor: -webkit-grabbing;\n        user-select: none;\n        -webkit-user-select: none;\n        -moz-user-select: none;\n        -ms-user-select: none;\n        overflow-anchor: none;\n      "}}];return{always:qfe(o,"always"),resting:qfe(o,"resting"),dragging:qfe(o,"dragging"),dropAnimating:qfe(o,"dropAnimating"),userCancel:qfe(o,"userCancel")}}(e)},[e]),r=(0,We.useRef)(null),i=(0,We.useRef)(null),o=ype(Dpe(function(e){var t=i.current;t||Bpe(!1),t.textContent=e}),[]),a=ype(function(e){var t=r.current;t||Bpe(!1),t.textContent=e},[]);Gfe(function(){(r.current||i.current)&&Bpe(!1);var s=Zfe(t),l=Zfe(t);return r.current=s,i.current=l,s.setAttribute(zfe+"-always",e),l.setAttribute(zfe+"-dynamic",e),Yfe().appendChild(s),Yfe().appendChild(l),a(n.always),o(n.resting),function(){var e=function(e){var t=e.current;t||Bpe(!1),Yfe().removeChild(t),e.current=null};e(r),e(i)}},[t,a,o,n.always,n.resting,e]);var s=ype(function(){return o(n.dragging)},[o,n.dragging]),l=ype(function(e){o("DROP"!==e?n.userCancel:n.dropAnimating)},[o,n.dropAnimating,n.userCancel]),c=ype(function(){i.current&&o(n.resting)},[o,n.resting]);return xpe(function(){return{dragging:s,dropping:l,resting:c}},[s,l,c])}var Xfe=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Qfe(e){return e instanceof Xfe(e).HTMLElement}function Jfe(e,t){var n="["+Hfe.contextId+'="'+e+'"]',r=hhe(document.querySelectorAll(n));if(!r.length)return null;var i=phe(r,function(e){return e.getAttribute(Hfe.draggableId)===t});return i&&Qfe(i)?i:null}function ege(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(function(t){return t(e)})}function r(t){return e.draggables[t]||null}var i={register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var i=t.descriptor.id,o=r(i);o&&t.uniqueId===o.uniqueId&&(delete e.draggables[i],n({type:"REMOVAL",value:t}))},getById:function(e){var t=r(e);return t||Bpe(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return dhe(e.draggables).filter(function(e){return e.descriptor.type===t})}};function o(t){return e.droppables[t]||null}return{draggable:i,droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=o(e);return t||Bpe(!1),t},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return dhe(e.droppables).filter(function(e){return e.descriptor.type===t})}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var tge=We.createContext(null),nge=function(){var e=document.body;return e||Bpe(!1),e},rge={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var ige=0,oge={separator:"::"};function age(e,t){return void 0===t&&(t=oge),xpe(function(){return""+e+t.separator+ige++},[t.separator,e])}var sge=We.createContext(null);function lge(e){0}function cge(e,t){lge()}function dge(){cge()}function uge(e){var t=(0,We.useRef)(e);return(0,We.useEffect)(function(){t.current=e}),t}var pge,hge=((pge={})[13]=!0,pge[9]=!0,pge),mge=function(e){hge[e.keyCode]&&e.preventDefault()},fge=function(){var e="visibilitychange";return"undefined"===typeof document?e:phe([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],function(e){return"on"+e in document})||e}();var gge,vge={type:"IDLE"};function xge(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,o=e.clientY;if(0===t){var a={x:n,y:o},s=r();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);"PENDING"!==s.type&&Bpe(!1);var l=s.point;if(c=l,d=a,Math.abs(d.x-c.x)>=5||Math.abs(d.y-c.y)>=5){var c,d;e.preventDefault();var u=s.actions.fluidLift(a);i({type:"DRAGGING",actions:u})}}}},{eventName:"mouseup",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void mge(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=r();"IDLE"===n.type&&Bpe(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:fge,fn:t}]}function yge(){}var bge=((gge={})[34]=!0,gge[33]=!0,gge[36]=!0,gge[35]=!0,gge);function jge(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(r){return 27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(bge[r.keyCode]?r.preventDefault():mge(r))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:fge,fn:n}]}var wge={type:"IDLE"};var _ge={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Cge(e,t){if(null==t)return!1;if(Boolean(_ge[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&Cge(e,t.parentElement)}function Sge(e,t){var n=t.target;return!!Qfe(n)&&Cge(e,n)}var Age=function(e){return bpe(e.getBoundingClientRect()).center};var kge=function(){var e="matches";return"undefined"===typeof document?e:phe([e,"msMatchesSelector","webkitMatchesSelector"],function(e){return e in Element.prototype})||e}();function Mge(e,t){return null==e?null:e[kge](t)?e:Mge(e.parentElement,t)}function Oge(e,t){return e.closest?e.closest(t):Mge(e,t)}function Tge(e,t){var n=t.target;if(!function(e){return e instanceof Xfe(e).Element}(n))return null;var r=function(e){return"["+Hfe.contextId+'="'+e+'"]'}(e),i=Oge(n,r);return i&&Qfe(i)?i:null}function Ege(e){e.preventDefault()}function Pge(e){var t=e.expected,n=e.phase,r=e.isLockActive;e.shouldWarn;return!!r()&&t===n}function Dge(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!!o&&(!!o.options.isEnabled&&!!vfe(n.getState(),i))}function Rge(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent;if(!Dge({lockAPI:t,store:r,registry:i,draggableId:o}))return null;var l=i.draggable.getById(o),c=function(e,t){var n="["+Wfe.contextId+'="'+e+'"]',r=phe(hhe(document.querySelectorAll(n)),function(e){return e.getAttribute(Wfe.id)===t});return r&&Qfe(r)?r:null}(n,l.descriptor.id);if(!c)return null;if(s&&!l.options.canDragInteractiveElements&&Sge(c,s))return null;var d=t.claim(a||Lpe),u="PRE_DRAG";function p(){return l.options.shouldRespectForcePress}function h(){return t.isActive(d)}var m=function(e,t){Pge({expected:e,phase:u,isLockActive:h,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function f(e){function n(){t.release(),u="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var o=Ipe(window,[{eventName:"click",fn:Ege,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(o)}n(),r.dispatch(Fme({reason:t}))}return"PRE_DRAG"!==u&&(n(),"PRE_DRAG"!==u&&Bpe(!1)),r.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),u="DRAGGING",(0,Ft.A)({isActive:function(){return Pge({expected:"DRAGGING",phase:u,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}var g={isActive:function(){return Pge({expected:"PRE_DRAG",phase:u,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=Rpe(function(e){m(function(){return Pme({client:e})})}),n=f({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return(0,Ft.A)({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return m(Dme)},moveRight:function(){return m(Nme)},moveDown:function(){return m(Rme)},moveLeft:function(){return m(Lme)}};return f({liftActionArgs:{id:o,clientSelection:Age(c),movementMode:"SNAP"},cleanup:Lpe,actions:e})},abort:function(){Pge({expected:"PRE_DRAG",phase:u,isLockActive:h,shouldWarn:!0})&&t.release()}};return g}var Nge=[function(e){var t=(0,We.useRef)(vge),n=(0,We.useRef)(Lpe),r=xpe(function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,a,{sourceEvent:t});if(i){t.preventDefault();var o={x:t.clientX,y:t.clientY};n.current(),c(i,o)}}}}}},[e]),i=xpe(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}},[e]),o=ype(function(){n.current=Ipe(window,[i,r],{passive:!1,capture:!0})},[i,r]),a=ype(function(){"IDLE"!==t.current.type&&(t.current=vge,n.current(),o())},[o]),s=ype(function(){var e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=ype(function(){var e=xge({cancel:s,completed:a,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=Ipe(window,e,{capture:!0,passive:!1})},[s,a]),c=ype(function(e,n){"IDLE"!==t.current.type&&Bpe(!1),t.current={type:"PENDING",point:n,actions:e},l()},[l]);Gfe(function(){return o(),function(){n.current()}},[o])},function(e){var t=(0,We.useRef)(yge),n=xpe(function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var i=e.findClosestDraggableId(n);if(i){var o=e.tryGetLock(i,l,{sourceEvent:n});if(o){n.preventDefault();var a=!0,s=o.snapLift();t.current(),t.current=Ipe(window,jge(s,l),{capture:!0,passive:!1})}}}function l(){a||Bpe(!1),a=!1,t.current(),r()}}}},[e]),r=ype(function(){t.current=Ipe(window,[n],{passive:!1,capture:!0})},[n]);Gfe(function(){return r(),function(){t.current()}},[r])},function(e){var t=(0,We.useRef)(wge),n=(0,We.useRef)(Lpe),r=ype(function(){return t.current},[]),i=ype(function(e){t.current=e},[]),o=xpe(function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var r=e.findClosestDraggableId(t);if(r){var i=e.tryGetLock(r,s,{sourceEvent:t});if(i){var o=t.touches[0],a={x:o.clientX,y:o.clientY};n.current(),u(i,a)}}}}}},[e]),a=ype(function(){n.current=Ipe(window,[o],{capture:!0,passive:!1})},[o]),s=ype(function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(wge),n.current(),a())},[a,i]),l=ype(function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=ype(function(){var e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:r},i=Ipe(window,function(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=r();if("DRAGGING"===n.type){n.hasMoved=!0;var i=e.touches[0],o={x:i.clientX,y:i.clientY};e.preventDefault(),n.actions.move(o)}else t()}},{eventName:"touchend",fn:function(e){var i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=r();"IDLE"===n.type&&Bpe(!1);var i=e.touches[0];if(i&&i.force>=.15){var o=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return o?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();o&&t()}}},{eventName:fge,fn:t}]}(t),e),o=Ipe(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:fge,fn:t}]}(t),e);n.current=function(){i(),o()}},[l,r,s]),d=ype(function(){var e=r();"PENDING"!==e.type&&Bpe(!1);var t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})},[r,i]),u=ype(function(e,t){"IDLE"!==r().type&&Bpe(!1);var n=setTimeout(d,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()},[c,r,i,d]);Gfe(function(){return a(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(wge))}},[r,a,i]),Gfe(function(){return Ipe(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])},[])}];function Lge(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,a=[].concat(o?Nge:[],i||[]),s=(0,We.useState)(function(){return function(){var e=null;function t(){e||Bpe(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&Bpe(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()})[0],l=ype(function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()},[s]);Gfe(function(){var e=n.getState();return n.subscribe(function(){var t=n.getState();l(e,t),e=t})},[s,n,l]),Gfe(function(){return s.tryAbandon},[s.tryAbandon]);var c=ype(function(e){return Dge({lockAPI:s,registry:r,store:n,draggableId:e})},[s,r,n]),d=ype(function(e,i,o){return Rge({lockAPI:s,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:i,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null})},[t,s,r,n]),u=ype(function(e){return function(e,t){var n=Tge(e,t);return n?n.getAttribute(Hfe.draggableId):null}(t,e)},[t]),p=ype(function(e){var t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),h=ype(function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))},[s,n]),m=ype(s.isClaimed,[s]),f=xpe(function(){return{canGetLock:c,tryGetLock:d,findClosestDraggableId:u,findOptionsForDraggable:p,tryReleaseLock:h,isLockClaimed:m}},[c,d,u,p,h,m]);lge();for(var g=0;g<a.length;g++)a[g](f)}function Ige(e){return e.current||Bpe(!1),e.current}function Fge(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,a=(0,We.useRef)(null);dge();var s=uge(e),l=ype(function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(s.current)},[s]),c=function(e){var t=xpe(function(){return function(e){return"rbd-announcement-"+e}(e)},[e]),n=(0,We.useRef)(null);(0,We.useEffect)(function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),(0,Ft.A)(e.style,rge),nge().appendChild(e),function(){setTimeout(function(){var t=nge();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]);var r=ype(function(e){var t=n.current;t&&(t.textContent=e)},[]);return r}(t),d=function(e){var t=e.contextId,n=e.text,r=age("hidden-text",{separator:"-"}),i=xpe(function(){return"rbd-hidden-text-"+(e={contextId:t,uniqueId:r}).contextId+"-"+e.uniqueId;var e},[r,t]);return(0,We.useEffect)(function(){var e=document.createElement("div");return e.id=i,e.textContent=n,e.style.display="none",nge().appendChild(e),function(){var t=nge();t.contains(e)&&t.removeChild(e)}},[i,n]),i}({contextId:t,text:o}),u=Kfe(t,i),p=ype(function(e){Ige(a).dispatch(e)},[]),h=xpe(function(){return(0,Rue.zH)({publishWhileDragging:kme,updateDroppableScroll:Ome,updateDroppableIsEnabled:Tme,updateDroppableIsCombineEnabled:Eme,collectionStarting:Mme},p)},[p]),m=function(){var e=xpe(ege,[]);return(0,We.useEffect)(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}(),f=xpe(function(){return gfe(m,h)},[m,h]),g=xpe(function(){return Bfe((0,Ft.A)({scrollWindow:xfe,scrollDroppable:f.scrollDroppable},(0,Rue.zH)({move:Pme},p)))},[f.scrollDroppable,p]),v=function(e){var t=(0,We.useRef)({}),n=(0,We.useRef)(null),r=(0,We.useRef)(null),i=(0,We.useRef)(!1),o=ype(function(e,n){var r={id:e,focus:n};return t.current[e]=r,function(){var n=t.current;n[e]!==r&&delete n[e]}},[]),a=ype(function(t){var n=Jfe(e,t);n&&n!==document.activeElement&&n.focus()},[e]),s=ype(function(e,t){n.current===e&&(n.current=t)},[]),l=ype(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var e=n.current;e&&a(e)}))},[a]),c=ype(function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(Hfe.draggableId)===e&&(n.current=e)},[]);return Gfe(function(){return i.current=!0,function(){i.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}},[]),xpe(function(){return{register:o,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}},[o,c,l,s])}(t),x=xpe(function(){return dfe({announce:c,autoScroller:g,dimensionMarshal:f,focusMarshal:v,getResponders:l,styleMarshal:u})},[c,g,f,v,l,u]);a.current=x;var y=ype(function(){var e=Ige(a);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),b=ype(function(){var e=Ige(a).getState();return e.isDragging||"DROP_ANIMATING"===e.phase},[]);n(xpe(function(){return{isDragging:b,tryAbort:y}},[b,y]));var j=ype(function(e){return vfe(Ige(a).getState(),e)},[]),w=ype(function(){return ame(Ige(a).getState())},[]),_=xpe(function(){return{marshal:f,focus:v,contextId:t,canLift:j,isMovementAllowed:w,dragHandleUsageInstructionsId:d,registry:m}},[t,f,d,v,j,w,m]);return Lge({contextId:t,store:x,registry:m,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,We.useEffect)(function(){return y},[y]),We.createElement(sge.Provider,{value:_},We.createElement(zue,{context:tge,store:x},e.children))}var $ge=0;function Bge(e){var t=xpe(function(){return""+$ge++},[]),n=e.dragHandleUsageInstructions||qpe;return We.createElement(zpe,null,function(r){return We.createElement(Fge,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var zge=function(e){return function(t){return e===t}},Hge=zge("scroll"),Wge=zge("auto"),Vge=(zge("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),Uge=function e(t){return null==t||t===document.body||t===document.documentElement?null:function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Vge(n,Hge)||Vge(n,Wge)}(t)?t:e(t.parentElement)},qge=function(e){return{x:e.scrollLeft,y:e.scrollTop}},Gge=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},Yge=function(e){return{closestScrollable:Uge(e),isFixedOnPage:Gge(e)}},Zge=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,s=e.isCombineEnabled,l=e.shouldClipSubject,c=r.closestScrollable,d=function(e,t){var n=Ope(e);if(!t)return n;if(e!==t)return n;var r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,o=r+t.scrollHeight,a=i+t.scrollWidth,s=jpe({top:r,right:a,bottom:o,left:i},n.border);return Cpe({borderBox:s,margin:n.margin,border:n.border,padding:n.padding})}(t,c),u=kpe(d,i),p=function(){if(!c)return null;var e=Ope(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:kpe(e,i),scroll:qge(c),scrollSize:t,shouldClipSubject:l}}(),h=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,s=e.page,l=e.closest,c=function(){if(!l)return null;var e=l.scrollSize,t=l.client,n=ufe({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:n,diff:{value:Kpe,displacement:Kpe}}}}(),d="vertical"===o?Ohe:The;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:d,isEnabled:n,client:a,page:s,frame:c,subject:lhe({page:s,withPlaceholder:null,axis:d,frame:c})}}({descriptor:n,isEnabled:!a,isCombineEnabled:s,isFixedOnPage:r.isFixedOnPage,direction:o,client:d,page:u,closest:p});return h},Kge={passive:!1},Xge={passive:!0},Qge=function(e){return e.shouldPublishImmediately?Kge:Xge};function Jge(e){var t=(0,We.useContext)(e);return t||Bpe(!1),t}var eve=function(e){return e&&e.env.closestScrollable||null};function tve(){}var nve={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},rve=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate,i=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,r=e.animate;return t||"close"===r?nve:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?Vme.placeholder:null}};var ive=We.memo(function(e){var t=(0,We.useRef)(null),n=ype(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,s=(0,We.useState)("open"===e.animate),l=s[0],c=s[1];(0,We.useEffect)(function(){return l?"open"!==r?(n(),c(!1),tve):t.current?tve:(t.current=setTimeout(function(){t.current=null,c(!1)}),n):tve},[r,l,n]);var d=ype(function(e){"height"===e.propertyName&&(i(),"close"===r&&o())},[r,o,i]),u=rve({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return We.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":a,onTransitionEnd:d,ref:e.innerRef})}),ove=We.createContext(null);var ave=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return wn(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(We.PureComponent),sve=5e3,lve=4500,cve=function(e,t){return t?Vme.drop(t.duration):e?Vme.snap:Vme.fluid},dve=function(e,t){return e?t?zme.drop:zme.combining:null};function uve(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,i=e.dropping,o=Boolean(r),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),s=Boolean(i),l=s?Gme(n,o):qme(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:cve(a,i),transform:l,opacity:dve(o,s),zIndex:s?lve:sve,pointerEvents:"none"}}(e):{transform:qme((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t}function pve(e){var t=age("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,s=e.isEnabled,l=xpe(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:s}},[o,s,a]),c=ype(function(e){var t=i();return t||Bpe(!1),function(e,t,n){void 0===n&&(n=Kpe);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=Mpe(i,r),a=kpe(o,n);return{descriptor:e,placeholder:{client:o,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:a}}(n,t,e)},[n,i]),d=xpe(function(){return{uniqueId:t,descriptor:n,options:l,getDimension:c}},[n,c,l,t]),u=(0,We.useRef)(d),p=(0,We.useRef)(!0);Gfe(function(){return r.draggable.register(u.current),function(){return r.draggable.unregister(u.current)}},[r.draggable]),Gfe(function(){if(p.current)p.current=!1;else{var e=u.current;u.current=d,r.draggable.update(d,e)}},[d,r.draggable])}function hve(e,t,n){cge()}function mve(e){e.preventDefault()}var fve=function(e,t){return e===t},gve=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function vve(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var xve={mapped:{type:"SECONDARY",offset:Kpe,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:vve(null)}};var yve=gpe(function(){var e=function(){var e=Dpe(function(e,t){return{x:e,y:t}}),t=Dpe(function(e,t,n,r,i){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}}),n=Dpe(function(e,n,r,i,o,a,s){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,i,o,a,null)}}});return function(r,i){if(r.isDragging){if(r.critical.draggable.id!==i.draggableId)return null;var o=r.current.client.offset,a=r.dimensions.draggables[i.draggableId],s=ime(r.impact),l=(d=r.impact).at&&"COMBINE"===d.at.type?d.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(o.x,o.y),r.movementMode,a,i.isClone,s,l,c)}var d;if("DROP_ANIMATING"===r.phase){var u=r.completed;if(u.result.draggableId!==i.draggableId)return null;var p=i.isClone,h=r.dimensions.draggables[i.draggableId],m=u.result,f=m.mode,g=gve(m),v=function(e){return e.combine?e.combine.draggableId:null}(m),x={duration:r.dropDuration,curve:Bme,moveTo:r.newHomeClientOffset,opacity:v?zme.drop:null,scale:v?Hme.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:h,dropping:x,draggingOver:g,combineWith:v,mode:f,forceShouldAnimate:null,snapshot:t(f,p,g,v,x)}}}return null}}(),t=function(){var e=Dpe(function(e,t){return{x:e,y:t}}),t=Dpe(vve),n=Dpe(function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}}),r=function(e){return e?n(Kpe,e,!0):null},i=function(t,i,o,a){var s=o.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=bhe(o),d=c&&c.draggableId===t?i:null;if(!s){if(!l)return r(d);if(o.displaced.invisible[t])return null;var u=ehe(a.displacedBy.point),p=e(u.x,u.y);return n(p,d,!0)}if(l)return r(d);var h=o.displacedBy.point,m=e(h.x,h.y);return n(m,d,s.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:i(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:i(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(n,r){return e(n,r)||t(n,r)||xve}},{dropAnimationFinished:$me},null,{context:tge,pure:!0,areStatePropsEqual:fve})(function(e){var t=(0,We.useRef)(null),n=ype(function(e){t.current=e},[]),r=ype(function(){return t.current},[]),i=Jge(sge),o=i.contextId,a=i.dragHandleUsageInstructionsId,s=i.registry,l=Jge(ove),c=l.type,d=l.droppableId,u=xpe(function(){return{id:e.draggableId,index:e.index,type:c,droppableId:d}},[e.draggableId,e.index,c,d]),p=e.children,h=e.draggableId,m=e.isEnabled,f=e.shouldRespectForcePress,g=e.canDragInteractiveElements,v=e.isClone,x=e.mapped,y=e.dropAnimationFinished;hve(),lge(),v||pve(xpe(function(){return{descriptor:u,registry:s,getDraggableRef:r,canDragInteractiveElements:g,shouldRespectForcePress:f,isEnabled:m}},[u,s,r,g,f,m]));var b=xpe(function(){return m?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":h,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:mve}:null},[o,a,h,m]),j=ype(function(e){"DRAGGING"===x.type&&x.dropping&&"transform"===e.propertyName&&y()},[y,x]),w=xpe(function(){var e=uve(x),t="DRAGGING"===x.type&&x.dropping?j:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":h,style:e,onTransitionEnd:t},dragHandleProps:b}},[o,b,h,x,j,n]),_=xpe(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return p(w,x.snapshot,_)});function bve(e){return Jge(ove).isUsingCloneFor!==e.draggableId||e.isClone?We.createElement(yve,e):null}function jve(e){var t="boolean"!==typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return We.createElement(bve,(0,Ft.A)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var wve=function(e,t){return e===t.droppable.type},_ve=function(e,t){return t.draggables[e.draggable.id]},Cve={updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}};var Sve={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||Bpe(!1),document.body}},Ave=gpe(function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=(0,Ft.A)({},e,{shouldAnimatePlaceholder:!1}),n=Dpe(function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}}),r=Dpe(function(r,i,o,a,s,l){var c=s.descriptor.id;if(s.descriptor.droppableId===r){var d=l?{render:l,dragging:n(s.descriptor)}:null,u={isDraggingOver:o,draggingOverWith:o?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:u,useClone:d}}if(!i)return t;if(!a)return e;var p={isDraggingOver:o,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:p,useClone:null}});return function(n,i){var o=i.droppableId,a=i.type,s=!i.isDropDisabled,l=i.renderClone;if(n.isDragging){var c=n.critical;if(!wve(a,c))return t;var d=_ve(c,n.dimensions),u=ime(n.impact)===o;return r(o,s,u,u,d,l)}if("DROP_ANIMATING"===n.phase){var p=n.completed;if(!wve(a,p.critical))return t;var h=_ve(p.critical,n.dimensions);return r(o,s,gve(p.result)===o,ime(p.impact)===o,h,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var m=n.completed;if(!wve(a,m.critical))return t;var f=ime(m.impact)===o,g=Boolean(m.impact.at&&"COMBINE"===m.impact.at.type),v=m.critical.droppable.id===o;return f?g?e:t:v?e:t}return t}},Cve,null,{context:tge,pure:!0,areStatePropsEqual:fve})(function(e){var t=(0,We.useContext)(sge);t||Bpe(!1);var n=t.contextId,r=t.isMovementAllowed,i=(0,We.useRef)(null),o=(0,We.useRef)(null),a=e.children,s=e.droppableId,l=e.type,c=e.mode,d=e.direction,u=e.ignoreContainerClipping,p=e.isDropDisabled,h=e.isCombineEnabled,m=e.snapshot,f=e.useClone,g=e.updateViewportMaxScroll,v=e.getContainerForClone,x=ype(function(){return i.current},[]),y=ype(function(e){i.current=e},[]),b=(ype(function(){return o.current},[]),ype(function(e){o.current=e},[]));cge();var j=ype(function(){r()&&g({maxScroll:hfe()})},[r,g]);!function(e){var t=(0,We.useRef)(null),n=Jge(sge),r=age("droppable"),i=n.registry,o=n.marshal,a=uge(e),s=xpe(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),l=(0,We.useRef)(s),c=xpe(function(){return Dpe(function(e,n){t.current||Bpe(!1);var r={x:e,y:n};o.updateDroppableScroll(s.id,r)})},[s.id,o]),d=ype(function(){var e=t.current;return e&&e.env.closestScrollable?qge(e.env.closestScrollable):Kpe},[]),u=ype(function(){var e=d();c(e.x,e.y)},[d,c]),p=xpe(function(){return Rpe(u)},[u]),h=ype(function(){var e=t.current,n=eve(e);e&&n||Bpe(!1),e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),m=ype(function(e,r){t.current&&Bpe(!1);var i=a.current,o=i.getDroppableRef();o||Bpe(!1);var l=Yge(o),c={ref:o,descriptor:s,env:l,scrollOptions:r};t.current=c;var d=Zge({ref:o,descriptor:s,env:l,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),u=l.closestScrollable;return u&&(u.setAttribute(Ufe.contextId,n.contextId),u.addEventListener("scroll",h,Qge(c.scrollOptions))),d},[n.contextId,s,h,a]),f=ype(function(){var e=t.current,n=eve(e);return e&&n||Bpe(!1),qge(n)},[]),g=ype(function(){var e=t.current;e||Bpe(!1);var n=eve(e);t.current=null,n&&(p.cancel(),n.removeAttribute(Ufe.contextId),n.removeEventListener("scroll",h,Qge(e.scrollOptions)))},[h,p]),v=ype(function(e){var n=t.current;n||Bpe(!1);var r=eve(n);r||Bpe(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),x=xpe(function(){return{getDimensionAndWatchScroll:m,getScrollWhileDragging:f,dragStopped:g,scroll:v}},[g,m,f,v]),y=xpe(function(){return{uniqueId:r,descriptor:s,callbacks:x}},[x,s,r]);Gfe(function(){return l.current=y.descriptor,i.droppable.register(y),function(){t.current&&g(),i.droppable.unregister(y)}},[x,s,g,y,o,i.droppable]),Gfe(function(){t.current&&o.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),Gfe(function(){t.current&&o.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:p,isCombineEnabled:h,ignoreContainerClipping:u,getDroppableRef:x});var w=We.createElement(ave,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(e){var t=e.onClose,r=e.data,i=e.animate;return We.createElement(ive,{placeholder:r,onClose:t,innerRef:b,animate:i,contextId:n,onTransitionEnd:j})}),_=xpe(function(){return{innerRef:y,placeholder:w,droppableProps:{"data-rbd-droppable-id":s,"data-rbd-droppable-context-id":n}}},[n,s,w,y]),C=f?f.dragging.draggableId:null,S=xpe(function(){return{droppableId:s,type:l,isUsingCloneFor:C}},[s,C,l]);return We.createElement(ove.Provider,{value:S},a(_,m),function(){if(!f)return null;var e=f.dragging,t=f.render,n=We.createElement(bve,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(n,r){return t(n,r,e)});return ut.createPortal(n,v())}())});Ave.defaultProps=Sve;const kve="goal_name",Mve="category",Ove="is_active",Tve="priority",Eve="metrics",Pve="_id",Dve=e=>{var t,n,r,o,a,s,l,c,d,u,p,h;let{modal:m,onClose:f,onSubmit:g}=e;const{t:v}=vg(),[x,y]=(0,We.useState)(!1),[b,j]=(0,We.useState)([]),[w]=(0,We.useState)({[kve]:null!==m&&void 0!==m&&null!==(t=m.data)&&void 0!==t&&t.goal_name?null===m||void 0===m||null===(n=m.data)||void 0===n?void 0:n.goal_name:"",[Mve]:null!==m&&void 0!==m&&null!==(r=m.data)&&void 0!==r&&r.category?null===m||void 0===m||null===(o=m.data)||void 0===o?void 0:o.category:[],[Ove]:null===m||void 0===m||null===(a=m.data)||void 0===a||!a.is_active||(null===m||void 0===m||null===(s=m.data)||void 0===s?void 0:s.is_active),[Tve]:null!==m&&void 0!==m&&null!==(l=m.data)&&void 0!==l&&l.priority?null===m||void 0===m||null===(c=m.data)||void 0===c?void 0:c.priority:"",[Eve]:null!==m&&void 0!==m&&null!==(d=m.data)&&void 0!==d&&d.metrics?null===m||void 0===m||null===(u=m.data)||void 0===u?void 0:u.metrics:[{name:"Next Assessment",fieldType:"textfield",range:{min:"",max:""},options:[],key:"nextSessionDate",unit:"",traceableBy:["Provider"],is_required:!0}],[Pve]:null!==m&&void 0!==m&&null!==(p=m.data)&&void 0!==p&&p._id?null===m||void 0===m||null===(h=m.data)||void 0===h?void 0:h._id:""}),[_,C]=(0,We.useState)({question:"",short_description:"",fieldType:"",range:{min:"",max:""},options:[],unit:"",is_required:!1,traceableBy:["Provider"],key:"",pre_assessment:!1}),S=(e,t,n)=>{if(!e.destination)return;const r=((e,t,n)=>{const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r})(t[Eve],e.source.index,e.destination.index);n(Eve,r)};return(0,Gt.jsx)(Kw,{fullWidth:!0,maxWidth:"md",open:m,onClose:f,children:(0,Gt.jsx)(Iz,{initialValues:w,validationSchema:vV.addGoal,onSubmit:(e,t)=>{let{setErrors:n,resetForm:r}=t;return g(e,{setErrors:n,resetForm:r})},enableReinitialize:!0,children:e=>{var t,n,r;let{values:o,setFieldValue:a,handleChange:s}=e;return(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsxs)(n_,{children:[v("add"===m.type?"rpm_CreateGoal":"rpm_EditGoal"),(0,Gt.jsx)(Kp,{onClick:f,sx:{position:"absolute",right:8,top:8},children:(0,Gt.jsx)(Pue,{})})]}),(0,Gt.jsx)(s_,{dividers:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,direction:"column",children:[(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)($w,{fullWidth:!0,label:v("rpm_GoalName"),name:kve,value:o[kve],onChange:s,margin:"normal"}),(0,Gt.jsx)(Xz,{name:kve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:v(e,{field:v("rpm_GoalName")})})}),(0,Gt.jsx)(Eu,{display:"flex",gap:1,flexWrap:"wrap",mt:1,children:Dd.map((e,t)=>(0,Gt.jsx)(gb,{label:e,onClick:()=>((e,t)=>{const n=Ed.find(t=>t.goal===e);n&&(t(kve,e),t(Mve,n.category))})(e,a),clickable:!0,color:o[kve]===e?"primary":"default"},t))})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(qj,{children:v("rpm_Category")}),(0,Gt.jsx)(Hz,{as:Dw,name:Mve,fullWidth:!0,size:"small",multiple:!0,value:o[Mve],onChange:s,renderValue:e=>e.join(", "),children:["Dietitian","Fitness","Skincare"].map(e=>(0,Gt.jsxs)($m,{value:e,children:[(0,Gt.jsx)(jC,{checked:o[Mve].includes(e)}),(0,Gt.jsx)(Ym,{children:e})]},e))}),(0,Gt.jsx)(Xz,{name:Mve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:v(e,{field:v("rpm_Category")})})})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(Hz,{as:jC,name:Ove,checked:o[Ove],onChange:()=>a(Ove,!o[Ove])}),label:"Is Active"})}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)($w,{fullWidth:!0,label:v("rpm_Priority"),name:Tve,size:"small",value:o[Tve],onChange:s}),(0,Gt.jsx)(Xz,{name:Tve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:v(e,{field:v("rpm_Priority")})})})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(Ym,{fontWeight:600,mb:1,children:v("rpm_DefaultMetrics")}),(0,Gt.jsx)(Eu,{display:"flex",flexWrap:"wrap",gap:1,children:Rd.map(e=>(0,Gt.jsx)(gb,{label:e.name,clickable:!0,color:o[Eve].some(t=>t.name===e.name)?"primary":"default",onClick:()=>{e.disabled||((e,t,n)=>{const r=t[Eve];let i;if(r.some(t=>t.name===e.name)){if("nextSessionDate"===e.key)return;i=r.filter(t=>t.name!==e.name)}else i=[...r,{name:e.name,fieldType:e.field_type,range:"string"===typeof e.range?{min:e.range.split("-")[0]||"",max:e.range.split("-")[1]||""}:e.range,options:e.options||[],key:e.key||"",unit:e.unit||"",is_required:e.is_required,traceableBy:e.traceableBy,short_description:e.short_description,pre_assessment:e.pre_assessment}];const o=i.find(e=>"nextSessionDate"===e.key),a=i.filter(e=>"nextSessionDate"!==e.key),s=o?[...a,o]:a;n(Eve,s)})(e,o,a)}},e.name))}),(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsx)(Vp,{variant:"outlined",size:"small",startIcon:(0,Gt.jsx)(Due,{}),onClick:()=>y(e=>!e),children:v("rpm_CreateNewMetric")})}),x&&(0,Gt.jsxs)(Eu,{mt:2,p:2,border:"1px dashed grey",borderRadius:2,children:[(0,Gt.jsx)(Ym,{variant:"subtitle1",mb:1,fontWeight:600,children:v("rpm_NewMetric")}),(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)($w,{label:"Question",fullWidth:!0,size:"small",value:_.question,onChange:e=>(e=>{C((0,i.A)((0,i.A)({},_),{},{question:e}));const t=Pd.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()));j(t)})(e.target.value)}),b.length>0&&(0,Gt.jsx)(Uu,{style:{maxHeight:150,overflowY:"auto",marginTop:4,position:"absolute",zIndex:1e3,width:"100%"},children:(0,Gt.jsx)(hh,{children:b.map(e=>(0,Gt.jsx)(Qf,{button:!0,onClick:()=>{return t=e,C((0,i.A)((0,i.A)({},_),{},{question:t.name,short_description:t.short_description||"",fieldType:t.field_type,range:t.range,unit:t.unit,options:(t.field_type,[]),is_required:t.is_required,traceableBy:t.traceableBy,key:t.key,pre_assessment:t.pre_assessment})),void j([]);var t},children:e.name},e.name))})})]}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)($w,{fullWidth:!0,label:v("rpm_ShortDescription"),size:"small",value:_.short_description,onChange:e=>C((0,i.A)((0,i.A)({},_),{},{short_description:e.target.value}))})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)($w,{fullWidth:!0,label:"Unit",size:"small",value:_.unit,onChange:e=>C((0,i.A)((0,i.A)({},_),{},{unit:e.target.value}))})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(qj,{style:{marginBottom:4,display:"block",fontWeight:500},children:v("rpm_TraceableBy")}),(0,Gt.jsxs)(Eue,{row:!0,children:[(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(jC,{checked:(null===(t=_.traceableBy)||void 0===t?void 0:t.includes("Provider"))||!1,onChange:e=>{const t=e.target.checked,n=_.traceableBy||[];C((0,i.A)((0,i.A)({},_),{},{traceableBy:t?[...n,"Provider"]:n.filter(e=>"Provider"!==e)}))}}),label:v("rpm_Provider")}),(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(jC,{checked:(null===(n=_.traceableBy)||void 0===n?void 0:n.includes("Client"))||!1,onChange:e=>{const t=e.target.checked,n=_.traceableBy||[];C((0,i.A)((0,i.A)({},_),{},{traceableBy:t?[...n,"Client"]:n.filter(e=>"Client"!==e)}))}}),label:v("rpm_Client")})]})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(Hz,{as:jC,name:"is_required",checked:_.is_required,onChange:e=>{const t=e.target.checked;C((0,i.A)((0,i.A)({},_),{},{is_required:t}))}}),label:v("rpm_Required")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(Hz,{as:jC,name:"pre_assessment",checked:_.pre_assessment,onChange:e=>{const t=e.target.checked;C((0,i.A)((0,i.A)({},_),{},{pre_assessment:t}))}}),label:v("rpm_PreAssessment")})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(qj,{children:v("rpm_FieldType")}),(0,Gt.jsxs)(Dw,{fullWidth:!0,size:"small",value:_.fieldType,onChange:e=>C((0,i.A)((0,i.A)({},_),{},{fieldType:e.target.value})),children:[(0,Gt.jsx)($m,{value:"",children:v("rpm_SelectType")}),Object.entries(Td).map(e=>{let[t,n]=e;return(0,Gt.jsx)($m,{value:n,children:t.replaceAll("_"," ").toLowerCase().replace(/(^\w|\s\w)/g,e=>e.toUpperCase())},t)})]})]}),_.fieldType===Td.NUMBER&&(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{display:"flex",gap:2,children:[(0,Gt.jsx)($w,{label:"Min",size:"small",type:"number",value:_.range.min,onChange:e=>C((0,i.A)((0,i.A)({},_),{},{range:(0,i.A)((0,i.A)({},_.range),{},{min:e.target.value})}))}),(0,Gt.jsx)($w,{label:"Max",size:"small",type:"number",value:_.range.max,onChange:e=>C((0,i.A)((0,i.A)({},_),{},{range:(0,i.A)((0,i.A)({},_.range),{},{max:e.target.value})}))})]})}),(_.fieldType===Td.DROPDOWN||_.fieldType===Td.MULTI_DROPDOWN)&&(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)($w,{label:"Options (comma separated)",fullWidth:!0,size:"small",value:_.options.join(","),onChange:e=>C((0,i.A)((0,i.A)({},_),{},{options:e.target.value.split(",")}))})})]}),(0,Gt.jsxs)(Eu,{display:"flex",justifyContent:"flex-end",mt:2,gap:1,children:[(0,Gt.jsx)(Vp,{size:"small",onClick:()=>{y(!1),C({question:"",fieldType:"",short_description:"",range:{min:"",max:""},options:[],unit:"",is_required:!1,traceableBy:["Provider"],key:"",pre_assessment:!1})},children:v("rpm_Cancel")}),(0,Gt.jsx)(Vp,{size:"small",variant:"contained",onClick:()=>((e,t)=>{const n={name:_.question,short_description:_.short_description||"",fieldType:_.fieldType,range:_.range,options:_.options,unit:_.unit,is_required:_.is_required,traceableBy:_.traceableBy,key:_.key||(r=_.question,r.replace(/[^a-zA-Z0-9 ]/g,"").replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>0===t?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,"")),pre_assessment:_.pre_assessment};var r;if(typeof _.editIndex===Td.NUMBER){const r=[...e[Eve]];r[_.editIndex]=n,t(Eve,r)}else t(Eve,[...e[Eve],n]);C({question:"",short_description:"",fieldType:"",key:"",range:{min:"",max:""},options:[],unit:"",is_required:!1,pre_assessment:!1,traceableBy:["Provider"]}),y(!1)})(o,a),disabled:!_.question||!_.fieldType,children:v("rpm_SaveMetric")})]})]})]}),(null===(r=o[Eve])||void 0===r?void 0:r.length)>0&&(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsxs)(Ym,{fontWeight:600,mb:1,children:[v("rpm_MetricPriority")," (",v("rpm_DragToReorder"),")"]}),(0,Gt.jsx)(Bge,{onDragEnd:e=>S(e,o,a),children:(0,Gt.jsx)(Ave,{droppableId:Eve,children:e=>{var t;return(0,Gt.jsxs)(Eu,(0,i.A)((0,i.A)({},e.droppableProps),{},{ref:e.innerRef,display:"flex",flexDirection:"column",gap:1,children:[null===(t=o[Eve])||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsx)(jve,{draggableId:e.name+t,index:t,children:(n,r)=>{var s,l,c;return(0,Gt.jsxs)(Eu,(0,i.A)((0,i.A)((0,i.A)({ref:n.innerRef},n.draggableProps),n.dragHandleProps),{},{sx:{p:1.5,borderRadius:1,border:"1px solid #ccc",bgcolor:r.isDragging?"grey.100":"white",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Ym,{fontWeight:600,children:[t+1,". ",e.name]}),(0,Gt.jsxs)(Ym,{variant:"body2",color:"text.secondary",children:["Type: ",e.fieldType,e.unit?" | Unit: ".concat(e.unit):"",null!==(s=e.range)&&void 0!==s&&s.min||null!==(l=e.range)&&void 0!==l&&l.max?" | Range: ".concat(e.range.min,"-").concat(e.range.max):"",null!==(c=e.options)&&void 0!==c&&c.length?" | Options: ".concat(e.options.join(", ")):""]})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>{y(!0),C({question:e.name,fieldType:e.fieldType,range:e.range||{min:"",max:""},options:e.options||[],unit:e.unit||"",editIndex:t,traceableBy:e.traceableBy||["Provider"],is_required:e.is_required||!1,key:e.key||"",short_description:e.short_description||"",pre_assessment:e.pre_assessment||!1})},children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})}),(0,Gt.jsx)(Kp,{size:"small",color:"error",onClick:()=>{const e=o[Eve].filter((e,n)=>n!==t);a(Eve,e)},children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})]})]}))}},e.name+t)),e.placeholder]}))}})})]})]})}),(0,Gt.jsxs)(iO,{children:[(0,Gt.jsx)(Vp,{onClick:f,children:v("rpm_Cancel")}),(0,Gt.jsx)(Vp,{type:"submit",variant:"contained",color:"primary",children:v("rpm_Submit")})]})]})}})})},Rve=e=>{var t,n;let{open:r,onClose:i}=e;const{t:o}=vg(),a=(null===r||void 0===r?void 0:r.data)||{};return(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"md",open:null===r||void 0===r?void 0:r.open,onClose:i,children:[(0,Gt.jsxs)(n_,{sx:{fontWeight:600},children:[o("rpm_GoalDetails"),(0,Gt.jsx)(Kp,{onClick:i,sx:{position:"absolute",right:8,top:8},children:(0,Gt.jsx)(Pue,{})})]}),(0,Gt.jsx)(s_,{dividers:!0,children:(0,Gt.jsxs)(Uu,{variant:"outlined",sx:{p:2.5,borderRadius:2,mb:2,bgcolor:"#fcfcfc"},children:[(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:o("rpm_GoalName")}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:a.goal_name||"-"})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:o("rpm_Priority")}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:a.priority||"-"})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:o("rpm_Status")}),(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(jC,{checked:a.is_active,disabled:!0}),label:a.is_active?o("rpm_Active"):o("rpm_Inactive")})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:o("rpm_Categories")}),(0,Gt.jsx)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mt:.5,children:(a.category||[]).map((e,t)=>(0,Gt.jsx)(gb,{label:e,color:"primary",size:"small"},t))})]})]}),(null===(t=a.metrics)||void 0===t?void 0:t.length)>0&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{variant:"h6",fontWeight:600,mb:1.5,mt:2.5,children:o("rpm_Metrics")}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:a.metrics.map((e,t)=>{var n,r;return(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Uu,{variant:"outlined",sx:{p:2,borderRadius:2,bgcolor:"#fafafa",height:"100%"},children:[(0,Gt.jsxs)(Ym,{fontWeight:600,gutterBottom:!0,children:[t+1,". ",e.name]}),e.fieldType&&(0,Gt.jsxs)(Ym,{variant:"body2",color:"text.secondary",children:[o("rpm_FieldType"),": ",e.fieldType]}),e.unit&&(0,Gt.jsxs)(Ym,{variant:"body2",color:"text.secondary",children:[o("rpm_Unit"),": ",e.unit]}),e.range&&(e.range.min||e.range.max)&&(0,Gt.jsxs)(Ym,{variant:"body2",color:"text.secondary",children:[o("rpm_Range"),": ",e.range.min||"-"," - ",e.range.max||"-"]}),(null===(n=e.options)||void 0===n?void 0:n.length)>0&&(0,Gt.jsxs)(Ym,{variant:"body2",color:"text.secondary",children:[o("rpm_Options"),": ",e.options.join(", ")]}),(0,Gt.jsxs)(Ym,{variant:"body2",color:"text.secondary",children:[o("rpm_Required"),": ",e.is_required?o("rpm_Yes"):o("rpm_No")]}),(null===(r=e.traceableBy)||void 0===r?void 0:r.length)>0&&(0,Gt.jsxs)(Ym,{variant:"body2",color:"text.secondary",children:[o("rpm_TraceableBy"),": ",e.traceableBy.join(", ")]})]})},t)})})]}),!(null!==(n=a.metrics)&&void 0!==n&&n.length)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{variant:"h6",fontWeight:600,mb:1.5,mt:2.5,children:o("rpm_Metrics")}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsx)(Uu,{variant:"outlined",sx:{p:2,borderRadius:2,bgcolor:"#fafafa",height:"100%"},children:(0,Gt.jsx)(Ym,{color:"text.secondary",children:o("rpm_NoMetricsFound")})})})})]})]})}),(0,Gt.jsx)(iO,{children:(0,Gt.jsx)(Vp,{onClick:i,variant:"contained",children:o("rpm_Close")})})]})};function Nve(e){let{goalsList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,programHead:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchGoals:p,pageDetails:h,viewButton:m,editButton:f,goalModal:g,deleteButton:v,handleProgramModalToggle:x,createGoal:y,setHeadcells:b,settingModal:j,initialHeadcells:w,handleSettingModalToggle:_}=e;const{t:C}=vg();return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:C("rpm_WellnessGoals")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{x({},"add")},children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:C("rpm_CreateGoal")})]})})]})}),(0,Gt.jsx)(Eu,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,sx:{ml:"auto"},sm:3,xs:2,textAlign:"end",children:(0,Gt.jsx)(Yx,{title:C("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:_,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:null===s||void 0===s?void 0:s.filter(e=>w.includes(e.id)),dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:p,pageDetails:h,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},className:"program-tour-step0",children:[d&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:c,checked:l.includes(e.code),name:e.code,color:"primary"})}),w.includes("goal_name")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",children:e.goal_name})}),w.includes("category")&&(0,Gt.jsx)(rC,{children:e.category}),w.includes("is_active")&&(0,Gt.jsx)(rC,{children:e.is_active}),w.includes("priority")&&(0,Gt.jsx)(rC,{children:e.priority||"-"}),w.includes("action")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Eu,{className:"program-tour-step1",width:"fit-content",children:[f(e),m(e),v(e)]})})]},e.code))})}),(0,Gt.jsx)(IO,{pageDetails:h,fetchListFunction:p})]})]})}),g.open&&("edit"===g.type||"add"===g.type)&&(0,Gt.jsx)(Dve,{modal:g,onClose:x,onSubmit:y}),g.open&&"details"===g.type&&(0,Gt.jsx)(Rve,{open:g,onClose:x}),(0,Gt.jsx)(fO,{open:j,allHeadCells:s,initialHeadcells:w,setHeadcells:b,onClose:_})]})}Nve.defaultProps={programHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",goalsList:[],fetchGoals:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},goalModal:!1,handleProgramModalToggle:()=>{},createGoal:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{}};const Lve=Nve,Ive=()=>async e=>{e(na(!0));try{const e="".concat(ga.WELLNESS_GOAL),t=await cu(e,{});return oa()(t,"data",[]).forEach(e=>Fve(e)),null===t||void 0===t?void 0:t.data}catch(t){return t}finally{e(na(!1))}},Fve=function(e){var t;as(e)||(e.id=e._id,e.is_active=e.is_active?"Yes":"No",e.category=null===e||void 0===e||null===(t=e.category)||void 0===t?void 0:t.join(", "))};const $ve=function(e){let{pageDetails:t,userData:n}=e;const r=Nt(),o=Ct(Nd),a=P_(BA().breakpoints.down("sm")),{t:s}=vg(),[l,c]=(0,We.useState)("desc"),[d,u]=(0,We.useState)("updated_at"),[p,h]=(0,We.useState)([]),[m,f]=We.useState({open:!1,data:{},type:""}),[g,v]=We.useState({open:!1,data:{}}),[x,y]=(0,We.useState)([]),[b,j]=We.useState(!1),w=a?["goal_name","action"]:["goal_name","category","is_active","priority","action"],_=e=>{v((0,i.A)((0,i.A)({},g),{},{open:!g.open,data:e}))},C=(e,t)=>{m.open||"add"===t?m.open||"add"!==t?f({open:!m.open,data:{},type:""}):f({open:!m.open,data:{},type:"add"}):O(e.id,t)},[S,A]=We.useState(as($o.getAllProgramsCells())?w:$o.getAllProgramsCells()),k=function(e){A(e),$o.setAllProgramsCells(e)},M=async e=>{try{const e=await r(Ive((0,i.A)((0,i.A)({},t),{},{current_page:1})));y(e)}catch(n){console.log(n)}},O=async(e,t)=>{try{const n=await r((e=>async t=>{t(na(!0));try{const t="".concat(ga.WELLNESS_GOAL,"/").concat(e),n=await cu(t,{});return null===n||void 0===n?void 0:n.data}catch(n){return n}finally{t(na(!1))}})(e));f({open:!m.open,data:n,type:t})}catch(n){console.log(n)}},T=async(e,t)=>{try{await r((n=e,async e=>{e(na(!0));try{const e="".concat(ga.WELLNESS_GOAL,"/").concat(n);return await pu(e,{})}finally{e(na(!1))}})),M(),v({open:!1,data:{}}),r(Zo({subTitle:"message:rpm_DeleteGoalSuccess",severity:Bc}))}catch(i){r(Zo({subTitle:i.message,severity:$c}))}var n};We.useEffect(()=>{r(w_({activeMenuItem:"wellnessGoals",heading:{}}))},[]),We.useEffect(()=>{k(w)},[a]),We.useEffect(()=>{o&&M()},[o]);const E=[{id:"goal_name",label:s("rpm_GoalName"),isSort:!1,sortProperty:"goal_name"},{id:"category",label:s("rpm_Category"),isSort:!1,sortProperty:"category"},{id:"is_active",label:s("rpm_Active"),isSort:!1,sortProperty:"is_active"},{id:"priority",label:s("rpm_Priority"),isSort:!1,sortProperty:"priority"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Lve,{userData:n,order:l,orderBy:d,setOrder:c,setOrderBy:u,dataParameter:"code",checkState:p,onCheck:e=>{if(Array.isArray(e))return h(e.map(e=>e));const t=e.target.name;p.includes(t)?h(p.filter(e=>e!==t)):h(e=>[...e,t])},isSelection:!1,nodata:D_,programHead:E,goalsList:x,fetchGoals:M,pageDetails:t,editButton:e=>(0,Gt.jsx)(Yx,{title:s("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>C(e,"edit"),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,Gt.jsx)(Yx,{title:s("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>C(e,"details"),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,Gt.jsx)(Yx,{title:s("rpm_Delete"),children:(0,Gt.jsx)("span",{children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>_(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})}),goalModal:m,handleProgramModalToggle:C,setHeadcells:k,settingModal:b,initialHeadcells:S,handleSettingModalToggle:()=>{j(!b)},createGoal:async(e,t)=>{let{setErrors:n,resetForm:o}=t;try{await r((a=e,async e=>{e(na(!0));const t=$o.getAccessToken(),n=(0,i.A)((0,i.A)({},a),{},{priority:Number(a.priority||"0"),tenant_id:null===t||void 0===t?void 0:t.accountId});try{const e="".concat(ga.WELLNESS_GOAL);return await du(e,n)}finally{e(na(!1))}})),o(),r(Zo({subTitle:"message:rpm_GoalCreatedSuccessfully",severity:Bc})),M(),f({open:!1,data:{},type:""})}catch(s){const e=ls(s,"response.data.field_errors",{}),t=ls(s,"response.data.code","");as(e)?as(t)?r(Zo({subTitle:s.message,severity:$c})):r(Zo({subTitle:bd(t,"error:rpm_GoalCreatedFailed"),severity:$c})):n(yd(e))}var a}}),(0,Gt.jsx)(PU,{openModal:g.open,onCloseModal:_,actionFunction:()=>{var e;return T(null===g||void 0===g||null===(e=g.data)||void 0===e?void 0:e.id)},dataName:g.data.display_name,options:{primaryText:s("message:rpm_DeleteTitle"),secondaryText:s("message:rpm_DeleteBodyText"),descText:s("message:rpm_DeleteSubText"),btn:{primaryText:s("rpm_Delete"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};var Bve=n(34109),zve=n(26581);const Hve="name",Wve="primary_muscle",Vve="secondary_muscles",Uve="equipment",qve="exercise_type",Gve="movement_pattern",Yve="level",Zve="instructions",Kve="tips",Xve="common_mistakes",Qve="is_bodyweight",Jve="calorie_burn_rate_per_min",exe="category",txe=e=>{var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k;let{modal:M,onClose:O,onSubmit:T,muscleGroup:E,gymEquipments:P,exerciseType:D}=e;const{t:R}=vg(),[N]=(0,We.useState)({[Hve]:null!==M&&void 0!==M&&null!==(t=M.data)&&void 0!==t&&t.name?null===M||void 0===M||null===(n=M.data)||void 0===n?void 0:n.name:"",[Wve]:null!==M&&void 0!==M&&null!==(r=M.data)&&void 0!==r&&r.primary_muscle?null===M||void 0===M||null===(o=M.data)||void 0===o?void 0:o.primary_muscle:"",[Vve]:null!==M&&void 0!==M&&null!==(a=M.data)&&void 0!==a&&a.secondary_muscles?null===M||void 0===M||null===(s=M.data)||void 0===s?void 0:s.secondary_muscles:[],[Uve]:null!==M&&void 0!==M&&null!==(l=M.data)&&void 0!==l&&l.equipment?null===M||void 0===M||null===(c=M.data)||void 0===c?void 0:c.equipment:"",[qve]:null!==M&&void 0!==M&&null!==(d=M.data)&&void 0!==d&&d.exercise_type?null===M||void 0===M||null===(u=M.data)||void 0===u?void 0:u.exercise_type:"",[Gve]:null!==M&&void 0!==M&&null!==(p=M.data)&&void 0!==p&&p.movement_pattern?null===M||void 0===M||null===(h=M.data)||void 0===h?void 0:h.movement_pattern:"",[Yve]:null!==M&&void 0!==M&&null!==(m=M.data)&&void 0!==m&&m.level?null===M||void 0===M||null===(f=M.data)||void 0===f?void 0:f.level:"",[Zve]:null!==M&&void 0!==M&&null!==(g=M.data)&&void 0!==g&&g.instructions?null===M||void 0===M||null===(v=M.data)||void 0===v?void 0:v.instructions:"",[Kve]:null!==M&&void 0!==M&&null!==(x=M.data)&&void 0!==x&&x.tips?null===M||void 0===M||null===(y=M.data)||void 0===y?void 0:y.tips:[],[Xve]:null!==M&&void 0!==M&&null!==(b=M.data)&&void 0!==b&&b.common_mistakes?null===M||void 0===M||null===(j=M.data)||void 0===j?void 0:j.common_mistakes:[],[Qve]:!(null===M||void 0===M||null===(w=M.data)||void 0===w||!w.is_bodyweight)&&(null===M||void 0===M||null===(_=M.data)||void 0===_?void 0:_.is_bodyweight),[Jve]:null!==M&&void 0!==M&&null!==(C=M.data)&&void 0!==C&&C.calorie_burn_rate_per_min?null===M||void 0===M||null===(S=M.data)||void 0===S?void 0:S.calorie_burn_rate_per_min:0,[exe]:null!==M&&void 0!==M&&null!==(A=M.data)&&void 0!==A&&A.category?null===M||void 0===M||null===(k=M.data)||void 0===k?void 0:k.category:""}),L=Object.values(E),I=Object.values(D),F=["None",...Object.values(P)],$=(0,Gt.jsx)(Bve.A,{fontSize:"small"}),B=(0,Gt.jsx)(zve.A,{fontSize:"small"});return(0,Gt.jsx)(Kw,{fullWidth:!0,maxWidth:"md",open:M,onClose:O,children:(0,Gt.jsx)(Iz,{initialValues:N,validationSchema:vV.addExercise,onSubmit:(e,t)=>{let{setErrors:n,resetForm:r}=t;return T(M.data._id&&"edit"==M.type?M.data._id:"",e,{setErrors:n,resetForm:r})},enableReinitialize:!0,children:e=>{let{values:t,handleChange:n,setFieldValue:r}=e;return(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsxs)(n_,{children:[R("add"===M.type?"rpm_CreateExercise":"rpm_EditExerciseGoal"),(0,Gt.jsx)(Kp,{onClick:O,sx:{position:"absolute",right:8,top:8},children:(0,Gt.jsx)(Pue,{})})]}),(0,Gt.jsx)(s_,{dividers:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,direction:"column",children:[(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)($w,{fullWidth:!0,label:R("rpm_ExerciseName"),name:Hve,value:t[Hve],onChange:n,margin:"normal"}),(0,Gt.jsx)(Xz,{name:Hve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:R(e,{field:R("rpm_ExerciseName")})})})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(qj,{children:R("rpm_PrimaryMuscle")}),(0,Gt.jsx)(Hz,{name:Wve,children:e=>{let{field:t,form:n}=e;return(0,Gt.jsx)(Gb,{options:L,value:t.value||null,onChange:(e,t)=>{n.setFieldValue(Wve,t)},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",error:Boolean(n.errors[Wve]),helperText:n.errors[Wve]?R(n.errors[Wve],{field:R("rpm_PrimaryMuscle")}):""}))})}})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(qj,{children:R("rpm_SecondaryMuscle")}),(0,Gt.jsx)(Hz,{name:Vve,children:e=>{let{field:t,form:n}=e;return(0,Gt.jsx)(Gb,{multiple:!0,options:L,value:t.value||[],onChange:(e,t)=>{n.setFieldValue(Vve,t)},disableCloseOnSelect:!0,renderOption:(e,t,n)=>{let{selected:r}=n;return(0,Gt.jsxs)("li",(0,i.A)((0,i.A)({},e),{},{children:[(0,Gt.jsx)(jC,{icon:$,checkedIcon:B,checked:r,style:{marginRight:8}}),t]}))},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",error:Boolean(n.errors[Vve]),helperText:n.errors[Vve]?R(n.errors[Vve],{field:R("rpm_SecondaryMuscle")}):""}))})}})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(qj,{children:R("rpm_Equipment")}),(0,Gt.jsx)(Hz,{name:Uve,children:e=>{let{field:t,form:n}=e;return(0,Gt.jsx)(Gb,{options:F,value:t.value||null,onChange:(e,t)=>n.setFieldValue(Uve,t),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",error:Boolean(n.errors[Uve]),helperText:n.errors[Uve]?R(n.errors[Uve],{field:R("rpm_Equipment")}):""}))})}})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(qj,{children:R("rpm_ExerciseType")}),(0,Gt.jsx)(Hz,{name:qve,children:e=>{let{field:t,form:n}=e;return(0,Gt.jsx)(Gb,{options:I,value:t.value||null,onChange:(e,t)=>n.setFieldValue(qve,t),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",error:Boolean(n.errors[qve]),helperText:n.errors[qve]?R(n.errors[qve],{field:R("rpm_ExerciseType")}):""}))})}})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)($w,{fullWidth:!0,label:R("rpm_MovementPattern"),name:Gve,value:t[Gve],onChange:n,margin:"normal"}),(0,Gt.jsx)(Xz,{name:Gve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:R(e,{field:R("rpm_MovementPattern")})})})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(qj,{children:R("rpm_ExerciseLevel")}),(0,Gt.jsx)(Hz,{as:Dw,name:Yve,fullWidth:!0,size:"small",value:t[Yve]||"",onChange:n,children:["Beginner","Intermediate","Advanced"].map(e=>(0,Gt.jsx)($m,{value:e,children:(0,Gt.jsx)(Ym,{children:e})},e))}),(0,Gt.jsx)(Xz,{name:Yve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:R(e,{field:R("rpm_ExerciseLevel")})})})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(qj,{children:R("rpm_Instructions")}),(0,Gt.jsx)($w,{fullWidth:!0,label:R("rpm_Instructions"),name:Zve,value:t[Zve],onChange:n,margin:"normal"}),(0,Gt.jsx)(Xz,{name:Zve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:R(e,{field:R("rpm_Instructions")})})})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(qj,{children:R("rpm_Tips")}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",flexWrap:"wrap",gap:1,padding:"4px 4px",border:"1px solid #ccc",borderRadius:"4px"},children:[(t[Kve]||[]).map((e,n)=>(0,Gt.jsx)(gb,{label:e,onDelete:()=>{const e=t[Kve].filter((e,t)=>t!==n);r(Kve,e)},size:"small"},n)),(0,Gt.jsx)($w,{variant:"standard",placeholder:R("Add tips and press Enter"),value:t.tempTip||"",onChange:e=>r("tempTip",e.target.value),onKeyDown:e=>{if("Enter"===e.key){var n;e.preventDefault();const i=null===(n=t.tempTip)||void 0===n?void 0:n.trim();if(!i)return;const o=[...t[Kve]||[],i];r(Kve,o),r("tempTip","")}},sx:{minWidth:"120px"}})]}),(0,Gt.jsx)(Xz,{name:Kve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:R(e,{field:R("rpm_Tips")})})})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(qj,{children:R("rpm_CommonMistakes")}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",flexWrap:"wrap",gap:1,padding:"4px 0",border:"1px solid #ccc",borderRadius:"4px"},children:[(t[Xve]||[]).map((e,n)=>(0,Gt.jsx)(gb,{label:e,size:"small",onDelete:()=>{const e=t[Xve].filter((e,t)=>t!==n);r(Xve,e)}},n)),(0,Gt.jsx)($w,{variant:"standard",placeholder:R("Add common mistake and press Enter"),value:t.tempCommonMistake||"",onChange:e=>r("tempCommonMistake",e.target.value),onKeyDown:e=>{if("Enter"===e.key){var n;e.preventDefault();const i=null===(n=t.tempCommonMistake)||void 0===n?void 0:n.trim();if(!i)return;const o=[...t[Xve]||[],i];r(Xve,o),r("tempCommonMistake","")}},sx:{minWidth:"150px"}})]}),(0,Gt.jsx)(Xz,{name:Xve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:R(e,{field:R("rpm_CommonMistakes")})})})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(Hz,{as:jC,name:Qve,checked:t[Qve],onChange:()=>r(Qve,!t[Qve])}),label:"Is Body Weight"})}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)($w,{fullWidth:!0,label:R("rpm_Calorie_burn_rate"),name:Jve,value:t[Jve],onChange:n,margin:"normal",type:"number"}),(0,Gt.jsx)(Xz,{name:Jve,children:e=>(0,Gt.jsx)(iw,{error:!0,children:R(e,{field:R("rpm_Calorie_burn_rate")})})})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)($w,{fullWidth:!0,label:R("rpm_Category"),name:exe,value:t[exe],onChange:n,margin:"normal"}),(0,Gt.jsx)(Xz,{name:exe,children:e=>(0,Gt.jsx)(iw,{error:!0,children:R(e,{field:R("rpm_Category")})})})]})]})}),(0,Gt.jsxs)(iO,{children:[(0,Gt.jsx)(Vp,{onClick:O,children:R("rpm_Cancel")}),(0,Gt.jsx)(Vp,{type:"submit",variant:"contained",color:"primary",children:R("rpm_Submit")})]})]})}})})},nxe=e=>{let{open:t,onClose:n}=e;const{t:r}=vg(),i=(null===t||void 0===t?void 0:t.data)||{};return(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"md",open:null===t||void 0===t?void 0:t.open,onClose:n,children:[(0,Gt.jsxs)(n_,{sx:{fontWeight:600},children:[r("rpm_GoalDetails"),(0,Gt.jsx)(Kp,{onClick:n,sx:{position:"absolute",right:8,top:8},children:(0,Gt.jsx)(Pue,{})})]}),(0,Gt.jsx)(s_,{dividers:!0,children:(0,Gt.jsx)(Uu,{variant:"outlined",sx:{p:2.5,borderRadius:2,mb:2,bgcolor:"#fcfcfc"},children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:r("rpm_ExerciseName")}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:i.name||"-"})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:r("rpm_PrimaryMuscle")}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:i.primary_muscle||"-"})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:r("rpm_ExerciseLevel")}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:i.level||"-"})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:r("rpm_ExerciseType")}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:i.exercise_type||"-"})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:r("rpm_Priority")}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:i.priority||"-"})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body2",color:"text.secondary",children:r("rpm_Calorie_burn_rate")}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:i.calorie_burn_rate_per_min||"-"})]})]})})}),(0,Gt.jsx)(iO,{children:(0,Gt.jsx)(Vp,{onClick:n,variant:"contained",children:r("rpm_Close")})})]})},rxe=ss((e,t)=>{/^\++$/.test(t.trim())||e({exercise:t})},500);function ixe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t)return e;const n=new RegExp("(".concat(t,")"),"gi"),r=e.split(n);return(0,Gt.jsx)(Gt.Fragment,{children:r.map((e,n)=>e.toLowerCase()===t.toLowerCase()?(0,Gt.jsx)("span",{style:{fontWeight:"bold"},children:e},n):(0,Gt.jsx)("span",{children:e},n))})}const oxe=function(e){let{pageDetails:t,fetchListFunction:n,filterState:r,setFilterState:o,ExerciseSuggestions:a,fetchExerciseListSuggestions:s,placeholder:l,helpText:c}=e;const{t:d}=vg(),[u,p]=(0,We.useState)([]),[h,m]=(0,We.useState)("");(0,We.useEffect)(()=>{p(a)},[a]),(0,We.useEffect)(()=>{n()},[r]);const f=(0,We.useCallback)((e,t)=>{rxe(s,t)},[s]),g=()=>{t.current_page=1,m(""),o({exercise:""})},v=e=>{t.current_page=1,o({exercise:"".concat(e.name)}),a=[],p([])};return(0,Gt.jsx)(Iz,{initialValues:{patientName:""},onSubmit:()=>console.log("ExerciseFilter"),enableReinitialize:!0,children:()=>(0,Gt.jsx)(Wz,{style:{flex:"1"},children:(0,Gt.jsx)(Eu,{sx:{borderRadius:"8px"},py:.2,pl:1,mr:2,className:"course_filter WhiteBG",children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",position:"relative",width:"100%",children:(0,Gt.jsxs)(df,{item:!0,width:"100%",className:"globalSearchBox",children:[(0,Gt.jsxs)(Eu,{py:.2,display:"flex",alignItems:"center",position:"relative",width:"100%",children:[(0,Gt.jsx)(Rj,{sx:{position:"relative"},fullWidth:!0,size:"small",className:"exercises-tour-step0",placeholder:l,value:h,onKeyDown:e=>{if("Enter"===e.key&&(null===u||void 0===u?void 0:u.length)>0){const e=u[0];o((0,i.A)((0,i.A)({},r),{},{exercise:h})),v(e)}},onChange:e=>{let t=e.target.value;m(t),f(null,t)},endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:d(c||"message:rpm_SearchExerciseFilterBar"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Eu,{position:"absolute",right:"23px",children:!as(null===r||void 0===r?void 0:r.exercise)&&(0,Gt.jsx)(Vp,{variant:"text",disableElevation:!0,type:"reset",onClick:g,sx:{"&.MuiButtonBase-root:hover":{bgcolor:"transparent"}},children:(0,Gt.jsx)(Bw.A,{})})})]}),(0,Gt.jsx)(Eu,{className:"globalSearchParent",sx:{position:"absolute",width:"100%",background:"#ffffff",zIndex:"1",borderBottom:"1px solid #efefef",maxHeight:"350px",overflow:"auto",scrollbarWidth:"thin","&::-webkit-scrollbar":{width:"0.2em"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888"},"&::-webkit-scrollbar-thumb:hover":{background:"#555"}},children:(null===u||void 0===u?void 0:u.length)>0&&(0,Gt.jsx)(hh,{dense:!0,children:null===u||void 0===u?void 0:u.map((e,t)=>(0,Gt.jsx)(Qf,{button:!0,onClick:()=>v(e),children:(0,Gt.jsx)(ag,{primary:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",children:[(0,Gt.jsx)("span",{children:ixe(null===e||void 0===e?void 0:e.name,h)}),(0,Gt.jsx)("span",{children:ixe(null===e||void 0===e?void 0:e.primary_muscle,h)})]})})})},t))})})]})})})})},"filter_formik")};function axe(e){let{goalsList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,programHead:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchWorkoutGoals:p,pageDetails:h,viewButton:m,editButton:f,goalModal:g,deleteButton:v,handleProgramModalToggle:x,createWorkoutGoal:y,setHeadcells:b,settingModal:j,initialHeadcells:w,handleSettingModalToggle:_,muscleGroup:C,exerciseType:S,gymEquipments:A,fetchAllExerciseListSuggestions:k,filterState:M,setFilterState:O,allExerciseSuggestions:T,fetchWorkoutGoalDetails:E}=e;const{t:P}=vg();return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:P("rpm_ExerciseGoals")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{x({},"add")},children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:P("rpm_CreateExercise")})]})})]})}),(0,Gt.jsx)(Eu,{bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,lg:7,md:9,xs:10,sm:10,children:(0,Gt.jsx)(oxe,{pageDetails:h,fetchListFunction:p,filterState:M,setFilterState:O,ExerciseSuggestions:T,fetchExerciseListSuggestions:k,placeholder:"Search by exercise name",helpText:"Enter exercise name"})}),(0,Gt.jsx)(df,{item:!0,sx:{ml:"auto"},sm:3,xs:2,textAlign:"end",children:(0,Gt.jsx)(Yx,{title:P("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px",marginTop:"5px"},size:"small",color:"primary",onClick:_,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:null===s||void 0===s?void 0:s.filter(e=>w.includes(e.id)),dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:E,pageDetails:h,skeletonVrows:6,className:"theme_scroll",children:null!==t&&void 0!==t&&t.length?null===t||void 0===t?void 0:t.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},className:"program-tour-step0",children:[d&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:c,checked:l.includes(e.code),name:e.code,color:"primary"})}),w.includes("goal_name")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",children:e.name})}),w.includes("primary_muscle")&&(0,Gt.jsx)(rC,{children:e.primary_muscle}),w.includes("level")&&(0,Gt.jsx)(rC,{children:e.level}),w.includes("action")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Eu,{className:"program-tour-step1",width:"fit-content",children:[f(e),m(e),v(e)]})})]},e.code)):(0,Gt.jsx)(Gt.Fragment,{})})}),(0,Gt.jsx)(IO,{pageDetails:h,fetchListFunction:p})]})]})}),g.open&&("edit"===g.type||"add"===g.type)&&(0,Gt.jsx)(txe,{modal:g,onClose:x,onSubmit:y,muscleGroup:C,gymEquipments:A,exerciseType:S}),g.open&&"details"===g.type&&(0,Gt.jsx)(nxe,{open:g,onClose:x}),(0,Gt.jsx)(fO,{open:j,allHeadCells:s,initialHeadcells:w,setHeadcells:b,onClose:_})]})}axe.defaultProps={programHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",goalsList:[],fetchWorkoutGoals:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},goalModal:!1,handleProgramModalToggle:()=>{},createWorkoutGoal:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},muscleGroup:{},exerciseType:{},gymEquipments:[],filterState:{},setFilterState:()=>{},allExerciseSuggestions:[],fetchAllExerciseListSuggestions:()=>{},fetchWorkoutGoalDetails:()=>{}};const sxe=axe,lxe=e=>async t=>{const{current_page:n,per_page:r,newFilterState:i}=e;t(na(!0));try{let e="".concat(va.EXERCISE_GOAL,"?page=").concat(n||1,"&perPage=").concat(r);null!==i&&void 0!==i&&i.exercise&&(e+="&q=".concat(i.exercise));const t=await cu(e,{});return null===t||void 0===t?void 0:t.data}catch(o){return o}finally{t(na(!1))}},cxe=["content"];const dxe=function(e){let{userData:t}=e;const n=Nt(),r=Ct(Nd),o=P_(BA().breakpoints.down("sm")),{t:a}=vg(),[s,l]=(0,We.useState)("desc"),[c,d]=(0,We.useState)("updated_at"),[u,p]=(0,We.useState)([]),[h,m]=We.useState({open:!1,data:{},type:""}),[f,g]=We.useState({open:!1,data:{}}),[v,x]=(0,We.useState)([]),[y,b]=We.useState(!1),[j,w]=We.useState({}),[_,C]=We.useState({}),[S,A]=We.useState([]),[k,M]=(0,We.useState)((0,i.A)({},Fc)),[O,T]=(0,We.useState)([]),[E,P]=We.useState({}),D=o?["goal_name","action"]:["goal_name","primary_muscle","level","action"],R=e=>{g((0,i.A)((0,i.A)({},f),{},{open:!f.open,data:e}))},N=(e,t)=>{z(),H(),h.open||"add"===t?h.open||"add"!==t?m({open:!h.open,data:{},type:""}):m({open:!h.open,data:{},type:"add"}):W(e._id,t)},[L,I]=We.useState(as($o.getAllProgramsCells())?D:$o.getAllProgramsCells()),F=function(e){I(e),$o.setAllProgramsCells(e)},$=async(e,t,r)=>{let{setErrors:o}=r;try{await n(((e,t)=>async n=>{n(na(!0));const r=(0,i.A)((0,i.A)({},e),{},{priority:Number(e.priority||"0")});try{const e="".concat(va.EXERCISE_GOAL,"/").concat(t);return await uu(e,r)}finally{n(na(!1))}})(t,e)),n(Zo({subTitle:"message:rpm_ExerciseUpdatedSuccessfully",severity:Bc})),B(),m({open:!1,data:{},type:""})}catch(a){const e=ls(a,"response.data.field_errors",{}),t=ls(a,"response.data.code","");as(e)?as(t)?n(Zo({subTitle:a.message,severity:$c})):n(Zo({subTitle:bd(t,"error:rpm_ExerciseCreatedFailed"),severity:$c})):o(yd(e))}},B=async()=>{const e=(0,i.A)((0,i.A)({sort_by:c,sort_order:s},k),{},{newFilterState:E});try{const t=await n(lxe(e))||{},{content:r}=t,o=Ko(t,cxe);x(r),M(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,to:o.to,total:o.total}))}catch(t){console.log(t)}},z=async()=>{try{const e=await n(async e=>{e(na(!0));try{const e="".concat(va.ENUM),t=await cu(e,{});return null===t||void 0===t?void 0:t.data}catch(t){return t}finally{e(na(!1))}});w(null===e||void 0===e?void 0:e.muscle_group),C(null===e||void 0===e?void 0:e.exercise_type)}catch(e){console.log(e)}},H=async()=>{try{const e=await n(async e=>{e(na(!0));try{var t;const e="".concat(va.GYM_EQUIPMENTS),n=await cu(e,{});return null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.gymEquipments}catch(n){return n}finally{e(na(!1))}});A(e)}catch(e){console.log(e)}},W=async(e,t)=>{try{const r=await n((e=>async t=>{t(na(!0));try{const t="".concat(va.EXERCISE_GOAL,"/").concat(e),n=await cu(t,{});return null===n||void 0===n?void 0:n.data}catch(n){return n}finally{t(na(!1))}})(e));m({open:!h.open,data:r,type:t})}catch(r){console.log(r)}},V=async e=>{try{await n((t=e,async e=>{e(na(!0));try{const e="".concat(va.EXERCISE_GOAL,"/").concat(t);return await pu(e,{})}finally{e(na(!1))}})),B(),g({open:!1,data:{}}),n(Zo({subTitle:"message:rpm_DeleteWorkoutSuccess",severity:Bc}))}catch(r){n(Zo({subTitle:r.message,severity:$c}))}var t};We.useEffect(()=>{n(w_({activeMenuItem:"exerciseGoals",heading:{}}))},[]),We.useEffect(()=>{F(D)},[o]),We.useEffect(()=>{r&&B()},[r]);const U=[{id:"goal_name",label:a("rpm_ExerciseName"),isSort:!1,sortProperty:"goal_name"},{id:"primary_muscle",label:a("rpm_primary_muscle"),isSort:!1,sortProperty:"category"},{id:"level",label:a("rpm_Level"),isSort:!1,sortProperty:"is_active"},{id:"action",label:a("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(sxe,{userData:t,order:s,orderBy:c,setOrder:l,setOrderBy:d,dataParameter:"code",checkState:u,onCheck:e=>{if(Array.isArray(e))return p(e.map(e=>e));const t=e.target.name;u.includes(t)?p(u.filter(e=>e!==t)):p(e=>[...e,t])},isSelection:!1,nodata:D_,programHead:U,goalsList:v,fetchWorkoutGoals:B,pageDetails:k,editButton:e=>(0,Gt.jsx)(Yx,{title:a("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e._id,color:"primary",onClick:()=>N(e,"edit"),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,Gt.jsx)(Yx,{title:a("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>N(e,"details"),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,Gt.jsx)(Yx,{title:a("rpm_Delete"),children:(0,Gt.jsx)("span",{children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>R(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})}),goalModal:h,handleProgramModalToggle:N,setHeadcells:F,settingModal:y,initialHeadcells:L,handleSettingModalToggle:()=>{b(!y)},createWorkoutGoal:async(e,t,r)=>{let{setErrors:o,resetForm:a}=r;if(e){await $(e,t,{setErrors:o});const r=await n(B());return x(r),void m({open:!1,data:{},type:""})}try{await n((s=t,async e=>{e(na(!0));const t=(0,i.A)((0,i.A)({},s),{},{priority:Number(s.priority||"0")});try{const e="".concat(va.EXERCISE_GOAL);return await du(e,t)}finally{e(na(!1))}})),a(),n(Zo({subTitle:"message:rpm_ExerciseCreatedSuccessfully",severity:Bc})),B(),m({open:!1,data:{},type:""})}catch(l){let e=ls(l,"response.data.errorCode","");e?(e=e.split(":")[1],n(Zo({subTitle:bd(e,"error:rpm_ExerciseCreatedFailed"),severity:$c}))):n(Zo({subTitle:l.message,severity:$c}))}var s},muscleGroup:j,exerciseType:_,gymEquipments:S,filterState:E,setFilterState:P,allExerciseSuggestions:O,fetchAllExerciseListSuggestions:async e=>{const t=(0,i.A)({sort_by:c,sort_order:s,newFilterState:e},k);if(null!==e&&void 0!==e&&e.exercise){if(null!==e&&void 0!==e&&e.exercise.trim())try{const e=await n(lxe(t)),r=(null===e||void 0===e?void 0:e.content)||[];T(r)}catch(r){console.log(r)}}else T([]),B()},fetchWorkoutGoalDetails:W}),(0,Gt.jsx)(PU,{openModal:f.open,onCloseModal:R,actionFunction:()=>{var e;return V(null===f||void 0===f||null===(e=f.data)||void 0===e?void 0:e._id)},dataName:f.data.display_name,options:{primaryText:a("message:rpm_DeleteTitle"),secondaryText:a("message:rpm_DeleteBodyText"),descText:a("message:rpm_DeleteSubText"),btn:{primaryText:a("rpm_Delete"),secondaryText:a("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};const uxe=function(){const e=Nt(),{userData:t}=(0,We.useContext)(Zg),{programFetch:n,programPage:r,allProgramFetch:i}=(0,We.useContext)(j_);return We.useEffect(()=>{const n={sideBar:!0,listItems:S_(t)};e(w_(n))},[t]),(0,Gt.jsxs)(ko,{children:[(0,Gt.jsx)(So,{path:"/program",element:as(t)||null!==t&&void 0!==t&&t.showProgramList?(0,Gt.jsx)(vue,{fetchProgramList:n,pageDetails:r,userData:t,fetchAllProgramList:i}):(0,Gt.jsx)(__,{})}),(0,Gt.jsx)(So,{path:"/allusers",element:(0,Gt.jsx)(Aue,{})}),(0,Gt.jsx)(So,{path:"/wellness",element:(0,Gt.jsx)($ve,{})}),(0,Gt.jsx)(So,{path:"/exercise",element:(0,Gt.jsx)(dxe,{})}),(0,Gt.jsx)(So,{path:"/logs",element:(0,Gt.jsx)(tH,{})}),(0,Gt.jsx)(So,{path:"/logs/:eventId",element:(0,Gt.jsx)(OH,{})}),(0,Gt.jsx)(So,{path:"/dashboard",element:(0,Gt.jsx)(qde,{})}),(0,Gt.jsx)(So,{path:"/profile",element:(0,Gt.jsx)(Yde,{})}),(0,Gt.jsx)(So,{path:"/profile/edit/:userId",element:(0,Gt.jsx)(nue,{})}),(0,Gt.jsx)(So,{path:"/change-password",element:(0,Gt.jsx)(fJ,{})}),(0,Gt.jsx)(So,{path:"/roles",element:as(t)||null!==t&&void 0!==t&&t.showRoleMenu?(0,Gt.jsx)(LZ,{}):(0,Gt.jsx)(__,{})}),(0,Gt.jsx)(So,{path:"/roles/add",element:as(t)||null!==t&&void 0!==t&&t.showCreateRoleBtn?(0,Gt.jsx)(bV,{}):(0,Gt.jsx)(__,{})}),(0,Gt.jsx)(So,{path:"/roles/edit/:roleId",element:(0,Gt.jsx)(OU,{})}),(0,Gt.jsx)(So,{path:"/users",element:as(t)||null!==t&&void 0!==t&&t.showStaffMenu?(0,Gt.jsx)(pJ,{}):(0,Gt.jsx)(__,{})}),(0,Gt.jsx)(So,{path:"/users/add",element:as(t)||null!==t&&void 0!==t&&t.showCreateUserBtn?(0,Gt.jsx)(VK,{}):(0,Gt.jsx)(__,{})}),(0,Gt.jsx)(So,{path:"/users/edit/:userId",element:as(t)||null!==t&&void 0!==t&&t.showReadUserBtn?(0,Gt.jsx)(lJ,{fetchProgramList:n,pageDetails:r}):(0,Gt.jsx)(__,{})})]})};const pxe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f;let{patientData:g,scheduleList:v,scheduleGlucoseList:x}=e;const y=Nt(),{t:b}=vg(),{years:j}=hs(null===g||void 0===g?void 0:g.birth_date),w=Ct(Wd),_=Ct(zd),{patientId:C,programId:S}=lo(),[A,k]=We.useState({}),[M,O]=We.useState({});return We.useEffect(()=>{const e={course:A,course_glucose:M};$o.setPatientDefaultCourse(null===e||void 0===e?void 0:e.course),$o.setPatientDefaultCourseGlucose(null===e||void 0===e?void 0:e.course_glucose),y(w_(e))},[A,M]),We.useEffect(()=>{if(as(v))k({});else{const e=null===v||void 0===v?void 0:v.find(e=>"active"===(null===e||void 0===e?void 0:e.status)),t=null===v||void 0===v?void 0:v.find(e=>"inactive"===(null===e||void 0===e?void 0:e.status)),n=null===v||void 0===v?void 0:v.find(e=>"upcoming"===(null===e||void 0===e?void 0:e.status));k(e||(t||n))}},[v]),We.useEffect(()=>{if(as(x))O({});else{const e=null===x||void 0===x?void 0:x.find(e=>"active"===(null===e||void 0===e?void 0:e.status)),t=null===x||void 0===x?void 0:x.find(e=>"inactive"===(null===e||void 0===e?void 0:e.status)),n=null===x||void 0===x?void 0:x.find(e=>"upcoming"===(null===e||void 0===e?void 0:e.status));O(e||(t||n))}},[x]),(0,Gt.jsxs)(Eu,{sx:{mb:2.5},position:"relative",children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{display:{xs:"block",md:"none"},marginBottom:"8px"},children:b("rpm_medicalCharts")})}),g?(0,Gt.jsxs)(df,{container:!0,spacing:2.5,className:"patientDashboard-tour-step0",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:3,children:(0,Gt.jsx)(Lo,{to:"".concat(Lc.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(C,"/details"),className:"linkNoClr",children:(0,Gt.jsxs)(Eu,{sx:{position:"relative",display:"flex",p:2,bgcolor:"NON_COMPLIANT"==_?"red.50":"COMPLIANT"==_?"green.50":"#fff",borderRadius:1},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex"},children:(0,Gt.jsx)(wy,{src:null===g||void 0===g||null===(t=g.profile)||void 0===t?void 0:t.profileImage,sx:{bgcolor:"secondary.main",width:48,height:48,fontSize:32},children:null===g||void 0===g||null===(n=g.first_name)||void 0===n?void 0:n.charAt(0).toLocaleUpperCase()})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,pl:1.5,overflow:"hidden"},children:["NA"==_&&(0,Gt.jsx)(Eu,{component:"span",sx:e=>({position:"absolute",top:0,right:0,py:.25,px:1,display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600})}),"NON_COMPLIANT"==_&&(0,Gt.jsx)(Eu,{component:"span",sx:e=>({position:"absolute",top:0,right:0,py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}),"COMPLIANT"==_&&(0,Gt.jsx)(Eu,{component:"span",sx:e=>({position:"absolute",top:0,right:0,py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"}),(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",fontWeight:600,noWrap:!0,title:(null===g||void 0===g?void 0:g.first_name)+" "+(null===g||void 0===g?void 0:g.last_name),children:[(null===g||void 0===g?void 0:g.first_name)+" "+(null===g||void 0===g?void 0:g.last_name)," "]}),(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",sx:{color:"grey.600",fontWeight:600},children:["Age: ",null!==g&&void 0!==g&&g.birth_date?j:"NA"," ",null!==g&&void 0!==g&&null!==(r=g.profile)&&void 0!==r&&r.gender?", ".concat(null===g||void 0===g||null===(i=g.profile)||void 0===i?void 0:i.gender):""]})]})]})})}),(0,Gt.jsx)(df,{item:!0,md:!0,children:(0,Gt.jsx)(Eu,{sx:{p:2,bgcolor:"white",borderRadius:1},children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsxs)(df,{item:!0,md:5,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:(0,Gt.jsx)(Lo,{to:"".concat(Lc.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(C,"/details"),className:"linkNoClr",children:b("rpm_Vitals")})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Lo,{to:"".concat(Lc.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(C,"/details"),className:"linkNoClr",children:[(0,Gt.jsx)(Ym,{component:"span",variant:"body2",fontWeight:500,children:b("rpm_Height")+":"}),"\xa0",(0,Gt.jsxs)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:[null!==g&&void 0!==g&&null!==(o=g.patient_health_profile)&&void 0!==o&&null!==(a=o.height)&&void 0!==a&&a.split(".")[0]?(null===g||void 0===g||null===(s=g.patient_health_profile)||void 0===s||null===(l=s.height)||void 0===l?void 0:l.split(".")[0])+"' "+(null===g||void 0===g||null===(c=g.patient_health_profile)||void 0===c||null===(d=c.height)||void 0===d?void 0:d.split(".")[1])+"''":"NA"," ","\xa0 |"]})," "]}),"\xa0",(0,Gt.jsxs)(Lo,{to:"".concat(Lc.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(C,"/details"),className:"linkNoClr",children:[(0,Gt.jsx)(Ym,{component:"span",variant:"body2",fontWeight:500,children:b("rpm_Weight")+":"}),"\xa0",(0,Gt.jsxs)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:[null!==g&&void 0!==g&&null!==(u=g.patient_health_profile)&&void 0!==u&&u.weight?(null===g||void 0===g||null===(p=g.patient_health_profile)||void 0===p?void 0:p.weight)+"kg":"NA"," ","\xa0 |"]})," "]}),"\xa0",(0,Gt.jsxs)(Lo,{to:"".concat(Lc.PROGRAM.MAIN,"/").concat(S,"/patients/").concat(C,"/details"),className:"linkNoClr",children:[(0,Gt.jsx)(Ym,{component:"span",variant:"body2",fontWeight:500,children:b("rpm_BMI")+":"}),"\xa0",(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==g&&void 0!==g&&null!==(h=g.patient_health_profile)&&void 0!==h&&h.weight?Os(null===g||void 0===g||null===(m=g.patient_health_profile)||void 0===m?void 0:m.height,null===g||void 0===g||null===(f=g.patient_health_profile)||void 0===f?void 0:f.weight):"NA"})]})]})]}),(0,Gt.jsxs)(df,{item:!0,md:3,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:b("rpm_Courses")}),0===(null===w||void 0===w?void 0:w.activeVitalTab)&&(0,Gt.jsx)(Eu,{children:A?as(A)?(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"NA"}):(0,Gt.jsx)(Dw,{fullWidth:!0,size:"small",id:"course",name:"course",variant:"outlined",value:null===A||void 0===A?void 0:A.id,onChange:e=>{const t=null===v||void 0===v?void 0:v.find(t=>t.id===e.target.value);$o.setPatientDefaultCourse(t),k(t)},sx:{".MuiSelect-select":{p:0,fontSize:"body2.fontSize"},"& fieldset":{border:"none"}},MenuProps:{style:{maxHeight:"250px"}},children:!as(v)&&(null===v||void 0===v?void 0:v.map(e=>{var t;return(0,Gt.jsxs)($m,{value:null===e||void 0===e?void 0:e.id,sx:{justifyContent:"space-between",alignItems:"center"},children:[null===e||void 0===e||null===(t=e.schedule)||void 0===t?void 0:t.name," ",(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:ys(null===e||void 0===e?void 0:e.status),sx:e=>({py:0,px:1,ml:.5,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:b("rpm_".concat(null===e||void 0===e?void 0:e.status))})]},null===e||void 0===e?void 0:e.id)}))}):(0,Gt.jsx)(ZC,{variant:"rounded"})}),1===(null===w||void 0===w?void 0:w.activeVitalTab)&&(0,Gt.jsx)(Eu,{children:M?as(M)?(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"NA"}):(0,Gt.jsx)(Dw,{fullWidth:!0,size:"small",id:"course",name:"course",variant:"outlined",value:null===M||void 0===M?void 0:M.id,onChange:e=>{const t=null===x||void 0===x?void 0:x.find(t=>t.id===e.target.value);$o.setPatientDefaultCourseGlucose(t),O(t)},sx:{".MuiSelect-select":{p:0,fontSize:"body2.fontSize"},"& fieldset":{border:"none"}},MenuProps:{style:{maxHeight:"250px"}},children:!as(x)&&(null===x||void 0===x?void 0:x.map(e=>{var t;return(0,Gt.jsxs)($m,{value:null===e||void 0===e?void 0:e.id,sx:{justifyContent:"space-between",alignItems:"center"},children:[null===e||void 0===e||null===(t=e.schedule)||void 0===t?void 0:t.name,(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:ys(null===e||void 0===e?void 0:e.status),sx:e=>({py:0,px:1,ml:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:b("rpm_".concat(null===e||void 0===e?void 0:e.status))})]},null===e||void 0===e?void 0:e.id)}))}):(0,Gt.jsx)(ZC,{variant:"rounded"})}),null===(null===w||void 0===w?void 0:w.activeVitalTab)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"No course attached"})})]}),(0,Gt.jsxs)(df,{item:!0,md:!0,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:b("rpm_StartDate")}),0===(null===w||void 0===w?void 0:w.activeVitalTab)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==A&&void 0!==A&&A.start_date?sa()(null===A||void 0===A?void 0:A.start_date).format("DD MMM YYYY"):"NA"})}),1===(null===w||void 0===w?void 0:w.activeVitalTab)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==M&&void 0!==M&&M.start_date?sa()(null===M||void 0===M?void 0:M.start_date).format("DD MMM YYYY"):"NA"})}),null===(null===w||void 0===w?void 0:w.activeVitalTab)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"NA"})})]}),(0,Gt.jsxs)(df,{item:!0,md:!0,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:b("rpm_EndDate")}),0===(null===w||void 0===w?void 0:w.activeVitalTab)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==A&&void 0!==A&&A.end_date?sa()(null===A||void 0===A?void 0:A.end_date).format("DD MMM YYYY"):"NA"})}),1===(null===w||void 0===w?void 0:w.activeVitalTab)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:null!==M&&void 0!==M&&M.end_date?sa()(null===M||void 0===M?void 0:M.end_date).format("DD MMM YYYY"):"NA"})}),null===(null===w||void 0===w?void 0:w.activeVitalTab)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{component:"span",variant:"body2",sx:{color:"grey.600"},children:"NA"})})]})]})})})]}):(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:3,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",p:2,bgcolor:"primary.theme.50",borderRadius:1},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex"},children:(0,Gt.jsx)(ZC,{variant:"circular",width:48,height:48})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,pl:1.5},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontWeight:600,children:(0,Gt.jsx)(ZC,{variant:"text",width:100})}),(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:(0,Gt.jsx)(ZC,{variant:"text",width:60})})]})]})}),(0,Gt.jsx)(df,{item:!0,md:!0,children:(0,Gt.jsx)(Eu,{sx:{p:2,bgcolor:"white",borderRadius:1},children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsxs)(df,{item:!0,md:4,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:b("rpm_Vitals")}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{component:"span",variant:"body2",children:(0,Gt.jsx)(ZC,{variant:"text"})})})]}),(0,Gt.jsxs)(df,{item:!0,md:3,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:b("rpm_Courses")}),(0,Gt.jsx)(Ym,{component:"span",variant:"body2",children:(0,Gt.jsx)(ZC,{variant:"text"})})]}),(0,Gt.jsxs)(df,{item:!0,md:!0,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:b("rpm_StartDate")}),(0,Gt.jsx)(Ym,{component:"span",variant:"body2",children:(0,Gt.jsx)(ZC,{variant:"text"})})]}),(0,Gt.jsxs)(df,{item:!0,md:!0,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:b("rpm_EndDate")}),(0,Gt.jsx)(Ym,{component:"span",variant:"body2",children:(0,Gt.jsx)(ZC,{variant:"text"})})]})]})})})]})]})},hxe=(0,Un.Ay)(rC)(()=>({["&.".concat(J_.head)]:{padding:"8px 16px",fontWeight:"600"}})),mxe=We.forwardRef((e,t)=>{var n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T,E,P,D,R,N,L,I,F,$,B;const{t:z}=vg(),H=Nt(),{state:W}=oo(),V=(null===W||void 0===W?void 0:W.doctor)||(null===e||void 0===e?void 0:e.doctor);let U=function(e){const{vital:t,medications_list:n,intervals:r,start_date:i,end_date:o,id:a,created_by:s,created_at:l}=e,c=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ts(r,zc):"",interval:null}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:e.image,start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:Uc,timing:t,frequency:e.frequency,comments:e.comments}});return{vital:t,presId:a,pres_start_date:i,pres_end_date:o,created_by:s,created_at:l,medicationList:c}}(W||(null===e||void 0===e?void 0:e.details));const q=null===e||void 0===e||null===(n=e.details)||void 0===n||null===(r=n.advices)||void 0===r?void 0:r.join(", "),G=null===e||void 0===e||null===(i=e.details)||void 0===i||null===(o=i.tests)||void 0===o?void 0:o.join(", "),{years:Y}=hs(null===(a=e.patientData)||void 0===a?void 0:a.birth_date);return We.useEffect(()=>{if(!as(e.patientData)&&!as(e.program)&&W){H(w_({activeMenuItem:"prescription_report"}))}},[e.patientData,e.program]),(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,wordBreak:"break-all",mx:"auto",flexDirection:"column",height:"100%",display:"flex"},maxWidth:900,border:1,bgcolor:"white",borderColor:"grey.400",ref:t,height:"100%",children:[(0,Gt.jsxs)(Eu,{className:"prescritionPaper",children:[(0,Gt.jsx)(Eu,{sx:{backgroundColor:"#3F51B5"},p:2,pb:0,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,pb:1,children:[(0,Gt.jsx)(df,{item:!0,xs:7,lg:7,children:(0,Gt.jsxs)(Eu,{display:"flex",children:[(null===e||void 0===e||null===(s=e.program)||void 0===s?void 0:s.image)&&(0,Gt.jsx)(Eu,{sx:{lineHeight:1},className:"LogoImage",width:100,height:"100%",children:(0,Gt.jsx)("img",{src:null===e||void 0===e||null===(l=e.program)||void 0===l?void 0:l.image,width:90,height:"100%"})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{pb:.5,sx:{marginLeft:"10px"},children:(0,Gt.jsx)(Ym,{component:"span",fontWeight:"900",sx:{wordBreak:"break-word",fontSize:"28px"},color:"white",children:null!==e&&void 0!==e&&null!==(c=e.program)&&void 0!==c&&c.display_name?null===e||void 0===e||null===(d=e.program)||void 0===d?void 0:d.display_name:""})}),(0,Gt.jsx)(Eu,{pb:.5,sx:{marginLeft:"10px"},children:(0,Gt.jsx)(Ym,{component:"span",fontWeight:"500",sx:{wordBreak:"break-word",fontSize:"16px"},color:"white",children:(null===e||void 0===e||null===(u=e.program)||void 0===u?void 0:u.address)+", "+(null===e||void 0===e||null===(p=e.program)||void 0===p?void 0:p.city)+", "+(null===e||void 0===e||null===(h=e.program)||void 0===h?void 0:h.country)})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:5,lg:5,children:(0,Gt.jsxs)(Eu,{pt:0,textAlign:"right",children:[(0,Gt.jsx)(Eu,{pb:.5,children:(0,Gt.jsxs)(Ym,{component:"h1",fontWeight:"500",sx:{color:"#ffffff",fontSize:"28px"},children:["Dr. ",null===V||void 0===V?void 0:V.first_name," ",null===V||void 0===V?void 0:V.last_name]})}),(0,Gt.jsx)(Eu,{pb:.5,children:(0,Gt.jsx)(Ym,{component:"span",fontWeight:"500",sx:{wordBreak:"break-word"},color:"white",children:null!==V&&void 0!==V&&null!==(m=V.attributes)&&void 0!==m&&m.qualification?null===V||void 0===V||null===(f=V.attributes)||void 0===f?void 0:f.qualification:""})}),(0,Gt.jsx)(Eu,{pb:.5,children:(0,Gt.jsx)(Ym,{component:"span",fontWeight:"500",color:"white",children:null!==V&&void 0!==V&&null!==(g=V.attributes)&&void 0!==g&&g.registration?"Reg No. : ".concat(null===V||void 0===V||null===(v=V.attributes)||void 0===v?void 0:v.registration):""})}),(0,Gt.jsx)(Eu,{pb:.5,children:(0,Gt.jsx)(Ym,{component:"span",fontWeight:"500",color:"white",children:null!==V&&void 0!==V&&null!==(x=V.attributes)&&void 0!==x&&x.mobile?"Mob : ".concat(null===V||void 0===V||null===(y=V.attributes)||void 0===y?void 0:y.mobile):""})})]})})]})}),(0,Gt.jsxs)(Eu,{p:2,pt:0,mt:0,children:[(0,Gt.jsxs)(df,{container:!0,spacing:1,py:1,children:[(0,Gt.jsxs)(df,{item:!0,xs:6,children:[(0,Gt.jsx)(Eu,{display:"flex",children:(0,Gt.jsx)(Ym,{component:"span",fontSize:20,sx:{flex:"1"},fontWeight:"bold",children:(null===e||void 0===e||null===(b=e.patientData)||void 0===b?void 0:b.first_name)+" "+(null===e||void 0===e||null===(j=e.patientData)||void 0===j?void 0:j.last_name)})}),(0,Gt.jsx)(Eu,{display:"flex",children:(0,Gt.jsxs)(Ym,{component:"span",fontSize:16,sx:{flex:"1",fontWeight:"500"},children:[z("rpm_AgeYears",{count:Y})," ",(null===e||void 0===e||null===(w=e.patientData)||void 0===w||null===(_=w.profile)||void 0===_?void 0:_.gender)&&"/"," ",null===e||void 0===e||null===(C=e.patientData)||void 0===C||null===(S=C.profile)||void 0===S?void 0:S.gender]})})]}),(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsx)(Eu,{display:"flex",alignItems:"end",children:(0,Gt.jsx)(Ym,{component:"span",fontSize:20,sx:{flex:"1"},textAlign:"end",fontWeight:"600",children:"".concat(sa()(null===U||void 0===U?void 0:U.created_at).format("DD MMM YYYY"))})})})]}),(0,Gt.jsx)(Af,{sx:{borderColor:"#E2E3E6",borderWidth:"1px",mt:"5px"}}),(0,Gt.jsxs)(df,{container:!0,spacing:2,mt:1,pl:2,pr:2,children:[(null===e||void 0===e?void 0:e.isComplaints)&&(0,Gt.jsx)(df,{sm:6,lg:6,children:(0,Gt.jsxs)(Eu,{pb:.8,children:[(0,Gt.jsx)(Ym,{component:"Subtitle",pr:.5,fontSize:16,fontWeight:"600",children:z("rpm_ChiefComplaints")}),(0,Gt.jsx)(Ym,{component:"h3",fontSize:14,sx:{wordBreak:"break-word"},children:as(null===e||void 0===e||null===(A=e.details)||void 0===A?void 0:A.complaints)?"N/A":null===e||void 0===e||null===(k=e.details)||void 0===k?void 0:k.complaints.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})]})}),(null===e||void 0===e?void 0:e.isDiagnosis)&&(0,Gt.jsx)(df,{sm:6,lg:6,children:(0,Gt.jsxs)(Eu,{pb:.8,children:[(0,Gt.jsx)(Ym,{component:"Subtitle",pr:.5,fontSize:16,fontWeight:"600",children:z("rpm_Diagnosis")}),(0,Gt.jsx)(Ym,{component:"h3",fontSize:14,sx:{wordBreak:"break-word"},children:as(null===e||void 0===e||null===(M=e.details)||void 0===M?void 0:M.diagnosis)?"N/A":null===e||void 0===e||null===(O=e.details)||void 0===O?void 0:O.diagnosis.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})]})})]}),((null===e||void 0===e?void 0:e.isComplaints)||(null===e||void 0===e?void 0:e.isDiagnosis))&&(0,Gt.jsx)(Af,{sx:{borderColor:"#E2E3E6",borderWidth:"1px",mt:"5px"}}),(0,Gt.jsx)(Eu,{pb:.8,mt:1,children:(0,Gt.jsx)(Ym,{component:"Subtitle",pr:.5,fontSize:16,fontWeight:"600",children:z("Rx")})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(PC,{children:(0,Gt.jsxs)(kC,{"aria-label":"simple table",children:[(0,Gt.jsx)(cS,{sx:{backgroundColor:"#efefef"},children:(0,Gt.jsxs)(K_,{children:[(0,Gt.jsx)(hxe,{width:"120px",whiteSpace:"initial",children:(0,Gt.jsx)(Eu,{children:z("rpm_MedicineName")})}),(0,Gt.jsx)(hxe,{children:z("rpm_Dosage")}),(0,Gt.jsx)(hxe,{children:z("rpm_Duration&Time")}),(0,Gt.jsx)(hxe,{children:z("rpm_Comments")})]})}),(0,Gt.jsx)(nS,{children:null===U||void 0===U||null===(T=U.medicationList)||void 0===T?void 0:T.map(e=>{var t;return(0,Gt.jsxs)(K_,{sx:{"td, &:last-child th":{border:0,borderBottom:1,borderColor:"grey.400"},td:{padding:"8px 16px"}},children:[(0,Gt.jsx)(rC,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"25%"},children:(0,Gt.jsxs)(Eu,{whiteSpace:"initial",children:[e.medicine," ",as(null===e||void 0===e?void 0:e.dose)||as(null===e||void 0===e?void 0:e.unit)?"":"- "+e.dose+" "+e.unit]})}),(0,Gt.jsx)(rC,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"20%"},children:(0,Gt.jsx)(Eu,{whiteSpace:"initial",children:null===(t=ud.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text})}),(0,Gt.jsx)(rC,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"25%"},children:(0,Gt.jsxs)(Eu,{whiteSpace:"initial",children:[(0,Gt.jsxs)("div",{children:[null===e||void 0===e?void 0:e.days," days"," ","(".concat(sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM")," - ").concat(sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM"),")")," "]}),e.timing.map((t,n)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)("span",{children:[t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"From":""," ",t.start_time," ",t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"onwards":"",n<e.timing.length-1&&", "]})},n))]})}),(0,Gt.jsx)(rC,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"30%"},children:(0,Gt.jsx)(Eu,{whiteSpace:"initial",children:e.comments||"NA"})})]},e.medicine)})})]})})})}),(null===e||void 0===e?void 0:e.isAdvices)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{mt:2,mb:2,children:[(0,Gt.jsxs)(Ym,{component:"h4",pr:.5,fontSize:16,fontWeight:"600",children:[z("rpm_advice"),":"]}),as(null===e||void 0===e||null===(E=e.details)||void 0===E?void 0:E.advices)?(0,Gt.jsx)(Ym,{variant:"body1",fontSize:14,children:"N/A"}):(0,Gt.jsx)(Ym,{variant:"body1",fontSize:14,children:q})]}),(0,Gt.jsx)(Af,{sx:{borderColor:"#E2E3E6",borderWidth:"1px",mt:"5px"}})]}),(null===e||void 0===e?void 0:e.isTests)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{mt:2,mb:2,children:[(0,Gt.jsx)(Ym,{component:"h4",pr:.5,fontSize:16,fontWeight:"600",children:z("rpm_TestRequired")}),(0,Gt.jsx)(Ym,{component:"p",pr:.5,fontSize:16,mt:.5,children:as(null===e||void 0===e||null===(P=e.details)||void 0===P?void 0:P.tests)?(0,Gt.jsx)(Ym,{variant:"body1",fontSize:14,children:"N/A"}):(0,Gt.jsx)(Ym,{variant:"body1",fontSize:14,children:G})})]}),(0,Gt.jsx)(Af,{sx:{borderColor:"#E2E3E6",borderWidth:"1px",mt:"5px"}})]}),(null===e||void 0===e||null===(D=e.details)||void 0===D||null===(R=D.follow_up)||void 0===R?void 0:R.date)&&(0,Gt.jsxs)(Eu,{mt:2,mb:2,children:[(0,Gt.jsx)(Ym,{component:"h4",pr:.5,fontSize:16,fontWeight:"600",children:z("rpm_followUpDate")}),(0,Gt.jsx)(Ym,{component:"p",pr:.5,fontSize:16,mt:.5,children:sa()(null===e||void 0===e||null===(N=e.details)||void 0===N||null===(L=N.follow_up)||void 0===L?void 0:L.date).format("DD MMM YYYY")})]})]})]}),(0,Gt.jsxs)(Eu,{className:"precescriptionFooter",sx:{mt:"auto"},children:[(0,Gt.jsxs)(Eu,{pt:0,textAlign:"right",pr:2,mb:2,sx:{breakInside:"avoid"},children:[(0,Gt.jsx)(Eu,{pb:.5,children:(0,Gt.jsxs)(Ym,{component:"h1",fontWeight:"500",sx:{color:"#000000",fontSize:"30px"},children:["Dr. ",null===V||void 0===V?void 0:V.first_name," ",null===V||void 0===V?void 0:V.last_name]})}),(0,Gt.jsx)(Eu,{pb:1,children:(0,Gt.jsx)(Ym,{component:"span",fontWeight:"600",sx:{wordBreak:"break-word"},color:"#000000",children:null!==V&&void 0!==V&&null!==(I=V.attributes)&&void 0!==I&&I.qualification?null===V||void 0===V||null===(F=V.attributes)||void 0===F?void 0:F.qualification:""})}),(0,Gt.jsx)(Eu,{pb:.5,children:(0,Gt.jsx)(Ym,{component:"span",fontWeight:"500",color:"#000000",children:null!==V&&void 0!==V&&null!==($=V.attributes)&&void 0!==$&&$.registration?"Reg No. : ".concat(null===V||void 0===V||null===(B=V.attributes)||void 0===B?void 0:B.registration):""})})]}),(0,Gt.jsxs)(Eu,{bgcolor:"#EBEEF2",mt:1,p:2,children:[(0,Gt.jsx)(Ym,{component:"span",justifyContent:"left",display:"flex",fontSize:14,color:"#7E8491",sx:{breakInside:"avoid"},children:"Disclaimer : THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."}),(0,Gt.jsx)(Eu,{mr:3.3,children:(0,Gt.jsxs)(Ym,{component:"span",justifyContent:"center",display:"flex",fontSize:16,p:2,fontWeight:600,children:["Powered by ",(0,Gt.jsx)("img",{src:Kg,width:80,className:"powerdLogo"})]})})]})]})]})})});mxe.displayName="PrintPrescriptionNotes";const fxe=mxe;const gxe=function(){const{t:e}=vg(),t=so();return(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:e("rpm_AddNewNote")}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(Iz,{initialValues:{title:"",vital:"",description:""},onSubmit:e=>console.log(e),enableReinitialize:!0,children:()=>(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(uH,{children:(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,lg:5,xl:4,children:[(0,Gt.jsxs)(Eu,{mb:2.5,children:[(0,Gt.jsx)(qj,{htmlFor:"first_name",required:!0,sx:{mb:.75},children:e("rpm_Title")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"title",name:"title",size:"small",color:"primary",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:e("message:rpm_TitleHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"title",children:t=>(0,Gt.jsx)(iw,{error:!0,children:e(t,{field:e("rpm_Title")})})})]}),(0,Gt.jsxs)(Eu,{mb:2.5,children:[(0,Gt.jsx)(qj,{htmlFor:"vital",sx:{mb:.75},children:e("rpm_Vital")}),(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",margin:"dense",id:"vital",name:"vital",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"22px"},children:(0,Gt.jsx)(Yx,{title:e("message:rpm_VitalHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"BP",sx:{flexDirection:"column",alignItems:"flex-start"},children:e("rpm_bp")}),(0,Gt.jsx)($m,{value:"GLUCOSE",sx:{flexDirection:"column",alignItems:"flex-start"},children:"GLUCOSE"}),(0,Gt.jsx)($m,{value:"SPO2",sx:{flexDirection:"column",alignItems:"flex-start"},children:"SPO2"})]}),(0,Gt.jsx)(Xz,{name:"vital",children:t=>(0,Gt.jsx)(iw,{error:!0,children:e(t,{field:e("rpm_Vital")})})})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(qj,{htmlFor:"description",sx:{mb:.75},children:e("rpm_Description")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"description",name:"description",color:"primary",size:"small",multiline:!0,rows:4,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:e("message:rpm_DescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"description",children:t=>(0,Gt.jsx)(iw,{error:!0,children:e(t,{field:e("rpm_Description")})})})]})]})})}),(0,Gt.jsx)(RH,{sx:{p:2},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:()=>t(-1),children:e("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:e("rpm_Submit")})})]})})]})})},"note_formik")]})})})})};const vxe=function(){return(0,Gt.jsx)(gxe,{})};var xxe=n(67445);function yxe(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v;let{handleInitialValues:x}=e;const{t:y}=vg(),[b,j]=We.useState([]),w=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{as(x)||(()=>{const e=[];null===x||void 0===x||x.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:w(t)}))}),j(e)})()},[x]),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(PC,{sx:{borderRadius:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsxs)(cS,{children:[(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:y("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:y("rpm_Systolic")}),(0,Gt.jsx)(rC,{align:"center",colSpan:3,children:y("rpm_Diastolic")}),(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:y("rpm_BpRange(Sys/Dia)")})]}),(0,Gt.jsx)(K_,{className:"inner_head",sx:{"& .MuiTableCell-head:first-of-type":{display:"none"},"& .MuiTableCell-head":{border:1,borderColor:"#ddd"},bgcolor:"primary.theme.50"},children:[{id:"stages",align:"left"},{id:"from1",label:"From",align:"left"},{id:"to1",label:"To",align:"left"},{id:"from2",label:"From",align:"left"},{id:"to2",label:"To",align:"left"}].map(e=>(0,Gt.jsx)(rC,{align:"center",style:{top:57,minWidth:e.minWidth},colSpan:"1",children:y("rpm_".concat(e.label))},e.id))})]}),(0,Gt.jsxs)(nS,{children:[null===b||void 0===b?void 0:b.map((e,t)=>{var n,r,i,o,a,s,l,c,d,u,p,h,m,f;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:y("rpm_".concat(e.name))}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===t&&b[t].data[0].value,!(0===t||t===b.length-1)&&e.data[0].value,t===b.length-1&&"-"]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===t?"-":!(t===b.length-1)&&(null===(n=b[t-1])||void 0===n||null===(r=n.data[0])||void 0===r?void 0:r.value)-1,t===b.length-1&&(null===e||void 0===e||null===(i=e.data[0])||void 0===i?void 0:i.value)]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===t&&b[t].data[1].value,!(0===t||t===b.length-1||3===t)&&e.data[1].value,(t===b.length-1||3===t)&&"-"]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[0===t?"-":!(t===b.length-1)&&(null===(o=b[t-1])||void 0===o||null===(a=o.data[1])||void 0===a?void 0:a.value)-1,t===b.length-1&&(null===e||void 0===e||null===(s=e.data[1])||void 0===s?void 0:s.value)]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[0===t&&"".concat(b[t].data[0].value," & Above"),!(0===t||t===b.length-1)&&"".concat(null===(l=b[t])||void 0===l||null===(c=l.data[0])||void 0===c?void 0:c.value,"\n                        -\n                        ").concat((null===(d=b[t-1])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value)-1),t===b.length-1&&"Below or ".concat(e.data[0].value)," / ",0===t&&"".concat(b[t].data[1].value," & Above"),!(0===t||t===b.length-1||3===t)&&"".concat(null===(p=b[t])||void 0===p||null===(h=p.data[1])||void 0===h?void 0:h.value,"\n                        -\n                        ").concat((null===(m=b[t-1])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value)-1),(t===b.length-1||3===t)&&"Below or ".concat(e.data[1].value)]})]},e.salience)}),!as(b)&&(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normal",children:y("rpm_NormalPressure")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(t=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===t||null===(n=t.data[0])||void 0===n?void 0:n.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(r=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===r||null===(o=r.data[0])||void 0===o?void 0:o.value)-1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(a=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===a||null===(s=a.data[1])||void 0===s?void 0:s.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(l=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===l||null===(c=l.data[1])||void 0===c?void 0:c.value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===(d=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value)+1," "," - ",(null===(p=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===p||null===(h=p.data[0])||void 0===h?void 0:h.value)-1," "," / ",(null===(m=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value)+1," "," - ",(null===(g=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===g||null===(v=g.data[1])||void 0===v?void 0:v.value)-1]})]})]})]})})})}const bxe=(0,We.memo)(yxe);var jxe=n(17555),wxe=n(54469);const _xe=Au({defaultClassName:(0,ar.A)("MuiBox",["root"]).root,generateClassName:ku.A.generate});const Cxe=function(e){let{tags:t,diastolic:n,setDiastolic:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),[d,u]=We.useState(["CheckLowBP"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onSystolicSliderSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"20%"},onClick:p,"data-id":t.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:t.name}),(0,Gt.jsx)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s||2===s?"Below or ".concat(n):5===s?" ".concat(n," & Above"):6===s?n:" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(_xe,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onSystolicSliderSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mt:.5,mb:3},children:c("rpm_DiastolicRange")})]})};const Sxe=function(e){let{tags:t,fastingRange:n,setFastingRange:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),[d,u]=We.useState(["Hypoglycemia"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onFastingRangeSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"25%"},onClick:p,"data-id":t.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:t.name}),(0,Gt.jsx)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(n):3===s?" ".concat(n," & Above"):" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mb:.5},children:c("rpm_fasting")}),(0,Gt.jsx)(_xe,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,onFastingRangeSelect:e=>m(e,r),tag:e,previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))})]})};const Axe=function(e){let{tags:t,ppRange:n,setPPRange:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),[d,u]=We.useState(["Hypoglycemia"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onPPRangeSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"25%"},onClick:p,"data-id":t.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:t.name}),(0,Gt.jsx)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(n):3===s?" ".concat(n," & Above"):" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(_xe,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,onPPRangeSelect:e=>m(e,r),tag:e,previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mt:.5,mb:3},children:c("rpm_nonfasting")})]})};const kxe=function(e){let{styles:t,fastingRange:n,setFastingRange:r,getPercentage:i,limitNumberWithinRange:o,nearestN:a,ppRange:s,setPPRange:l,glucoseTags:c,setGlucoseTags:d}=e;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Sxe,{tags:c,setTags:d,fastingRange:n,setFastingRange:r,getPercentage:i,limitNumberWithinRange:o,nearestN:a,styles:t}),(0,Gt.jsx)(Eu,{my:.5}),(0,Gt.jsx)(Axe,{tags:c,setTags:d,ppRange:s,setPPRange:l,getPercentage:i,limitNumberWithinRange:o,nearestN:a,styles:t})]})};const Mxe=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m;let{handleInitialValues:f}=e;const{t:g}=vg(),[v,x]=We.useState(null),y=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{(()=>{const e=[];null===f||void 0===f||f.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:y(t)}))}),x(e)})()},[f]),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(PC,{sx:{borderRadius:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsx)(cS,{children:(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:g("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:g("rpm_Activity")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:g("rpm_From")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:g("rpm_To")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:g("rpm_Range")})]})}),(0,Gt.jsxs)(nS,{children:[(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:g("rpm_normalfasting")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor fasting",children:(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,Gt.jsx)("strong",{children:g("rpm_fasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(t=v[2])||void 0===t||null===(n=t.data[0])||void 0===n?void 0:n.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(r=v[1])||void 0===r||null===(o=r.data[0])||void 0===o?void 0:o.value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===v||void 0===v||null===(a=v[2])||void 0===a||null===(s=a.data[0])||void 0===s?void 0:s.value)+1," "," - ",(null===v||void 0===v||null===(l=v[1])||void 0===l||null===(c=l.data[0])||void 0===c?void 0:c.value)-1]})]}),(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",borderBottom:2,borderBottomColor:"#bbb",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:g("rpm_normalpp")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor nonfasting",children:(0,Gt.jsx)(XO,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,Gt.jsx)("strong",{children:g("rpm_nonfasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(d=v[5])||void 0===d?void 0:d.data[0].value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(u=v[4])||void 0===u?void 0:u.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===v||void 0===v||null===(p=v[5])||void 0===p?void 0:p.data[0].value)+1," "," - ",(null===v||void 0===v||null===(h=v[4])||void 0===h?void 0:h.data[0].value)-1]})]})]}),null===v||void 0===v||null===(m=v.slice(0,6))||void 0===m?void 0:m.map((e,t)=>{var n,r,i,o;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:g("rpm_".concat(e.name.toLowerCase()))}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat("eq"==e.data[(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.length)-1].op?"fasting":"nonfasting"),children:"eq"===e.data[(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1].op?(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,Gt.jsx)("strong",{children:g("rpm_fasting")})}):(0,Gt.jsx)(XO,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,Gt.jsx)("strong",{children:g("rpm_nonfasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"-":e.data[0].value}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:0===t||3===t?"-":e.data[(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.length)-2].value}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:["HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"Below":e.data[0].value," ","-"," ","DiabetesFasting"==e.name||"DiabetesPP"==e.name?"Above":e.data[(null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.length)-2].value]})]},e.salience)})]})]})})})};const Oxe=function(e){let{tags:t,pulse:n,setPulse:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),[d,u]=We.useState(["LowPulse"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onPulseSliderSelect:r,noSliderButton:o,rangeIndex:a,previousWidth:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"33%"},onClick:p,"data-id":t.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:t.name}),(0,Gt.jsx)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===a?"Below or ".concat(n):1===a?" ".concat(s+1," - ").concat(n):" ".concat(n," & Above")}),!o&&d.includes(t.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mb:1.5},children:c("rpm_PulseRange")}),(0,Gt.jsx)(_xe,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onPulseSliderSelect:e=>m(e,r),rangeIndex:r,nextWidth:n[r+1],previousWidth:n[r-1]},r)},r))})]})};const Txe=function(e){let{handleInitialValues:t,pulse:n}=e;const{t:r}=vg(),[o,a]=We.useState([]),s=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{as(t)||(()=>{const e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:s(t)}))}),a(e)})()},[t]),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(PC,{sx:{borderRadius:2,mt:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsx)(cS,{children:(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",children:r("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",children:r("rpm_From")}),(0,Gt.jsx)(rC,{align:"center",children:r("rpm_To")}),(0,Gt.jsx)(rC,{align:"center",children:r("rpm_Range")})]})}),(0,Gt.jsxs)(nS,{children:[null===o||void 0===o?void 0:o.map((e,t)=>(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,Gt.jsx)(rC,{align:"center",className:"tableColor ".concat(e.name),children:r("rpm_".concat(e.name))}),(0,Gt.jsxs)(rC,{align:"center",children:[0===t&&o[t].data[0].value,!(0===t||t===o.length-1)&&o[t+1].data[0].value+1,t==o.length-1&&"-"]}),(0,Gt.jsx)(rC,{align:"center",children:0===t?"-":e.data[0].value}),(0,Gt.jsxs)(rC,{align:"center",children:[0===t&&"".concat(o[t].data[0].value," & Above"),!(0===t||t===o.length-1)&&o[t+1].data[0].value+1+"-"+o[t].data[0].value,t==o.length-1&&"Below or ".concat(e.data[0].value)]})]},e.salience)),!as(o)&&(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",className:"tableColor normal",children:r("rpm_NormalPulse")}),(0,Gt.jsx)(rC,{align:"center",children:n[0]+1}),(0,Gt.jsx)(rC,{align:"center",children:n[1]}),(0,Gt.jsxs)(rC,{align:"center",children:[n[0]+1," - ",n[1]]})]})]})]})})})};const Exe=function(e){var t;let{openModal:n,onCloseModal:r}=e;const{t:i}=vg();return(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"sm",open:n.open,onClose:r,scroll:"paper",children:[(0,Gt.jsx)(n_,{children:i("rpm_ErrorInSlider")}),(0,Gt.jsxs)(s_,{children:[(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{p:2,borderRadius:1,border:"1px dashed #818181"},children:(0,Gt.jsxs)(Eu,{mb:3,children:[(0,Gt.jsx)(Ym,{variant:"body1",children:"Invalid range detected. Kindly review range selected for:"}),null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsxs)(iw,{error:!0,children:["\u2022 ","".concat(e.name," -> ").concat(i("rpm_".concat(e.rule)))]},t))]})})})}),(0,Gt.jsx)(Eu,{mt:2.5,children:(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"error",disableElevation:!0,onClick:r,children:i("rpm_Cancel")})})})})]})]})};const Pxe=function(e){let{tags:t,systolic:n,setSystolic:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),d=(0,We.useRef)(null),[u,p]=We.useState(["CheckLowBP"]),h=e=>{const t=e.currentTarget.attributes["data-id"].value;u.includes(t)?p(u.filter(e=>e!==t)):p(()=>[t])},m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=d.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const u=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",u),window.addEventListener("pointerup",u)},f=e=>{let{width:t,onSystolicSliderSelect:n,noSliderButton:r,tag:o,previousWidth:a,rangeIndex:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:o.color,width:r?"30px":"20%"},onClick:h,"data-id":o.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:o.name}),(0,Gt.jsx)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(t):5===s?" ".concat(t," & Above"):6===s?t:" ".concat(a+1," - ").concat(t)}),!r&&u.includes(o.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:n,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!r&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mb:.5},children:c("rpm_SystolicRange")}),(0,Gt.jsx)(_xe,{ref:d,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],previousWidth:n[r-1],nextWidth:n[r+1],noSliderButton:r===t.length-1,onSystolicSliderSelect:e=>m(e,r),tag:e,rangeIndex:r},r)},r))})]})};const Dxe=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y;let{addNewRule:b,addNewRuleGlucose:j,patientData:w,program:_,addNewPulseRule:C}=e;const S=Ct(Id),A=[{id:"CheckLowBP",name:"Low Blood Pressure",color:null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.amber[400]},{id:"NormalBP",name:"Normal Blood Pressure",color:null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.green[400]},{id:"ElevatedBloodPressure",name:"Elevated Blood Pressure",color:null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.orange[300]},{id:"Hypertension_Stage1",name:"Hypertension Stage 1",color:null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[600]},{id:"Hypertensive_Stage2",name:"Hypertensive Stage 2",color:null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[400]},{id:"Hypertensive_Crisis",name:"Hypertensive Crisis",color:null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.red[600]},{id:"extra_space",name:"More Space",color:"white"}],k=[{id:"Bradycardia",name:"Bradycardia",color:null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.amber[400]},{id:"NormalPulse",name:"Normal pulse",color:null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.green[400]},{id:"Tachycardia",name:"Tachycardia",color:null===Lde||void 0===Lde||null===(d=Lde.palette)||void 0===d?void 0:d.red[400]},{id:"extra_space",name:"More Space",color:"white"}],M=[{id:"Hypoglycemia",name:"Hypoglycemia(Low)",color:null===Lde||void 0===Lde||null===(u=Lde.palette)||void 0===u?void 0:u.red[200]},{id:"Normal",name:"Normal",color:null===Lde||void 0===Lde||null===(p=Lde.palette)||void 0===p?void 0:p.green[300]},{id:"Pre-diabetes",name:"Pre-diabetes",color:null===Lde||void 0===Lde||null===(h=Lde.palette)||void 0===h?void 0:h.orange[300]},{id:"Diabetes",name:"Diabetes",color:null===Lde||void 0===Lde||null===(m=Lde.palette)||void 0===m?void 0:m.red[300]},{id:"extra_space",name:"More Space",color:"white"}],O=[{id:"Hypertensive_Crisis",name:"Hypertensive Crisis",color:null===Lde||void 0===Lde||null===(f=Lde.palette)||void 0===f?void 0:f.red[600],sys_range:[180,280],dia_range:[120,200]},{id:"Hypertensive_Stage2",name:"Hypertensive Stage 2",color:null===Lde||void 0===Lde||null===(g=Lde.palette)||void 0===g?void 0:g.red[400],sys_range:[140,179],dia_range:[90,119]},{id:"Hypertension_Stage1",name:"Hypertension Stage 1",color:null===Lde||void 0===Lde||null===(v=Lde.palette)||void 0===v?void 0:v.orange[600],sys_range:[130,139],dia_range:[80,89]},{id:"ElevatedBloodPressure",name:"Elevated Blood Pressure",color:null===Lde||void 0===Lde||null===(x=Lde.palette)||void 0===x?void 0:x.orange[300],sys_range:[120,129],dia_range:[0,79]},{id:"CheckLowBP",name:"Low Blood Pressure",color:null===Lde||void 0===Lde||null===(y=Lde.palette)||void 0===y?void 0:y.amber[400],sys_range:[0,90],dia_range:[0,60]}],{t:T}=vg(),E=Nt(),[P,D]=(so(),(0,We.useState)([90,119,129,139,179,180,500])),[R,N]=(0,We.useState)([60,78,79,89,119,120,500]),[L,I]=(0,We.useState)([60,129,130,500]),[F,$]=(0,We.useState)(A),[B,z]=(0,We.useState)(k),[H,W]=(0,We.useState)([]),[V,U]=(0,We.useState)([]),[q,G]=(0,We.useState)([70,99,125,126,500]),[Y,Z]=(0,We.useState)([95,140,199,200,500]),[K,X]=(0,We.useState)(M),[Q,J]=(0,We.useState)([]),[ee,te]=(0,We.useState)(""),[ne,re]=(0,We.useState)(""),[ie,oe]=We.useState(O),[ae,se]=We.useState([]),[le,ce]=We.useState([]),[de,ue]=We.useState({open:!1,data:[]}),pe=e=>{ue((0,i.A)((0,i.A)({},de),{},{open:!de.open,data:e}))},he=(e,t)=>t/e*100,me=(e,t,n)=>Math.min(Math.max(e,t),n),fe=(e,t)=>Math.ceil(t/e)*e,ge={data_type:"bp",processing_mode:"REALTIME",data_batch_size:"",short_description:"",rule:[{name:"Hypertensive_Crisis",desc:"Hypertensive_CrisisDesc",salience:6,when:{or:[{gte:["Util.ToInt(Data.systolic)",P[5]]},{gte:["Util.ToInt(Data.diastolic)",R[5]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertensive_Crisis"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertensive_Crisis"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"Hypertensive_Stage2Desc",salience:5,when:{or:[{gte:["Util.ToInt(Data.systolic)",P[3]+1]},{gte:["Util.ToInt(Data.diastolic)",R[3]+1]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertensive_Stage2"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertensive_Stage2"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"Hypertension_Stage1Desc",salience:4,when:{or:[{gte:["Util.ToInt(Data.systolic)",P[2]+1]},{gte:["Util.ToInt(Data.diastolic)",R[2]+1]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertension_Stage1"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertension_Stage1"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"ElevatedBloodPressureDesc",salience:3,when:{and:[{gte:["Util.ToInt(Data.systolic)",P[1]+1]},{lte:["Util.ToInt(Data.diastolic)",R[2]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"ElevatedBloodPressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"ElevatedBloodPressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"CheckLowBPDesc",salience:2,when:{or:[{lte:["Util.ToInt(Data.systolic)",P[0]]},{lte:["Util.ToInt(Data.diastolic)",R[0]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"CheckLowBP"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"CheckLowBP"}]},{call:["Complete"]}]}]},ve={data_type:"pulse",processing_mode:"",data_batch_size:"",short_description:"",rule:[{name:"Tachycardia",desc:"TachycardiaDesc",salience:2,when:{gte:["Util.ToInt(Data.pulse)",L[2]]},then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{obj:"Data.pulse"},{const:"tachycardia"}]},{call:["Complete"]}]},{name:"Bradycardia",desc:"BradycardiaDesc",salience:1,when:{lte:["Util.ToInt(Data.pulse)",L[0]]},then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{obj:"Data.pulse"},{const:"bradycardia"}]},{call:["Complete"]}]}]},xe={data_type:"glucose",processing_mode:"REALTIME",data_batch_size:"",short_description:"",rule:[{name:"DiabetesFasting",desc:"DiabetesFastingDesc",salience:8,when:{and:[{gte:["Util.ToInt(Data.glucose)",q[3]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"diabetes"}]},{call:["Complete"]}]},{name:"PrediabetesFasting",desc:"PrediabetesFastingDesc",salience:7,when:{and:[{gte:["Util.ToInt(Data.glucose)",q[1]+1]},{lte:["Util.ToInt(Data.glucose)",q[2]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"prediabetes"}]},{call:["Complete"]}]},{name:"HypoglycemiaFasting",desc:"HypoglycemiaFastingDesc",salience:6,when:{and:[{lte:["Util.ToInt(Data.glucose)",q[0]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"hypoglycemia"}]},{call:["Complete"]}]},{name:"DiabetesPP",desc:"DiabetesDescPP",salience:5,when:{and:[{gte:["Util.ToInt(Data.glucose)",Y[3]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"diabetes"}]},{call:["Complete"]}]},{name:"PrediabetesPP",desc:"PrediabetesDescPP",salience:4,when:{and:[{gte:["Util.ToInt(Data.glucose)",Y[1]+1]},{lte:["Util.ToInt(Data.glucose)",Y[2]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"prediabetes"}]},{call:["Complete"]}]},{name:"HypoglycemiaPP",desc:"HypoglycemiaDescPP",salience:3,when:{and:[{lte:["Util.ToInt(Data.glucose)",Y[0]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"hypoglycemia"}]},{call:["Complete"]}]},{name:"NormalFasting",desc:"NormalFastingDesc",salience:2,when:{and:[{gte:["Util.ToInt(Data.glucose)",q[0]+1]},{lte:["Util.ToInt(Data.glucose)",q[2]-1]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Complete"]}]},{name:"NormalPP",desc:"NormalPPDesc",salience:1,when:{and:[{gte:["Util.ToInt(Data.glucose)",Y[0]+1]},{lte:["Util.ToInt(Data.glucose)",Y[2]-1]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Complete"]}]}]},ye={tag:{height:55,paddingLeft:20,paddingRight:20,textAlign:"center",position:"relative",borderRightWidth:".1em",borderRightStyle:"solid",borderRightColor:"white",boxSizing:"border-box",borderLeftWidth:".1em",borderLeftStyle:"solid",borderLeftColor:"white",cursor:"pointer",borderRadius:"0",display:"flex",alignItems:"center",justifyContent:"center"},tagText:{fontSize:"0.675rem",color:"white",fontWeight:700,userSelect:"none",display:"block",overflow:"hidden"},sliderButton:{width:"2em",height:"2em",backgroundColor:"white",position:"absolute",borderRadius:"2em",right:"calc(-1.1em)",top:0,display:"flex",justifyContent:"center",alignItems:"center",bottom:0,margin:"auto",zIndex:10,cursor:"ew-resize",userSelect:"none"}},be=[{name:T("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===_||void 0===_?void 0:_.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===_||void 0===_?void 0:_.code,"/patients")},{name:"".concat((null===w||void 0===w?void 0:w.first_name)||""," ").concat((null===w||void 0===w?void 0:w.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===_||void 0===_?void 0:_.code,"/patients/").concat(null===w||void 0===w?void 0:w.id,"/dashboard")},{name:T("rpm_patientRules"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===_||void 0===_?void 0:_.code,"/patients/").concat(null===w||void 0===w?void 0:w.id,"/rules")},{name:T("rpm_AddRule"),url:""}],je=()=>"bp"===ee?ge:"glucose"===ee?xe:ge;return We.useEffect(()=>{je()},[ee]),We.useEffect(()=>{"bp"===ee&&(W(ge.rule),U(ve.rule))},[ee,P,R,L]),We.useEffect(()=>{(()=>{let e=null===A||void 0===A?void 0:A.map(e=>e.id),t=null===k||void 0===k?void 0:k.map(e=>e.id),n=null===M||void 0===M?void 0:M.map(e=>e.id),r=[],i=[];P.forEach((t,n)=>{t+1>P[n+1]&&r.push({name:"Systolic",rule:e[n+1],value:[t+1,P[n+1]]})}),R.forEach((t,n)=>{t+1>R[n+1]&&r.push({name:"Diastolic",rule:e[n+1],value:[t+1,R[n+1]]})}),L.forEach((e,n)=>{e+1>L[n+1]&&r.push({name:"Pulse",rule:t[n+1],value:[e+1,L[n+1]]})}),q.forEach((e,t)=>{e+1>q[t+1]&&i.push({name:"Fasting",rule:n[t+1],value:[e+1,q[t+1]]})}),Y.forEach((e,t)=>{e+1>Y[t+1]&&i.push({name:"Non Fasting",rule:n[t+1],value:[e+1,Y[t+1]]})}),se(r),ce(i)})()},[P,R,L,q,Y]),We.useEffect(()=>{"glucose"===ee&&J(xe.rule)},[ee,q,Y]),We.useEffect(()=>{te("bp");const e={activeMenuItem:"rules",breadcrumb:be};as(_)||as(w)||E(w_(e))},[_,w]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(Iz,{initialValues:je(),validationSchema:vV.addRule,onSubmit:async e=>{const t="".concat(e.short_description,"/").concat(sa()().valueOf()),n=[{name:"Hypertensive_Crisis",desc:"Hypertensive_CrisisDesc",salience:6,when:bs({or:[{gte:["Util.ToInt(Data[0].values.systolic)",P[5]]},{gte:["Util.ToInt(Data[0].values.diastolic)",R[5]]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"Hypertensive_Crisis"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"Hypertensive_Crisis"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"Hypertensive_Stage2Desc",salience:5,when:bs({or:[{gte:["Util.ToInt(Data[0].values.systolic)",P[3]+1]},{gte:["Util.ToInt(Data[0].values.diastolic)",R[3]+1]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"Hypertensive_Stage2"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"Hypertensive_Stage2"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"Hypertension_Stage1Desc",salience:4,when:bs({or:[{gte:["Util.ToInt(Data[0].values.systolic)",P[2]+1]},{gte:["Util.ToInt(Data[0].values.diastolic)",R[2]+1]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"Hypertension_Stage1"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"Hypertension_Stage1"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"ElevatedBloodPressureDesc",salience:3,when:bs({and:[{gte:["Util.ToInt(Data[0].values.systolic)",P[1]+1]},{lte:["Util.ToInt(Data[0].values.diastolic)",R[2]]}]},"and","and",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"ElevatedBloodPressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"ElevatedBloodPressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"CheckLowBPDesc",salience:2,when:bs({or:[{lte:["Util.ToInt(Data[0].values.systolic)",P[0]]},{lte:["Util.ToInt(Data[0].values.diastolic)",R[0]]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"CheckLowBP"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"CheckLowBP"}]},{call:["Complete"]}]}],r=[{name:"Tachycardia",desc:"TachycardiaDesc",salience:2,when:Cs({gte:["Util.ToInt(Data[0].values.pulse)",L[2]]},"or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{plus:js("pulse",e.data_batch_size)},{const:"tachycardia"}]},{call:["Complete"]}]},{name:"Bradycardia",desc:"BradycardiaDesc",salience:1,when:Cs({lte:["Util.ToInt(Data[0].values.pulse)",L[0]]},"or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{plus:js("pulse",e.data_batch_size)},{const:"bradycardia"}]},{call:["Complete"]}]}];"bp"===e.data_type&&(as(ae)?(await b((0,i.A)((0,i.A)({},e),{},{short_description:t,rule:"BATCH"!==e.processing_mode?H:n})),await C((0,i.A)((0,i.A)({},e),{},{short_description:t,rule:"BATCH"!==e.processing_mode?V:r}))):pe(ae)),"glucose"===e.data_type&&(as(le)?j((0,i.A)((0,i.A)({},e),{},{rule:Q})):pe(le))},enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},position:"relative",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsxs)(df,{item:!0,xs:!0,children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:T("rpm_AddNewRule")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-32px",bottom:"0",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:T("rpm_AddNewRule")})})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(CT,{loading:S,variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:T("rpm_Save")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{placement:"top",title:"Reset","aria-label":"Reset",children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>{D([90,119,129,139,179,180,500]),N([60,78,79,89,119,120,500]),G([70,99,125,126,500]),Z([95,140,199,200,500]),I([60,129,130,500]),$(A),z(k)},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,Gt.jsx)(xxe.A,{fontSize:"small"})})})})]})}),(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:1,children:[(0,Gt.jsx)(qj,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:T("rpm_VitalType")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Dw,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,input:(0,Gt.jsx)(Rj,{}),onChange:e=>te(e.target.value),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:T("message:rpm_VitalTypeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===cd||void 0===cd?void 0:cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:T("rpm_".concat(e.name))},e.name))}),(0,Gt.jsx)(Xz,{name:"data_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:T(e,{field:T("rpm_VitalType")})})})]})}),"glucose"!==t.data_type&&(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:1,children:[(0,Gt.jsx)(qj,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:T("rpm_ProcessingMode")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,input:(0,Gt.jsx)(Rj,{}),onChange:e=>re(e.target.value),renderValue:e=>e||"Select",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:T("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"BATCH",disabled:!0,children:"BATCH"}),(0,Gt.jsx)($m,{value:"REALTIME",children:"REALTIME"})]}),(0,Gt.jsx)(Xz,{name:"processing_mode",children:e=>(0,Gt.jsx)(iw,{error:!0,children:T(e,{field:T("rpm_ProcessingMode")})})})]})}),"BATCH"===t.processing_mode&&(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:1,className:"hide_num_arrow",children:[(0,Gt.jsx)(qj,{htmlFor:"data_batch_size",sx:{mb:.75},required:!0,children:T("rpm_BatchDataSize")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"data_batch_size",name:"data_batch_size",size:"small",type:"number",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:T("message:rpm_BatchDataSizeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"data_batch_size",children:e=>(0,Gt.jsx)(iw,{error:!0,children:T(e,{field:T("rpm_BatchDataSize")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:1,children:[(0,Gt.jsx)(qj,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:T("rpm_ShortDescription")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"short_description",name:"short_description",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:T("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"short_description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:T(e,{field:T("rpm_ShortDescription")})})})]})})]}),"bp"===t.data_type&&(0,Gt.jsxs)(df,{container:!0,spacing:.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Pxe,{tags:F,setTags:$,systolic:P,setSystolic:D,getPercentage:he,limitNumberWithinRange:me,nearestN:fe,styles:ye})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Cxe,{tags:F,setTags:$,diastolic:R,setDiastolic:N,getPercentage:he,limitNumberWithinRange:me,nearestN:fe,styles:ye})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(bxe,{handleInitialValues:H,systolic:P,diastolic:R})}),!1]}),"glucose"===t.data_type&&(0,Gt.jsxs)(df,{container:!0,spacing:.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(kxe,{styles:ye,fastingRange:q,setFastingRange:G,ppRange:Y,setPPRange:Z,addNewRuleGlucose:j,getPercentage:he,limitNumberWithinRange:me,nearestN:fe,glucoseTags:K,setGlucoseTags:X})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Mxe,{handleInitialValues:Q})})]})]})}),"bp"===t.data_type&&(0,Gt.jsx)(aH,{variant:"outlined",sx:{mt:2.5},children:(0,Gt.jsx)(uH,{sx:{p:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:7,children:(0,Gt.jsx)(Oxe,{tags:B,setTags:z,pulse:L,setPulse:I,getPercentage:he,limitNumberWithinRange:me,nearestN:fe,styles:ye})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:5,children:(0,Gt.jsx)(Txe,{handleInitialValues:V,pulse:L})})]})})})]})})}},"editor_formik")}),(0,Gt.jsx)(Exe,{openModal:de,onCloseModal:()=>pe([])})]})};function Rxe(e){let{addNewRule:t,addNewRuleGlucose:n,patientData:r,program:i,addNewPulseRule:o}=e;return(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(Dxe,{addNewRule:t,addNewRuleGlucose:n,patientData:r,program:i,addNewPulseRule:o})})}Rxe.defaultProps={addNewRule:()=>{},addNewRuleGlucose:()=>{},addNewPulseRule:()=>{}};const Nxe=Rxe;const Lxe=function(e){let{patientData:t,program:n}=e;const r=Nt(),{t:o}=vg(),a=so(),{enqueueSnackbar:s}=hi(),{patientId:l}=lo();return(0,Gt.jsx)(Nxe,{addNewRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,c=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(Js(null===n||void 0===n?void 0:n.code,l,c)),s(o("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),a(-1)}catch(d){const e=ls(d,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_err_rule_already_exist"),severity:$c}))}},addNewRuleGlucose:async e=>{const t=null===e||void 0===e?void 0:e.rule,c=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(Js(null===n||void 0===n?void 0:n.code,l,c)),s(o("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),a(-1)}catch(d){const e=ls(d,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_err_rule_already_exist"),severity:$c}))}},patientData:t,program:n,addNewPulseRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,a=(0,i.A)((0,i.A)({},e),{},{data_type:"bp.pulse",execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(Js(null===n||void 0===n?void 0:n.code,l,a)),s(o("message:rpm_RuleCreatedSuccessfully"),{variant:"success"})}catch(c){const e=ls(c,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_err_rule_already_exist"),severity:$c}))}}})};function Ixe(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Fxe(e){let{patientBpReport:t,getAlertClassName:n,vitalCheck:r,nodata:i}=e;const[o,a]=We.useState([]),[s,l]=We.useState(null);We.useEffect(()=>{if(t)if(as(t))a([]);else if(null!==r&&void 0!==r&&r.bp)if(null!==r&&void 0!==r&&r.glucose)a((null===t||void 0===t?void 0:t.length)>0?d(t):[]);else{const e=null===t||void 0===t?void 0:t.filter(e=>"glucose"!==(null===e||void 0===e?void 0:e.name));a((null===e||void 0===e?void 0:e.length)>0?d(e):[])}else{const e=null===t||void 0===t?void 0:t.filter(e=>"bp"!==(null===e||void 0===e?void 0:e.name));a((null===e||void 0===e?void 0:e.length)>0?d(e):[])}},[r.bp,r.glucose,null===t||void 0===t?void 0:t.length]);const{t:c}=vg(),d=e=>{if(e.length>0){var t;const n={};return e.forEach(e=>{const{ts:t,name:r,values:i,alerts:o}=e,a=sa()(t,"DD MMM YYYY hh:mm A"),s=a.format("DD MMM YYYY hh:mm A"),l=a.format("DD MMM");n[s]||(n[s]={name:l,date:s,alerts:[]}),"glucose"===r?"fasting"===i.activityType?(n[t].Fasting=i.glucose,n[t].Systolic=null,n[t].Diastolic=null,n[t].Pulse=null):(n[t].NonFasting=i.glucose,n[t].Systolic=null,n[t].Diastolic=null,n[t].Pulse=null):"bp"===r&&(n[t].Systolic=i.systolic,n[t].Diastolic=i.diastolic,n[t].Pulse=i.pulse),o&&(n[t].alerts=n[t].alerts.concat(o))}),null===(t=Object.values(n))||void 0===t?void 0:t.reverse()}return null===e||void 0===e?void 0:e.reverse()},u=e=>{var t;let r=null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.green[300];var i,o,a,s,l;"CheckLowBP"===n(e)&&(r=null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[300]);"ElevatedBloodPressure"===n(e)&&(r=null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[600]);"Hypertension_Stage1"===n(e)&&(r=null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[300]);"Hypertensive_Stage2"===n(e)&&(r=null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.red[500]);"Hypertensive_Crisis"===n(e)&&(r=null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.red[700]);return r},p=e=>{if(s){var t;let u=null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.grey[100];if("Pulse"===s){var r;u=null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.grey[100]}else{var i,o,a,l,c,d;if(n(e)===s&&"CheckLowBP"===s)u=null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[300];if(n(e)===s&&"ElevatedBloodPressure"===s)u=null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[600];if(n(e)===s&&"Hypertension_Stage1"===s)u=null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[300];if(n(e)===s&&"Hypertensive_Stage2"===s)u=null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.red[500];if(n(e)===s&&"Hypertensive_Crisis"===s)u=null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.red[700];if(!n(e)&&"Normal"===s)u=null===Lde||void 0===Lde||null===(d=Lde.palette)||void 0===d?void 0:d.green[300]}return u}return u(e)},h=(e,t)=>{var n;let r=null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.green[300],i=Ms(e);var o,a,l;return!t&&s&&"Pulse"!==s?null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.grey[300]:"tachycardia"===i?null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[300]:"bradycardia"===i?null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.orange[300]:r},m=e=>{var t;let n=null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.green[300];var r,i,o;"hypoglycemia"===As(e)&&(n=null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.red[200]);"prediabetes"===As(e)&&(n=null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[300]);"diabetes"===As(e)&&(n=null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.red[300]);return n},f=e=>{var t;const{cx:n,cy:r,fill:i,payload:o}=e,a=null===o||void 0===o||null===(t=o.alerts)||void 0===t?void 0:t.findIndex(e=>"pulse"===(null===e||void 0===e?void 0:e.data_name));return null!==o&&void 0!==o&&o.pulse||-1!==a||null!==o&&void 0!==o&&o.Systolic||null!==o&&void 0!==o&&o.Diastolic?(null===o||void 0===o||null===(s=o.alerts)||void 0===s?void 0:s.length)>0?(0,Gt.jsx)("svg",{x:n-6,y:r-6,width:12,height:12,fill:h(o),viewBox:"0 0 24 24",children:(0,Gt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"})}):void 0:null;var s},g=e=>{let{active:t,payload:i}=e;if(t&&i&&i.length){var o,a,s,l,d;const e=i[0].payload,t=n(e),p=Ms(e),f=As(e);return(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#fff",border:"1px solid #ccc",p:1.5,width:250},children:[(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===e||void 0===e?void 0:e.date)}),(null===e||void 0===e?void 0:e.Fasting)&&(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Fasting: ".concat(null===e||void 0===e?void 0:e.Fasting)}),(null===e||void 0===e?void 0:e.NonFasting)&&(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Non Fasting: ".concat(null===e||void 0===e?void 0:e.NonFasting)}),(null===e||void 0===e?void 0:e.Systolic)&&(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Systolic: ".concat(null===e||void 0===e?void 0:e.Systolic)}),(null===e||void 0===e?void 0:e.Diastolic)&&(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Diastolic: ".concat(null===e||void 0===e?void 0:e.Diastolic)}),(null===e||void 0===e?void 0:e.Pulse)&&(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Pulse: ".concat(null===e||void 0===e?void 0:e.Pulse)}),f?(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,color:m(null===(o=i[0])||void 0===o?void 0:o.payload),children:"Glucose Status: ".concat(c("rpm_".concat(null===e||void 0===e||null===(a=e.alerts[0])||void 0===a?void 0:a.text)))}):(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,color:m(null===(s=i[0])||void 0===s?void 0:s.payload),children:(null===r||void 0===r?void 0:r.glucose)&&"Glucose Status: ".concat(c("rpm_normal"))}),p?(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,color:h(null===(l=i[0])||void 0===l?void 0:l.payload,!0),children:"Pulse Status: ".concat(c("rpm_".concat(p)))}):(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,color:Lde.palette.green[500],children:(null===r||void 0===r?void 0:r.bp)&&"Pulse Status: ".concat(c("rpm_normal"))}),t?(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,color:u(null===(d=i[0])||void 0===d?void 0:d.payload),children:"BP Status: ".concat(c("rpm_".concat(t)))}):(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,color:Lde.palette.green[500],children:(null===r||void 0===r?void 0:r.bp)&&"BP Status: ".concat(c("rpm_normal"))})]})}return null},v=e=>{var t,n,i,o,a,c;let{payload:d}=e;const u=d.filter(e=>"Systolic"===e.value||"Diastolic"===e.value||"Low Blood Pressure"===e.value||"Elevated Blood Pressure"===e.value||"Hypertension Stage 1"===e.value||"Hypertensive Stage 2"===e.value||"Hypertensive Crisis"===e.value||"Normal"===e.value),p={"Low Blood Pressure":null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.orange[300],"Elevated Blood Pressure":null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.orange[600],"Hypertension Stage 1":null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.red[300],"Hypertensive Stage 2":null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.red[500],"Hypertensive Crisis":null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[700],Normal:null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.green[300]},h={"Low Blood Pressure":"CheckLowBP","Elevated Blood Pressure":"ElevatedBloodPressure","Hypertension Stage 1":"Hypertension_Stage1","Hypertensive Stage 2":"Hypertensive_Stage2","Hypertensive Crisis":"Hypertensive_Crisis",Normal:"Normal"},m=u.map(e=>(e.alias=h[e.value]||"Normal",e.color=((e,t)=>{var n;return t?t===h[e.value]?p[e.value]:null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.grey[300]:p[e.value]})(e,s),e)),f=d.filter(e=>"Pulse"===e.value),g=d.filter(e=>"Fasting"===e.value||"NonFasting"===e.value);return(0,Gt.jsxs)("div",{style:{paddingLeft:40,marginLeft:"10px"},children:[(0,Gt.jsxs)("div",{children:[(null===r||void 0===r?void 0:r.bp)&&(0,Gt.jsx)("strong",{children:"Blood Pressure"}),(0,Gt.jsx)("ul",{style:{listStyleType:"none",paddingLeft:0},children:m.map((e,t)=>{if("Systolic"!==e.value&&"Diastolic"!==e.value)return(0,Gt.jsxs)("li",{style:{marginBottom:"8px",cursor:"pointer"},onClick:()=>{s===(null===e||void 0===e?void 0:e.alias)?l(null):l(e.alias)},children:[(0,Gt.jsx)("span",{style:{display:"inline-block",width:"12px",height:"12px",backgroundColor:e.color,marginRight:"8px"}}),e.value]},"item-".concat(t))})})]}),(0,Gt.jsxs)("div",{children:[(null===r||void 0===r?void 0:r.bp)&&(0,Gt.jsx)("strong",{children:"Pulse"}),(0,Gt.jsx)("ul",{style:{listStyleType:"none",paddingLeft:0},children:f.map((e,t)=>(0,Gt.jsxs)("li",{style:{marginBottom:"8px",cursor:"pointer"},onClick:()=>{l("Pulse"===s?null:"Pulse")},children:[(0,Gt.jsx)("span",{style:{display:"inline-block",width:"12px",height:"12px",backgroundColor:e.color,marginRight:"8px"}}),e.value]},"item-".concat(t)))})]}),(0,Gt.jsxs)("div",{children:[(null===r||void 0===r?void 0:r.glucose)&&(0,Gt.jsx)("strong",{children:"Glucose"}),(0,Gt.jsx)("ul",{style:{listStyleType:"none",paddingLeft:0},children:g.map((e,t)=>(0,Gt.jsxs)("li",{style:{marginBottom:"8px",cursor:"pointer"},onClick:()=>{s===e.value?l(null):l(e.value)},children:[(0,Gt.jsx)("span",{style:{display:"inline-block",width:"12px",height:"12px",backgroundColor:e.color,marginRight:"8px"}}),e.value]},"item-".concat(t)))})]})]})};return(0,Gt.jsx)(l2,{width:"100%",height:400,children:0===(null===o||void 0===o?void 0:o.length)?(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",height:"100%",children:(0,Gt.jsx)("img",{src:i,style:{display:"block",margin:"auto"}})}):(0,Gt.jsxs)($le,{data:o,children:[(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(kle,{dataKey:"name"}),(0,Gt.jsx)(Fle,{label:{value:"Values",angle:"90",position:"insideLeft",dx:0,fontSize:"1rem"},domain:[0,400]})]}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(g,{})}),(0,Gt.jsx)(L3,{content:(0,Gt.jsx)(v,{}),layout:"vertical",align:"right",verticalAlign:"top",wrapperStyle:{width:300}}),(null===r||void 0===r?void 0:r.bp)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Systolic",stroke:Lde.palette.error.main,strokeWidth:2,dot:!1,className:"removeLine"}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Diastolic",stroke:Lde.palette.error.main,strokeWidth:2,dot:!1,className:"removeLine"}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Low Blood Pressure",stroke:Lde.palette.orange[300],strokeWidth:2,dot:!1,className:"removeLine"}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Elevated Blood Pressure",stroke:Lde.palette.orange[600],strokeWidth:2,dot:!1,className:"removeLine"}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Hypertension Stage 1",stroke:Lde.palette.red[300],strokeWidth:2,dot:!1,className:"removeLine"}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Hypertensive Stage 2",stroke:Lde.palette.red[500],strokeWidth:2,dot:!1,className:"removeLine"}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Hypertensive Crisis",stroke:Lde.palette.red[700],strokeWidth:2,dot:!1,className:"removeLine"}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Normal",stroke:Lde.palette.green[300],strokeWidth:2,dot:!1,className:"removeLine"}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Pulse",stroke:"Pulse"!==s&&s?Lde.palette.grey[300]:Lde.palette.primary.light,strokeWidth:2,strokeDasharray:"4 10",dot:(0,Gt.jsx)(f,{fill:Lde.palette.green[500],alertName:"pulse"}),connectNulls:!0})]}),(null===r||void 0===r?void 0:r.glucose)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Fasting",stroke:"Fasting"!==s&&s?Lde.palette.grey[300]:Lde.palette.pink[800],strokeWidth:2,dot:!0,connectNulls:!0}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"NonFasting",stroke:"NonFasting"!==s&&s?Lde.palette.grey[300]:Lde.palette.pink[900],strokeWidth:2,dot:!0,connectNulls:!0})]}),(null===r||void 0===r?void 0:r.bp)&&(0,Gt.jsx)(sce,{component:e=>{var t;let{formattedGraphicalItems:n}=e;const r=n[0],i=n[1];return null===r||void 0===r||null===(t=r.props)||void 0===t?void 0:t.points.map((e,t)=>{var n,o;const a=null===r||void 0===r||null===(n=r.props)||void 0===n?void 0:n.points[t],s=null===i||void 0===i||null===(o=i.props)||void 0===o?void 0:o.points[t],l=a.y-s.y;return a.y>0&&a.x>0&&l?(0,Gt.jsx)(Q1,{radius:8,width:10,height:-l-10,x:a.x-5,y:a.y+5,fill:p(null===e||void 0===e?void 0:e.payload)},t):(0,Gt.jsx)(Q1,{radius:0,width:0,height:0,x:0,y:0,fill:"transparent"},t)})}})]})})}Fxe.defaultProps={patientBpReport:[],getAlertClassName:()=>{},vitalCheck:gu().object};const $xe=Fxe,Bxe=e=>{let{medicinePercentage:t,patientBpReport:n,vitalCheck:r}=e;const[i,o]=We.useState([]),[a,s]=We.useState([]),[l,c]=We.useState(null);let d=[];if(!as(t)){const e={};t.forEach(t=>{const n=sa()(t.date).format("DD MMM YYYY");e[n]||(e[n]={date:n,glucose:0,bp:0,others:0}),"glucose"===t.vital?e[n].glucose=t.adherence_percentage.toFixed(2):"bp"===t.vital?e[n].bp=t.adherence_percentage.toFixed(2):"others"===t.vital?e[n].others=t.adherence_percentage.toFixed(2):e[n].all=t.adherence_percentage.toFixed(2)}),Object.keys(e).forEach(t=>{d.push(e[t])})}(0,We.useEffect)(()=>{if(l){d=[];const e={};t.map(t=>{const n=sa()(t.date).format("DD MMM YYYY");e[n]||(e[n]={date:n,glucose:0,bp:0,others:0}),"glucose"===t.vital?e[n].glucose=t.adherence_percentage.toFixed(2):"bp"===t.vital?e[n].bp=t.adherence_percentage.toFixed(2):"others"===t.vital?e[n].others=t.adherence_percentage.toFixed(2):e[n].all=t.adherence_percentage.toFixed(2)}),Object.keys(e).forEach(t=>{d.push(e[t])})}},[l,t]);const u=()=>(0,Gt.jsx)("div",{style:{paddingLeft:20},children:(0,Gt.jsx)("ul",{style:{listStyleType:"none",paddingLeft:25},children:[{value:"0-25%",color:"#EE5962"},{value:"26-50%",color:"#F1AE5E"},{value:"51-75%",color:"#B4CE4C"},{value:"76-100%",color:"#81c784"}].map((e,t)=>(0,Gt.jsxs)("li",{style:{marginBottom:"8px",cursor:"pointer"},onClick:()=>{l===e.value?c(null):c(e.value)},children:[(0,Gt.jsx)("span",{style:{display:"inline-block",width:"12px",height:"12px",backgroundColor:l!==e.value&&l?Lde.palette.grey[300]:e.color,marginRight:"8px"}}),e.value]},"item-".concat(t)))})}),p=e=>e>=76&&(!l||"76-100%"===l)?"#81c784":e>=51&&e<=75&&(!l||"51-75%"===l)?"#B4CE4C":e>=26&&e<=50&&(!l||"26-50%"===l)?"#F1AE5E":e>=0&&e<=25&&(!l||"0-25%"===l)?"#EE5962":Lde.palette.grey[300];return We.useEffect(()=>{if(as(n))s([]),o([]),d=[];else if(null!==r&&void 0!==r&&r.bp)if(null!==r&&void 0!==r&&r.glucose)s((null===n||void 0===n?void 0:n.length)>0?n:[]);else{const e=null===n||void 0===n?void 0:n.filter(e=>"glucose"!==(null===e||void 0===e?void 0:e.name));s(e)}else{const e=null===n||void 0===n?void 0:n.filter(e=>"bp"!==(null===e||void 0===e?void 0:e.name));s(e)}},[r.bp,r.glucose,n]),We.useEffect(()=>{var e,t;as(a)||function(e,t){const n=sa()(e,"YYYY-MM-DD"),r=sa()(t,"YYYY-MM-DD"),i=[];for(;n.isSameOrBefore(r);){var a;let e=null===(a=d)||void 0===a?void 0:a.find(e=>sa()(null===e||void 0===e?void 0:e.date,"DD-MMM-YYYY").isSame(n,"day"));e?i.push(e):i.push({date:sa()(n).format("DD MMM YYYY"),glucose:0,bp:0,others:0,all:0}),n.add(1,"day")}o(i)}(sa()(null===(e=a[(null===a||void 0===a?void 0:a.length)-parseInt(1)])||void 0===e?void 0:e.ts,"DD-MMM-YYYY hh:mm A").format("YYYY-MM-DD"),sa()(null===(t=a[0])||void 0===t?void 0:t.ts,"DD-MMM-YYYY hh:mm A").format("YYYY-MM-DD"))},[a,t,l]),(0,Gt.jsx)(l2,{width:"100%",height:400,children:(0,Gt.jsxs)(mce,{width:500,height:300,data:i,margin:{top:30,right:30,left:20,bottom:5},children:[(0,Gt.jsx)(rce,{strokeDasharray:"3 3"}),(0,Gt.jsx)(kle,{dataKey:"date",height:100,interval:0,angle:-45,textAnchor:"end"}),(0,Gt.jsx)(Fle,{label:{value:"Medicine %",angle:"90",position:"insideLeft",dx:0,fontSize:"1rem"},domain:[0,100]}),i.length&&(0,Gt.jsx)(l5,{}),(0,Gt.jsx)(L3,{content:(0,Gt.jsx)(u,{}),layout:"vertical",align:"right",verticalAlign:"top",wrapperStyle:{paddingLeft:30,width:300}}),(0,Gt.jsxs)(Eie,{dataKey:"bp",name:"Blood Pressure",barSize:15,cursor:{fill:"transparent"},children:[i.map((e,t)=>(0,Gt.jsx)(sre,{fill:p(e.bp)},"cell-bp-".concat(t))),(0,Gt.jsx)(jre,{dataKey:"bp",position:"top",content:e=>{let{x:t,y:n,width:r,value:i}=e;return(0,Gt.jsx)("text",{x:t+r/2,y:n-10,fill:p(i),textAnchor:"middle",children:i?"B":""})}})]}),(0,Gt.jsxs)(Eie,{dataKey:"glucose",name:"Glucose",barSize:15,cursor:{fill:"transparent"},children:[i.map((e,t)=>(0,Gt.jsx)(sre,{fill:p(e.glucose)},"cell-glucose-".concat(t))),(0,Gt.jsx)(jre,{dataKey:"glucose",position:"top",content:e=>{let{x:t,y:n,width:r,value:i}=e;return(0,Gt.jsx)("text",{x:t+r/2,y:n-10,fill:p(i),textAnchor:"middle",children:i?"G":""})}})]}),(0,Gt.jsxs)(Eie,{dataKey:"others",name:"Others",barSize:15,cursor:{fill:"transparent"},children:[i.map((e,t)=>(0,Gt.jsx)(sre,{fill:p(e.others)},"cell-others-".concat(t))),(0,Gt.jsx)(jre,{dataKey:"others",position:"top",content:e=>{let{x:t,y:n,width:r,value:i}=e;return(0,Gt.jsx)("text",{x:t+r/2,y:n-10,fill:p(i),textAnchor:"middle",children:i?"O":""})}})]}),(0,Gt.jsx)(Eie,{dataKey:"all",name:"All",barSize:15,cursor:{fill:"transparent"},children:i.map((e,t)=>(0,Gt.jsx)(sre,{fill:p(e.all)},"cell-all-".concat(t)))})]})})},zxe=e=>{let{patientData:t,program:n,stageAlertData:r,medicinePercentage:o,filterState:a,setFilterState:s,nodata:l,vitalCheck:c,handleCheckBox:d}=e;const u=Nt(),[p]=We.useState("AllStage"),h=[{name:we("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===n||void 0===n?void 0:n.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients")},{name:"".concat((null===t||void 0===t?void 0:t.first_name)||""," ").concat((null===t||void 0===t?void 0:t.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients/").concat(null===t||void 0===t?void 0:t.id,"/dashboard")},{name:we("rpm_AdherenceReport"),url:""}],m=e=>{switch(e){case"LowBloodPressure":{const e=null===r||void 0===r?void 0:r.filter(e=>"LowBloodPressure"===e.key);return e}case"NormalPressure":{const e=null===r||void 0===r?void 0:r.filter(e=>"NormalPressure"===e.key);return e}case"ElevatedBloodPressure":{const e=null===r||void 0===r?void 0:r.filter(e=>"ElevatedBloodPressure"===e.key);return e}case"HighBloodPressure":{const e=null===r||void 0===r?void 0:r.filter(e=>"HighBloodPressure"===e.key);return e}case"HighBloodPressureStage2":{const e=null===r||void 0===r?void 0:r.filter(e=>"HighBloodPressureStage2"===e.key);return e}case"HypertensiveCrisis":{const e=null===r||void 0===r?void 0:r.filter(e=>"HypertensiveCrisis"===e.key);return e}default:return r&&r}};We.useEffect(()=>{const e={breadcrumb:h};as(n)||as(t)||u(w_(e))},[n,t]);return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsx)(Eu,{sx:{mb:1},position:"relative",children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Eu,{sx:{mb:1},children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:we("rpm_AdherenceReport")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-33px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:we("rpm_AdherenceReport")})})]})})})})})})}),null!==n&&void 0!==n&&n.is_hospital?(0,Gt.jsx)(Eu,{bgcolor:"white",children:(0,Gt.jsx)(Iz,{initialValues:{vital:"",start_date:null,end_date:null},children:()=>(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{sx:{width:"100%"},p:1,children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",className:"adherenceReport-tour-step0",children:[(0,Gt.jsx)(df,{item:!0,md:8,xs:12,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",ml:2,mb:3,className:"AdherenceGraph",children:[(0,Gt.jsxs)(Eu,{bgcolor:"#E3E5EF",display:"flex",alignItems:"center",p:"3px 0 3px 6px ",borderRadius:2,mr:1,children:[(0,Gt.jsx)(Eu,{component:"span",bgcolor:"white",mr:1,sx:{padding:"5px 8px",borderRadius:"8px"},display:"flex",height:"35px",width:"35px",alignItems:"center",children:(0,Gt.jsx)(Tc,{})}),(0,Gt.jsx)(uO,{sx:{flexDirection:"row-reverse",marginLeft:"10px",marginRight:"0"},label:"All",control:(0,Gt.jsx)(jC,{checked:null===c||void 0===c?void 0:c.all,onChange:()=>d("all"),color:"primary"}),disableRipple:!0})]}),(0,Gt.jsxs)(Eu,{bgcolor:"#E3E5EF",display:"flex",alignItems:"center",p:"3px 0 3px 6px ",borderRadius:2,mr:1,children:[(0,Gt.jsx)(Eu,{component:"span",bgcolor:"white",mr:1,sx:{padding:"5px 8px",borderRadius:"8px"},display:"flex",height:"35px",width:"35px",alignItems:"center",children:(0,Gt.jsx)(Mc,{})}),(0,Gt.jsx)(uO,{sx:{flexDirection:"row-reverse",marginLeft:"10px",marginRight:"0"},label:"Blood Pressure",control:(0,Gt.jsx)(jC,{checked:null===c||void 0===c?void 0:c.bp,onChange:()=>d("bp"),color:"primary"}),disableRipple:!0})]}),(0,Gt.jsxs)(Eu,{bgcolor:"#E3E5EF",display:"flex",alignItems:"center",p:"3px 0 3px 6px ",borderRadius:2,mr:1,children:[(0,Gt.jsx)(Eu,{component:"span",bgcolor:"white",mr:1,sx:{padding:"5px 8px",borderRadius:"8px"},display:"flex",height:"35px",width:"35px",alignItems:"center",children:(0,Gt.jsx)(Oc,{})}),(0,Gt.jsx)(uO,{sx:{flexDirection:"row-reverse",marginLeft:"10px",marginRight:"0"},label:"Glucose",control:(0,Gt.jsx)(jC,{checked:null===c||void 0===c?void 0:c.glucose,onChange:()=>d("glucose"),color:"primary"})})]})]})}),(0,Gt.jsx)(df,{item:!0,md:4,className:"paddingTopNone",children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",className:"AdherenceGraphFilter",children:[(0,Gt.jsx)(Ym,{color:"primary",fontWeight:600,sx:{fontSize:14},ml:1,children:we("rpm_Duration")}),(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),mx:1,children:(0,Gt.jsxs)(TT,{dateAdapter:jI,children:[(0,Gt.jsx)(Hz,{className:"AdherenceGraph",as:nR,size:"small",label:"From",name:"start_date",value:null===a||void 0===a?void 0:a.start_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),maxDate:new Date,onChange:e=>{s(t=>{const n=sa()().diff(sa()(e),"days");return(0,i.A)((0,i.A)({},t),{},{start_date:sa()(e).startOf("day").valueOf(),end_date:n>=45?sa()(e).add(45,"days").endOf("day").valueOf():sa()().endOf("day").valueOf()})})}}),(0,Gt.jsx)(Eu,{})]})}),(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),ml:1,children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{className:"AdherenceGraph",as:nR,size:"small",label:"To",name:"end_date",value:null===a||void 0===a?void 0:a.end_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:a.start_date?new Date(a.start_date):void 0,maxDate:sa()().diff(sa()(null===a||void 0===a?void 0:a.start_date),"days")>=45?sa()(null===a||void 0===a?void 0:a.start_date).add(45,"days").startOf("day").valueOf():new Date,onChange:e=>{s(t=>(0,i.A)((0,i.A)({},t),{},{end_date:sa()(e).endOf("day").valueOf()}))}})})})]})})]}),(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)($xe,{patientBpReport:m(p),getAlertClassName:Ss,vitalCheck:c,nodata:l})})}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:12,lg:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Bxe,{medicinePercentage:o,patientBpReport:m(p),vitalCheck:c})}),(0,Gt.jsx)(Eu,{textAlign:"end",children:(0,Gt.jsx)(uO,{sx:{flexDirection:"row",marginLeft:"10px",marginRight:"0"},label:"See all medicine graph",control:(0,Gt.jsx)(jC,{checked:null===c||void 0===c?void 0:c.allMedicine,onChange:()=>d("allMedicine"),color:"primary"}),disableRipple:!0})})]})]})]})})})}):(0,Gt.jsxs)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,Gt.jsx)("img",{src:D_,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,Gt.jsx)(Eu,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:we("rpm_To_Explore_This")})]})]})},Hxe=e=>{let{patientData:t,program:n}=e;const r=Nt(),{enqueueSnackbar:o}=hi(),[a,s]=We.useState(null),l=Ct(qd),[c,d]=We.useState(null),[u,p]=We.useState(null),[h,m]=We.useState(null),[f,g]=We.useState([]),[v,x]=We.useState(""),y=!("true"===ls(l,"user_principal.attributes.skip_tour[0]","")),[b,j]=We.useState((0,i.A)({},Fc)),[w,_]=We.useState({vital:"",start_date:sa()().subtract(7,"days").startOf("day").valueOf(),end_date:sa()().endOf("day").valueOf()}),[C,S]=We.useState({all:!0,bp:!0,glucose:!0,allMedicine:!1}),A={print_report:"",filter_report:"course",from:null===w||void 0===w?void 0:w.start_date,to:null===w||void 0===w?void 0:w.end_date,page:1},k=async e=>{const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.filter_report,r=e.from,i=e.to;return"day"===e.filter_report&&(n="day",r=sa()().startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(1,"days").startOf("day").valueOf(),i=sa()(i).subtract(1,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(1,"days").startOf("day").valueOf(),i=sa()(i).add(1,"days").endOf("day").valueOf())),"weekly"===e.filter_report&&(n="weekly",r=sa()().subtract(6,"days").startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(6,"days").startOf("day").valueOf(),i=sa()(i).subtract(6,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(6,"days").startOf("day").valueOf(),i=sa()(i).add(6,"days").endOf("day").valueOf())),"monthly"===e.filter_report&&(n="monthly",r=sa()().subtract(30,"days").startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(30,"days").startOf("day").valueOf(),i=sa()(i).subtract(30,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(30,"days").startOf("day").valueOf(),i=sa()(i).add(30,"days").endOf("day").valueOf())),"custom"===e.filter_report&&(n="custom",r=sa()(e.from).startOf("day").valueOf(),i=sa()(e.to).endOf("day").valueOf()),"all"===e.filter_report&&(n="all",r="",i=""),s({filter_report:n||(null===a||void 0===a?void 0:a.filter_report),from:r,to:i}),{filter_report:n,from:r,to:i}}(e);(async e=>{try{const{data:t}=await r(Zs(e)),n=t||{},o=Object.assign({},(Ixe(n),n));d(t),p(t),j(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){o(t.message,{variant:"error"})}})({patient_id:null===t||void 0===t?void 0:t.id,desease:["bp","glucose"],duration:[n.from,n.to]})},M=async e=>{const i={patientId:null===t||void 0===t?void 0:t.id,programId:null===n||void 0===n?void 0:n.code,start:null===e||void 0===e?void 0:e.from,end:null===e||void 0===e?void 0:e.to},{data:o}=await r((e=>async t=>{t(na(!0));try{const t="".concat(ua.prescription,"/").concat(e.programId,"/").concat(e.patientId,"/adherence-report?start=").concat(null===e||void 0===e?void 0:e.start,"&end=").concat(null===e||void 0===e?void 0:e.end),n=await cu(t,{});return oa()(n,"data",[]).forEach(e=>Is(e)),n}catch(n){return n}finally{t(na(!1))}})(i));if(null===C||void 0===C||!C.bp||null!==C&&void 0!==C&&C.glucose)if(null===C||void 0===C||!C.glucose||null!==C&&void 0!==C&&C.bp)m(o);else{const e=null===o||void 0===o?void 0:o.filter(e=>"glucose"===(null===e||void 0===e?void 0:e.vital)||"others"===(null===e||void 0===e?void 0:e.vital));m(e)}else{const e=null===o||void 0===o?void 0:o.filter(e=>"bp"===(null===e||void 0===e?void 0:e.vital)||"others"===(null===e||void 0===e?void 0:e.vital));m(e)}},O=async e=>{const i={patientId:null===t||void 0===t?void 0:t.id,programId:null===n||void 0===n?void 0:n.code,start:null===e||void 0===e?void 0:e.from,end:null===e||void 0===e?void 0:e.to},{data:o}=await r((e=>async t=>{t(na(!0));try{const t="".concat(ua.prescription,"/").concat(e.programId,"/").concat(e.patientId,"/adherence-report/all-vitals?start=").concat(null===e||void 0===e?void 0:e.start,"&end=").concat(null===e||void 0===e?void 0:e.end),n=await cu(t,{});return oa()(n,"data",[]).forEach(e=>Is(e)),n}catch(n){return n}finally{t(na(!1))}})(i));g(o)};We.useEffect(()=>{as(t)||(k(A),M(A),O(A))},[t,w,null===C||void 0===C?void 0:C.bp,null===C||void 0===C?void 0:C.glucose]),We.useEffect(()=>{if(!as(t)&&!as(n)){r(w_({activeMenuItem:"adherence-report"}))}},[t,n]);return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(zxe,{program:n,patientData:t,stageAlertData:u,patientBpReport:c,pageDetails:b,medicinePercentage:null!==C&&void 0!==C&&C.allMedicine?f:h,filterState:w,setFilterState:_,nodata:D_,vitalCheck:C,handleCheckBox:e=>{"bp"==e?C.glucose&&S((0,i.A)((0,i.A)({},C),{},{bp:!C.bp,all:C.glucose&&!C.bp})):"all"==e?S({all:!0,glucose:!0,bp:!0}):"glucose"==e?C.bp&&S((0,i.A)((0,i.A)({},C),{},{glucose:!C.glucose,all:!C.glucose&&C.bp})):"allMedicine"==e&&S((0,i.A)((0,i.A)({},C),{},{allMedicine:!C.allMedicine}))}}),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:y,path:"adherenceReportTour",setRenderer:x}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:v})]})]})},Wxe=(e,t,n)=>async r=>{r(na(!0));const o=(0,i.A)({},n);try{const n="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||"");return await uu(n,o)}finally{r(na(!1))}},Vxe=(e,t,n)=>async r=>{r(na(!0));try{const r="".concat(la.schedules,"/-/").concat(e||"","?&page=").concat(t.current_page||"","&q=").concat(n.courseName||"","&vital=").concat(n.vital||"","&duration=").concat(n.duration||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"");return await cu(r,{})}finally{r(na(!1))}},Uxe=(e,t)=>async n=>{n(na(!0));try{const n="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||""),r=await cu(n,{}),{data:i}=r;return function(e){if(null===(null===e||void 0===e?void 0:e.start_date)&&null===e.end_date)return!1;e.start_date=sa()(e.start_date).format("DD MMM YYYY hh:mm A"),e.end_date=sa()(e.end_date).format("DD MMM YYYY hh:mm A")}(i),i}finally{n(na(!1))}},qxe=e=>t=>{var n;const[r,o]=We.useState({}),a=Nt(),s=Ct(Nd);return We.useEffect(()=>{var e;s&&(async e=>{try{const{data:t}=await a(Tg(e));return await o(t),t}catch(t){console.log(t)}})(null===t||void 0===t||null===(e=t.activeProgram)||void 0===e?void 0:e.code)},[s,null===t||void 0===t||null===(n=t.activeProgram)||void 0===n?void 0:n.code]),(0,Gt.jsx)(e,(0,i.A)({notifications:r},t))};const Gxe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T,E,P,D,R,N,L,I,F,$,B,z,H,W,V;let{schedule:U,activeProgram:q,patientData:G,notifications:Y}=e;const{t:Z}=vg(),K=Nt(),X=so(),{scheduleId:Q,programId:J}=lo(),ee=[{name:Z("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===q||void 0===q?void 0:q.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===q||void 0===q?void 0:q.code,"/patients")},{name:"".concat((null===G||void 0===G?void 0:G.first_name)||""," ").concat((null===G||void 0===G?void 0:G.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===q||void 0===q?void 0:q.code,"/patients/").concat(null===G||void 0===G?void 0:G.id,"/dashboard")},{name:Z("rpm_patientCourses"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===q||void 0===q?void 0:q.code,"/patients/").concat(null===G||void 0===G?void 0:G.id,"/courses")},{name:null!==U&&void 0!==U&&U.name?null===U||void 0===U?void 0:U.name:Z("rpm_ScheduleDetails"),url:""}],te=e=>{var t,n;const r=null===(t=e.repetition)||void 0===t||null===(n=t.split(" ")[5])||void 0===n?void 0:n.split(",");return"Weekly"==e.repeat_type?(0,Gt.jsx)(Gt.Fragment,{children:as(U)?(0,Gt.jsx)(ZC,{width:100}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:e?null===r||void 0===r?void 0:r.map(e=>(0,Gt.jsx)(Eu,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:e.slice(0,2)},e)):"NA"})}):"Daily"==e.repeat_type?(0,Gt.jsx)(Gt.Fragment,{children:as(U)?(0,Gt.jsx)(ZC,{width:100}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:(0,Gt.jsx)(Eu,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:"Daily"})})}):(0,Gt.jsx)(Gt.Fragment,{children:as(U)?(0,Gt.jsx)(ZC,{width:100}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:(0,Gt.jsx)(Eu,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:"None"})})})};return We.useEffect(()=>{const e={breadcrumb:ee};as(q)||as(G)||as(U)||K(w_(e))},[q,G,U]),(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{sx:{mb:1.5},position:"relative",children:[(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Eu,{sx:{mb:1},children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:Z("rpm_ScheduleDetails")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-33px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:Z("rpm_ScheduleDetails")})})]})})}),(0,Gt.jsx)(df,{container:!0,spacing:2,mt:.05,children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_ScheduleName")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(U)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==U&&void 0!==U&&U.name?null===U||void 0===U?void 0:U.name:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_Program")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(U)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==U&&void 0!==U&&U.program?null===U||void 0===U?void 0:U.program:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_VitalName")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(U)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==U&&void 0!==U&&U.vital_name?Z("rpm_".concat(U.vital_name)):"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_Duration")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(U)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==U&&void 0!==U&&U.duration?(null===U||void 0===U?void 0:U.duration)+" (days)":"NA"})})]})})]}),!as(U)&&null!==U&&void 0!==U&&U.non_compliance?(0,Gt.jsxs)(df,{container:!0,spacing:2.5,mt:.05,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_NonComplianceNotification")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(ZC,{}):null!==U&&void 0!==U&&null!==(t=U.non_compliance)&&void 0!==t&&t.notification_enabled?(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Active"}):(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Inactive"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_Title")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(n=U.non_compliance)&&void 0!==n&&n.notification_title?null===U||void 0===U||null===(r=U.non_compliance)||void 0===r?void 0:r.notification_title:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_Description")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(i=U.non_compliance)&&void 0!==i&&i.notification_text?null===U||void 0===U||null===(o=U.non_compliance)||void 0===o?void 0:o.notification_text:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Z("rpm_MaxStrikes")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==U&&void 0!==U&&null!==(a=U.non_compliance)&&void 0!==a&&a.max_strikes?null===U||void 0===U||null===(s=U.non_compliance)||void 0===s?void 0:s.max_strikes:"NA"})})]})})]}):null===(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(df,{container:!0,spacing:2.5,mt:.05,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:4,display:"flex",height:"100%"},children:(0,Gt.jsxs)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:[(0,Gt.jsx)(Ym,{variant:"h6",children:"Non Compliance Notification not set"}),(0,Gt.jsx)(Eu,{sx:{mt:3,textAlign:"center"},children:(0,Gt.jsx)(Vp,{color:"primary",variant:"contained",disableElevation:!0,onClick:()=>X("".concat(Lc.DOCTOR.PROGRAM,"/").concat(J,"/course/").concat(Q,"/edit")),children:Z("rpm_SetNow")})})]})})})}):(0,Gt.jsxs)(df,{container:!0,spacing:2.5,mt:.05,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(ZC,{})})]})]})})})})]}),(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,mt:.05,children:as(null===U||void 0===U||null===(l=U.mandate)||void 0===l?void 0:l.timing)?(0,Gt.jsx)(df,{item:!0,xs:12,children:0===(null===U||void 0===U||null===(V=U.mandate)||void 0===V?void 0:V.timing.length)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,textAlign:"center"},children:(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto"}})})}):(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{height:"350px"},children:(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"100%"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})})})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:Z("rpm_MandateDetails")})}),null===U||void 0===U||null===(c=U.mandate)||void 0===c||null===(d=c.timing)||void 0===d?void 0:d.map((e,t)=>((e,t)=>{var n,r,i;return(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(aH,{variant:"outlined",sx:{height:"100%",mb:2.5},children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",children:["Mandate ",t+1]}),subheader:(0,Gt.jsx)(Gt.Fragment,{})}),(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_StartTime")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:fs(null===e||void 0===e?void 0:e.start_time,null===U||void 0===U||null===(n=U.mandate)||void 0===n||null===(r=n.reminder_notification)||void 0===r||null===(i=r.interval)||void 0===i?void 0:i.pre_reminder)})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_EndTime")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:fs(null===e||void 0===e?void 0:e.end_time)})})]}),(null===e||void 0===e?void 0:e.activity_type)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_ActivityType")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:Z("rpm_".concat(null===e||void 0===e?void 0:e.activity_type))})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_ActivityName")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:null===e||void 0===e?void 0:e.activity_name})})]})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Z("rpm_Repetition")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Eu,{children:te(e)})})]})]})]})},null===e||void 0===e?void 0:e.id)})(e,t))]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:Z("rpm_NotificationsDetails")}),(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:Z("rpm_ReminderNotificationText")})}),(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_SendInEvery")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(u=U.mandate)&&void 0!==u&&null!==(p=u.reminder_notification)&&void 0!==p&&null!==(h=p.interval)&&void 0!==h&&h.every?(null===U||void 0===U||null===(m=U.mandate)||void 0===m||null===(f=m.reminder_notification)||void 0===f||null===(g=f.interval)||void 0===g?void 0:g.every)/60+"min":"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Repetition")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(v=U.mandate)&&void 0!==v&&null!==(x=v.reminder_notification)&&void 0!==x&&null!==(y=x.interval)&&void 0!==y&&y.stop_after?(e=>{var t,n,r,i,o,a,s,l,c;return null!==e&&void 0!==e&&null!==(t=e.mandate)&&void 0!==t&&null!==(n=t.reminder_notification)&&void 0!==n&&null!==(r=n.interval)&&void 0!==r&&r.pre_reminder?(null===e||void 0===e||null===(i=e.mandate)||void 0===i||null===(o=i.reminder_notification)||void 0===o||null===(a=o.interval)||void 0===a?void 0:a.stop_after)-parseInt(1):null===e||void 0===e||null===(s=e.mandate)||void 0===s||null===(l=s.reminder_notification)||void 0===l||null===(c=l.interval)||void 0===c?void 0:c.stop_after})(U):"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Title")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(b=U.mandate)&&void 0!==b&&null!==(j=b.reminder_notification)&&void 0!==j&&j.fallback_title?null===U||void 0===U||null===(w=U.mandate)||void 0===w||null===(_=w.reminder_notification)||void 0===_?void 0:_.fallback_title:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Description")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(C=U.mandate)&&void 0!==C&&null!==(S=C.reminder_notification)&&void 0!==S&&S.fallback_text?null===U||void 0===U||null===(A=U.mandate)||void 0===A||null===(k=A.reminder_notification)||void 0===k?void 0:k.fallback_text:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_PreReminder")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(M=U.mandate)&&void 0!==M&&null!==(O=M.reminder_notification)&&void 0!==O&&null!==(T=O.interval)&&void 0!==T&&T.pre_reminder?(null===U||void 0===U||null===(E=U.mandate)||void 0===E||null===(P=E.reminder_notification)||void 0===P||null===(D=P.interval)||void 0===D?void 0:D.pre_reminder)/60+" min":"NA"})})]}),!(null!==Y&&void 0!==Y&&null!==(R=Y.push_notification)&&void 0!==R&&R.reading_reminder)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",Z("message:rpm_notificationSettingMessage"),")"]})})]})]})}),(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:Z("rpm_MissedReadingNotification")})}),(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Title")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(N=U.mandate)&&void 0!==N&&null!==(L=N.missed_reading_notification)&&void 0!==L&&L.notification_title?null===U||void 0===U||null===(I=U.mandate)||void 0===I||null===(F=I.missed_reading_notification)||void 0===F?void 0:F.notification_title:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Z("rpm_Description")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==($=U.mandate)&&void 0!==$&&null!==(B=$.missed_reading_notification)&&void 0!==B&&B.notification_text?null===U||void 0===U||null===(z=U.mandate)||void 0===z||null===(H=z.missed_reading_notification)||void 0===H?void 0:H.notification_text:"NA"})})]}),!(null!==Y&&void 0!==Y&&null!==(W=Y.push_notification)&&void 0!==W&&W.missed_mandate)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",Z("message:rpm_notificationSettingMessage"),")"]})})]})]})})]})]})})})]})};const Yxe=qxe(function(e){var t;let{activeProgram:n,patientData:r,notifications:i}=e;const o=Ct(Nd),{programId:a,courseId:s}=lo(),l=Nt(),[c,d]=We.useState(null);return We.useEffect(()=>{o&&a&&s&&(async()=>{try{const e=await l(Uxe(a,s));d(e)}catch(e){console.log(e)}})()},[o,a,s]),We.useEffect(()=>{l(w_({activeMenuItem:"schedule"}))},[]),as(n)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsx)(Gt.Fragment,{children:null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showViewCourseBtn?(0,Gt.jsx)(Gxe,{schedule:c,activeProgram:n,patientData:r,notifications:i}):(0,Gt.jsx)(__,{})})});function Zxe(e){var t;let{scheduleList:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,scheduleHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchScheduleList:m,handleAttachSchedule:f,freeScheduleList:g,actionAttachSchedule:v,viewButton:x,createConsultationButton:y,deleteButton:b,errSchedule:j,setErrSchedule:w,setSearchSchedule:_,program:C,patientData:S,filterState:A,setFilterState:k,courseDate:M,setCourseDate:O,setHeadcells:T,settingModal:E,initialHeadcells:P,handleSettingModalToggle:D}=e;const{t:R}=vg(),N=Nt(),L=[{name:R("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===C||void 0===C?void 0:C.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:R("rpm_patientCourses"),url:""}],[I,F]=We.useState(0),[$,B]=We.useState(1),[z,H]=(0,We.useState)(20);return We.useEffect(()=>{const e={breadcrumb:L};ta()(C)||ta()(S)||N(w_(e))},[C,S]),(0,Gt.jsx)(Eu,{sx:{width:"100%"},position:"relative",children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:R("rpm_patientCourses")})}),(0,Gt.jsx)(df,{item:!0,xs:!0,sx:{display:{xs:"block",sm:"none",md:"none"}},children:(0,Gt.jsx)(Eu,{position:"absolute",top:"-29px",bottom:"0",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:R("rpm_patientCourses")})})}),(0,Gt.jsx)(df,{item:!0,xs:!0,children:(null===C||void 0===C?void 0:C.is_hospital)&&(0,Gt.jsxs)(df,{container:!0,spacing:2,className:"patientCourses-tour-step1",children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:ta()(g)?[]:g,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.name,renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.name})})),onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(f(null===t||void 0===t?void 0:t.id,null===t||void 0===t?void 0:t.vital_name),w(!1)),"clear"===n&&(w(!0),_(""))},onInputChange:(e,t)=>{_(t||"")},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:R("rpm_SearchSchedule")+"..."}))})}),j&&(0,Gt.jsx)(iw,{error:!0,children:R("message:rpm_PleaseSelectCourse")})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Eu,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(nR,{size:"small",id:M,name:M,value:M,onChange:e=>O(e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:new Date,inputFormat:"dd/MM/yyyy"})})}),(0,Gt.jsx)(Eu,{ml:2,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",sx:{whiteSpace:"nowrap"},disableElevation:!0,onClick:v,children:R("rpm_AssignSchedule")})})]})})]})})]})}),null!==C&&void 0!==C&&C.is_hospital?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{bgcolor:"#fff",mt:2,py:.5,pl:.5,sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,md:6,lg:4,children:(0,Gt.jsxs)(Eu,{display:"flex",p:1,borderRadius:2,className:"patientCourses-tour-step0",children:[(0,Gt.jsx)(Iz,{initialValues:{vital:"",start_date:null,end_date:null},children:(0,Gt.jsxs)(Hz,{as:Dw,displayEmpty:!0,sx:{borderRadius:2,bgcolor:"white",color:A?"grey.900":"grey.400",mr:1},fullWidth:!0,name:"vital",value:A,onChange:e=>{k(e.target.value),m({filter:e.target.value})},variant:"outlined",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:R("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"",sx:{display:"none"},children:R("rpm_VitalType")}),cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:R("rpm_".concat(e.name))},e.value))]})}),(0,Gt.jsx)(Vp,{variant:"text",disableElevation:!0,type:"reset",onClick:()=>{k(""),m({filter:""})},children:(0,Gt.jsx)(Bw.A,{})})]})}),(0,Gt.jsx)(df,{item:!0,ml:"auto",children:(0,Gt.jsx)(Yx,{title:R("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px"},size:"small",color:"primary",onClick:D,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(EM,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:n,headCells:null===c||void 0===c?void 0:c.filter(e=>P.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n||null===(t=n.slice(I*z,I*z+Number(z)))||void 0===t?void 0:t.map((e,t)=>{var n,r,i,o,a,s,l,c;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:u,checked:d.includes(null===e||void 0===e?void 0:e.schedule.id.toString()),name:null===e||void 0===e?void 0:e.schedule.id.toString(),color:"primary"})}),P.includes("title")&&(0,Gt.jsx)(rC,{width:300,children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"".concat(null===e||void 0===e?void 0:e.schedule.id),children:null===e||void 0===e?void 0:e.schedule.name})}),P.includes("vital_name")&&(0,Gt.jsxs)(rC,{children:[" ","bp"===e.schedule.vital_name&&(0,Gt.jsxs)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",R("rpm_".concat(e.schedule.vital_name))]}),"glucose"===e.schedule.vital_name&&(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",R("rpm_".concat(e.schedule.vital_name))]})]}),P.includes("start_date")&&(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.start_date)&&sa()(e.start_date).format("DD MMM YYYY hh:mm A")}),P.includes("end_date")&&(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.end_date)&&sa()(e.end_date).format("DD MMM YYYY hh:mm A")}),P.includes("status")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:ys(null===e||void 0===e?void 0:e.status),sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==e&&void 0!==e&&e.status?R("rpm_".concat(null===e||void 0===e?void 0:e.status)):"NA"})}),P.includes("mandates")&&(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&null!==(n=e.schedule)&&void 0!==n&&null!==(r=n.mandate)&&void 0!==r&&null!==(i=r.timing)&&void 0!==i&&i.length?null===e||void 0===e||null===(o=e.schedule)||void 0===o||null===(a=o.mandate)||void 0===a||null===(s=a.timing)||void 0===s?void 0:s.length:0}),P.includes("action")&&(0,Gt.jsxs)(rC,{children:[(null===C||void 0===C||null===(l=C.permissions)||void 0===l?void 0:l.showViewCourseBtn)&&x(null===e||void 0===e?void 0:e.schedule),"active"===(null===e||void 0===e?void 0:e.status)&&y(e),(null===C||void 0===C||null===(c=C.permissions)||void 0===c?void 0:c.showDeleteCourseBtn)&&b(e)]})]},(null===e||void 0===e?void 0:e.schedule.id)+t)})}),(0,Gt.jsx)(fO,{open:E,allHeadCells:c,initialHeadcells:P,setHeadcells:T,onClose:D})]}),(0,Gt.jsx)(Eu,{py:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,Gt.jsx)(df,{item:!0,sm:!0,children:(0,Gt.jsx)(LO,{count:Math.ceil((null===n||void 0===n?void 0:n.length)/z),page:$,shape:"rounded",color:"primary",onChange:function(e,t){B(t),F(t-1)}})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Ym,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,Gt.jsx)(Xj,{margin:"dense",children:(0,Gt.jsx)(Dw,{variant:"outlined",size:"small",value:z,onChange:e=>{H(parseInt(e.target.value,10)),F(0)},children:[10,20,30,50,100].map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))})})]})})]})})]}):(0,Gt.jsxs)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,Gt.jsx)("img",{src:D_,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,Gt.jsx)(Eu,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:R("rpm_To_Explore_This")})]})]})})})}Zxe.defaultProps={scheduleHead:[],order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",scheduleList:[],otherDiseaseList:[],familyDiseaseList:[],fetchScheduleList:()=>{},editButton:()=>{},viewButton:()=>{},createConsultationButton:()=>{},deleteButton:()=>{},attachSchedule:{},handleAttachSchedule:()=>{},freeScheduleList:[],errSchedule:!1,setErrSchedule:()=>{},setSearchSchedule:()=>{},program:{},patientData:{},filterState:"",setFilterState:()=>{},courseDate:{},setCourseDate:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{}};const Kxe=Zxe;var Xxe=n(68864);const Qxe=MM({drawerHeader:{display:"flex",alignItems:"center","& .MuiSvgIcon-root":{color:"#7986cb"}},filterContent:{minHeight:"190px",paddingBottom:"60px",paddingTop:"6px",maxHeight:"300px","& .MuiInputBase-root":{textAlign:"left"},"& .MuiInputLabel-root":{transform:"translate(14px, 9px) scale(1)"},"& .MuiInputLabel-shrink":{transform:"translate(14px, -9px) scale(0.75)"},"& .MuiFormControl-root":{margin:"0px 0 15px 0"},"& .MuiInputBase-root.MuiOutlinedInput-root":{height:"40px"}},applyFilterBtn:{width:"calc(100% - 77px)"},titles:{color:"#7986cb",fontSize:"14px !important",fontWeight:"600 !important",letterSpacing:"0.02em"},linkClr:{fontSize:"14px !important",color:"#0000EE"}});function Jxe(e){let{scheduleList:t,scheduleHead:n,checkState:r,onCheck:o,isSelection:a,fetchScheduleList:s,handleAttachSchedule:l,freeScheduleList:c,actionAttachSchedule:d,viewButton:u,createConsultationButton:p,deleteButton:h,errSchedule:m,setErrSchedule:f,setSearchSchedule:g,program:v,patientData:x,filterState:y,setFilterState:b,courseDate:j,setCourseDate:w,setHeadcells:_,settingModal:C,initialHeadcells:S,handleSettingModalToggle:A,filterVariant:k}=e;const{t:M}=vg(),O=Nt(),T=[{name:M("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:"".concat((null===x||void 0===x?void 0:x.first_name)||""," ").concat((null===x||void 0===x?void 0:x.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients/").concat(null===x||void 0===x?void 0:x.id,"/dashboard")},{name:M("rpm_patientCourses"),url:""}],[E,P]=(0,We.useState)(!1),D=()=>P(!1),R=Qxe(),[N,L]=We.useState(!1),I=()=>{L(e=>!e)};return We.useEffect(()=>{const e={breadcrumb:T};ta()(v)||ta()(x)||O(w_(e))},[v,x]),(0,Gt.jsx)(Eu,{sx:{width:"100%"},position:"relative",children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Eu,{sx:{mb:2.5},children:[(0,Gt.jsx)(Eu,{position:"absolute",top:"-29px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:M("rpm_patientCourses")})}),null!==v&&void 0!==v&&v.is_hospital?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,Gt.jsxs)(Vp,{variant:k,onClick:I,children:[(0,Gt.jsx)(Xxe.A,{}),"Filters"]}),(0,Gt.jsx)(Vp,{variant:"contained",onClick:()=>P(!0),children:"+ Assign Course"})]}),(0,Gt.jsx)(Lf,{anchor:"right",open:E,onClose:D,children:(0,Gt.jsxs)(Eu,{bgcolor:"white",width:"300px",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:[(0,Gt.jsxs)(Eu,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,bgcolor:"#f2f2fe",py:1,px:1.8,children:[(0,Gt.jsx)(Ym,{variant:"h6",sx:{color:"#7986cb",fontSize:"16px",fontWeight:"600"},children:"Assign Course"}),(0,Gt.jsx)(Kp,{onClick:D,children:(0,Gt.jsx)(Bw.A,{})})]}),(0,Gt.jsxs)(Eu,{pl:1.5,pr:1.5,children:[(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:ta()(c)?[]:c,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.name,renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.name})})),onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(l(null===t||void 0===t?void 0:t.id,null===t||void 0===t?void 0:t.vital_name),f(!1)),"clear"===n&&(f(!0),g(""))},onInputChange:(e,t)=>{g(t||"")},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:M("rpm_SearchSchedule")+"..."}))}),m&&(0,Gt.jsx)(iw,{error:!0,children:M("message:rpm_PleaseSelectCourse")}),(0,Gt.jsx)(Eu,{mt:1,mb:1,sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(nR,{size:"small",id:j,name:j,value:j,onChange:e=>w(e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:new Date,inputFormat:"dd/MM/yyyy"})})})," ",(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:d,sx:{width:"100%",marginTop:"15px"},children:M("rpm_AssignSchedule")})]})]})}),(0,Gt.jsx)(Lf,{anchor:"bottom",open:N,onClose:I,transitionDuration:500,PaperProps:{sx:{borderRadius:"16px 16px 0 0"}},children:(0,Gt.jsxs)(Eu,{sx:{textAlign:"center"},children:[(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",px:"20px",py:1,mb:2,bgcolor:"#f2f2fe",color:"#7986cb",children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{display:"flex",alignItems:"center"},children:(0,Gt.jsxs)(Eu,{className:R.drawerHeader,children:[(0,Gt.jsx)(Xxe.A,{sx:{marginRight:"7px"}}),(0,Gt.jsx)(Ym,{color:"primary",variant:"h6",children:"Filters"})]})}),(0,Gt.jsx)(Kp,{onClick:I,children:(0,Gt.jsx)(Bw.A,{})})]}),(0,Gt.jsxs)(Eu,{px:2.5,className:R.filterContent,sx:{display:"flex",flexDirection:"column"},children:[(0,Gt.jsx)(Iz,{initialValues:{vital:"",start_date:null,end_date:null},children:(0,Gt.jsxs)(Hz,{as:Dw,displayEmpty:!0,sx:{borderRadius:2,bgcolor:"white",color:y?"grey.900":"grey.400",mr:1},fullWidth:!0,name:"vital",value:y,onChange:e=>{b(e.target.value),s({filter:e.target.value})},variant:"outlined",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:M("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"",sx:{display:"none"},children:M("rpm_VitalType")}),cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:M("rpm_".concat(e.name))},e.value))]})}),(0,Gt.jsxs)(Eu,{py:.5,display:"flex",alignItems:"center",width:"100%",position:"fixed",bottom:"0",left:"0",pl:"20px",borderTop:"1px solid #efefef",children:[(0,Gt.jsx)(Vp,{className:R.applyFilterBtn,variant:"contained",disableElevation:!0,disabled:""===y,sx:{mt:1,mr:2,height:"40px"},onClick:()=>{I()},children:M("rpm_ApplyFilters")}),(0,Gt.jsx)(Vp,{variant:"outlined",disableElevation:!0,type:"reset",sx:{mt:1},style:{minWidth:"40px",minHeight:"40px"},className:"resetBackupButton",onClick:()=>{b(""),s({filter:""})},children:(0,Gt.jsx)(xxe.A,{fontSize:"small"})})]})]})]})})]}):(0,Gt.jsxs)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,Gt.jsx)("img",{src:D_,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,Gt.jsx)(Eu,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:M("rpm_To_Explore_This")})]})]}),(null===v||void 0===v?void 0:v.is_hospital)&&(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{display:"flex",flexWrap:"wrap",gap:2,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map((e,t)=>{var n,i,s,l,c;return(0,Gt.jsxs)(aH,{sx:{width:"100%",boxShadow:2,marginBottom:"5px",borderLeft:"4px solid #868fcd",overflow:"auto"},children:[a&&(0,Gt.jsx)(RH,{children:(0,Gt.jsx)(jC,{onChange:o,checked:r.includes(null===e||void 0===e?void 0:e.schedule.id.toString()),name:null===e||void 0===e?void 0:e.schedule.id.toString(),color:"primary"})}),(0,Gt.jsxs)(uH,{children:[(0,Gt.jsxs)(Eu,{display:"flex",justifyContent:"space-between",children:[(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:R.titles,fontWeight:600,children:M("rpm_Title")}),S.includes("title")&&(0,Gt.jsx)(Ym,{variant:"span",children:(0,Gt.jsx)(Lo,{className:R.linkClr,to:"".concat(null===e||void 0===e?void 0:e.schedule.id),children:null===e||void 0===e?void 0:e.schedule.name})})]}),(0,Gt.jsx)(Eu,{className:R.alertBadge,children:S.includes("status")&&(0,Gt.jsx)(XO,{icon:!1,severity:ys(null===e||void 0===e?void 0:e.status),sx:e=>({display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==e&&void 0!==e&&e.status?M("rpm_".concat(null===e||void 0===e?void 0:e.status)):"NA"})})]}),(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%",marginTop:"10px"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:R.titles,fontWeight:600,children:M("rpm_Vitals")}),S.includes("vital_name")&&(0,Gt.jsx)(Ym,{color:"bp"===e.schedule.vital_name?"customClr.bp":"customClr.glucose",fontWeight:600,fontSize:14,children:M("rpm_".concat(e.schedule.vital_name))})]}),(0,Gt.jsx)(Af,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:"10px"}}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%",marginTop:"10px"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:R.titles,fontWeight:600,children:M("rpm_Mandate")}),S.includes("mandates")&&(0,Gt.jsx)(Ym,{children:(null===e||void 0===e||null===(n=e.schedule)||void 0===n||null===(i=n.mandate)||void 0===i||null===(s=i.timing)||void 0===s?void 0:s.length)||0})]})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%",marginTop:"10px"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:R.titles,fontWeight:600,children:M("rpm_StartDate")}),S.includes("start_date")&&(0,Gt.jsxs)(Ym,{color:"textSecondary",children:[" ",(null===e||void 0===e?void 0:e.start_date)&&sa()(e.start_date).format("DD MMM YYYY hh:mm A")]})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%",marginTop:"10px"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:R.titles,fontWeight:600,children:M("rpm_EndDate")}),S.includes("end_date")&&(0,Gt.jsx)(Ym,{color:"textSecondary",children:(null===e||void 0===e?void 0:e.end_date)&&sa()(e.end_date).format("DD MMM YYYY hh:mm A")})]})]}),(0,Gt.jsx)(RH,{children:S.includes("action")&&(0,Gt.jsxs)(Gt.Fragment,{children:[(null===v||void 0===v||null===(l=v.permissions)||void 0===l?void 0:l.showViewCourseBtn)&&u(null===e||void 0===e?void 0:e.schedule),"active"===(null===e||void 0===e?void 0:e.status)&&p(e),(null===v||void 0===v||null===(c=v.permissions)||void 0===c?void 0:c.showDeleteCourseBtn)&&h(e)]})})]},(null===e||void 0===e?void 0:e.schedule.id)+t)})}),(0,Gt.jsx)(fO,{open:C,allHeadCells:n,initialHeadcells:S,setHeadcells:_,onClose:A})]})]})})})}Jxe.defaultProps={scheduleHead:[],order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",scheduleList:[],otherDiseaseList:[],familyDiseaseList:[],fetchScheduleList:()=>{},editButton:()=>{},viewButton:()=>{},createConsultationButton:()=>{},deleteButton:()=>{},attachSchedule:{},handleAttachSchedule:()=>{},freeScheduleList:[],errSchedule:!1,setErrSchedule:()=>{},setSearchSchedule:()=>{},program:{},patientData:{},filterState:"",setFilterState:()=>{},courseDate:{},setCourseDate:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{}};const eye=Jxe;const tye=function(e){var t;let{program:n,patientData:r}=e;const o=window.innerWidth,a=Nt(),s=so(),{programId:l,patientId:c}=lo(),d=Ct(qd),u=!("true"===ls(d,"user_principal.attributes.skip_tour[0]","")),p=Ct(Nd),{t:h}=vg(),{enqueueSnackbar:m}=hi(),[f,g]=(0,We.useState)("desc"),[v,x]=(0,We.useState)("created_at"),[y,b]=We.useState(""),[j,w]=We.useState(""),[_,C]=We.useState(""),[S,A]=We.useState(null),[k,M]=We.useState(null),[O,T]=(0,We.useState)([]),[E,P]=We.useState(null),[D,R]=We.useState(!1),[N,L]=We.useState(""),[I,F]=We.useState(new Date),[$,B]=We.useState(!1),[z,H]=We.useState(!1),[W,V]=We.useState({open:!1,data:{}}),U=e=>{V((0,i.A)((0,i.A)({},W),{},{open:!W.open,data:e}))},[q,G]=We.useState({open:!1,data:{}}),Y=e=>{G((0,i.A)((0,i.A)({},q),{},{open:!q.open,data:e}))},Z=(e,t)=>{P({value:e,vital:t})},[K,X]=We.useState(!1),[Q,J]=We.useState(as($o.getScheduleHeadcells())?["title","vital_name","start_date","end_date","status","mandates","action"]:$o.getScheduleHeadcells()),ee=function(e){J(e),$o.setScheduleHeadcells(e)},te=()=>{X(!K)},ne=async()=>{E&&!D?"bp"==(null===E||void 0===E?void 0:E.vital)&&$||"glucose"==(null===E||void 0===E?void 0:E.vital)&&z?Y(null===E||void 0===E?void 0:E.value):await ae({programId:l,scheduleId:null===E||void 0===E?void 0:E.value,patientId:r.id},sa()(I).format("DD/MM/YYYY")!=sa()(new Date).format("DD/MM/YYYY")?sa()(I).startOf("day"):null):R(!0)},re=e=>{if(Array.isArray(e))return T(e.map(e=>e.toString()));const t=e.target.name;O.includes(t)?T(O.filter(e=>e!==t)):T(e=>[...e,t])},ie=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:y,filter:N};try{const{data:t}=await a(ol({sort_by:v,sort_order:f,q:e.q,filter:[e.filter]},{patientId:r.id,programId:l}));A(t)}catch(t){m(t.message,{variant:"error"})}},oe=async()=>{const e={sort_by:v,sort_order:f,q:_};try{const{data:t}=await a(((e,t)=>async n=>{n(na(!0));try{const n="".concat(la.schedules,"/-/").concat(e||"","?&q=").concat(t.q,"&page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"");return await cu(n,{})}finally{n(na(!1))}})(l,e)),{content:n}=t||{},r=null===n||void 0===n?void 0:n.filter(e=>!0!==(null===e||void 0===e?void 0:e.dummy));M(r)}catch(t){m(t.message,{variant:"error"})}},ae=async(e,t)=>{try{await a(((e,t)=>async n=>{n(na(!0));try{const n="".concat(la.schedules,"/-/").concat(e.programId,"/").concat(e.scheduleId,"/patient/").concat(e.patientId,"?startDate=").concat(sa()(t).valueOf()?sa()(t).valueOf():"");return await cu(n,{})}finally{n(na(!1))}})(e,t)),q.open&&Y(),await ie(),m(h("message:rpm_AttachScheduleSuccess"),{variant:"success"})}catch(n){const e=ls(n,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_CourseAttachFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_CourseAttachFailed"),severity:$c}))}},se=async e=>{const t=null===S||void 0===S?void 0:S.find(t=>t.id===e.scheduleId);try{t.active?m(h("message:rpm_ActiveCourseNotDelete"),{variant:"error"}):(await a((e=>async t=>{t(na(!0));try{const t="".concat(la.schedules,"/-/").concat(e.programId,"/").concat(e.scheduleId,"/patient/").concat(e.patientId);return await pu(t,{})}finally{t(na(!1))}})(e)),V({open:!1,data:{}}),ie(),m(h("message:rpm_DeAttachScheduleSuccess"),{variant:"success"}))}catch(n){m(n.message,{variant:"error"})}},le=e=>(0,Gt.jsx)(Yx,{title:h("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),ce=e=>(0,Gt.jsx)(Yx,{title:h("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(e.id)),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),de=e=>(0,Gt.jsx)(Yx,{title:h("rpm_CreateConsultation"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>s("".concat(Lc.DOCTOR.PROGRAM,"/").concat(l,"/patients/").concat(c,"/consultations/add-consultation"),{state:e}),children:(0,Gt.jsx)(Xl,{fontSize:"small",sx:{width:16,height:16}})})}),ue=e=>(0,Gt.jsx)(Yx,{title:h("rpm_Delete"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,disabled:"upcoming"!==(null===e||void 0===e?void 0:e.status),color:"error",onClick:()=>U(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})});We.useEffect(()=>{p&&r&&ie()},[p,r]),We.useEffect(()=>{p&&S&&(null!==S&&void 0!==S&&S.find(e=>{var t;return"active"===e.status&&"bp"===(null===e||void 0===e||null===(t=e.schedule)||void 0===t?void 0:t.vital_name)})&&B(!0),null!==S&&void 0!==S&&S.find(e=>{var t;return"active"===e.status&&"glucose"===(null===e||void 0===e||null===(t=e.schedule)||void 0===t?void 0:t.vital_name)})&&H(!0))},[p,S]),We.useEffect(()=>{p&&l&&oe()},[p,l,_]),We.useEffect(()=>{a(w_({activeMenuItem:"schedule"}))},[]);const pe=[{id:"title",label:h("rpm_Title"),isSort:!1,sortProperty:"title"},{id:"vital_name",label:h("rpm_Vitals"),isSort:!1,sortProperty:"vital_name"},{id:"start_date",label:h("rpm_StartDate"),isSort:!1,sortProperty:"start_date"},{id:"end_date",label:h("rpm_EndDate"),isSort:!1,sortProperty:"end_date"},{id:"status",label:h("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"mandates",label:h("rpm_Mandates"),isSort:!1,sortProperty:"mandates"},{id:"action",label:h("rpm_Actions"),isSort:!1,sortProperty:"action"}];return as(n)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showCourseList?o>=575?(0,Gt.jsx)(Kxe,{order:f,orderBy:v,setOrder:g,setOrderBy:x,searchText:y,setSearchText:b,dataParameter:"id",checkState:O,onCheck:re,isSelection:!1,nodata:D_,scheduleHead:pe,scheduleList:S,fetchScheduleList:ie,editButton:le,viewButton:ce,createConsultationButton:de,deleteButton:ue,attachSchedule:E,handleAttachSchedule:Z,freeScheduleList:k,actionAttachSchedule:ne,errSchedule:D,setErrSchedule:R,setSearchSchedule:C,program:n,patientData:r,filterState:N,setFilterState:L,courseDate:I,setCourseDate:F,setHeadcells:ee,settingModal:K,initialHeadcells:Q,handleSettingModalToggle:te}):(0,Gt.jsx)(eye,{order:f,orderBy:v,setOrder:g,setOrderBy:x,searchText:y,setSearchText:b,dataParameter:"id",checkState:O,onCheck:re,isSelection:!1,nodata:D_,scheduleHead:pe,scheduleList:S,fetchScheduleList:ie,editButton:le,viewButton:ce,createConsultationButton:de,deleteButton:ue,attachSchedule:E,handleAttachSchedule:Z,freeScheduleList:k,actionAttachSchedule:ne,errSchedule:D,setErrSchedule:R,setSearchSchedule:C,program:n,patientData:r,filterState:N,setFilterState:L,courseDate:I,setCourseDate:F,setHeadcells:ee,settingModal:K,initialHeadcells:Q,handleSettingModalToggle:te}):(0,Gt.jsx)(__,{}),(0,Gt.jsx)(PU,{openModal:W.open,onCloseModal:U,actionFunction:()=>se({programId:l,scheduleId:W.data.id,patientId:r.id}),dataName:"",options:{primaryText:h("message:rpm_DeleteCourse"),secondaryText:h("message:rpm_DeleteCourseBodyText"),btn:{primaryText:h("rpm_Delete"),secondaryText:h("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(PU,{openModal:q.open,onCloseModal:Y,actionFunction:()=>ae({programId:l,scheduleId:null===E||void 0===E?void 0:E.value,patientId:r.id},sa()(I).format("DD/MM/YYYY")!=sa()(new Date).format("DD/MM/YYYY")?sa()(I).startOf("day"):null),dataName:"",options:{primaryText:h("message:rpm_AttachCourse"),secondaryText:h("message:rpm_AttachCourseText"),btn:{primaryText:h("rpm_Yes"),secondaryText:h("rpm_No"),primaryColor:"success",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(AZ,{isTour:u,path:"patientCoursesTour",setRenderer:w}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:j})]})};const nye=function(){return(0,Gt.jsx)("div",{children:"OxyDashboard"})};const rye=function(){return We.useEffect(()=>{console.log("OxyDashboardContainer")},[]),(0,Gt.jsx)(nye,{})};const iye=n.p+"static/media/no_course_attached.b60bd29dc00c5b7590b606a343fd7200.svg";const oye=["children","value","index"];function aye(e){const{children:t,value:n,index:r}=e,o=Ko(e,oye);return(0,Gt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function sye(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}function lye(e){var t;let{patientId:n,patientLastFrame:r,activeAlertCount:o,tabValue:a,handleChangeTabs:s,pageDetails:l,BpDashboardContainer:c,GlucoseDashboardContainer:d,patientData:u,program:p,bpVital:h,glucoseVital:m}=e;const{t:f}=vg();r&&sa()(null===(t=r[0])||void 0===t?void 0:t.ts).format("DD MMM YYYY hh:mm A");return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[!1,(0,Gt.jsx)(df,{container:!0,spacing:2.5,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",sx:{display:{xs:"none",md:"block"}},children:f("rpm_medicalCharts")})})}),null!==a?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2.5,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{borderBottom:1,borderColor:"divider"},children:(0,Gt.jsxs)(eU,{value:a,onChange:s,"aria-label":"basic tabs example",sx:{mt:1},children:[(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:f("rpm_bp")},sye(0)),{},{disabled:0===(null===h||void 0===h?void 0:h.length),sx:{display:0===(null===h||void 0===h?void 0:h.length)?"none":"block"}})),(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:f("rpm_glucose")},sye(1)),{},{disabled:0===(null===m||void 0===m?void 0:m.length),sx:{display:0===(null===m||void 0===m?void 0:m.length)?"none":"block"}}))]})})}),(0,Gt.jsx)(df,{item:!0})]}),(null===h||void 0===h?void 0:h.length)>0&&(0,Gt.jsx)(aye,{value:a,index:0,children:(0,Gt.jsx)(c,{patientLastFrame:r,patientId:n,patientData:u,program:p})}),(null===m||void 0===m?void 0:m.length)>0&&(0,Gt.jsx)(aye,{value:a,index:1,children:(0,Gt.jsx)(d,{patientData:u,program:p})}),(0,Gt.jsx)(aye,{value:a,index:2,children:"BMI"}),(0,Gt.jsx)(aye,{value:a,index:3,children:"WEIGHT"}),(0,Gt.jsx)(aye,{value:a,index:4,children:(0,Gt.jsx)(rye,{})})]}):(0,Gt.jsx)(aH,{sx:{mt:2},children:(0,Gt.jsxs)(Eu,{py:6,children:[(0,Gt.jsx)("img",{src:iye,alt:"No Data Found",style:{display:"block",margin:"auto"},width:"200px"}),(0,Gt.jsx)(Ym,{component:"h6",variant:"h6",textAlign:"center",sx:{color:"grey.500"},fontWeight:"500",children:f("rpm_NoCourseAttached")})]})})]})}lye.defaultProps={patientId:"",patientLastFrame:[],activeAlertCount:[],tabValue:0,handleChangeTabs:()=>{},bpVital:[],glucoseVital:[]};const cye=lye;const dye=function(){return(0,Gt.jsxs)(df,{item:!0,xs:12,sm:!0,container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,Gt.jsx)(ZC,{variant:"rounded",width:40,height:40,sx:{borderRadius:1}}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:(0,Gt.jsx)(ZC,{variant:"text",width:100})}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:(0,Gt.jsx)(ZC,{variant:"text",width:50})})]})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,Gt.jsx)(ZC,{variant:"rounded",width:40,height:40,sx:{borderRadius:1}}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:(0,Gt.jsx)(ZC,{variant:"text",width:100})}),(0,Gt.jsx)(df,{container:!0,spacing:1,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:(0,Gt.jsx)(ZC,{variant:"text",width:50})})})})]})]})})]})};var uye=n(44448),pye=n(56658);const hye=n.p+"static/media/active_alerts.7bc51e9739d3c5191b18a5fc62b95676.svg";n.p;const mye=n.p+"static/media/resolved_alerts.30784fed298dfef5516f5d999b670792.svg";function fye(e){let{order:t,orderBy:n,setOrder:r,setOrderBy:i,alertData:o,headCellsItems:a,resolvedButton:s,fetchPatientAlerts:l,activeAlertsPageDetails:c,deleteAlertButton:d}=e;const{t:u}=vg();return(0,Gt.jsxs)(Eu,{sx:{"& .MuiPaper-root":{borderTopLeftRadius:0,borderTopRightRadius:0}},children:[(0,Gt.jsx)(EM,{order:t,orderBy:n,setOrder:r,setOrderBy:i,data:o,headCells:a,noDataImage:D_,fetchList:l,skeletonVrows:6,stickyHeader:!0,scrollHeight:400,className:"theme_scroll",children:null===o||void 0===o?void 0:o.map(e=>{var t;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((t,n)=>{var r,i,o,a;return(0,Gt.jsx)(Eu,{className:null===t||void 0===t?void 0:t.text,display:"inline-flex",mr:n===(null===e||void 0===e||null===(r=e.alerts)||void 0===r?void 0:r.length)-1?0:1,children:(0,Gt.jsxs)(Eu,{component:"span",children:["bp systolic"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(u("rpm_Sys"),": "),"bp diastolic"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(u("rpm_Dia"),": "),"glucose"===(null===t||void 0===t||null===(i=t.data_name)||void 0===i||null===(o=i.split(" "))||void 0===o?void 0:o[0])&&"".concat(null===t||void 0===t||null===(a=t.data_name)||void 0===a?void 0:a.replace("glucose",""),": "),"pulse"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(u("rpm_pulse"),": "),null===t||void 0===t?void 0:t.value]})},n)}):"NA"}),(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,Gt.jsx)(Eu,{children:0===t&&(0,Gt.jsx)(Eu,{component:"span",children:u("rpm_".concat(null===e||void 0===e?void 0:e.text))})},t))}),(0,Gt.jsx)(rC,{children:e.ts}),(0,Gt.jsxs)(rC,{children:[s(e),d(e)]})]},e.id)})}),(0,Gt.jsx)(IO,{pageDetails:c,fetchListFunction:l})]})}var gye=n(94992),vye=n(54444);function xye(e){return(0,sr.Ay)("MuiToggleButton",e)}const yye=(0,ar.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]);const bye=We.createContext({});const jye=We.createContext(void 0);function wye(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}const _ye=["value"],Cye=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],Sye=(0,Un.Ay)(Dp,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["size".concat((0,Fu.A)(n.size))]]}})(e=>{let t,{theme:n,ownerState:r}=e,i="standard"===r.color?n.palette.text.primary:n.palette[r.color].main;return n.vars&&(i="standard"===r.color?n.vars.palette.text.primary:n.vars.palette[r.color].main,t="standard"===r.color?n.vars.palette.text.primaryChannel:n.vars.palette[r.color].mainChannel),(0,Ft.A)({},n.typography.button,{borderRadius:(n.vars||n).shape.borderRadius,padding:11,border:"1px solid ".concat((n.vars||n).palette.divider),color:(n.vars||n).palette.action.active},r.fullWidth&&{width:"100%"},{["&.".concat(yye.disabled)]:{color:(n.vars||n).palette.action.disabled,border:"1px solid ".concat((n.vars||n).palette.action.disabledBackground)},"&:hover":{textDecoration:"none",backgroundColor:n.vars?"rgba(".concat(n.vars.palette.text.primaryChannel," / ").concat(n.vars.palette.action.hoverOpacity,")"):Qn(n.palette.text.primary,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(yye.selected)]:{color:i,backgroundColor:n.vars?"rgba(".concat(t," / ").concat(n.vars.palette.action.selectedOpacity,")"):Qn(i,n.palette.action.selectedOpacity),"&:hover":{backgroundColor:n.vars?"rgba(".concat(t," / calc(").concat(n.vars.palette.action.selectedOpacity," + ").concat(n.vars.palette.action.hoverOpacity,"))"):Qn(i,n.palette.action.selectedOpacity+n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:n.vars?"rgba(".concat(t," / ").concat(n.vars.palette.action.selectedOpacity,")"):Qn(i,n.palette.action.selectedOpacity)}}}},"small"===r.size&&{padding:7,fontSize:n.typography.pxToRem(13)},"large"===r.size&&{padding:15,fontSize:n.typography.pxToRem(15)})}),Aye=We.forwardRef(function(e,t){const n=We.useContext(bye),{value:r}=n,i=(0,nn.A)(n,_ye),o=We.useContext(jye),a=(0,Qu.A)((0,Ft.A)({},i,{selected:wye(e.value,r)}),e),s=(0,$t.b)({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:d="standard",disabled:u=!1,disableFocusRipple:p=!1,fullWidth:h=!1,onChange:m,onClick:f,selected:g,size:v="medium",value:x}=s,y=(0,nn.A)(s,Cye),b=(0,Ft.A)({},s,{color:d,disabled:u,disableFocusRipple:p,fullWidth:h,size:v}),j=(e=>{const{classes:t,fullWidth:n,selected:r,disabled:i,size:o,color:a}=e,s={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth","size".concat((0,Fu.A)(o)),a]};return(0,ir.A)(s,xye,t)})(b),w=o||"";return(0,Gt.jsx)(Sye,(0,Ft.A)({className:(0,nr.A)(i.className,j.root,c,w),disabled:u,focusRipple:!p,ref:t,onClick:e=>{f&&(f(e,x),e.defaultPrevented)||m&&m(e,x)},onChange:m,value:x,ownerState:b,"aria-pressed":g},y,{children:l}))}),kye=Aye;function Mye(e){return(0,sr.Ay)("MuiToggleButtonGroup",e)}const Oye=(0,ar.A)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),Tye=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],Eye=(0,Un.Ay)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Oye.grouped)]:t.grouped},{["& .".concat(Oye.grouped)]:t["grouped".concat((0,Fu.A)(n.orientation))]},{["& .".concat(Oye.firstButton)]:t.firstButton},{["& .".concat(Oye.lastButton)]:t.lastButton},{["& .".concat(Oye.middleButton)]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})(e=>{let{ownerState:t,theme:n}=e;return(0,Ft.A)({display:"inline-flex",borderRadius:(n.vars||n).shape.borderRadius},"vertical"===t.orientation&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{["& .".concat(Oye.grouped)]:(0,Ft.A)({},"horizontal"===t.orientation?{["&.".concat(Oye.selected," + .").concat(Oye.grouped,".").concat(Oye.selected)]:{borderLeft:0,marginLeft:0}}:{["&.".concat(Oye.selected," + .").concat(Oye.grouped,".").concat(Oye.selected)]:{borderTop:0,marginTop:0}})},"horizontal"===t.orientation?{["& .".concat(Oye.firstButton,",& .").concat(Oye.middleButton)]:{borderTopRightRadius:0,borderBottomRightRadius:0},["& .".concat(Oye.lastButton,",& .").concat(Oye.middleButton)]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{["& .".concat(Oye.firstButton,",& .").concat(Oye.middleButton)]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},["& .".concat(Oye.lastButton,",& .").concat(Oye.middleButton)]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},"horizontal"===t.orientation?{["& .".concat(Oye.lastButton,".").concat(yye.disabled,",& .").concat(Oye.middleButton,".").concat(yye.disabled)]:{borderLeft:"1px solid transparent"}}:{["& .".concat(Oye.lastButton,".").concat(yye.disabled,",& .").concat(Oye.middleButton,".").concat(yye.disabled)]:{borderTop:"1px solid transparent"}})}),Pye=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiToggleButtonGroup"}),{children:r,className:i,color:o="standard",disabled:a=!1,exclusive:s=!1,fullWidth:l=!1,onChange:c,orientation:d="horizontal",size:u="medium",value:p}=n,h=(0,nn.A)(n,Tye),m=(0,Ft.A)({},n,{disabled:a,fullWidth:l,orientation:d,size:u}),f=(e=>{const{classes:t,orientation:n,fullWidth:r,disabled:i}=e,o={root:["root","vertical"===n&&"vertical",r&&"fullWidth"],grouped:["grouped","grouped".concat((0,Fu.A)(n)),i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,ir.A)(o,Mye,t)})(m),g=We.useCallback((e,t)=>{if(!c)return;const n=p&&p.indexOf(t);let r;p&&n>=0?(r=p.slice(),r.splice(n,1)):r=p?p.concat(t):[t],c(e,r)},[c,p]),v=We.useCallback((e,t)=>{c&&c(e,p===t?null:t)},[c,p]),x=We.useMemo(()=>({className:f.grouped,onChange:s?v:g,value:p,size:u,fullWidth:l,color:o,disabled:a}),[f.grouped,s,v,g,p,u,l,o,a]),y=function(e){return We.Children.toArray(e).filter(e=>We.isValidElement(e))}(r),b=y.length,j=e=>{const t=0===e,n=e===b-1;return t&&n?"":t?f.firstButton:n?f.lastButton:f.middleButton};return(0,Gt.jsx)(Eye,(0,Ft.A)({role:"group",className:(0,nr.A)(f.root,i),ref:t,ownerState:m},h,{children:(0,Gt.jsx)(bye.Provider,{value:x,children:y.map((e,t)=>(0,Gt.jsx)(jye.Provider,{value:j(t),children:e},t))})}))}),Dye=Pye;function Rye(e){let{patientBpReport:t,nodata:n,checkState:r}=e;const{t:i}=vg(),o=[];t.forEach(e=>{o.push({name:sa()(e.ts).format("DD MMM"),Systolic:e.values.systolic,Diastolic:e.values.diastolic,Pulse:e.values.pulse,amt:1.25*e.values.systolic,alerts:e.alerts,key:e.key,nbps:(null===e||void 0===e?void 0:e.values.systolic)>=90&&(null===e||void 0===e?void 0:e.values.systolic)<120?e.values.systolic:void 0,ebps:(null===e||void 0===e?void 0:e.values.systolic)>=120&&(null===e||void 0===e?void 0:e.values.systolic)<=129?e.values.systolic:void 0,hbps:(null===e||void 0===e?void 0:e.values.systolic)>=130&&(null===e||void 0===e?void 0:e.values.systolic)<=139?e.values.systolic:void 0,hbps2s:(null===e||void 0===e?void 0:e.values.systolic)>=140?e.values.systolic:void 0,hbpcs:(null===e||void 0===e?void 0:e.values.systolic)>=180?e.values.systolic:void 0,nbpd:(null===e||void 0===e?void 0:e.values.diastolic)>=60&&(null===e||void 0===e?void 0:e.values.diastolic)<80?e.values.diastolic:void 0,ebpd:(null===e||void 0===e?void 0:e.values.diastolic)<80?e.values.diastolic:void 0,hbpd:(null===e||void 0===e?void 0:e.values.diastolic)>=80&&(null===e||void 0===e?void 0:e.values.diastolic)<=90?e.values.diastolic:void 0,hbps2d:(null===e||void 0===e?void 0:e.values.diastolic)>=90?e.values.diastolic:void 0,hbpcd:(null===e||void 0===e?void 0:e.values.diastolic)>=120?e.values.diastolic:void 0})});const a=e=>{var t,n;const{cx:r,cy:i,fill:o,payload:a,alertName:s}=e;return(0,Gt.jsx)("svg",{x:r-6,y:i-6,width:12,height:12,fill:(null===a||void 0===a||null===(t=a.alerts)||void 0===t?void 0:t.length)>0&&(null===(n=a.alerts)||void 0===n?void 0:n.findIndex(e=>e.data_name===s))>=0?Lde.palette.error.main:o,viewBox:"0 0 24 24",children:(0,Gt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"})})},s=e=>{const{x:t,y:n,payload:r}=e;return(0,Gt.jsx)("g",{transform:"translate(".concat(t,",").concat(n,")"),children:(0,Gt.jsx)("text",{x:16,y:0,dy:16,textAnchor:"end",fill:"#666",transform:"rotate(0)",children:r.value})})},l=e=>{var t;let{active:n,payload:r}=e;const o=null===(t=r[0])||void 0===t?void 0:t.payload;if(n&&r&&null!==r&&void 0!==r&&r.length)return(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#fff",border:"1px solid #ccc",p:1.5,width:250},children:[(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===o||void 0===o?void 0:o.name)}),(0,Gt.jsx)(Ym,{color:Lde.palette.deepPurple[500],gutterBottom:!0,variant:"body2",children:"Systolic: ".concat(null===o||void 0===o?void 0:o.Systolic)}),(0,Gt.jsx)(Ym,{color:Lde.palette.blue[500],gutterBottom:!0,variant:"body2",children:"Diastolic:  ".concat(null===o||void 0===o?void 0:o.Diastolic)}),(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",children:"Stage:  ".concat(i("rpm_".concat(null===o||void 0===o?void 0:o.key)))})]})},c=e=>{const{payload:t}=e;return(0,Gt.jsx)(Eu,{component:"ul",className:"recharts-default-legend",sx:{p:0,m:0,textAlign:"center"},children:t.map((e,t)=>("Systolic"===e.dataKey||"Diastolic"===e.dataKey)&&(0,Gt.jsxs)(Eu,{component:"li",className:"recharts-legend-item legend-item-".concat(t),sx:{display:"inline-block",marginRight:"10px"},children:[(0,Gt.jsx)("svg",{className:"recharts-surface",width:"14",height:"14",viewBox:"0 0 32 32",version:"1.1",style:{display:"inline-block",verticalAlign:"middle",marginRight:"4px"},children:(0,Gt.jsx)("path",{strokeWidth:"4",fill:"none",stroke:e.color,d:"M0,16h10.666666666666666 A5.333333333333333,5.333333333333333,0,1,1,21.333333333333332,16 H32M21.333333333333332,16 A5.333333333333333,5.333333333333333,0,1,1,10.666666666666666,16",className:"recharts-legend-icon"})}),(0,Gt.jsx)(Eu,{component:"span",className:"recharts-legend-item-text",sx:{color:e.color},children:e.value})]},"item-".concat(t)))})};return(0,Gt.jsx)(Gt.Fragment,{children:(null===o||void 0===o?void 0:o.length)>0?(0,Gt.jsx)(l2,{width:"100%",height:"100%",children:(0,Gt.jsxs)($le,{data:o.reverse(),children:[(0,Gt.jsx)(Poe,{y:120,label:"",stroke:Lde.palette.deepPurple[500],strokeDasharray:"3 3"}),(0,Gt.jsx)(Poe,{y:100,label:"",stroke:Lde.palette.blue[500],strokeDasharray:"3 3"}),!1,(0,Gt.jsx)(kle,{dataKey:"name",tick:(0,Gt.jsx)(s,{})}),(0,Gt.jsx)(Fle,{dataKey:"amt",label:{value:"Sys / Dia  (mmHg)",angle:"-90",position:"center",dx:-20,fontSize:"0.8rem"}}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(l,{})}),(0,Gt.jsx)(L3,{verticalAlign:"top",content:(0,Gt.jsx)(c,{})}),r.includes("systolic")&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(qse,{strokeWidth:1,type:"monotone",dataKey:"Systolic",stroke:Lde.palette.deepPurple[300],dot:!1}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"nbps",stroke:Lde.palette.green[700],dot:!1}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"ebps",stroke:Lde.palette.amber[700],dot:!1}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"hbps",stroke:Lde.palette.orange[700],dot:!1}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"hbps2s",stroke:Lde.palette.red[400],dot:!1}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"hbpcs",stroke:Lde.palette.red[800],dot:!1})]}),r.includes("diastolic")&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(qse,{strokeWidth:1,type:"monotone",dataKey:"Diastolic",stroke:Lde.palette.blue[500],dot:!1,activeDot:(0,Gt.jsx)(a,{alertName:"diastolic"})}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"nbpd",stroke:Lde.palette.green[700],dot:!1}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"ebpd",stroke:Lde.palette.amber[700],dot:!1}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"hbpd",stroke:Lde.palette.orange[700],dot:!1}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"hbps2d",stroke:Lde.palette.red[400],dot:!1}),(0,Gt.jsx)(qse,{strokeWidth:2,type:"monotone",dataKey:"hbpcd",stroke:Lde.palette.red[800],dot:!1})]}),r.includes("pulse")&&(0,Gt.jsx)(qse,{strokeWidth:1,type:"monotone",dataKey:"Pulse",stroke:Lde.palette.primary.main,dot:!1})]})}):(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6},children:(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",children:(0,Gt.jsx)("img",{src:n,style:{display:"block",margin:"auto"}})})})})}Rye.defaultProps={patientBpReport:[],checkState:[]};function Nye(e){let{patientBpReport:t,getAlertClassName:n}=e;const{t:r}=vg(),i=[];as(t)||null===t||void 0===t||t.forEach(e=>{i.push({name:sa()(e.ts).format("DD MMM"),Systolic:e.values.systolic,Diastolic:e.values.diastolic,Pulse:e.values.pulse,amt:1.25*e.values.systolic,alerts:e.alerts,date:sa()(e.ts).format("DD MMM YYYY hh:mm A")})});const o=e=>{var t;let r=null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.green[300];var i,o,a,s,l;"CheckLowBP"===n(e)&&(r=null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[300]);"ElevatedBloodPressure"===n(e)&&(r=null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[600]);"Hypertension_Stage1"===n(e)&&(r=null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[300]);"Hypertensive_Stage2"===n(e)&&(r=null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.red[500]);"Hypertensive_Crisis"===n(e)&&(r=null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.red[700]);return r},a=e=>{var t,i;let{active:a,payload:s}=e;const l=null!==(t=s[0])&&void 0!==t&&t.payload?null===(i=s[0])||void 0===i?void 0:i.payload:{},c=n(l);var d;if(a&&s&&null!==s&&void 0!==s&&s.length)return(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#fff",border:"1px solid #ccc",p:1.5,width:250},children:[(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===l||void 0===l?void 0:l.date)}),(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Systolic: ".concat(null===l||void 0===l?void 0:l.Systolic)}),(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Diastolic:  ".concat(null===l||void 0===l?void 0:l.Diastolic)}),c?(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,color:o(null===(d=s[0])||void 0===d?void 0:d.payload),children:"Status: ".concat(r("rpm_".concat(c)))}):(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,color:Lde.palette.green[500],children:"Status: ".concat(r("rpm_normal"))})]})};return(0,Gt.jsx)(l2,{width:"100%",children:(0,Gt.jsxs)($le,{width:500,height:300,data:i.reverse(),children:[(0,Gt.jsx)(kle,{dataKey:"name"}),(0,Gt.jsx)(Fle,{dataKey:"amt",label:{value:"Sys / Dia  (mmHg)",angle:"-90",position:"center",dx:-20,fontSize:"0.8rem"}}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(a,{})}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Systolic",stroke:Lde.palette.primary.main,strokeWidth:2,className:"removeLine",isAnimationActive:!1,dot:!1,activeDot:!1}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Diastolic",stroke:Lde.palette.primary.main,strokeWidth:2,className:"removeLine",isAnimationActive:!1,dot:!1,activeDot:!1}),(0,Gt.jsx)(sce,{component:e=>{var t;let{formattedGraphicalItems:n}=e;const r=n[0],i=n[1];return null===r||void 0===r||null===(t=r.props)||void 0===t?void 0:t.points.map((e,t)=>{var n,a;const s=null===r||void 0===r||null===(n=r.props)||void 0===n?void 0:n.points[t],l=null===i||void 0===i||null===(a=i.props)||void 0===a?void 0:a.points[t],c=s.y-l.y;return(0,Gt.jsx)(Q1,{radius:8,width:10,height:-c-10,x:s.x-5,y:s.y+5,fill:o(null===e||void 0===e?void 0:e.payload)},t)})}})]})})}Nye.defaultProps={patientBpReport:[],getAlertClassName:()=>{}};const Lye=Nye;const Iye=function(e){let{row:t,name:n,checkState:r,onCheck:i,bpVitalData:o,handleSelectAllClick:a}=e;return(0,Gt.jsx)(Eue,{row:!!t,children:null===o||void 0===o?void 0:o.map(e=>(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(jC,{name:e.id,checked:r.includes(e.id),onChange:i}),label:e.name},e.id))})};function Fye(e){let{patientBpReport:t}=e;const n=e=>{let t=Ms(e);return"tachycardia"===t?"Tachycardia":"bradycardia"===t?"Bradycardia":"Normal"},r=[];null===t||void 0===t||t.forEach(e=>{r.push({name:sa()(e.ts).format("DD MMM"),Systolic:e.values.systolic,Diastolic:e.values.diastolic,Pulse:{value:e.values.pulse,status:n(e)},amt:1.75*e.values.pulse,alerts:e.alerts,date:sa()(e.ts).format("DD MMM YYYY hh:mm A")})});const i=e=>{var t;let n=null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.green[300],r=Ms(e);var i,o;return"tachycardia"===r?null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.red[300]:"bradycardia"===r?null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[300]:n},o=e=>{const{cx:t,cy:n,payload:r}=e;return(0,Gt.jsx)("svg",{x:t-4,y:n-4,width:8,height:8,fill:i(r),viewBox:"0 0 24 24",children:(0,Gt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"})})},a=e=>{var t,n;let{active:r,payload:o}=e;const a=null!==(t=o[0])&&void 0!==t&&t.payload?null===(n=o[0])||void 0===n?void 0:n.payload:{};var s,l,c;if(r&&o&&null!==o&&void 0!==o&&o.length)return(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#fff",border:"1px solid #ccc",p:1.5,width:250},children:[(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===a||void 0===a?void 0:a.date)}),(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Pulse:  ".concat(null===a||void 0===a||null===(s=a.Pulse)||void 0===s?void 0:s.value)}),(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,color:i(null===(l=o[0])||void 0===l?void 0:l.payload),children:"Status: ".concat(null===a||void 0===a||null===(c=a.Pulse)||void 0===c?void 0:c.status)})]})};return(0,Gt.jsx)(l2,{width:"100%",children:(0,Gt.jsxs)($le,{width:500,height:300,data:r.reverse(),children:[(0,Gt.jsx)(kle,{dataKey:"name"}),(0,Gt.jsx)(Fle,{dataKey:"amt",label:{value:"Pulse (BPM)",angle:"-90",position:"center",dx:-20,fontSize:"0.8rem"}}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(a,{})}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Pulse.value",stroke:Lde.palette.primary.main,strokeWidth:2,isAnimationActive:!1,dot:(0,Gt.jsx)(o,{}),activeDot:(0,Gt.jsx)(o,{})})]})})}Fye.defaultProps={patientBpReport:[]};const $ye=Fye;function Bye(e){let{stageAlertData:t,height:n,width:r}=e;const{t:i}=vg(),[o,a]=We.useState([]),s=["CheckLowBP","ElevatedBloodPressure","Hypertension_Stage1","Hypertensive_Stage2","Hypertensive_Crisis","normal"],l=["CheckLowBP","ElevatedBloodPressure","Hypertension_Stage1","Hypertensive_Stage2","Hypertensive_Crisis",""],c=e=>{var t;let n=null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.green[300];var r,i,o,a,s;"CheckLowBP"===(null===e||void 0===e?void 0:e.id)&&(n=null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.orange[300]);"ElevatedBloodPressure"===(null===e||void 0===e?void 0:e.id)&&(n=null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[600]);"Hypertension_Stage1"===(null===e||void 0===e?void 0:e.id)&&(n=null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.red[300]);"Hypertensive_Stage2"===(null===e||void 0===e?void 0:e.id)&&(n=null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[500]);"Hypertensive_Crisis"===(null===e||void 0===e?void 0:e.id)&&(n=null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.red[700]);return n},d=Math.PI/180,u=e=>{var t,n;let{active:r,payload:i}=e;const o=null!==(t=i[0])&&void 0!==t&&t.payload?null===(n=i[0])||void 0===n?void 0:n.payload:{};if(r&&i&&null!==i&&void 0!==i&&i.length)return(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#ffffff",border:"1px solid #cccccc",p:1.5,width:250},children:[(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:(0,Gt.jsx)(Eu,{component:"span",color:"normal"!==(null===o||void 0===o?void 0:o.id)?c(null===o||void 0===o?void 0:o.payload):Lde.palette.green[500],children:null===o||void 0===o?void 0:o.name})}),(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Count:  ".concat(null===o||void 0===o?void 0:o.value)})]})};return We.useEffect(()=>{(()=>{let e=[],n=[];const r=null===t||void 0===t?void 0:t.map(e=>Ss(e));null===l||void 0===l||l.forEach(e=>{const t=null===r||void 0===r?void 0:r.filter(t=>t===e);n.push({id:e||i("rpm_normal"),name:i(e?"rpm_".concat(e):"rpm_normal"),value:null===t||void 0===t?void 0:t.length})}),null===s||void 0===s||s.forEach(n=>{const r=null===t||void 0===t?void 0:t.filter(e=>{var t,r,i=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.find(e=>"systolic"==(null===e||void 0===e?void 0:e.data_name));return(null===e||void 0===e||null===(r=e.alerts)||void 0===r?void 0:r.length)&&(null===i||void 0===i?void 0:i.text)==n}),o=null===t||void 0===t?void 0:t.filter(function(e){var t,n;if(1===(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length))return"pulse"===(null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.data_name)}),a=null===t||void 0===t?void 0:t.filter(function(e){var t;if(void 0===(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length))return!0});null!==r&&void 0!==r&&r.length&&e.push({id:n,name:i("rpm_".concat(n)),value:null===r||void 0===r?void 0:r.length}),"normal"===n&&(a.length||o.length)&&e.push({id:n,name:i("rpm_".concat(n)),value:(null===a||void 0===a?void 0:a.length)+(null===o||void 0===o?void 0:o.length)})}),a(n)})()},[t]),(0,Gt.jsx)(l2,{width:"100%",height:"100%",children:(0,Gt.jsxs)(fde,{width:r||400,height:n||400,children:[(0,Gt.jsx)(mde,{data:o,cx:"50%",cy:"50%",innerRadius:r?r/4.5:70,outerRadius:n?n/2:150,paddingAngle:0,labelLine:!1,label:e=>{const{cx:t,cy:n,midAngle:r,innerRadius:i,outerRadius:o,percent:a}=e,s=i+.5*(o-i),l=t+s*Math.cos(-r*d),c=n+s*Math.sin(-r*d);return(0,Gt.jsx)("text",{x:l,y:c,fill:"white",textAnchor:l>t?"start":"end",dominantBaseline:"central",children:0==a?null:"".concat((100*a).toFixed(0),"%")})},dataKey:"value",children:o.map((e,t)=>(0,Gt.jsx)(sre,{fill:c(e)},"cell-".concat(t)))}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(u,{})})]})})}Bye.defaultProps={stageAlertData:[]};const zye=Bye;function Hye(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y;let{order:b,orderBy:j,setOrder:w,setOrderBy:_,dataParameter:C,headCellsItems:S,checkState:A,onCheck:k,isSelection:M,nodata:O,pageDetails:T,fetchPatientBpReportList:E,getReadingColor:P,bpVitalData:D,handleSelectAllClick:R,readingCounts:N,stageAlertData:L,getStageStatus:I,patientLastFrame:F,deleteReadingButton:$}=e;const{t:B}=vg(),[z,H]=We.useState("AllStage"),[W,V]=We.useState("trend"),U=e=>{switch(e){case"LowBloodPressure":{const e=null===L||void 0===L?void 0:L.filter(e=>"LowBloodPressure"===e.key);return e}case"NormalPressure":{const e=null===L||void 0===L?void 0:L.filter(e=>"NormalPressure"===e.key);return e}case"ElevatedBloodPressure":{const e=null===L||void 0===L?void 0:L.filter(e=>"ElevatedBloodPressure"===e.key);return e}case"HighBloodPressure":{const e=null===L||void 0===L?void 0:L.filter(e=>"HighBloodPressure"===e.key);return e}case"HighBloodPressureStage2":{const e=null===L||void 0===L?void 0:L.filter(e=>"HighBloodPressureStage2"===e.key);return e}case"HypertensiveCrisis":{const e=null===L||void 0===L?void 0:L.filter(e=>"HypertensiveCrisis"===e.key);return e}default:return L&&L}},q=[{value:"CheckLowBP",color:null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.orange[300],darkColor:null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.orange[700]},{value:"ElevatedBloodPressure",color:null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.orange[600],darkColor:null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[900]},{value:"Hypertension_Stage1",color:null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.red[300],darkColor:null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[500]},{value:"Hypertensive_Stage2",color:null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.red[500],darkColor:null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.red[700]},{value:"Hypertensive_Crisis",color:null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.red[700],darkColor:null===Lde||void 0===Lde||null===(d=Lde.palette)||void 0===d?void 0:d.red[900]},{value:"normal",color:null===Lde||void 0===Lde||null===(u=Lde.palette)||void 0===u?void 0:u.green[300],darkColor:null===Lde||void 0===Lde||null===(p=Lde.palette)||void 0===p?void 0:p.green[700]}],G=e=>{let{legend:t}=e;return t.length>0&&(0,Gt.jsx)(Eu,{textAlign:"right",children:(0,Gt.jsx)(Eu,{component:"ul",p:0,m:0,display:"inline-flex",flexWrap:"wrap",children:null===q||void 0===q?void 0:q.map((e,t)=>(0,Gt.jsxs)(Ym,{component:"li",fontSize:14,sx:{listStyle:"none",display:"flex",alignItems:"center",mr:1.5},children:[(0,Gt.jsx)(gye.A,{sx:{width:10,color:e.color}}),(0,Gt.jsx)(Eu,{component:"span",ml:1,color:e.darkColor,children:B("rpm_".concat(e.value))})]},t))})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2.5,mt:.05,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,sx:{display:"none"},children:[(0,Gt.jsx)(Eu,{pb:1.75,children:(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Iye,{row:!0,name:"vitals",onCheck:k,checkState:A,bpVitalData:D,handleSelectAllClick:R})}),as(N)?(0,Gt.jsx)(dye,{}):(0,Gt.jsxs)(df,{item:!0,xs:12,sm:!0,container:!0,spacing:2.5,justifyContent:"flex-end",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)(lce.A,{sx:{color:"primary.theme.300"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:B("rpm_TotalReadings")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:null===N||void 0===N?void 0:N.totalCounts})]})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)(vye.A,{sx:{color:"primary.theme.300"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:B("rpm_TotalAlerts")}),(0,Gt.jsxs)(df,{container:!0,spacing:1,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:null===N||void 0===N?void 0:N.totalAlerts})}),!1]})]})]})})]})]})}),(0,Gt.jsx)(Af,{sx:{mx:-2}})]}),!1]}),(0,Gt.jsxs)(df,{container:!0,spacing:2.5,mt:.05,children:[(0,Gt.jsx)(df,{item:!0,xs:12,lg:7,children:(0,Gt.jsx)(aH,{variant:"outlined",sx:{height:"100%"},children:(0,Gt.jsxs)(uH,{sx:{height:"100%"},children:[!as(L)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Dye,{exclusive:!0,size:"small",color:"primary",value:W,onChange:(e,t)=>{null!==t&&V(t)},sx:{mb:1.5,"& .MuiToggleButton-root":{px:2.25}},children:[(0,Gt.jsx)(kye,{value:"trend",children:B("rpm_Trend")}),(0,Gt.jsx)(kye,{value:"pie",children:B("rpm_Donut")})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,Gt.jsx)(Ym,{variant:"body2",children:B("rpm_LastReading")}),as(F)?(0,Gt.jsx)(ZC,{sx:{ml:3},variant:"rounded",width:75}):(0,Gt.jsxs)(Eu,{fontSize:"body2.fontSize",sx:{bgcolor:"primary.theme.50",px:1,py:.5,borderRadius:1,ml:3},children:[B("rpm_BP"),": ",null===(h=F[0])||void 0===h||null===(m=h.values)||void 0===m?void 0:m.systolic,"/",null===(f=F[0])||void 0===f||null===(g=f.values)||void 0===g?void 0:g.diastolic," | ",B("rpm_Pulse"),":"," ",null===(v=F[0])||void 0===v||null===(x=v.values)||void 0===x?void 0:x.pulse]})]})})]}),(0,Gt.jsx)(df,{container:!0,spacing:1,justifyContent:"flex-end",mt:.05,children:(0,Gt.jsx)(df,{item:!0,md:8,children:(0,Gt.jsx)(G,{legend:q})})})]}),"trend"===W?(0,Gt.jsx)(Eu,{sx:{height:"100%"},children:L?as(L)?(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",height:"100%",children:(0,Gt.jsx)("img",{src:O,style:{display:"block",margin:"auto",maxWidth:"300px",width:"100%",height:"auto"}})}):(0,Gt.jsxs)(Gt.Fragment,{children:[!1,(0,Gt.jsx)(Eu,{sx:{height:"300px"},children:(0,Gt.jsx)(Lye,{patientBpReport:U(z),getAlertClassName:Ss})}),(0,Gt.jsx)(Eu,{sx:{height:"200px"},children:(0,Gt.jsx)($ye,{patientBpReport:U(z)})})]}):(0,Gt.jsx)(Eu,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,Gt.jsx)(vT,{color:"primary",sx:{m:"auto"}})})}):(0,Gt.jsx)(Eu,{sx:{height:"400px"},children:L?as(L)?(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",height:"100%",children:(0,Gt.jsx)("img",{src:O,style:{display:"block",margin:"auto"}})}):(0,Gt.jsx)(zye,{stageAlertData:L}):(0,Gt.jsx)(Eu,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,Gt.jsx)(vT,{color:"primary",sx:{m:"auto"}})})})]})})}),(0,Gt.jsx)(df,{item:!0,xs:12,lg:5,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:b,orderBy:j,setOrder:w,setOrderBy:_,data:U(z),headCells:S,dataParameter:C,selected:A,setSelected:k,isSelection:M,noDataImage:O,fetchList:E,pageDetails:T,skeletonVrows:6,stickyHeader:!0,scrollHeight:570,className:"theme_scroll",children:null===(y=U(z))||void 0===y?void 0:y.map(e=>{var t,n,r,i,o,a;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[M&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:k,checked:A.includes(e.id.toString()),name:e.id,color:"primary"})}),(0,Gt.jsxs)(rC,{children:[e.ts,(0,Gt.jsxs)(Ym,{variant:"caption",component:"p",children:["(",sa()(e.ts).fromNow(),")"]})]}),(0,Gt.jsx)(rC,{children:e.values.systolic?(0,Gt.jsx)(Gt.Fragment,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0&&!as(Ss(e))?(0,Gt.jsx)(Eu,{className:Ss(e),display:"inline-flex",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.systolic})}):(0,Gt.jsx)(Eu,{className:"normal",display:"inline-flex",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.systolic})})}):"NA"}),(0,Gt.jsx)(rC,{children:e.values.diastolic?(0,Gt.jsx)(Gt.Fragment,{children:(null===e||void 0===e||null===(n=e.alerts)||void 0===n?void 0:n.length)>0&&!as(Ss(e))?(0,Gt.jsx)(Eu,{className:Ss(e),display:"inline-flex",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.diastolic})}):(0,Gt.jsx)(Eu,{className:"normal",display:"inline-flex",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.diastolic})})}):"NA"}),(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&null!==(r=e.values)&&void 0!==r&&r.pulse?(0,Gt.jsx)(Gt.Fragment,{children:(null===e||void 0===e||null===(i=e.alerts)||void 0===i?void 0:i.length)>0&&Ms(e)?(0,Gt.jsx)(Eu,{className:Ms(e),display:"inline-flex",children:(0,Gt.jsx)(Eu,{component:"span",children:null===e||void 0===e||null===(o=e.values)||void 0===o?void 0:o.pulse})}):(0,Gt.jsx)(Eu,{className:"normal",display:"inline-flex",children:(0,Gt.jsx)(Eu,{component:"span",children:null===e||void 0===e||null===(a=e.values)||void 0===a?void 0:a.pulse})})}):"NA"}),(0,Gt.jsx)(rC,{children:$(e)}),!1]},e.id)})})})})]})]})}Hye.defaultProps={headCellsItems:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientBpReport:[],fetchPatientBpReportList:()=>{},fiterReportData:()=>{},filterInitialData:{},getReadingColor:()=>{},getStatus:()=>{},bpVitalData:[],handleSelectAllClick:()=>{},reportView:"chart",handleReportView:()=>{},stageAlertData:[],getStageStatus:()=>{},patientLastFrame:[],deleteReadingButton:()=>{}};const Wye=Hye;function Vye(e){let{resolveAlertsPageDetails:t,resolveAlertCount:n,resolveAlertBpHeadCell:r,fetchResolvePatientAlerts:i}=e;const{t:o}=vg();return(0,Gt.jsxs)(Eu,{sx:{"& .MuiPaper-root":{borderTopLeftRadius:0,borderTopRightRadius:0}},children:[(0,Gt.jsx)(EM,{noDataImage:D_,data:n,headCells:r,fetchList:i,skeletonVrows:6,stickyHeader:!0,scrollHeight:400,className:"theme_scroll",children:null===n||void 0===n?void 0:n.map(e=>{var t;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{sx:{textTransform:"capitalize","& > .name":{"&::after":{content:'"/"',mx:.5},":last-child":{"&::after":{display:"none"}}}},children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((t,n)=>{var r,i,a,s;return(0,Gt.jsx)(Eu,{className:null===t||void 0===t?void 0:t.text,display:"inline-flex",mr:n===(null===e||void 0===e||null===(r=e.alerts)||void 0===r?void 0:r.length)-1?0:1,children:(0,Gt.jsxs)(Eu,{component:"span",children:["bp systolic"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(o("rpm_Sys"),": "),"bp diastolic"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(o("rpm_Dia"),": "),"glucose"===(null===t||void 0===t||null===(i=t.data_name)||void 0===i||null===(a=i.split(" "))||void 0===a?void 0:a[0])&&"".concat(null===t||void 0===t||null===(s=t.data_name)||void 0===s?void 0:s.replace("glucose",""),": "),"pulse"===(null===t||void 0===t?void 0:t.data_name)&&"".concat(o("rpm_pulse"),": "),null===t||void 0===t?void 0:t.value]})},n)}):"NA"}),(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,Gt.jsx)(Eu,{children:0===t&&(0,Gt.jsx)(Eu,{component:"span",children:o("rpm_".concat(null===e||void 0===e?void 0:e.text))})},t))}),(0,Gt.jsx)(rC,{width:"45%",sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Eu,{sx:{wordBreak:"break-all"},children:e.follow_up?e.follow_up:"-"})}),(0,Gt.jsx)(rC,{children:e.dismissed_at})]},e.id)})}),(0,Gt.jsx)(IO,{pageDetails:t,fetchListFunction:i})]})}const Uye=function(e){let{order:t,orderBy:n,setOrder:r,setOrderBy:o,dataParameter:a,checkState:s,onCheck:l,isSelection:c,nodata:d,pageDetails:u,activeAlertsPageDetails:p,resolveAlertsPageDetails:h,headCellsItemsBp:m,patientBpReport:f,fetchPatientBpReportList:g,fiterReportData:v,filterInitialData:x,activeAlertBpHeadCell:y,activeAlertCount:b,fetchPatientAlerts:j,resolveAlertCount:w,resolveAlertBpHeadCell:_,fetchResolvePatientAlerts:C,resolvedButton:S,getStatus:A,getReadingColor:k,bpVitalData:M,bpVitalData1:O,handleSelectAllClick:T,filterDate:E,handleDateFilter:P,readingCounts:D,stageAlertData:R,getStageStatus:N,alertStatic:L,userData:I,patientLastFrame:F,fetchBPAndAlertsList:$,deleteAlertButton:B,deleteReadingButton:z,patientData:H,program:W,patientMissedReading:V,activeCourse:U}=e;const[q,G]=We.useState(null),Y=Boolean(q),Z=e=>{G(e.currentTarget)},K=()=>{G(null)},{t:X}=vg(),Q=so(),[J,ee]=We.useState(0),[te,ne]=We.useState("panel1"),[re,ie]=We.useState(!1),oe=e=>(t,n)=>{ne(!!n&&e)};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{bgcolor:"#fff",p:1,sx:{borderRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,alignItems:"center",children:[b?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(df,{item:!0,className:"patientDashboard-tour-step1",children:(0,Gt.jsx)(yf,{className:"linkNoClr",color:"inherit",onClick:()=>{ne("panel2"),ee(1)},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)("img",{src:mye,height:40})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:X("rpm_ResolvedAlerts")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:null===L||void 0===L?void 0:L.resolveAlerts})]})]})})}),(0,Gt.jsx)(df,{item:!0,className:"patientDashboard-tour-step2",children:(0,Gt.jsx)(yf,{className:"linkNoClr",color:"inherit",onClick:()=>{ne("panel2"),ee(0)},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)("img",{src:hye,height:40})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:X("rpm_ActiveAlerts")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:null===L||void 0===L?void 0:L.activeAlerts})]})]})})}),!1]}):(0,Gt.jsx)(dye,{}),(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,justifyContent:"flex-end",alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Iz,{initialValues:x,onSubmit:$,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,resetForm:r}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",justifyContent:"flex-end",children:[(0,Gt.jsx)(df,{item:!0,className:"patientDashboard-tour-step4",children:(0,Gt.jsxs)(df,{container:!0,spacing:1,alignItems:"center",sx:{borderRadius:"8px"},className:"ExtralightBG",p:.2,pb:.8,mt:0,pr:1,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Xj,{sx:{minWidth:120},size:"small",children:[(0,Gt.jsx)(qj,{id:"filter_report",children:"Filter"}),(0,Gt.jsxs)(Hz,{as:Dw,sx:{bgcolor:"#fff"},label:"Filter",labelId:"filter_report",id:"filter_report",name:"filter_report",onChange:e=>{n("filter_report",e.target.value),"custom"!==e.target.value&&$((0,i.A)((0,i.A)({},t),{},{filter_report:e.target.value}))},children:[(0,Gt.jsx)($m,{value:"day",children:"Day"}),(0,Gt.jsx)($m,{value:"weekly",children:"Weekly"}),(0,Gt.jsx)($m,{value:"monthly",children:"Monthly"}),(0,Gt.jsx)($m,{value:"course",children:"Course"}),(0,Gt.jsx)($m,{value:"custom",children:"Custom"})]}),(0,Gt.jsx)(Xz,{name:"filter_report",children:e=>(0,Gt.jsx)(Ym,{component:"span",className:"error",variant:"body2",children:X(e,{field:X("rpm_FilterReport")})})})]})}),"custom"!==t.filter_report&&"course"!==E.filter_report&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#fff",px:1,borderRadius:1},children:[(0,Gt.jsx)(Kp,{onClick:()=>P({value:"<",table:"trends"}),size:"small",children:(0,Gt.jsx)(uye.A,{fontSize:"small"})}),(0,Gt.jsxs)(Ym,{variant:"body2",component:"span",children:[sa()(E.from).format("DD MMM YYYY")," - ",sa()(E.to).format("DD MMM YYYY")]}),sa()().diff(sa()(E.to),"days")>0&&(0,Gt.jsx)(Kp,{onClick:()=>P({value:">",table:"trends"}),size:"small",children:(0,Gt.jsx)(pye.A,{fontSize:"small"})})]})}),"course"===E.filter_report&&"custom"!==t.filter_report&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{sx:{bgcolor:"#fff",px:2,py:1,borderRadius:1},children:(0,Gt.jsxs)(Ym,{variant:"body2",component:"span",children:[sa()(U.start_date).format("DD MMM YYYY")," - ",sa()(U.end_date).format("DD MMM YYYY")]})})}),"custom"==t.filter_report&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{sx:{width:"160px","& .MuiOutlinedInput-input":{py:1.0625},bgcolor:"#fff"},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"From",id:"from",name:"from",inputFormat:"dd/MM/yyyy",value:t.from?new Date(parseInt(t.from,10)):null,onChange:e=>n("from",sa()(e).valueOf()),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),maxDate:new Date})})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{sx:{width:"160px","& .MuiOutlinedInput-input":{py:1.0625},bgcolor:"#fff"},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"To",id:"to",name:"to",inputFormat:"dd/MM/yyyy",value:t.to?new Date(parseInt(t.to,10)):null,onChange:e=>n("to",sa()(e).valueOf()),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),maxDate:t.to?new Date:null,minDate:t.from})})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:"Submit"})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{placement:"top","aria-label":"Reset Filter",title:"Reset Filter",children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:()=>{r(),$(x)},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,Gt.jsx)(xxe.A,{fontSize:"small"})})})})]})]})}),(0,Gt.jsx)(df,{item:!0,className:"patientDashboard-tour-step3",children:(0,Gt.jsxs)(Xj,{sx:{minWidth:120},size:"small",children:[(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",id:"basic-button","aria-controls":Y?"demo-customized-menu":void 0,"aria-haspopup":"true","aria-expanded":Y?"true":void 0,disableElevation:!0,onClick:Z,endIcon:(0,Gt.jsx)(Gy.A,{}),children:"Reports"}),(0,Gt.jsxs)(km,{id:"basic-menu",anchorEl:q,open:Y,onClose:K,MenuListProps:{"aria-labelledby":"basic-button"},children:[(0,Gt.jsx)($m,{onClick:()=>{K(),Q("".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===W||void 0===W?void 0:W.code,"/patients/").concat(null===H||void 0===H?void 0:H.id,"/bp/report"))},children:X("rpm_summarized")}),(0,Gt.jsx)($m,{onClick:()=>{K(),Q("".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===W||void 0===W?void 0:W.code,"/patients/").concat(null===H||void 0===H?void 0:H.id,"/bp/report/detailed"))},children:X("rpm_detailed")})]})]})})]})})})}},"filter_formik")})})})]})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,mt:.01,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(aH,{variant:"outlined",sx:{border:"none"},className:"medicalChartAccordian",children:(0,Gt.jsxs)(lU,{expanded:"panel1"===te,onChange:oe("panel1"),children:[(0,Gt.jsx)(jU,{expandIcon:(0,Gt.jsx)(Eu,{sx:{lineHeight:"0",color:"primary.main"},children:(0,Gt.jsx)(Jg.A,{})}),sx:{bgcolor:"white","&.MuiAccordionSummary-root":{"&.Mui-expanded":{minHeight:48}},"& .MuiAccordionSummary-content":{"&.Mui-expanded":{my:1.5}}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"Vital Trends"})}),(0,Gt.jsx)(hU,{sx:{p:0},children:(0,Gt.jsx)(uH,{sx:{pb:0},className:"patientDashboard-tour-step5",children:(0,Gt.jsx)(Wye,{order:t,orderBy:n,setOrder:r,setOrderBy:o,dataParameter:a,checkState:s,onCheck:l,isSelection:c,nodata:d,pageDetails:u,headCellsItems:m,patientBpReport:f,fetchPatientBpReportList:g,fiterReportData:v,filterInitialData:x,getReadingColor:k,getStatus:A,bpVitalData:M,bpVitalData1:O,handleSelectAllClick:T,reportView:re,handleReportView:()=>{ie(!re)},readingCounts:D,stageAlertData:R,getStageStatus:N,patientLastFrame:F,deleteReadingButton:z})})})]})})})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,sx:{mt:.01},children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(aH,{variant:"outlined",sx:{border:"none"},className:"medicalChartAccordian patientDashboard-tour-step6",children:(0,Gt.jsxs)(lU,{expanded:"panel2"===te,onChange:oe("panel2"),children:[(0,Gt.jsx)(jU,{expandIcon:(0,Gt.jsx)(Eu,{sx:{lineHeight:"0",color:"primary.main"},children:(0,Gt.jsx)(Jg.A,{})}),sx:{bgcolor:"white","&.MuiAccordionSummary-root":{"&.Mui-expanded":{minHeight:48}},"& .MuiAccordionSummary-content":{"&.Mui-expanded":{my:1.5}}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"Alert Summary"})}),(0,Gt.jsx)(hU,{sx:{p:0},children:(0,Gt.jsxs)(uH,{sx:{pt:0,pb:0},children:[(0,Gt.jsx)(Eu,{sx:{border:1,borderColor:"divider",borderRadius:1,borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(eU,{value:J,onChange:(e,t)=>{ee(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:X("rpm_ActiveAlerts")},kU(0)),{},{sx:{py:1.5}})),(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:X("rpm_ResolvedAlerts")},kU(1)),{},{sx:{py:1.5}}))]})})})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(AU,{value:J,index:0,children:(0,Gt.jsx)(fye,{order:t,orderBy:n,setOrder:r,setOrderBy:o,activeAlertsPageDetails:p,resolvedButton:S,alertData:b,headCellsItems:y,fetchPatientAlerts:()=>j((0,i.A)((0,i.A)({},E),{},{filter_report:""})),filterDate:E,userData:I,deleteAlertButton:B})}),(0,Gt.jsx)(AU,{value:J,index:1,children:(0,Gt.jsx)(Vye,{resolveAlertsPageDetails:h,resolveAlertCount:w,resolveAlertBpHeadCell:_,fetchResolvePatientAlerts:()=>C((0,i.A)((0,i.A)({},E),{},{filter_report:""}))})})]})})]})})]})})})})]})};const qye=function(e){let{options:t,onCloseModal:n,actionFunction:r}=e;const{t:i}=vg();return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{component:"p",variant:"h6",children:i("message:rpm_AlertResolvedBody")}),(0,Gt.jsx)(Ym,{component:"p",variant:"body1"}),(0,Gt.jsx)(Iz,{initialValues:{description:""},validationSchema:vV.resolveAlert,onSubmit:r,enableReinitialize:!0,children:()=>(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(qj,{htmlFor:"description",required:!0,sx:{mb:.75,fontWeight:600},children:i("rpm_FollowUpComment")}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,id:"description",name:"description",color:"primary",size:"small",multiline:!0,rows:4,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:i("message:rpm_DescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:i(e,{field:i("rpm_Followupcomment")})})})]}),(0,Gt.jsx)(Eu,{mt:2.5,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,direction:t.btnSwap?"row-reverse":"row",justifyContent:"start",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:t.btn.primaryColor,disableElevation:!0,variant:"contained",type:"submit",children:t.btn.primaryText})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:t.btn.primaryColor,variant:"outlined",onClick:n,children:t.btn.secondaryText})})]})})]})})},"followup_formik")]})},Gye=["content"],Yye=["content"];const Zye=function(e){let{patientId:t,patientLastFrame:n,patientData:r,program:o}=e;const a=Ct(Bd),s={print_report:"",filter_report:"course",from:null===a||void 0===a?void 0:a.start_date,to:null===a||void 0===a?void 0:a.end_date,page:1},l=[{id:"systolic",name:"Systolic"},{id:"diastolic",name:"Diastolic"},{id:"pulse",name:"Pulse"}],c=[{id:"minimum",name:"Minimum"},{id:"maximum",name:"Maximum"},{id:"average",name:"Average"}],d=Nt(),{t:u}=vg(),{enqueueSnackbar:p}=hi(),h=Ct(Nd),[m,f]=We.useState(!0),[g,v]=We.useState("desc"),[x,y]=We.useState("ts"),[b,j]=We.useState(null),[w,_]=We.useState(null),[C,S]=We.useState(null),[A,k]=We.useState(null),[M,O]=We.useState(["systolic","diastolic","pulse"]),[T,E]=We.useState(null),[P,D]=We.useState(s),[R,N]=We.useState(null),[L,I]=We.useState(null),[F,$]=We.useState((0,i.A)({},Fc)),[B,z]=We.useState((0,i.A)({},Fc)),[H,W]=We.useState((0,i.A)({},Fc)),[V,U]=We.useState({open:!1,data:{}}),[q,G]=We.useState({open:!1,data:{}}),[Y,Z]=We.useState({open:!1,data:{}}),[K,X]=We.useState(null),{schedule:Q}=Ct(Bd),J=null===Q||void 0===Q?void 0:Q.id,ee=null===a||void 0===a?void 0:a.id,te=e=>{U((0,i.A)((0,i.A)({},V),{},{open:!V.open,data:e}))},ne=e=>{G((0,i.A)((0,i.A)({},q),{},{open:!q.open,data:e}))},re=e=>{Z((0,i.A)((0,i.A)({},Y),{},{open:!Y.open,data:e}))},ie=e=>{if(Array.isArray(e))return O(e.map(e=>e.toString()));const t=e.target.name;M.includes(t)&&M.length>1?O(M.filter(e=>e!==t)):O(e=>e.includes(t)?[...e]:[...e,t])},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.filter_report,r=e.from,i=e.to;return"day"===e.filter_report&&(n="day",r=sa()().startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(1,"days").startOf("day").valueOf(),i=sa()(i).subtract(1,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(1,"days").startOf("day").valueOf(),i=sa()(i).add(1,"days").endOf("day").valueOf())),"weekly"===e.filter_report&&(n="weekly",r=sa()().subtract(6,"days").startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(6,"days").startOf("day").valueOf(),i=sa()(i).subtract(6,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(6,"days").startOf("day").valueOf(),i=sa()(i).add(6,"days").endOf("day").valueOf())),"monthly"===e.filter_report&&(n="monthly",r=sa()().subtract(30,"days").startOf("day").valueOf(),i=sa()().valueOf(),"<"===t?(r=sa()(r).subtract(30,"days").startOf("day").valueOf(),i=sa()(i).subtract(30,"days").endOf("day").valueOf()):">"===t&&(r=sa()(r).add(30,"days").startOf("day").valueOf(),i=sa()(i).add(30,"days").endOf("day").valueOf())),"custom"===e.filter_report&&(n="custom",r=sa()(e.from).startOf("day").valueOf(),i=sa()(e.to).endOf("day").valueOf()),"all"===e.filter_report&&(n="all",r="",i=""),D({filter_report:n||(null===P||void 0===P?void 0:P.filter_report),from:r,to:i}),{filter_report:n,from:r,to:i}},ae=async e=>{try{const{data:t}=await d(Zs(e)),n=t||{},r=Object.assign({},(Ixe(n),n));j(t),N(t),$(e=>(0,i.A)((0,i.A)({},e),{},{last_page:r.last_page,current_page:r.current_page,from:r.from,per_page:r.per_page,to:r.to,total:r.total}))}catch(t){p(t.message,{variant:"error"})}},se=async e=>{const n=oe(e),r={patient_id:t,desease:["bp"],duration:[n.from,n.to]};ae(r)},le=async e=>{try{const{data:n}=await d(Xs(t,e)),r=n||{},{content:o}=r,a=Ko(r,Gye);S(o),I(e=>(0,i.A)((0,i.A)({},e),{},{activeAlerts:null===a||void 0===a?void 0:a.total})),z(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(n){p(n.message,{variant:"error"})}},ce=async e=>{const t=oe(e);let n=null===t||void 0===t?void 0:t.from,r=null===t||void 0===t?void 0:t.to;const o=(0,i.A)((0,i.A)({sort_by:x,sort_order:g},B),{},{vitalType:"bp",minTs:n,maxTs:r,current_page:null!==e&&void 0!==e&&e.page?null===e||void 0===e?void 0:e.page:null===B||void 0===B?void 0:B.current_page});le(o)},de=async e=>{try{const{data:n}=await d(Xs(t,e)),r=n||{},{content:o}=r,a=Ko(r,Yye);k(o),I(e=>(0,i.A)((0,i.A)({},e),{},{resolveAlerts:null===a||void 0===a?void 0:a.total})),W(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(n){p(n.message,{variant:"error"})}},ue=async e=>{const t=oe(e);let n=null===t||void 0===t?void 0:t.from,r=null===t||void 0===t?void 0:t.to;const o=(0,i.A)((0,i.A)({},H),{},{vitalType:"bp",sort_by:x,sort_order:g,includeDismissed:!0,minTs:n,maxTs:r});de(o)},pe=e=>{se(e),ce(e),ue(e)};We.useEffect(()=>{const e={filterDate:{start_date:P.from,end_date:P.to,report:P.filter_report},complianceStatus:m?"NA":null!==K&&void 0!==K&&K.status?K.status:"COMPLIANT"};$o.setFilterDate(e.filterDate),d(w_(e))},[P,m]),We.useEffect(()=>{h&&async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{const{data:n}=await d(il({sort_by:"",sort_order:"",per_page:9999,q:e},t)),{content:r}=n||{};E(r)}catch(n){p(n.message,{variant:"error"})}}()},[h]),We.useEffect(()=>{t&&J&&(async()=>{try{const{data:e}=await d(Ys(t,J,ee));X(e)}catch(e){console.log(e)}})()},[t,J,ee]),We.useEffect(()=>{f(!0),setTimeout(()=>{as(a)||pe(s),f(!1)},2e3)},[a]);const he=[{id:"time",label:u("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"systolic",label:u("rpm_Systolic"),isSort:!1,sortProperty:"systolic"},{id:"diastolic",label:u("rpm_Diastolic"),isSort:!1,sortProperty:"diastolic"},{id:"pulse",label:u("rpm_Pulse"),isSort:!1,sortProperty:"pulse"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}],me=[{id:"reading",label:u("rpm_Readings"),isSort:!1,sortProperty:"value"},{id:"conditions",label:u("rpm_Conditions"),isSort:!1,sortProperty:"name"},{id:"time",label:u("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}],fe=[{id:"vitals",label:u("rpm_Vitals"),isSort:!1,sortProperty:"name"},{id:"reading",label:u("rpm_Condition"),isSort:!1,sortProperty:"value"},{id:"msg",label:u("rpm_Message"),isSort:!1,sortProperty:"msg"},{id:"time",label:u("rpm_Time"),isSort:!1,sortProperty:"time"}],ge=[{id:"name",label:u("rpm_Name"),isSort:!1,sortProperty:"name"},{id:"minimum",label:u("rpm_Minimum"),isSort:!1,sortProperty:"minimum"},{id:"maximum",label:u("rpm_Maximum"),isSort:!1,sortProperty:"maximum"},{id:"average",label:u("rpm_Average"),isSort:!1,sortProperty:"average"}];return m?(0,Gt.jsx)(dye,{}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Uye,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:"id",checkState:M,onCheck:ie,isSelection:!1,nodata:D_,pageDetails:F,activeAlertsPageDetails:B,resolveAlertsPageDetails:H,headCellsItemsBp:he,patientLastFrame:n,patientBpReport:b,fetchPatientBpReportList:se,fiterReportData:()=>{},filterInitialData:s,activeAlertBpHeadCell:me,activeAlertCount:C,fetchPatientAlerts:ce,resolveAlertCount:A,resolveAlertBpHeadCell:fe,fetchResolvePatientAlerts:ue,resolvedButton:e=>{var t;return(0,Gt.jsx)(Vp,{size:"small",color:"primary","data-id":e.id,sx:{bgcolor:"primary.theme.50",fontSize:12,px:1.5,"&:hover":{backgroundColor:"primary.theme.50"}},onClick:()=>te(e),disabled:!(null!==o&&void 0!==o&&null!==(t=o.permissions)&&void 0!==t&&t.showDismissAlertPatientBtn),children:u("rpm_FollowUp")})},getStatus:e=>{var t;return(0,Gt.jsx)(Eu,{children:null!==e&&void 0!==e&&null!==(t=e.alerts)&&void 0!==t&&t.length?(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Alert"})}):(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Normal"})})})},getReadingColor:e=>{var t,n;let r=null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.green[50],i=null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.green[900];var o,a,s,l;return e>=Number("100")?{bg:null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.red[100],text:null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[900]}:e<Number("60")?{bg:null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.orange[100],text:null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.orange[900]}:{bg:r,text:i}},bpVitalData:l,bpVitalData1:c,handleSelectAllClick:e=>{let t=[];if(e.target.checked){"vitals"===e.target.name&&(t=l),"average"===e.target.name&&(t=c);const n=t.map(e=>e.id);return void ie(n)}ie([])},headCellAverageReport:ge,averageReport:w,fetchAverageBpReport:async e=>{let n=e.from,r=e.to;"day"===e.filter_report&&(n=sa()().startOf("day").valueOf(),r=sa()().endOf("day").valueOf()),"weekly"===e.filter_report&&(n=sa()().subtract(6,"days").startOf("day").valueOf(),r=sa()().endOf("day").valueOf()),"monthly"===e.filter_report&&(n=sa()().subtract(30,"days").startOf("day").valueOf(),r=sa()().endOf("day").valueOf()),"custom"===e.filter_report&&(n=sa()(e.from).startOf("day").valueOf(),r=sa()(e.to).endOf("day").valueOf());try{const e={patient_id:t,desease:["bp"],duration:[n,r],vitals:["bp.systolic","bp.diastolic","bp.pulse"]},i=await d((e=>async t=>{t(na(!0));try{const t="".concat(ca.patients,"/").concat(e.patient_id,"/data/avg?dataNames=").concat(e.desease[0],"&start=").concat(e.duration[0],"&end=").concat(e.duration[1],"&vitalNames=").concat(e.vitals);return await cu(t,{})}catch(n){return n}finally{t(na(!1))}})(e)),{aggregated_data_point:o}=i.data;let a=[];Object.keys(o).forEach(e=>{a.push({id:e,name:e,minimum:o[e].Min,maximum:o[e].Max,average:o[e].Average})}),_(a)}catch(i){console.log("fetchPatientBpReportList="+i)}},deviceList:T,filterDate:P,handleDateFilter:async e=>{let n=P.filter_report,r=P.from,o=P.to;"day"===P.filter_report&&(n="day","<"===e.value?(r=sa()(r).subtract(1,"days").startOf("day").valueOf(),o=sa()(o).subtract(1,"days").endOf("day").valueOf()):(r=sa()(r).add(1,"days").startOf("day").valueOf(),o=sa()(o).add(1,"days").endOf("day").valueOf())),"weekly"===P.filter_report&&(n="weekly","<"===e.value?(r=sa()(r).subtract(6,"days").startOf("day").valueOf(),o=sa()(o).subtract(6,"days").endOf("day").valueOf()):(r=sa()(r).add(6,"days").startOf("day").valueOf(),o=sa()(o).add(6,"days").endOf("day").valueOf())),"monthly"===P.filter_report&&(n="monthly","<"===e.value?(r=sa()(r).subtract(30,"days").startOf("day").valueOf(),o=sa()(o).subtract(30,"days").endOf("day").valueOf()):(r=sa()(r).add(30,"days").startOf("day").valueOf(),o=sa()(o).add(30,"days").endOf("day").valueOf())),D({filter_report:n,from:r,to:o});const a={patient_id:t,desease:["bp"],duration:[r,o]},s=(0,i.A)((0,i.A)({sort_by:x,sort_order:g},B),{},{vitalType:"bp",minTs:r,maxTs:o}),l=(0,i.A)((0,i.A)({},H),{},{vitalType:"bp",sort_by:x,sort_order:g,includeDismissed:!0,minTs:r,maxTs:o});ae(a),le(s),de(l)},readingCounts:{},stageAlertData:R,getStageStatus:e=>{var t,n,r;let i="",o="",a="",s="",l="";if(null===e||void 0===e||!e.alerts)return(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Normal"})});const c=null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.filter(t=>t.data_name===e.name||("systolic"===t.data_name||("diastolic"===t.data_name||("pulse"===t.data_name||void 0))));return(null===c||void 0===c?void 0:c.findIndex(e=>"systolic"===e.data_name))>=0&&(o=(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"High Systolic"})})),(null===c||void 0===c?void 0:c.findIndex(e=>"diastolic"===e.data_name))>=0&&(a=(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"High Diastolic"})})),(null===c||void 0===c?void 0:c.findIndex(e=>"pulse"===e.data_name))>=0&&(s=(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"High Pulse"})})),(null===c||void 0===c?void 0:c.findIndex(e=>"bp"===e.data_name))>=0&&(l=c.find(e=>"bp"===e.data_name)),i=(0,Gt.jsxs)(Gt.Fragment,{children:[o," ",a," ",s]}),null!==(n=l)&&void 0!==n&&n.text?null===(r=l)||void 0===r?void 0:r.text:i},alertStatic:L,userData:null===o||void 0===o?void 0:o.permissions,fetchBPAndAlertsList:pe,deleteAlertButton:e=>(0,Gt.jsx)(Yx,{title:u("rpm_Delete"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>ne(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})}),deleteReadingButton:e=>(0,Gt.jsx)(Yx,{title:u("rpm_Delete"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>re(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})}),patientData:r,program:o,patientMissedReading:K,activeCourse:a}),(0,Gt.jsx)(PU,{openModal:V.open,onCloseModal:te,actionFunction:async e=>{const n={follow_up:e.description};try{await d(Qs(t,V.data.id,n)),pe((0,i.A)((0,i.A)({},P),{},{filter_report:""})),U((0,i.A)((0,i.A)({},V),{},{open:!V.open})),p(u("message:rpm_ResolveAlertSuccess"),{variant:"success"})}catch(r){p(r.message,{variant:"error"})}},dataName:null,options:{primaryText:u("message:rpm_AlertResolvedTitle"),secondaryText:u("message:rpm_AlertResolvedBody"),descText:u("message:rpm_AlertResolvedSub"),btn:{primaryText:u("rpm_Confirm"),secondaryText:u("rpm_Cancel"),primaryColor:"primary",secondaryColor:"inherit"},btnSwap:!0},children:e=>(0,Gt.jsx)(qye,(0,i.A)({},e))}),(0,Gt.jsx)(PU,{openModal:q.open,onCloseModal:ne,actionFunction:async()=>{try{await d(ml(t,q.data.id)),pe((0,i.A)((0,i.A)({},P),{},{filter_report:""})),G((0,i.A)((0,i.A)({},q),{},{open:!q.open})),p(u("message:rpm_DeleteAlertSuccess"),{variant:"success"})}catch(e){p(e.message,{variant:"error"})}},dataName:null,options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteAlertText"),descText:"",btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(PU,{openModal:Y.open,onCloseModal:re,actionFunction:async()=>{try{await d(fl(t,Y.data.id)),pe((0,i.A)((0,i.A)({},P),{},{filter_report:""})),Z((0,i.A)((0,i.A)({},Y),{},{open:!Y.open})),p(u("message:rpm_DeleteReadingSuccess"),{variant:"success"})}catch(e){p(e.message,{variant:"error"})}},dataName:null,options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteReadingText"),descText:"",btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};function Kye(e){let{glucoseData:t,gridWidth:n,chartWidth:r,chartHeight:o,stage:a}=e;const{t:s}=vg(),[l,c]=We.useState([]),[d,u]=We.useState([]),p=e=>{const t=[];return e.forEach(e=>{t.push((0,i.A)((0,i.A)({},e),{},{name:sa()(e.ts).format("DD MMM"),Glucose:e.values.glucose,amt:1.25*e.values.glucose,alerts:e.alerts,ts:sa()(e.ts).format("DD MMM YYYY hh:mm A")}))}),t.reverse()},h=e=>{var t,n,r,i,o,a,s;let l=null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.green[300];var c,d,u;null!==e&&void 0!==e&&null!==(n=e.alerts)&&void 0!==n&&n.length&&"hypoglycemia"===(null===e||void 0===e||null===(r=e.alerts[0])||void 0===r?void 0:r.text)&&(l=null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.red[200]);null!==e&&void 0!==e&&null!==(i=e.alerts)&&void 0!==i&&i.length&&"prediabetes"===(null===e||void 0===e||null===(o=e.alerts[0])||void 0===o?void 0:o.text)&&(l=null===Lde||void 0===Lde||null===(d=Lde.palette)||void 0===d?void 0:d.orange[300]);null!==e&&void 0!==e&&null!==(a=e.alerts)&&void 0!==a&&a.length&&"diabetes"===(null===e||void 0===e||null===(s=e.alerts[0])||void 0===s?void 0:s.text)&&(l=null===Lde||void 0===Lde||null===(u=Lde.palette)||void 0===u?void 0:u.red[300]);return l},m=e=>{var t,n;let{active:r,payload:i}=e;const o=null!==(t=i[0])&&void 0!==t&&t.payload?null===(n=i[0])||void 0===n?void 0:n.payload:{};var a,l,c,d,u;if(r&&i&&null!==i&&void 0!==i&&i.length)return(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#ffffff",border:"1px solid #cccccc",p:1.5,width:250},children:[(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",children:"Date: ".concat(null===o||void 0===o?void 0:o.ts)}),(0,Gt.jsx)(Ym,{color:(null===o||void 0===o||null===(a=o.alerts)||void 0===a?void 0:a.length)>0?h(null===(l=i[0])||void 0===l?void 0:l.payload):Lde.palette.green[500],gutterBottom:!0,variant:"body2",fontWeight:600,children:"Glucose:  ".concat(null===o||void 0===o?void 0:o.Glucose)}),(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",children:"Event:  ".concat(null===o||void 0===o||null===(c=o.values)||void 0===c?void 0:c.activity)}),(null===o||void 0===o||null===(d=o.alerts)||void 0===d?void 0:d.length)>0?(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Status: ".concat(s("rpm_".concat(null===o||void 0===o||null===(u=o.alerts[0])||void 0===u?void 0:u.text)))}):(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Status: ".concat(s("rpm_NormalGlucose"))})]})},f=e=>{var t;const{cx:n,cy:r,fill:i,payload:o}=e;return(0,Gt.jsx)("svg",{x:n-4,y:r-4,width:8,height:8,fill:(null===o||void 0===o||null===(t=o.alerts)||void 0===t?void 0:t.length)>0?h(o):i,viewBox:"0 0 24 24",children:(0,Gt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"})})};return We.useEffect(()=>{as(d)||(()=>{let e=[];d.forEach(n=>{e.push({id:n,data:null===t||void 0===t?void 0:t.filter(e=>e.values.activity===n)})}),c(e)})()},[d]),We.useEffect(()=>{as(t)||u(kd(t))},[t]),(0,Gt.jsx)(df,{container:!0,spacing:2,mt:.05,children:"AllStage"===a?null===l||void 0===l?void 0:l.map(e=>e.data.length>0&&(0,Gt.jsxs)(df,{item:!0,xs:12,md:n,children:[!as(null===e||void 0===e?void 0:e.data)&&(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,Gt.jsx)(Eu,{sx:{height:"".concat(o,"px")},children:(0,Gt.jsx)(l2,{width:"100%",children:(0,Gt.jsxs)($le,{width:r,height:o,data:p(e.data),children:[(0,Gt.jsx)(kle,{dataKey:"name"}),(0,Gt.jsx)(Fle,{dataKey:"amt",label:{value:"Blood Glucose (in mg/dL)",angle:"-90",position:"center",dx:-30,fontSize:"0.7rem"}}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(m,{})}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Glucose",stroke:Lde.palette.deepPurple[300],strokeWidth:2,isAnimationActive:!1,dot:(0,Gt.jsx)(f,{fill:Lde.palette.green[500]}),activeDot:(0,Gt.jsx)(f,{fill:Lde.palette.green[500]})})]})})})]},null===e||void 0===e?void 0:e.id)):null===l||void 0===l?void 0:l.map(e=>e.data.length>0&&(0,Gt.jsxs)(df,{item:!0,xs:12,md:12,children:[!as(null===e||void 0===e?void 0:e.data)&&(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,Gt.jsx)(Eu,{sx:{height:"400px"},children:(0,Gt.jsx)(l2,{width:"100%",children:(0,Gt.jsxs)($le,{width:800,height:400,data:p(e.data),children:[(0,Gt.jsx)(kle,{dataKey:"name"}),(0,Gt.jsx)(Fle,{dataKey:"amt",label:{value:"Blood Glucose (in mg/dL)",angle:"-90",position:"center",dx:-30,fontSize:"0.7rem"}}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(m,{})}),(0,Gt.jsx)(qse,{type:"monotone",dataKey:"Glucose",stroke:Lde.palette.deepPurple[300],strokeWidth:2,isAnimationActive:!1,dot:(0,Gt.jsx)(f,{fill:Lde.palette.green[500]}),activeDot:(0,Gt.jsx)(f,{fill:Lde.palette.green[500]})})]})})})]},null===e||void 0===e?void 0:e.id))})}Kye.defaultProps={glucoseData:[]};const Xye=Kye;function Qye(e){let{glucoseData:t,stage:n,height:r,width:i,report:o,filteredActivities:a}=e;const{t:s}=vg(),[l,c]=We.useState([]),d=["diabetes","prediabetes","hypoglycemia","normal"],u=e=>{let t=[];return d.forEach(n=>{const r=e.filter(e=>{var t,r;return(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)&&(null===e||void 0===e||null===(r=e.alerts[0])||void 0===r?void 0:r.text)===n}),i=e.filter(e=>as(null===e||void 0===e?void 0:e.alerts));r.length&&t.push({id:n,name:s("rpm_".concat(n)),value:r.length}),"normal"===n&&i.length&&t.push({id:n,name:s("rpm_".concat(n)),value:i.length})}),t},p=e=>{let t="";var n,r,i,o;"normal"===e.id&&(t=null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.green[300]);"hypoglycemia"===e.id&&(t=null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.red[200]);"prediabetes"===e.id&&(t=null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[300]);"diabetes"===e.id&&(t=null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.red[300]);return t},h=Math.PI/180,m=e=>{const{cx:t,cy:n,midAngle:r,innerRadius:i,outerRadius:o,percent:a}=e,s=i+.4*(o-i),l=t+s*Math.cos(-r*h),c=n+s*Math.sin(-r*h);return(0,Gt.jsx)("text",{x:l,y:c,fill:"white",textAnchor:l>t?"start":"middle",dominantBaseline:"central",children:0==a?null:"".concat((100*a).toFixed(0),"%")})},f=e=>{var t,n;let{active:r,payload:i}=e;const o=null!==(t=i[0])&&void 0!==t&&t.payload?null===(n=i[0])||void 0===n?void 0:n.payload:{};var a;if(r&&i&&null!==i&&void 0!==i&&i.length)return(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#ffffff",border:"1px solid #cccccc",p:1.5,width:250},children:[(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:(0,Gt.jsx)(Eu,{component:"span",color:"normal"!==(null===o||void 0===o?void 0:o.id)?p(null===o||void 0===o?void 0:o.payload):Lde.palette.green[500],children:null===o||void 0===o?void 0:o.name})}),(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Count:  ".concat(null===o||void 0===o||null===(a=o.payload)||void 0===a?void 0:a.value)})]})};return We.useEffect(()=>{(()=>{let e=[];a.forEach(n=>{e.push({id:n,data:u(null===t||void 0===t?void 0:t.filter(e=>e.values.activity===n))})}),c(e)})()},[t]),(0,Gt.jsx)(df,{container:!0,spacing:2,mt:.05,children:"AllStage"===n?null===l||void 0===l?void 0:l.map(e=>{var t;return(0,Gt.jsxs)(df,{item:!0,xs:o?4:12,md:4,lg:o?4:6,xl:4,children:[!as(null===e||void 0===e?void 0:e.data)&&(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,Gt.jsx)(Eu,{sx:{height:r?"".concat(r,"px"):"200px"},children:(0,Gt.jsxs)(fde,{width:i||200,height:r||200,style:{margin:"auto"},children:[(0,Gt.jsx)(mde,{data:null===e||void 0===e?void 0:e.data,cx:"50%",cy:"50%",innerRadius:i?i/4.5:40,outerRadius:r?r/2:90,paddingAngle:0,labelLine:!1,label:m,dataKey:"value",children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsx)(sre,{fill:p(e)},"cell-".concat(t)))}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(f,{}),wrapperStyle:{zIndex:99}})]})})]},null===e||void 0===e?void 0:e.id)}):null===l||void 0===l?void 0:l.map(e=>{var t;return e.data.length>0&&(0,Gt.jsxs)(df,{item:!0,xs:12,children:[!as(null===e||void 0===e?void 0:e.data)&&(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,Gt.jsx)(Eu,{sx:{height:"400px"},children:(0,Gt.jsxs)(fde,{width:400,height:400,style:{margin:"auto"},children:[(0,Gt.jsx)(mde,{data:null===e||void 0===e?void 0:e.data,cx:"50%",cy:"50%",innerRadius:70,outerRadius:150,paddingAngle:0,labelLine:!1,label:m,dataKey:"value",children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsx)(sre,{fill:p(e)},"cell-".concat(t)))}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(f,{}),wrapperStyle:{zIndex:99}})]})})]},null===e||void 0===e?void 0:e.id)})})}Qye.defaultProps={glucoseData:[],filteredActivities:[]};const Jye=Qye;const ebe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h;let{glucoseData:m,readingHeadCell:f,deleteReadingButton:g,patientLastFrame:v}=e;const{t:x}=vg(),[y,b]=We.useState("AllStage"),[j,w]=We.useState("trend"),[_,C]=We.useState([]),S=()=>{if(y===y){const e=null===m||void 0===m?void 0:m.filter(e=>{var t;return(null===e||void 0===e?void 0:e.values)&&(null===e||void 0===e||null===(t=e.values)||void 0===t?void 0:t.activity)===y}),t=null===m||void 0===m?void 0:m.filter(e=>as(e));return"normal"===y?t:"AllStage"===y?m:e}},A=[{value:"Diabetes",color:null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.red[300],darkColor:null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.red[900]},{value:"Prediabetes",color:null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.orange[300],darkColor:null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[900]},{value:"Normal",color:null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.green[300],darkColor:null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.green[500]},{value:"Hypoglycemia",color:null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.red[200],darkColor:null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.red[500]}],k=e=>{let{legend:t}=e;return t.length>0&&(0,Gt.jsx)(Eu,{textAlign:"right",children:(0,Gt.jsx)(Eu,{component:"ul",p:0,m:0,display:"inline-flex",flexWrap:"wrap",children:null===A||void 0===A?void 0:A.map((e,t)=>(0,Gt.jsxs)(Ym,{component:"li",fontSize:14,sx:{listStyle:"none",display:"flex",alignItems:"center",mr:1.5},children:[(0,Gt.jsx)(gye.A,{sx:{width:10,color:e.color}}),(0,Gt.jsx)(Eu,{component:"span",ml:1,color:e.darkColor,children:e.value})]},t))})})};return We.useEffect(()=>{as(m)||C(kd(m))},[m]),(0,Gt.jsxs)(df,{container:!0,spacing:2.5,mt:.05,children:[(0,Gt.jsx)(df,{item:!0,xs:12,lg:7,children:(0,Gt.jsx)(aH,{variant:"outlined",sx:{height:"100%"},children:(0,Gt.jsxs)(uH,{sx:{height:"100%"},children:[!as(m)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Dye,{exclusive:!0,size:"small",color:"primary",value:j,onChange:(e,t)=>{null!==t&&w(t)},sx:{"& .MuiToggleButton-root":{px:2.25}},children:[(0,Gt.jsx)(kye,{value:"trend",children:x("rpm_Trend")}),(0,Gt.jsx)(kye,{value:"pie",children:x("rpm_Donut")})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Dw,{fullWidth:!0,size:"small",variant:"outlined",value:y,onChange:e=>{b(e.target.value)},children:[(0,Gt.jsx)($m,{value:"AllStage",children:"All Activities"}),_.map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))]})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{sx:{mb:1.5,display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,Gt.jsx)(Ym,{variant:"body2",children:x("rpm_LastReading")}),as(v)?(0,Gt.jsx)(ZC,{sx:{ml:3},variant:"rounded",width:75}):(0,Gt.jsxs)(Eu,{fontSize:"body2.fontSize",sx:{bgcolor:"primary.theme.50",px:1,py:.5,borderRadius:1,ml:3},children:[x("rpm_Glucose"),": ",null===(c=v[0])||void 0===c||null===(d=c.values)||void 0===d?void 0:d.glucose," |"," ",x("rpm_Activity"),": ",null===(u=v[0])||void 0===u||null===(p=u.values)||void 0===p?void 0:p.activity]})]})})]}),(0,Gt.jsx)(k,{legend:A})]}),"trend"===j?(0,Gt.jsx)(Eu,{sx:{height:"100%"},children:m?as(m)?(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto"}})}):(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Xye,{glucoseData:S(),gridWidth:4,chartWidth:250,chartHeight:200,stage:y})}):(0,Gt.jsx)(Eu,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,Gt.jsx)(vT,{color:"primary",sx:{m:"auto"}})})}):(0,Gt.jsx)(Eu,{children:m?as(m)?(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto"}})}):(0,Gt.jsx)(Jye,{glucoseData:S(),stage:y,filteredActivities:_}):(0,Gt.jsx)(Eu,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,Gt.jsx)(vT,{color:"primary",sx:{m:"auto"}})})})]})})}),(0,Gt.jsx)(df,{item:!0,xs:12,lg:5,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{data:S(),headCells:f,noDataImage:D_,fetchList:()=>{},skeletonVrows:6,stickyHeader:!0,scrollHeight:568,className:"theme_scroll",children:null===(h=S())||void 0===h?void 0:h.map(e=>{var t;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsxs)(rC,{children:[e.ts,(0,Gt.jsxs)(Ym,{variant:"caption",component:"p",children:["(",sa()(e.ts).fromNow(),")"]})]}),(0,Gt.jsx)(rC,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((t,n)=>{var r;return(0,Gt.jsx)(Eu,{className:null===t||void 0===t?void 0:t.text,display:"inline-flex",mr:n===(null===e||void 0===e||null===(r=e.alerts)||void 0===r?void 0:r.length)-1?0:1,children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.glucose})},n)}):(0,Gt.jsx)(Eu,{className:"normal",display:"inline-flex",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.glucose})})}),(0,Gt.jsx)(rC,{children:e.values.activity?e.values.activity:"NA"}),(0,Gt.jsx)(rC,{children:g(e)})]},e.id)})})})})]})};const tbe=function(e){let{order:t,orderBy:n,setOrder:r,setOrderBy:o,alertHeadCellsItems:a,activeAlertsPageDetails:s,resolvedButton:l,fetchPatientAlerts:c,activeAlertCount:d,alertStatic:u,deleteAlertButton:p,userData:h,glucoseData:m,readingHeadCell:f,getReadingColor:g,filterDate:v,filterInitialData:x,handleDateFilter:y,fetchGlucoseAndAlertsList:b,resolveAlertsPageDetails:j,resolveAlertCount:w,resolveAlertBpHeadCell:_,fetchResolvePatientAlerts:C,deleteReadingButton:S,patientLastFrame:A,program:k,patientData:M,patientMissedReading:O}=e;const{t:T}=vg(),E=so(),[P,D]=We.useState(0),[R,N]=We.useState("panel1"),[L,I]=We.useState("AllStage"),[F,$]=We.useState([]),[B,z]=We.useState(null),H=Boolean(B),W=e=>{z(e.currentTarget)},V=()=>{z(null)},U=e=>(t,n)=>{N(!!n&&e)};return We.useEffect(()=>{as(m)||$(kd(m))},[m]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{bgcolor:"#fff",p:1,sx:{borderRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,alignItems:"center",children:[d?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(yf,{className:"linkNoClr",color:"inherit",onClick:()=>{N("panel2"),D(1)},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)("img",{src:mye,height:40})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:T("rpm_ResolvedAlerts")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:null===u||void 0===u?void 0:u.resolveAlerts})]})]})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(yf,{className:"linkNoClr",color:"inherit",onClick:()=>{N("panel2"),D(0)},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",bgcolor:"primary.theme.50",borderRadius:1},children:(0,Gt.jsx)("img",{src:hye,height:40})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:T("rpm_ActiveAlerts")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:null===u||void 0===u?void 0:u.activeAlerts})]})]})})}),!1]}):(0,Gt.jsx)(dye,{}),(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,justifyContent:"flex-end",alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Iz,{initialValues:x,onSubmit:b,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,resetForm:r}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",justifyContent:"flex-end",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:1,alignItems:"center",sx:{borderRadius:"8px"},className:"ExtralightBG",p:.2,pb:.8,pr:1,mt:0,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Xj,{sx:{minWidth:120},size:"small",children:[(0,Gt.jsx)(qj,{id:"filter_report",children:"Filter"}),(0,Gt.jsxs)(Hz,{as:Dw,sx:{bgcolor:"#fff"},label:"Filter",labelId:"filter_report",id:"filter_report",name:"filter_report",onChange:e=>{n("filter_report",e.target.value),"custom"!==e.target.value&&b((0,i.A)((0,i.A)({},t),{},{filter_report:e.target.value}))},children:[(0,Gt.jsx)($m,{value:"day",children:"Day"}),(0,Gt.jsx)($m,{value:"weekly",children:"Weekly"}),(0,Gt.jsx)($m,{value:"monthly",children:"Monthly"}),(0,Gt.jsx)($m,{value:"course",children:"Course"}),(0,Gt.jsx)($m,{value:"custom",children:"Custom"})]}),(0,Gt.jsx)(Xz,{name:"filter_report",children:e=>(0,Gt.jsx)(Ym,{component:"span",className:"error",variant:"body2",children:T(e,{field:T("rpm_FilterReport")})})})]})}),"custom"==t.filter_report&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{sx:{width:"160px","& .MuiOutlinedInput-input":{py:1.0625},bgcolor:"#fff"},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"From",id:"from",name:"from",inputFormat:"dd/MM/yyyy",value:t.from,onChange:e=>n("from",e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),maxDate:new Date})})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{sx:{width:"160px","& .MuiOutlinedInput-input":{py:1.0625},bgcolor:"#fff"},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"To",id:"to",name:"to",inputFormat:"dd/MM/yyyy",value:t.to,onChange:e=>n("to",e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),maxDate:t.to?new Date:null})})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:"Submit"})})," ",(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{placement:"top","aria-label":"Reset Filter",title:"Reset Filter",children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:()=>{r(),b(x)},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,Gt.jsx)(xxe.A,{fontSize:"small"})})})})]}),"custom"!==t.filter_report&&"course"!==v.filter_report&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#fff",px:1,borderRadius:1},children:[(0,Gt.jsx)(Kp,{onClick:()=>y({value:"<",table:"trends"}),size:"small",children:(0,Gt.jsx)(uye.A,{fontSize:"small"})}),(0,Gt.jsxs)(Ym,{variant:"body2",component:"span",children:[sa()(v.from).format("DD MMM YYYY")," - ",sa()(v.to).format("DD MMM YYYY")]}),sa()().diff(sa()(v.to),"days")>0&&(0,Gt.jsx)(Kp,{onClick:()=>y({value:">",table:"trends"}),size:"small",children:(0,Gt.jsx)(pye.A,{fontSize:"small"})})]})}),"course"===v.filter_report&&"custom"!==t.filter_report&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{sx:{bgcolor:"#fff",px:2,py:1,borderRadius:1},children:(0,Gt.jsxs)(Ym,{variant:"body2",component:"span",children:[sa()(v.from).format("DD MMM YYYY")," - ",sa()(v.to).format("DD MMM YYYY")]})})})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Xj,{sx:{minWidth:120},size:"small",children:[(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",id:"basic-button","aria-controls":H?"demo-customized-menu":void 0,"aria-haspopup":"true","aria-expanded":H?"true":void 0,disableElevation:!0,onClick:W,endIcon:(0,Gt.jsx)(Gy.A,{}),children:"Reports"}),(0,Gt.jsxs)(km,{id:"basic-menu",anchorEl:B,open:H,onClose:V,MenuListProps:{"aria-labelledby":"basic-button"},children:[(0,Gt.jsx)($m,{onClick:()=>{V(),E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===k||void 0===k?void 0:k.code,"/patients/").concat(null===M||void 0===M?void 0:M.id,"/glucose/report"))},children:T("rpm_summarized")}),(0,Gt.jsx)($m,{onClick:()=>{V(),E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===k||void 0===k?void 0:k.code,"/patients/").concat(null===M||void 0===M?void 0:M.id,"/glucose/report/detailed"))},children:T("rpm_detailed")})]})]})})]})})})}},"filter_formik")})})})]})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,mt:.01,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(aH,{variant:"outlined",sx:{border:"none"},children:(0,Gt.jsxs)(lU,{expanded:"panel1"===R,onChange:U("panel1"),children:[(0,Gt.jsx)(jU,{expandIcon:(0,Gt.jsx)(Eu,{sx:{bgcolor:"primary.main",color:"white",display:"flex",borderRadius:1},children:(0,Gt.jsx)(Jg.A,{})}),sx:{bgcolor:"white","&.MuiAccordionSummary-root":{"&.Mui-expanded":{minHeight:48}},"& .MuiAccordionSummary-content":{"&.Mui-expanded":{my:1.5}}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"Vital Trends"})}),(0,Gt.jsx)(hU,{sx:{p:0},children:(0,Gt.jsx)(uH,{sx:{pb:0},children:(0,Gt.jsx)(ebe,{glucoseData:m,readingHeadCell:f,getReadingColor:g,deleteReadingButton:S,patientLastFrame:A})})})]})})})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,sx:{mt:.01},children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(aH,{variant:"outlined",sx:{border:"none"},children:(0,Gt.jsxs)(lU,{expanded:"panel2"===R,onChange:U("panel2"),children:[(0,Gt.jsx)(jU,{expandIcon:(0,Gt.jsx)(Eu,{sx:{bgcolor:"primary.main",color:"white",display:"flex",borderRadius:1},children:(0,Gt.jsx)(Jg.A,{})}),sx:{bgcolor:"white","&.MuiAccordionSummary-root":{"&.Mui-expanded":{minHeight:48}},"& .MuiAccordionSummary-content":{"&.Mui-expanded":{my:1.5}}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"Alert Summary"})}),(0,Gt.jsx)(hU,{sx:{p:0},children:(0,Gt.jsxs)(uH,{sx:{pt:0,pb:0},children:[(0,Gt.jsx)(Eu,{sx:{border:1,borderColor:"divider",borderRadius:1,borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(eU,{value:P,onChange:(e,t)=>{D(t)},variant:"scrollable",scrollButtons:"auto",children:[(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:T("rpm_ActiveAlerts")},kU(0)),{},{sx:{py:1.5}})),(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:T("rpm_ResolvedAlerts")},kU(1)),{},{sx:{py:1.5}}))]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{pr:2,children:(0,Gt.jsxs)(Dw,{fullWidth:!0,size:"small",variant:"outlined",value:L,onChange:e=>{I(e.target.value)},children:[(0,Gt.jsx)($m,{value:"AllStage",children:"All"}),null===F||void 0===F?void 0:F.map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))]})})})]})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(AU,{value:P,index:0,children:(0,Gt.jsx)(fye,{order:t,orderBy:n,setOrder:r,setOrderBy:o,activeAlertsPageDetails:s,alertData:(()=>{if(L===L){const e=null===d||void 0===d?void 0:d.filter(e=>{var t,n;return(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)&&(null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.data_name)==="glucose ".concat(L)}),t=null===d||void 0===d?void 0:d.filter(e=>as(null===e||void 0===e?void 0:e.alerts));return"normal"===L?t:"AllStage"===L?d:e}})(),headCellsItems:a,fetchPatientAlerts:()=>c((0,i.A)((0,i.A)({},v),{},{filter_report:""})),filterDate:v,userData:h,resolvedButton:l,deleteAlertButton:p})}),(0,Gt.jsx)(AU,{value:P,index:1,children:(0,Gt.jsx)(Vye,{resolveAlertsPageDetails:j,resolveAlertCount:(()=>{if(L===L){const e=null===w||void 0===w?void 0:w.filter(e=>{var t,n;return(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)&&(null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.data_name)==="glucose ".concat(L)}),t=null===w||void 0===w?void 0:w.filter(e=>as(null===e||void 0===e?void 0:e.alerts));return"normal"===L?t:"AllStage"===L?w:e}})(),resolveAlertBpHeadCell:_,fetchResolvePatientAlerts:()=>C((0,i.A)((0,i.A)({},v),{},{filter_report:""}))})})]})})]})})]})})})})]})},nbe=["content"],rbe=["content"];const ibe=function(e){let{patientData:t,program:n}=e;const r=Ct(Hd),o={print_report:"",filter_report:"course",from:null===r||void 0===r?void 0:r.start_date,to:null===r||void 0===r?void 0:r.end_date,page:1},{schedule:a}=Ct(Hd),s=null===a||void 0===a?void 0:a.id,l=null===r||void 0===r?void 0:r.id,c=Nt(),{t:d}=vg(),{patientId:u}=lo(),[p,h]=We.useState(!0),[m,f]=We.useState("desc"),[g,v]=We.useState("ts"),[x,y]=We.useState(null),[b,j]=We.useState(o),[w,_]=We.useState(null),[C,S]=We.useState(null),[A,k]=We.useState(null),[M,O]=We.useState(null),[T,E]=We.useState(null),[P,D]=We.useState((0,i.A)({},Fc)),[R,N]=We.useState((0,i.A)({},Fc)),[L,I]=We.useState({open:!1,data:{}}),[F,$]=We.useState({open:!1,data:{}}),[B,z]=We.useState({open:!1,data:{}}),H=e=>{I((0,i.A)((0,i.A)({},L),{},{open:!L.open,data:e}))},W=e=>{$((0,i.A)((0,i.A)({},F),{},{open:!F.open,data:e}))},V=e=>{z((0,i.A)((0,i.A)({},B),{},{open:!B.open,data:e}))},U=e=>{let t=e.filter_report,n=e.from,i=e.to;return"day"===e.filter_report&&(t="day",n=sa()().startOf("day").valueOf(),i=sa()().valueOf()),"weekly"===e.filter_report&&(t="weekly",n=sa()().subtract(6,"days").startOf("day").valueOf(),i=sa()().valueOf()),"monthly"===e.filter_report&&(t="monthly",n=sa()().subtract(30,"days").startOf("day").valueOf(),i=sa()().valueOf()),"course"===e.filter_report&&(t="course",n=null===r||void 0===r?void 0:r.start_date,i=null===r||void 0===r?void 0:r.end_date),"custom"===e.filter_report&&(t="custom",n=sa()(e.from).startOf("day").valueOf(),i=sa()(e.to).endOf("day").valueOf()),j({filter_report:t||(null===b||void 0===b?void 0:b.filter_report),from:n,to:i}),{filter_report:t,from:n,to:i}},q=async e=>{try{const{data:t}=await c(gl(e));y(t)}catch(t){console.log(t)}},G=async e=>{try{const{data:t}=await c(((e,t)=>async n=>{n(na(!0));try{let n="".concat(ca.patients,"/").concat(e,"/alerts?dataName=").concat(t.vitalType||"","&page=").concat(t.current_page||"","&perPage=").concat(t.per_page||"","&sortBy=").concat(t.sort_by||"","&sortOrder=").concat(t.sort_order||"","&minTs=").concat(t.minTs||"","&maxTs=").concat(t.maxTs||"");t.includeDismissed&&(n+="&includeDismissed=".concat(t.includeDismissed,"&dataName=").concat(t.data_name||""));const r=await cu(n,{});return oa()(r,"data.content",[]).forEach(e=>Ls(e)),r}catch(r){return r}finally{n(na(!1))}})(u,e)),n=t||{},{content:r}=n,o=Ko(n,nbe);_(r),k(e=>(0,i.A)((0,i.A)({},e),{},{activeAlerts:null===o||void 0===o?void 0:o.total})),D(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){c(Zo({subTitle:t.message,severity:$c}))}},Y=async e=>{const t=U(e);let n=null===t||void 0===t?void 0:t.from,r=null===t||void 0===t?void 0:t.to;const o=(0,i.A)((0,i.A)({sort_by:g,sort_order:m},P),{},{vitalType:"glucose",minTs:n,maxTs:r,current_page:null!==e&&void 0!==e&&e.page?null===e||void 0===e?void 0:e.page:null===P||void 0===P?void 0:P.current_page});G(o)},Z=async e=>{try{const{data:t}=await c(Xs(u,e)),n=t||{},{content:r}=n,o=Ko(n,rbe);S(r),k(e=>(0,i.A)((0,i.A)({},e),{},{resolveAlerts:null===o||void 0===o?void 0:o.total})),N(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){c(Zo({subTitle:t.message,severity:$c}))}},K=async e=>{const t=U(e);let n=null===t||void 0===t?void 0:t.from,r=null===t||void 0===t?void 0:t.to;const o=(0,i.A)((0,i.A)({},R),{},{sort_by:g,sort_order:m,vitalType:"glucose",includeDismissed:!0,minTs:n,maxTs:r});Z(o)},X=e=>{(e=>{const t=U(e),n={patient_id:u,disease:"glucose",duration:[t.from,t.to]};q(n)})(e),Y(e),K(e)};We.useEffect(()=>{h(!0),setTimeout(()=>{as(r)||X(o),h(!1)},2e3)},[r]),We.useEffect(()=>{const e={filterDate:{start_date:b.from,end_date:b.to,report:b.filter_report},complianceStatus:p?"NA":null!==T&&void 0!==T&&T.status?T.status:"COMPLIANT"};$o.setFilterDate(e.filterDate),c(w_(e))},[b,p]),We.useEffect(()=>{u&&(async()=>{try{const{data:e}=await c(Gs(u,"glucose"));O(e)}catch(e){console.log(e)}})()},[]),We.useEffect(()=>{u&&s&&(async()=>{try{const{data:e}=await c(Ys(u,s,l));E(e)}catch(e){console.log(e)}})()},[u,s,l]);const Q=[{id:"time",label:d("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"glucose",label:d("rpm_Glucose"),isSort:!1,sortProperty:"glucose"},{id:"event",label:d("rpm_Event"),isSort:!1,sortProperty:"event"},{id:"action",label:d("rpm_Actions"),isSort:!1,sortProperty:"action"}],J=[{id:"reading",label:d("rpm_Readings"),isSort:!1,sortProperty:"value"},{id:"condition",label:d("rpm_Conditions"),isSort:!1,sortProperty:"name"},{id:"time",label:d("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"action",label:d("rpm_Actions"),isSort:!1,sortProperty:"action"}],ee=[{id:"activity",label:d("rpm_activity"),isSort:!1,sortProperty:"name"},{id:"reading",label:d("rpm_Condition"),isSort:!1,sortProperty:"value"},{id:"msg",label:d("rpm_Message"),isSort:!1,sortProperty:"msg"},{id:"time",label:d("rpm_Time"),isSort:!1,sortProperty:"time"}];return p?(0,Gt.jsx)(dye,{}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(tbe,{order:m,orderBy:g,setOrder:f,setOrderBy:v,filterDate:b,filterInitialData:o,glucoseData:x,alertHeadCellsItems:J,readingHeadCell:Q,getReadingColor:e=>!as(e.alerts),handleDateFilter:async e=>{let t=b.filter_report,n=b.from,r=b.to;"day"===b.filter_report&&(t="day","<"===e.value?(n=sa()(n).subtract(1,"days").startOf("day").valueOf(),r=sa()(r).subtract(1,"days").endOf("day").valueOf()):(n=sa()(n).add(1,"days").startOf("day").valueOf(),r=sa()(r).add(1,"days").endOf("day").valueOf())),"weekly"===b.filter_report&&(t="weekly","<"===e.value?(n=sa()(n).subtract(6,"days").startOf("day").valueOf(),r=sa()(r).subtract(6,"days").endOf("day").valueOf()):(n=sa()(n).add(6,"days").startOf("day").valueOf(),r=sa()(r).add(6,"days").endOf("day").valueOf())),"monthly"===b.filter_report&&(t="monthly","<"===e.value?(n=sa()(n).subtract(30,"days").startOf("day").valueOf(),r=sa()(r).subtract(30,"days").endOf("day").valueOf()):(n=sa()(n).add(30,"days").startOf("day").valueOf(),r=sa()(r).add(30,"days").endOf("day").valueOf())),j({filter_report:t,from:n,to:r});const o={patient_id:u,disease:"glucose",duration:[n,r]},a=(0,i.A)((0,i.A)({sort_by:g,sort_order:m},P),{},{vitalType:"glucose",minTs:n,maxTs:r}),s=(0,i.A)((0,i.A)({},R),{},{vitalType:"glucose",sort_by:g,sort_order:m,includeDismissed:!0,minTs:n,maxTs:r});q(o),G(a),Z(s)},fetchGlucoseAndAlertsList:X,fetchPatientAlerts:Y,activeAlertCount:w,alertStatic:A,activeAlertsPageDetails:P,resolvedButton:e=>{var t;return(0,Gt.jsx)(Vp,{size:"small",color:"primary","data-id":e.id,sx:{bgcolor:"primary.theme.50",fontSize:12,px:1.5,"&:hover":{backgroundColor:"primary.theme.50"}},onClick:()=>H(e),disabled:!(null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showDismissAlertPatientBtn),disableElevation:!0,children:d("rpm_FollowUp")})},deleteAlertButton:e=>(0,Gt.jsx)(Yx,{title:d("rpm_Delete"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})}),userData:null===n||void 0===n?void 0:n.permissions,resolveAlertsPageDetails:R,resolveAlertCount:C,resolveAlertBpHeadCell:ee,fetchResolvePatientAlerts:K,deleteReadingButton:e=>(0,Gt.jsx)(Yx,{title:d("rpm_Delete"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>V(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})}),patientLastFrame:M,patientData:t,program:n,patientMissedReading:T}),(0,Gt.jsx)(PU,{openModal:L.open,onCloseModal:H,actionFunction:async e=>{const t={follow_up:e.description};try{await c(Qs(u,L.data.id,t)),X((0,i.A)((0,i.A)({},b),{},{filter_report:""})),I((0,i.A)((0,i.A)({},L),{},{open:!L.open})),c(Zo({subTitle:d("message:rpm_ResolveAlertSuccess"),severity:Bc}))}catch(n){c(Zo({subTitle:n.message,severity:$c}))}},dataName:null,options:{primaryText:d("message:rpm_AlertResolvedTitle"),secondaryText:d("message:rpm_AlertResolvedBody"),descText:d("message:rpm_AlertResolvedSub"),btn:{primaryText:d("rpm_Confirm"),secondaryText:d("rpm_Cancel"),primaryColor:"primary",secondaryColor:"inherit"},btnSwap:!0},children:e=>(0,Gt.jsx)(qye,(0,i.A)({},e))}),(0,Gt.jsx)(PU,{openModal:F.open,onCloseModal:W,actionFunction:async()=>{try{await c(ml(u,F.data.id)),X((0,i.A)((0,i.A)({},b),{},{filter_report:""})),$((0,i.A)((0,i.A)({},F),{},{open:!F.open})),c(Zo({subTitle:d("message:rpm_DeleteAlertSuccess"),severity:Bc}))}catch(e){c(Zo({subTitle:e.message,severity:$c}))}},dataName:null,options:{primaryText:d("message:rpm_DeleteTitle"),secondaryText:d("message:rpm_DeleteAlertText"),descText:"",btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(PU,{openModal:B.open,onCloseModal:V,actionFunction:async()=>{try{await c(fl(u,B.data.id)),X((0,i.A)((0,i.A)({},b),{},{filter_report:""})),z((0,i.A)((0,i.A)({},B),{},{open:!B.open})),c(Zo({subTitle:d("message:rpm_DeleteReadingSuccess"),severity:Bc}))}catch(e){c(Zo({subTitle:e.message,severity:$c}))}},dataName:null,options:{primaryText:d("message:rpm_DeleteTitle"),secondaryText:d("message:rpm_DeleteReadingText"),descText:"",btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};const obe=function(e){let{patientData:t,program:n}=e;const{t:r}=vg(),i=Ct(qd),o=!("true"===ls(i,"user_principal.attributes.skip_tour[0]","")),a=Ct(Vd),s=Ct(Ud),l=Nt(),c=Ct(Nd),{patientId:d}=lo(),[u,p]=We.useState(null),[h,m]=We.useState(null),[f,g]=We.useState(""),v=[{name:r("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===n||void 0===n?void 0:n.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients")},{name:"".concat((null===t||void 0===t?void 0:t.first_name)||""," ").concat((null===t||void 0===t?void 0:t.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients/").concat(null===t||void 0===t?void 0:t.id,"/dashboard")},{name:r("rpm_medicalCharts"),url:""}];return We.useEffect(()=>{const e={activeMenuItem:"dashboard",breadcrumb:v};as(n)||as(t)||l(w_(e))},[n,t]),We.useEffect(()=>{c&&d&&(async()=>{try{const{data:e}=await l(Gs(d,"bp"));p(e)}catch(e){console.log("fetchPatientLastFrame="+e)}})()},[c]),We.useEffect(()=>{l(Rs({activeVitalTab:h}))},[h]),We.useEffect(()=>{as(a)||m(0),as(s)||m(1),as(a)||as(s)||m(0),0===(null===a||void 0===a?void 0:a.length)&&0===(null===s||void 0===s?void 0:s.length)&&m(null)},[s,a]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(cye,{tabValue:h,patientId:d,handleChangeTabs:(e,t)=>{m(t)},patientLastFrame:u,BpDashboardContainer:Zye,OxyDashboardContainer:rye,GlucoseDashboardContainer:ibe,patientData:t,program:n,bpVital:a,glucoseVital:s}),!as(t)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:o,path:"patientDashboardTour",setRenderer:g}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:f})]})]})};function abe(e){let{deviceList:t,order:n,orderBy:r,setOrder:o,setOrderBy:a,dataParameter:s,deviceHead:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchDevicesList:h,pageDetails:m,handleAttachDevice:f,freeDeviceList:g,actionAttachDevice:v,deleteButton:x,errDevice:y,setErrDevice:b,setSearchDevice:j,patientData:w,program:_}=e;const{t:C}=vg(),S=Nt(),A=so(),k=[{name:C("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===_||void 0===_?void 0:_.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===_||void 0===_?void 0:_.code,"/patients")},{name:"".concat((null===w||void 0===w?void 0:w.first_name)||""," ").concat((null===w||void 0===w?void 0:w.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===_||void 0===_?void 0:_.code,"/patients/").concat(null===w||void 0===w?void 0:w.id,"/dashboard")},{name:C("rpm_devices"),url:""}];return We.useEffect(()=>{const e={breadcrumb:k};ta()(_)||ta()(w)||S(w_(e))},[_,w]),(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:C("rpm_Devices")})}),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:3,children:[(0,Gt.jsx)(Eu,{sx:{"& .MuiAutocomplete-root":{"& .MuiFormControl-root":{"& .MuiInputBase-root":{paddingRight:3.5}}}},children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"device",name:"device",loading:!ta()(g),options:ta()(g)?[]:g,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>(null===e||void 0===e?void 0:e.display_name)+" ("+e.model_number+") "+(null===e||void 0===e?void 0:e.id),renderOption:(e,t)=>(0,Gt.jsx)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.display_name}),(0,Gt.jsxs)(Ym,{variant:"caption",component:"p",children:["(","Modal: "+t.model_number+", Serial No.: "+t.serial_number,")"]})]})})),onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(f(null===t||void 0===t?void 0:t.id),b(!1)),"clear"===n&&(b(!0),j(""))},onInputChange:(e,t)=>{t&&j(t)},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:"Search Device..."}))})}),y&&(0,Gt.jsx)(iw,{error:!0,children:C("message:rpm_PleaseSelectDevice")})]}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:v,children:C("rpm_AssignDevice")}),(0,Gt.jsx)(Yx,{title:C("message:rpm_AssignDeviceRuleText"),children:(0,Gt.jsx)(Kp,{children:(0,Gt.jsx)($Z.A,{fontSize:"small",sx:{width:16,height:16}})})})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:()=>A(-1),children:C("rpm_Back")})})]})]})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:o,setOrderBy:a,data:t,headCells:l,dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,Gt.jsx)(rC,{children:e.display_name}),(0,Gt.jsx)(rC,{children:e.serial_number}),(0,Gt.jsx)(rC,{children:e.model_number}),(0,Gt.jsx)(rC,{children:e.last_activity?e.last_activity:"NA"}),(0,Gt.jsx)(rC,{children:x(e)})]},e.id))})}),(0,Gt.jsx)(IO,{pageDetails:m,fetchListFunction:h})]})})})}abe.defaultProps={deviceHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",deviceList:[],otherDiseaseList:[],familyDiseaseList:[],fetchDevicesList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},attachDevice:"",handleAttachDevice:()=>{},freeDeviceList:[],errDevice:!1,setErrDevice:()=>{},setSearchDevice:()=>{},program:{},patientData:{}};const sbe=abe,lbe=["content"];const cbe=function(e){let{program:t,patientData:n}=e;const r=Nt(),{programId:o}=lo(),a=Ct(Nd),{t:s}=vg(),{enqueueSnackbar:l}=hi(),[c,d]=(0,We.useState)("desc"),[u,p]=(0,We.useState)("updated_at"),[h,m]=We.useState(""),[f,g]=We.useState(""),[v,x]=We.useState(null),[y,b]=We.useState(null),[j,w]=(0,We.useState)([]),[_,C]=We.useState(null),[S,A]=We.useState(!1),[k,M]=(0,We.useState)((0,i.A)({},Fc)),[O,T]=We.useState({open:!1,data:{}}),E=e=>{T((0,i.A)((0,i.A)({},O),{},{open:!O.open,data:e}))},P=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;try{const{data:t}=await r(il((0,i.A)((0,i.A)({sort_by:u,sort_order:c},k),{},{q:e}),n.id)),o=t||{},{content:a}=o,s=Ko(o,lbe);x(a),M(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){l(t.message,{variant:"error"})}},D=async()=>{try{const{data:e}=await r(rl({search:f},"UNASSOCIATED")),{content:t}=e||{};b(t)}catch(e){l(e.message,{variant:"error"})}},R=async(e,t)=>{try{await r(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/").concat(t,"/assign-device?deviceId=").concat(n),i=await du(r,{});return oa()(i,"data.content",[]).forEach(e=>Fs(e)),i}finally{r(na(!1))}})(o,e,t)),P(),D(),l(s("message:rpm_AttachDeviceSuccess"),{variant:"success"})}catch(n){l(n.message,{variant:"error"})}},N=async(e,t)=>{try{await r(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ca.patients,"/").concat(e,"/").concat(t,"/un-assign-device?deviceId=").concat(n),i=await pu(r,{});return oa()(i,"data.content",[]).forEach(e=>Fs(e)),i}finally{r(na(!1))}})(o,e,t)),T({open:!1,data:{}}),P(),D(),l(s("message:rpm_DeAttachDeviceSuccess"),{variant:"success"})}catch(n){l(n.message,{variant:"error"})}};We.useEffect(()=>{a&&n&&P()},[a,n]),We.useEffect(()=>{a&&D()},[a,f]),We.useEffect(()=>{r(w_({activeMenuItem:"devices"}))},[]);const L=[{id:"display_name",label:s("rpm_Name"),isSort:!0,sortProperty:"display_name"},{id:"serial_number",label:s("rpm_SerialNumber"),isSort:!0,sortProperty:"serial_number"},{id:"model_number",label:s("rpm_ModelNumber"),isSort:!0,sortProperty:"model_number"},{id:"last_activity",label:s("rpm_LastActivity"),isSort:!0,sortProperty:"last_activity"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(sbe,{order:c,orderBy:u,setOrder:d,setOrderBy:p,searchText:h,setSearchText:m,dataParameter:"id",checkState:j,onCheck:e=>{if(Array.isArray(e))return w(e.map(e=>e.toString()));const t=e.target.name;j.includes(t)?w(j.filter(e=>e!==t)):w(e=>[...e,t])},isSelection:!1,nodata:D_,deviceHead:L,deviceList:v,fetchDevicesList:P,pageDetails:k,editButton:e=>(0,Gt.jsx)(Yx,{title:s("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,Gt.jsx)(Yx,{title:s("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,Gt.jsx)(Yx,{title:s("rpm_Delete"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>E(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})}),attachDevice:_,handleAttachDevice:e=>{C(e)},freeDeviceList:y,actionAttachDevice:()=>{_&&!S?R(n.id,_):A(!0)},errDevice:S,setErrDevice:A,setSearchDevice:g,patientData:n,program:t}),(0,Gt.jsx)(PU,{openModal:O.open,onCloseModal:E,actionFunction:()=>N(n.id,O.data.id),dataName:"",options:{primaryText:s("message:rpm_DeleteTitle"),secondaryText:s("message:rpm_DeleteBodyText"),btn:{primaryText:s("rpm_Delete"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};var dbe=n(10652),ube=n(71612),pbe=n(3156),hbe=n(94329),mbe=n(36631),fbe=n(99604);function gbe(e){let{allDiseaseList:t,familyDiseaseList:n,order:r,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,familyDiseaseHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchDiseaseList:m,pageDetails:f,editButton:g,closeButton:v,deleteButton:x,saveButton:y,fileUploadButton:b,downloadFile:j,fileModal:w,fileUploadIconButton:_,patientData:C,program:S}=e;const{t:A}=vg(),k=Nt(),M=Xy(),O=(0,We.useRef)(null),T=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},E=[{name:A("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===S||void 0===S?void 0:S.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===S||void 0===S?void 0:S.code,"/patients")},{name:"".concat((null===C||void 0===C?void 0:C.first_name)||""," ").concat((null===C||void 0===C?void 0:C.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===S||void 0===S?void 0:S.code,"/patients/").concat(null===C||void 0===C?void 0:C.id,"/dashboard")},{name:A("rpm_FamilyMedicalHistory"),url:""}],P={diseaseList:null===n||void 0===n?void 0:n.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:null===e||void 0===e?void 0:e.custom_duration}))},D=e=>{let{name:t,errors:n}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",placeholder:A("message:rpm_RemarkPlaceHolder"),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:A("message:rpm_DiseaseRemarkHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:t,children:e=>(0,Gt.jsx)(iw,{error:!0,children:A(e,{field:A("rpm_Remark")})})}),(0,Gt.jsx)(iw,{error:!0,children:n.remark})]})},R=e=>{let{name:n,diseaseName:r,setFieldValue:o,errors:a}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{component:Gb,fullWidth:!0,size:"small",id:n,name:n,variant:"outlined",value:r||null,options:t||[],filterOptions:(e,t)=>{const n=M(e,t),{inputValue:r}=t,i=e.some(e=>r===e.disease_name);return""===r||i||n.push({inputValue:r,disease_name:'Add "'.concat(r,'"')}),n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.disease_name,renderOption:(e,t)=>(0,Gt.jsx)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{children:t.disease_name})),onChange:(e,t)=>{"string"===typeof t?o(n,t||""):t&&t.inputValue?o(n,t.inputValue?t.inputValue:""):o(n,null!==t&&void 0!==t&&t.disease_name?t.disease_name:"")},freeSolo:!0,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:A("rpm_DiseaseName")}))}),(0,Gt.jsx)(Xz,{name:n,children:e=>(0,Gt.jsx)(iw,{error:!0,children:A(e,{field:A("rpm_SelectDisease")})})}),(0,Gt.jsx)(iw,{error:!0,children:A(a.disease_name,{field:A("rpm_DiseaseName")})})]})},N=e=>{let{name:t,data:n,setFieldValue:r,errors:o}=e;return(0,Gt.jsx)(Gt.Fragment,{children:"CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)||"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)?(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:5,children:(0,Gt.jsxs)(Eu,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,views:["year"],size:"small",label:"From",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),maxDate:new Date})}),(0,Gt.jsx)(iw,{error:!0,children:A(o.start_date,{field:A("rpm_From")})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:5,children:["CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,Gt.jsxs)(Eu,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,views:["year"],size:"small",label:"To",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),minDate:n.start_date?(()=>{const e=new Date(n.start_date),t=e.setFullYear(e.getFullYear()+1);return new Date(t)})(n.start_date):void 0,maxDate:new Date})}),(0,Gt.jsx)(iw,{error:!0,children:A(o.end_date,{field:A("rpm_From")})})]}),"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,Gt.jsx)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:A("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ed||void 0===ed?void 0:ed.map(e=>(0,Gt.jsx)($m,{value:e.value,children:A("rpm_".concat(e.name))},e.value))})})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:A("rpm_Close"),children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>r(t.unit,""),children:(0,Gt.jsx)(ube.A,{fontSize:"small",sx:{width:16,height:16}})})})})]}):(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsxs)(Eu,{className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:t.value,name:t.value,variant:"outlined",type:"number",placeholder:A("message:rpm_DurationValuePlaceHolder"),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:A("message:rpm_DurationValueHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:t.value,children:e=>(0,Gt.jsx)(iw,{error:!0,children:A(e,{field:A("rpm_Duration")})})}),(0,Gt.jsx)(iw,{error:!0,children:o.duration})]})}),(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:A("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ed||void 0===ed?void 0:ed.map(e=>(0,Gt.jsx)($m,{value:e.value,children:A("rpm_".concat(e.name))},e.value))}),(0,Gt.jsx)(Xz,{name:null===t||void 0===t?void 0:t.unit,children:e=>(0,Gt.jsx)(iw,{error:!0,children:A(e,{field:A("rpm_Duration")})})})]})})]})})},L=e=>{let{name:t,errors:n}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:A("message:rpm_DiseaseRelationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===id||void 0===id?void 0:id.map(e=>(0,Gt.jsx)($m,{value:e,children:A("rpm_".concat(e))},e))}),(0,Gt.jsx)(Xz,{name:t,children:e=>(0,Gt.jsx)(iw,{error:!0,children:A(e,{field:A("rpm_Relation")})})}),(0,Gt.jsx)(iw,{error:!0,children:A(null===n||void 0===n?void 0:n.relationship,{field:A("rpm_Relation")})})]})},I=e=>{var t,n,r,i;let{diseaseObj:o}=e;const[a,s]=We.useState(2),l=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,Gt.jsxs)(Gt.Fragment,{children:[null===o||void 0===o||null===(t=o.files)||void 0===t||null===(n=t.slice(0,a))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},"data-id":e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:l(e.file_name),variant:"outlined",onDelete:()=>j(e),deleteIcon:(0,Gt.jsx)(mbe.A,{color:"primary"})},e.id)),(null===o||void 0===o||null===(r=o.files)||void 0===r?void 0:r.length)>2&&(0,Gt.jsx)(Yx,{title:(null===o||void 0===o||null===(i=o.files)||void 0===i?void 0:i.length)===a?A("rpm_Less"):A("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;a===(null===o||void 0===o||null===(e=o.files)||void 0===e?void 0:e.length)?s(2):s(null===o||void 0===o||null===(t=o.files)||void 0===t?void 0:t.length)},children:"..."})})]})},F=e=>{let{remark:t}=e;const[n,r]=We.useState(150);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===t||void 0===t?void 0:t.substring(0,n),(null===t||void 0===t?void 0:t.length)>150&&(0,Gt.jsx)(Yx,{title:(null===t||void 0===t?void 0:t.length)===n?A("rpm_Less"):A("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{n===(null===t||void 0===t?void 0:t.length)?r(150):r(null===t||void 0===t?void 0:t.length)},children:"..."})})]})},$=()=>{var e,t,n,r,i,o,a;return!as(null===w||void 0===w||null===(e=w.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===w||void 0===w||null===(r=w.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"outlined"},t)))};return We.useEffect(()=>{const e={breadcrumb:E};as(S)||as(C)||k(w_(e))},[S,C]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Eu,{sx:{width:"100%"},position:"relative",children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Iz,{initialValues:as(null===P||void 0===P?void 0:P.diseaseList)?{diseaseList:[]}:P,enableReinitialize:!0,children:e=>{var t,n;let{values:i,setFieldValue:j,setErrors:C,errors:k}=e;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsxs)(df,{item:!0,xs:!0,children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"40px",top:"-28px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:A("rpm_FamilyMedicalHistory")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:A("rpm_FamilyMedicalHistory")})})]}),(0,Gt.jsx)(df,{item:!0,sx:{display:"none"},children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===i||void 0===i||null===(t=i.diseaseList)||void 0===t||null===(n=t.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===n?void 0:n.isEdit,onClick:()=>O.current.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:A("rpm_AddDisease")})})]})}),(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:r,orderBy:o,setOrder:a,setOrderBy:s,data:as(null===i||void 0===i?void 0:i.diseaseList)?[{}]:null===i||void 0===i?void 0:i.diseaseList,headCells:c,dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:(0,Gt.jsx)(Zz,{name:"diseaseList",children:e=>{var t,n,r,o,a;return O.current=e,(0,Gt.jsx)(Gt.Fragment,{children:as(null===i||void 0===i?void 0:i.diseaseList)?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsxs)(rC,{colSpan:6,style:{textAlign:"center"},children:[(0,Gt.jsx)("img",{src:h,style:{display:"block",margin:"auto"}}),(null===S||void 0===S||null===(n=S.permissions)||void 0===n?void 0:n.showAddMedicalHistoryBtn)&&(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,className:(null===S||void 0===S||null===(r=S.permissions)||void 0===r?void 0:r.showAddMedicalHistoryBtn)&&"fmedicalHistory-tour-step0",disabled:null===i||void 0===i||null===(o=i.diseaseList)||void 0===o||null===(a=o.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===a?void 0:a.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:[(0,Gt.jsx)(oue.A,{}),A("rpm_AddNewDisease")]})]})})}):null===i||void 0===i||null===(t=i.diseaseList)||void 0===t?void 0:t.map((t,n)=>{var r,o,a,s,l,c,d,u,p;return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{sx:{minWidth:150},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(L,{name:"diseaseList.".concat(n,".relationship"),errors:k}):null!==t&&void 0!==t&&t.relationship?null===t||void 0===t?void 0:t.relationship:"NA"}),(0,Gt.jsx)(rC,{sx:{minWidth:250},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(R,{diseaseName:t,name:"diseaseList.".concat(n,".disease_name"),setFieldValue:j,errors:k}):null===t||void 0===t?void 0:t.disease_name}),(0,Gt.jsx)(rC,{sx:{minWidth:"CUSTOM"===(null===t||void 0===t?void 0:t.duration_unit)?350:250},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(N,{errors:k,data:t,setFieldValue:j,name:{value:"diseaseList.".concat(n,".duration"),unit:"diseaseList.".concat(n,".duration_unit"),start_date:"diseaseList.".concat(n,".start_date"),end_date:"diseaseList.".concat(n,".end_date")}}):(0,Gt.jsx)(Gt.Fragment,{children:t.custom_duration?t.custom_duration+" "+(null===t||void 0===t?void 0:t.duration_unit):T(t.duration_unit,null===t||void 0===t?void 0:t.start_date,t.end_date)})}),(0,Gt.jsx)(rC,{sx:{minWidth:250,whiteSpace:"normal"},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(D,{name:"diseaseList.".concat(n,".remark"),errors:k}):null!==t&&void 0!==t&&t.remark?(0,Gt.jsx)(F,{remark:null===t||void 0===t?void 0:t.remark}):"NA"}),(0,Gt.jsx)(rC,{sx:{minWidth:250,whiteSpace:"normal"},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)($,{}),as(null===w||void 0===w||null===(r=w.data)||void 0===r||null===(o=r.local_files)||void 0===o||null===(a=o.local)||void 0===a?void 0:a.files)?b("diseaseList.".concat(n,".reports"),t):_("diseaseList.".concat(n,".reports"),t)]}):(0,Gt.jsx)(I,{diseaseObj:t})}),(0,Gt.jsx)(rC,{children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsxs)(Gt.Fragment,{children:[y(t,{setErrors:C}),v(t,e.remove,n)]}):(0,Gt.jsxs)(Gt.Fragment,{children:[(null===S||void 0===S||null===(s=S.permissions)||void 0===s?void 0:s.showEditMedicalHistoryBtn)&&g(t),(null===S||void 0===S||null===(l=S.permissions)||void 0===l?void 0:l.showDeleteMedicalHistoryBtn)&&x(t)]})})]}),(null===S||void 0===S||null===(c=S.permissions)||void 0===c?void 0:c.showAddMedicalHistoryBtn)&&(null===i||void 0===i||null===(d=i.diseaseList)||void 0===d?void 0:d.length)-1===n&&(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:5,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===i||void 0===i||null===(u=i.diseaseList)||void 0===u||null===(p=u.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===p?void 0:p.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:[(0,Gt.jsx)(oue.A,{}),A("rpm_AddNewDisease")]})})})]},n)})})}})})})})]})}},"addMedicalHistory_formik"),(0,Gt.jsx)(Eu,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,Gt.jsx)(IO,{pageDetails:f,fetchListFunction:m})})]})})})})}gbe.defaultProps={allDiseaseList:[],familyDiseaseHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",familyDiseaseList:[],otherDiseaseList:[],fetchDiseaseList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},isEdit:!1,saveButton:()=>{},fileUploadButton:()=>{},editRow:[],closeButton:()=>{},otherHistory:{},downloadFile:()=>{},fileModal:{},fileUploadIconButton:()=>{},patientData:{},program:{}};const vbe=gbe;var xbe=n(99641);function ybe(e){return(0,sr.Ay)("MuiAlertTitle",e)}(0,ar.A)("MuiAlertTitle",["root"]);const bbe=["className"],jbe=(0,Un.Ay)(Ym,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{fontWeight:t.typography.fontWeightMedium,marginTop:-2}}),wbe=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiAlertTitle"}),{className:r}=n,i=(0,nn.A)(n,bbe),o=n,a=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},ybe,t)})(o);return(0,Gt.jsx)(jbe,(0,Ft.A)({gutterBottom:!0,component:"div",ownerState:o,ref:t,className:(0,nr.A)(a.root,r)},i))}),_be=wbe;const Cbe=function(e){var t,n,r,i,o,a,s,l,c,d;let{openModal:u,onCloseModal:p,onFileUpload:h,onLocalFileDelete:m,fileModal:f,actionFunction:g,onCloudFilesDelete:v}=e;const{t:x}=vg(),y=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"sm",open:u,onClose:p,scroll:"paper",children:[(0,Gt.jsx)(n_,{children:x("rpm_AddReports")}),(0,Gt.jsxs)(s_,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{p:2,py:6,borderRadius:1,textAlign:"center",border:"1px dashed #818181"},children:[(0,Gt.jsxs)(Eu,{mb:3,children:[(0,Gt.jsx)(xbe.A,{sx:{color:"grey.400",fontSize:"h3.fontSize"}}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:500,sx:{color:"grey.500"},children:x("rpm_AddReportsHere")})]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsxs)(Vp,{startIcon:(0,Gt.jsx)(dbe.A,{}),variant:"contained",color:"primary",component:"span",size:"large",disableElevation:!0,children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:h}),x("rpm_ChooseFile")]})})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[!as(null===f||void 0===f||null===(t=f.data)||void 0===t?void 0:t.files)&&(0,Gt.jsx)(Gt.Fragment,{children:null===f||void 0===f||null===(n=f.data)||void 0===n||null===(r=n.files)||void 0===r?void 0:r.map((e,t)=>(0,Gt.jsxs)(XO,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"large"}),onClose:()=>v(null===f||void 0===f?void 0:f.data,null===e||void 0===e?void 0:e.id,t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,Gt.jsx)(_be,{title:y(null===e||void 0===e?void 0:e.file_name),sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y(null===e||void 0===e?void 0:e.file_name)}),(0,Gt.jsx)(Eu,{children:"Uploaded"})]},t))}),!as(null===f||void 0===f||null===(i=f.data)||void 0===i||null===(o=i.local_files)||void 0===o||null===(a=o.local)||void 0===a?void 0:a.files)&&(0,Gt.jsx)(Af,{sx:{mb:2}}),null===f||void 0===f||null===(s=f.data)||void 0===s||null===(l=s.local_files)||void 0===l||null===(c=l.local)||void 0===c||null===(d=c.files)||void 0===d?void 0:d.map((e,t)=>(0,Gt.jsxs)(XO,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"large"}),onClose:()=>m(t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,Gt.jsx)(_be,{className:"text-clamp-1",children:null===e||void 0===e?void 0:e.name}),(0,Gt.jsxs)("strong",{children:[Math.ceil((null===e||void 0===e?void 0:e.size)/1024),"KB"]})]},t))]})]}),(0,Gt.jsx)(Eu,{mt:2.5,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:p,children:x("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:g,children:x("rpm_Submit")})})]})})]})]})};var Sbe=n(22505);const Abe=["children","onClose"];const kbe=function(e){var t,n,r,o,a,s,l,c,d,u;let{openModal:p,onCloseModal:h,onFileUpload:m,onLocalFileDelete:f,fileModal:g,actionFunction:v,onCloudFilesDelete:x}=e;const{t:y}=vg(),b=e=>{const{children:t,onClose:n}=e,r=Ko(e,Abe);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{className:"helloworld",children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:5,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))},j=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"sm",open:p,onClose:h,scroll:"paper",children:[(0,Gt.jsx)(b,{sx:{padding:"12px 16px",fontSize:"16px"},onClose:h,children:(0,Gt.jsx)(n_,{sx:{fontSize:"16px",padding:"0"},children:y("rpm_AddReports")})}),(0,Gt.jsxs)(s_,{sx:{padding:"20px 16px"},children:[(0,Gt.jsx)(Eu,{sx:{py:1,textAlign:"center",border:"3px dashed #efefef",borderRadius:"4px"},children:(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",alignItems:"center",children:[(0,Gt.jsx)(dbe.A,{sx:{color:"#5363bd",fontSize:"h3.fontSize"}}),(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsxs)(Vp,{startIcon:(0,Gt.jsx)(Sbe.A,{}),component:"span",size:"large",disableElevation:!0,children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:m}),y("rpm_AddReportsHere")]})})]})}),(0,Gt.jsxs)(Eu,{children:[!as(null===g||void 0===g||null===(t=g.data)||void 0===t?void 0:t.files)&&(0,Gt.jsx)(Gt.Fragment,{children:null===g||void 0===g||null===(n=g.data)||void 0===n||null===(r=n.files)||void 0===r?void 0:r.map((e,t)=>(0,Gt.jsxs)(XO,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),onClose:()=>x(null===g||void 0===g?void 0:g.data,null===e||void 0===e?void 0:e.id,t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,Gt.jsx)(_be,{title:j(null===e||void 0===e?void 0:e.file_name),sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:j(null===e||void 0===e?void 0:e.file_name)}),(0,Gt.jsx)(Eu,{children:"Uploaded"})]},t))}),!as(null===g||void 0===g||null===(o=g.data)||void 0===o||null===(a=o.local_files)||void 0===a||null===(s=a.local)||void 0===s?void 0:s.files)&&(0,Gt.jsx)(Af,{sx:{mb:.2}}),null===g||void 0===g||null===(l=g.data)||void 0===l||null===(c=l.local_files)||void 0===c||null===(d=c.local)||void 0===d||null===(u=d.files)||void 0===u?void 0:u.map((e,t)=>(0,Gt.jsxs)(XO,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"small",sx:{marginRight:"0"}}),onClose:()=>f(t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,Gt.jsx)(_be,{sx:{fontSize:"12px"},children:null===e||void 0===e?void 0:e.name}),(0,Gt.jsxs)("strong",{children:[Math.ceil((null===e||void 0===e?void 0:e.size)/1024),"KB"]})]},t))]}),(0,Gt.jsxs)(Eu,{mt:2.5,children:[(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:v,sx:{marginRight:"8px"},children:y("rpm_Submit")}),(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:h,children:y("rpm_Cancel")})]})]})]})};var Mbe=n(56559);const Obe=["children","onClose"],Tbe=e=>{const{children:t,onClose:n}=e,r=Ko(e,Obe);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{className:"helloworld",children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:5,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};function Ebe(e){let{dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o,children:a}=e;return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"sm",open:r,onClose:i,children:[(0,Gt.jsx)(Tbe,{sx:{padding:"12px 16px",fontSize:"16px"},onClose:i,children:(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Mbe.A,{color:"error",sx:{marginRight:"5px",width:"16px"}}),o.primaryText,t&&(0,Gt.jsx)(Ym,{component:"p",variant:"subtitle2",fontSize:"14px",children:"(".concat(t,")")})]})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(s_,{sx:{padding:"12px 16px"},children:a?a({dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{component:"p",variant:"h6",fontSize:"14px",children:o.secondaryText}),o.descText&&(0,Gt.jsx)(Ym,{component:"p",variant:"body1",fontSize:"14px",children:o.descText})]}),(0,Gt.jsx)(Eu,{mt:2.5,children:(0,Gt.jsxs)(Eu,{direction:o.btnSwap?"row-reverse":"row",children:[(0,Gt.jsx)(Vp,{color:o.btn.secondaryColor,variant:"outlined",onClick:i,children:o.btn.secondaryText})," ",(0,Gt.jsx)(Vp,{color:o.btn.primaryColor,disableElevation:!0,variant:"contained",onClick:n,children:o.btn.primaryText})]})})]})})]})})}function Pbe(e){let{allDiseaseList:t,familyDiseaseList:n,editIcon:r,closeButtonMobile:o,deleteButtonIcon:a,saveButtonMobile:s,fileUploadButton:l,downloadFile:c,fileModal:d,fileUploadIconButton:u,patientData:p,program:h,nodata:m}=e;const f=MM({labelAnswers:{fontSize:"16px !important"},titles:{fontSize:"14px !important",color:"#7986cb",fontWeight:"600 !important",letterSpacing:"0.02em"},familyDiseasebutton:{"& .MuiButtonBase-root":{textAlign:"center",marginBottom:"16px",background:"#e8eaf6",padding:"5px 10px",boxShadow:"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)",borderRadius:"4px",border:"1px solid #3f51b5",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",marginTop:"10px"}}})(),{t:g}=vg(),v=Nt(),x=Xy(),y=(0,We.useRef)(null),b=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},j=[{name:g("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===h||void 0===h?void 0:h.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===h||void 0===h?void 0:h.code,"/patients")},{name:"".concat((null===p||void 0===p?void 0:p.first_name)||""," ").concat((null===p||void 0===p?void 0:p.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===h||void 0===h?void 0:h.code,"/patients/").concat(null===p||void 0===p?void 0:p.id,"/dashboard")},{name:g("rpm_FamilyMedicalHistory"),url:""}],w={diseaseList:null===n||void 0===n?void 0:n.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:null===e||void 0===e?void 0:e.custom_duration}))},_=e=>{let{name:t,errors:n}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625},"& .MuiInputAdornment-root":{right:"15px !important"}},className:f.editHistoryColum,children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",placeholder:g("message:rpm_RemarkPlaceHolder"),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:g("message:rpm_DiseaseRemarkHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:t,children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_Remark")})})}),(0,Gt.jsx)(iw,{error:!0,children:n.remark})]})},C=e=>{let{name:n,diseaseName:r,setFieldValue:o,errors:a}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{component:Gb,fullWidth:!0,size:"small",id:n,name:n,variant:"outlined",value:r||null,options:t||[],filterOptions:(e,t)=>{const n=x(e,t),{inputValue:r}=t,i=e.some(e=>r===e.disease_name);return""===r||i||n.push({inputValue:r,disease_name:'Add "'.concat(r,'"')}),n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.disease_name,renderOption:(e,t)=>(0,Gt.jsx)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{children:t.disease_name})),onChange:(e,t)=>{"string"===typeof t?o(n,t||""):t&&t.inputValue?o(n,t.inputValue?t.inputValue:""):o(n,null!==t&&void 0!==t&&t.disease_name?t.disease_name:"")},freeSolo:!0,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:g("rpm_DiseaseName")}))}),(0,Gt.jsx)(Xz,{name:n,children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_SelectDisease")})})}),(0,Gt.jsx)(iw,{error:!0,children:g(a.disease_name,{field:g("rpm_DiseaseName")})})]})},S=e=>{let{name:t,data:n,setFieldValue:r,errors:o}=e;return(0,Gt.jsx)(Gt.Fragment,{children:"CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)||"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)?(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:5,children:(0,Gt.jsxs)(Eu,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,views:["year"],size:"small",label:"From",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),maxDate:new Date})}),(0,Gt.jsx)(iw,{error:!0,children:g(o.start_date,{field:g("rpm_From")})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:5,children:["CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,Gt.jsxs)(Eu,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,views:["year"],size:"small",label:"To",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),minDate:n.start_date?(()=>{const e=new Date(n.start_date),t=e.setFullYear(e.getFullYear()+1);return new Date(t)})(n.start_date):void 0,maxDate:new Date})}),(0,Gt.jsx)(iw,{error:!0,children:g(o.end_date,{field:g("rpm_From")})})]}),"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,Gt.jsx)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:g("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ed||void 0===ed?void 0:ed.map(e=>(0,Gt.jsx)($m,{value:e.value,children:g("rpm_".concat(e.name))},e.value))})})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:g("rpm_Close"),children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>r(t.unit,""),children:(0,Gt.jsx)(ube.A,{fontSize:"small",sx:{width:16,height:16}})})})})]}):(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsxs)(Eu,{className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:t.value,name:t.value,variant:"outlined",type:"number",placeholder:g("message:rpm_DurationValuePlaceHolder"),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:g("message:rpm_DurationValueHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:t.value,children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_Duration")})})}),(0,Gt.jsx)(iw,{error:!0,children:o.duration})]})}),(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:g("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ed||void 0===ed?void 0:ed.map(e=>(0,Gt.jsx)($m,{value:e.value,children:g("rpm_".concat(e.name))},e.value))}),(0,Gt.jsx)(Xz,{name:null===t||void 0===t?void 0:t.unit,children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_Duration")})})})]})})]})})},A=e=>{let{name:t,errors:n}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:g("message:rpm_DiseaseRelationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===id||void 0===id?void 0:id.map(e=>(0,Gt.jsx)($m,{value:e,children:g("rpm_".concat(e))},e))}),(0,Gt.jsx)(Xz,{name:t,children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_Relation")})})}),(0,Gt.jsx)(iw,{error:!0,children:g(null===n||void 0===n?void 0:n.relationship,{field:g("rpm_Relation")})})]})},k=e=>{var t,n,r,i;let{diseaseObj:o}=e;const[a,s]=We.useState(2),l=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,Gt.jsxs)(Gt.Fragment,{children:[null===o||void 0===o||null===(t=o.files)||void 0===t||null===(n=t.slice(0,a))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},"data-id":e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:l(e.file_name),variant:"outlined",onDelete:()=>c(e),deleteIcon:(0,Gt.jsx)(mbe.A,{color:"primary"})},e.id)),(null===o||void 0===o||null===(r=o.files)||void 0===r?void 0:r.length)>2&&(0,Gt.jsx)(Yx,{title:(null===o||void 0===o||null===(i=o.files)||void 0===i?void 0:i.length)===a?g("rpm_Less"):g("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;a===(null===o||void 0===o||null===(e=o.files)||void 0===e?void 0:e.length)?s(2):s(null===o||void 0===o||null===(t=o.files)||void 0===t?void 0:t.length)},children:"..."})})]})},M=e=>{let{remark:t}=e;const[n,r]=We.useState(150);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===t||void 0===t?void 0:t.substring(0,n),(null===t||void 0===t?void 0:t.length)>150&&(0,Gt.jsx)(Yx,{title:(null===t||void 0===t?void 0:t.length)===n?g("rpm_Less"):g("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{n===(null===t||void 0===t?void 0:t.length)?r(150):r(null===t||void 0===t?void 0:t.length)},children:"..."})})]})},O=()=>{var e,t,n,r,i,o,a;return!as(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"outlined"},t)))};return We.useEffect(()=>{const e={breadcrumb:j};as(h)||as(p)||v(w_(e))},[h,p]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Eu,{sx:{width:"100%"},position:"relative",children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Iz,{initialValues:as(null===w||void 0===w?void 0:w.diseaseList)?{diseaseList:[]}:w,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,setErrors:i,errors:c}=e;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"35px",top:"-25px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontSize:16,children:g("rpm_FamilyMedicalHistory")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",fontSize:16,children:g("rpm_FamilyMedicalHistory")})}),(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Zz,{name:"diseaseList",children:e=>{var p,v,x,j,w,T;return y.current=e,(0,Gt.jsx)(Gt.Fragment,{children:as(null===t||void 0===t?void 0:t.diseaseList)?(0,Gt.jsxs)(Eu,{sx:{textAlign:"center",mt:2,bgcolor:"white",p:2,borderRadius:1},children:[(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)("img",{src:m,style:{display:"block",margin:"auto",maxWidth:"130px"}}),(0,Gt.jsx)("span",{style:{fontSize:"12px",fontWeight:"600"},children:"No Records Found."})]}),(null===h||void 0===h||null===(p=h.permissions)||void 0===p?void 0:p.showAddMedicalHistoryBtn)&&(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===t||void 0===t||null===(v=t.diseaseList)||void 0===v||null===(x=v.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===x?void 0:x.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:[(0,Gt.jsx)(oue.A,{}),g("rpm_AddNewDisease")]})]}):(0,Gt.jsxs)(Gt.Fragment,{children:[(null===h||void 0===h||null===(j=h.permissions)||void 0===j?void 0:j.showAddMedicalHistoryBtn)&&(0,Gt.jsx)(Eu,{className:f.familyDiseasebutton,children:(0,Gt.jsxs)(Vp,{color:"primary",disableElevation:!0,disabled:null===t||void 0===t||null===(w=t.diseaseList)||void 0===w?void 0:w.some(e=>null===e||void 0===e?void 0:e.isEdit),onClick:()=>e.unshift({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),sx:{padding:"0",marginBottom:"10px"},children:[(0,Gt.jsx)(oue.A,{}),g("rpm_AddNewDisease")]})}),null===t||void 0===t||null===(T=t.diseaseList)||void 0===T?void 0:T.map((t,p)=>{var m,v,x,y,j;return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)(aH,{sx:{marginBottom:"5px",borderLeft:"4px solid #868fcd",overflow:"auto"},children:[(0,Gt.jsx)(WH,{sx:{paddingBottom:"0"},action:(0,Gt.jsx)(Eu,{sx:{display:"flex",justifyContent:"space-between"},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{sx:{marginTop:null!==t&&void 0!==t&&t.isEdit?"27px":"0px",marginLeft:null!==t&&void 0!==t&&t.isEdit?"15px":"0px"},children:[s(t,{setErrors:i}),o(t,e.remove,p)]})}):(0,Gt.jsxs)(Gt.Fragment,{children:[(null===h||void 0===h||null===(m=h.permissions)||void 0===m?void 0:m.showEditMedicalHistoryBtn)&&r(t),(null===h||void 0===h||null===(v=h.permissions)||void 0===v?void 0:v.showDeleteMedicalHistoryBtn)&&a(t)]})}),title:(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:f.titles,fontWeight:600,children:g("Relationship")}),null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(A,{name:"diseaseList.".concat(p,".relationship"),errors:c}):(0,Gt.jsx)(Ym,{variant:"body2",className:f.labelAnswers,children:(null===t||void 0===t?void 0:t.relationship)||"NA"})]})}),(0,Gt.jsxs)(uH,{sx:{paddingTop:null!==t&&void 0!==t&&t.isEdit?"8px":"16px"},children:[(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",sx:{display:null!==t&&void 0!==t&&t.isEdit?"block":"flex",marginBottom:null!==t&&void 0!==t&&t.isEdit?"10px":"8px"},children:[(0,Gt.jsxs)(Eu,{sx:{display:"flex",flexDirection:"column",flex:"0 0 150px"},children:[(0,Gt.jsx)(Ym,{variant:"subtitle1",className:f.titles,fontWeight:600,children:g("Disease Name")}),null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(C,{diseaseName:t,name:"diseaseList.".concat(p,".disease_name"),setFieldValue:n,errors:c}):(0,Gt.jsx)(Ym,{variant:"body2",fontSize:16,sx:{wordBreak:"break-all",whiteSpace:"pre-wrap"},children:(null===t||void 0===t?void 0:t.disease_name)||"NA"})]}),(0,Gt.jsx)(Af,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{margin:"10px",display:null!==t&&void 0!==t&&t.isEdit?"none":"block"}}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",flexDirection:"column",flex:"0 0 80px"},children:[(0,Gt.jsx)(Ym,{variant:"subtitle1",className:f.titles,fontWeight:600,sx:{paddingTop:null!==t&&void 0!==t&&t.isEdit?"8px":"0px"},children:g("Duration")}),null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(S,{errors:c,data:t,setFieldValue:n,name:{value:"diseaseList.".concat(p,".duration"),unit:"diseaseList.".concat(p,".duration_unit"),start_date:"diseaseList.".concat(p,".start_date"),end_date:"diseaseList.".concat(p,".end_date")}}):(0,Gt.jsx)(Ym,{children:t.custom_duration?t.custom_duration+" "+(null===t||void 0===t?void 0:t.duration_unit):b(t.duration_unit,null===t||void 0===t?void 0:t.start_date,t.end_date)})]})]}),(0,Gt.jsxs)(Eu,{mb:1,sx:{display:"flex",flexDirection:"column"},children:[(0,Gt.jsx)(Ym,{variant:"subtitle1",className:f.titles,fontWeight:600,children:g("Remark")}),null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(_,{name:"diseaseList.".concat(p,".remark"),errors:c}):(0,Gt.jsx)(Ym,{variant:"body2",fontSize:16,children:null!==t&&void 0!==t&&t.remark?(0,Gt.jsx)(M,{remark:null===t||void 0===t?void 0:t.remark}):"NA"})]}),(0,Gt.jsxs)(Eu,{mt:1,sx:{display:"flex",flexDirection:"column"},children:[(0,Gt.jsx)(Ym,{variant:"subtitle1",className:f.titles,fontWeight:600,sx:{paddingTop:null!==t&&void 0!==t&&t.isEdit?"8px":"0px"},children:g("Reports")}),null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(O,{}),as(null===d||void 0===d||null===(x=d.data)||void 0===x||null===(y=x.local_files)||void 0===y||null===(j=y.local)||void 0===j?void 0:j.files)?l("diseaseList.".concat(p,".reports"),t):u("diseaseList.".concat(p,".reports"),t)]}):as(null===t||void 0===t?void 0:t.files)?(0,Gt.jsx)(Ym,{children:"NA"}):(0,Gt.jsx)(k,{diseaseObj:t})]})]})]})},p)})]})})}})})})})]})}},"addMedicalHistory_formik")})})})})}Pbe.defaultProps={allDiseaseList:[],familyDiseaseHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",familyDiseaseList:[],otherDiseaseList:[],fetchDiseaseList:()=>{},editIcon:()=>{},viewButton:()=>{},deleteButtonIcon:()=>{},isEdit:!1,saveButtonMobile:()=>{},fileUploadButton:()=>{},editRow:[],closeButtonMobile:()=>{},otherHistory:{},downloadFile:()=>{},fileModal:{},fileUploadIconButton:()=>{},patientData:{},program:{}};const Dbe=Pbe;var Rbe=n(38723),Nbe=n(95382),Lbe=n(10155),Ibe=n(3519);const Fbe=["content"];const $be=function(e){let{patientData:t,program:n}=e;const r=window.innerWidth,[o,a]=We.useState(""),s=Nt(),l=Ct(qd),c=!("true"===ls(l,"user_principal.attributes.skip_tour[0]","")),d=Ct(Nd),{t:u}=vg(),{programId:p,patientId:h}=lo(),[m,f]=We.useState((0,i.A)({},{local:{files:[]},onCloud:{files:[]}})),[g,v]=(0,We.useState)("desc"),[x,y]=(0,We.useState)("updated_at"),[b,j]=We.useState(null),[w,_]=We.useState(null),[C,S]=(0,We.useState)([]),[A,k]=(0,We.useState)((0,i.A)({},Fc)),[M,O]=We.useState({open:!1,data:{}}),[T,E]=We.useState({open:!1,data:{}}),P=e=>{E((0,i.A)((0,i.A)({},T),{},{open:!T.open,data:e}))},D=e=>{O((0,i.A)((0,i.A)({},M),{},{open:!M.open,data:(0,i.A)((0,i.A)({},e.disease),{},{local_files:m})}))},R=()=>{let e=(0,i.A)({},m);e.local.files.splice(0,e.local.files.length),f(e),O((0,i.A)((0,i.A)({},M),{},{open:!1}))},N=function(e){let t=(0,i.A)({},m);t.local.files.splice(e,1),f(t)},L=e=>{if(Array.isArray(e))return S(e.map(e=>e.toString()));const t=e.target.name;C.includes(t)?S(C.filter(e=>e!==t)):S(e=>[...e,t])},I=e=>{const t=null===w||void 0===w?void 0:w.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id}));_(t)},F=(e,t,n)=>{if(R(),e.id){const t=null===w||void 0===w?void 0:w.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id&&!1}));_(t)}else t(n)},$=async()=>{const e=(0,i.A)((0,i.A)({},A),{},{kind:"FAMILY"});try{const{data:t}=await s(al(p,h,e)),n=t||{},{content:r}=n,o=Ko(n,Fbe),a=r.filter(e=>"FAMILY"===e.kind);_(a),k(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){console.log(t)}},B=async(e,t)=>{try{await s(pl(p,h,e.id,t)),$(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);O((0,i.A)((0,i.A)({},M),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),s(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_FileDeleteFailed"),severity:$c}))}},z=async e=>{try{await s(hl(p,h,e)),s(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(t){const e=ls(t,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_DownloadFileFailed"),severity:$c}))}},H=async(e,t)=>{var n,r;let{setErrors:i}=t,o=null===e||void 0===e?void 0:e.start_date,a=null===e||void 0===e?void 0:e.end_date;"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?(o=sa()(o).startOf("year").valueOf(),a=sa()(a).startOf("year").valueOf()):(a=sa()().valueOf(),o=sa()(a).subtract(null===e||void 0===e?void 0:e.duration,"".concat(null===e||void 0===e?void 0:e.duration_unit).toLowerCase()).valueOf());const l={disease_name:null===e||void 0===e?void 0:e.disease_name,start_date:o?sa()(o).format():null,end_date:a?sa()(a).format():null,remark:null===e||void 0===e?void 0:e.remark,duration_unit:null!==e&&void 0!==e&&e.duration_unit?null===e||void 0===e?void 0:e.duration_unit:"YEAR",custom_duration:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?0:null===e||void 0===e?void 0:e.duration,kind:"FAMILY",relationship:null!==e&&void 0!==e&&e.relationship?null===e||void 0===e?void 0:e.relationship:"",upload:as(null===M||void 0===M||null===(n=M.data)||void 0===n?void 0:n.local_files)?[]:null===M||void 0===M||null===(r=M.data)||void 0===r?void 0:r.local_files};vV.addNewDisease.validate(e,{abortEarly:!1}).then(async()=>{try{await s(sl(p,h,l)),$(),R(),s(Zo({subTitle:"message:rpm_DiseaseCreatedSuccessfully",severity:Bc}))}catch(e){const t=ls(e,"response.data.code","");as(t)?s(Zo({subTitle:"error:rpm_DiseaseCreatedFailed",severity:$c})):s(Zo({subTitle:bd(t,"error:rpm_DiseaseCreatedFailed"),severity:$c}))}}).catch(e=>{const t=Array.from(e.inner||[]).reduce((e,t)=>(e[t.path]=t.message,e),{});i(t)})},W=async(e,t)=>{var n,r;let{setErrors:i}=t,o=null===e||void 0===e?void 0:e.start_date,a=null===e||void 0===e?void 0:e.end_date;"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?(o=sa()(o).startOf("year").valueOf(),a=sa()(a).startOf("year").valueOf()):(a=sa()().valueOf(),o=sa()(a).subtract(null===e||void 0===e?void 0:e.duration,"".concat(null===e||void 0===e?void 0:e.duration_unit).toLowerCase()).valueOf());const l={id:null===e||void 0===e?void 0:e.id,disease_name:null===e||void 0===e?void 0:e.disease_name,start_date:o?sa()(o).format():null,end_date:a?sa()(a).format():null,remark:null===e||void 0===e?void 0:e.remark,duration_unit:null===e||void 0===e?void 0:e.duration_unit,custom_duration:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?0:null===e||void 0===e?void 0:e.duration,kind:null===e||void 0===e?void 0:e.kind,relationship:null!==e&&void 0!==e&&e.relationship?null===e||void 0===e?void 0:e.relationship:"",upload:as(null===M||void 0===M||null===(n=M.data)||void 0===n?void 0:n.local_files)?[]:null===M||void 0===M||null===(r=M.data)||void 0===r?void 0:r.local_files};vV.editNewDisease.validate(e,{abortEarly:!1}).then(async()=>{try{await s(ll(p,h,l)),$(),R(),s(Zo({subTitle:"message:rpm_DiseaseUpdateSuccessfully",severity:Bc}))}catch(e){const t=ls(e,"response.data.code","");as(t)?s(Zo({subTitle:"error:rpm_DiseaseUpdateFailed",severity:$c})):s(Zo({subTitle:bd(t,"error:rpm_DiseaseUpdateFailed"),severity:$c}))}}).catch(e=>{const t=Array.from(e.inner||[]).reduce((e,t)=>(e[t.path]=t.message,e),{});i(t)})},V=async e=>{try{var t;await s(dl(p,h,null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id)),$(),E((0,i.A)((0,i.A)({},T),{},{open:!T.open})),s(Zo({subTitle:"message:rpm_DiseaseDeleteSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_DiseaseUpdateFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_DiseaseDeleteFailed"),severity:$c}))}},U=(e,t)=>(0,Gt.jsx)(Vp,{variant:"text",color:"primary",disableElevation:!0,onClick:()=>D({name:e,disease:t}),sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsxs)(Eu,{sx:{flex:1,pl:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},children:u("rpm_UploadReport")}),(0,Gt.jsx)(Ym,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})}),q=(e,t)=>(0,Gt.jsx)(Yx,{title:u("rpm_UploadMore"),children:(0,Gt.jsx)(Kp,{"data-id":t.id,color:"primary",sx:{ml:1,mb:1},onClick:()=>D({name:e,disease:t}),children:(0,Gt.jsx)(dbe.A,{fontSize:"small",sx:{width:16,height:16}})})}),G=function(e){var t;const n=e.target.files;let r=(0,i.A)({},m.local),o=(null===r||void 0===r||null===(t=r.files)||void 0===t?void 0:t.map(e=>e.size))||[],a=0;n&&Array.from(n).forEach(e=>{var t;return as(null===r||void 0===r||null===(t=r.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(a+=o.reduce((e,t)=>e+t,0),(null===e||void 0===e?void 0:e.size)>=5242880||a>=5242800?s(Zo({subTitle:"error:rpm_ImageSize",severity:$c})):(e.url=URL.createObjectURL(e),void r.files.push(e))):s(Zo({subTitle:"error:rpm_SameFileName",severity:$c}))}),f(e=>(0,i.A)((0,i.A)({},e),{},{local:r})),e.target.value=""},Y=e=>(0,Gt.jsx)(Yx,{title:u("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})});We.useEffect(()=>{d&&($(),(async()=>{try{const{data:e}=od,{content:t}=e||{};j(t)}catch(e){console.log(e)}})())},[d]),We.useEffect(()=>{s(w_({activeMenuItem:"patient_history"}))},[]);const Z=[{id:"relationship",label:u("rpm_Relationship")+"*",isSort:!1,sortProperty:"relationship"},{id:"disease",label:u("rpm_DiseaseName")+"*",isSort:!1,sortProperty:"disease"},{id:"duration",label:u("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:u("rpm_Remarks"),isSort:!1,sortProperty:"remarks"},{id:"reports",label:u("rpm_AddReports"),isSort:!1,sortProperty:"reports"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,Gt.jsxs)(Gt.Fragment,{children:[r>=575?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(vbe,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:"id",checkState:C,onCheck:L,isSelection:!1,nodata:D_,allDiseaseList:b,familyDiseaseHead:Z,familyDiseaseList:w,fetchDiseaseList:$,pageDetails:A,editButton:e=>(0,Gt.jsx)(Yx,{title:u("rpm_Edit"),children:(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>I(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),closeButton:(e,t,n)=>(0,Gt.jsx)(Yx,{title:u("rpm_Cancel"),children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>F(e,t,n),children:(0,Gt.jsx)(ube.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:Y,deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>P(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),saveButton:(e,t)=>{let{setErrors:n}=t;return(0,Gt.jsx)(Yx,{title:u("rpm_Save"),children:(0,Gt.jsx)(Kp,{onClick:()=>e.id?W(e,{setErrors:n}):H(e,{setErrors:n}),color:"primary",children:(0,Gt.jsx)(hbe.A,{fontSize:"small"})})})},fileUploadButton:U,fileModal:M,downloadFile:z,fileUploadIconButton:q,patientData:t,program:n}),(0,Gt.jsx)(Cbe,{openModal:null===M||void 0===M?void 0:M.open,onCloseModal:R,actionFunction:D,onFileUpload:G,initialValues:m,onLocalFileDelete:N,fileModal:M,onCloudFilesDelete:B}),(0,Gt.jsx)(PU,{openModal:T.open,onCloseModal:P,actionFunction:()=>V(T),dataName:"",options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteBodyText"),btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Dbe,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:"id",checkState:C,onCheck:L,isSelection:!1,nodata:D_,allDiseaseList:b,familyDiseaseHead:Z,familyDiseaseList:w,fetchDiseaseList:$,pageDetails:A,editIcon:e=>(0,Gt.jsx)(Yx,{title:u("rpm_Edit"),children:(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>I(e),children:(0,Gt.jsx)(Ibe.A,{fontSize:"small"})})}),closeButtonMobile:(e,t,n)=>(0,Gt.jsx)(Yx,{title:u("rpm_Cancel"),children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>F(e,t,n),sx:{marginLeft:"5px",background:"#d32f2f1a",padding:"5px"},children:(0,Gt.jsx)(Lbe.A,{})})}),viewButton:Y,deleteButtonIcon:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>P(e),children:(0,Gt.jsx)(Rbe.A,{fontSize:"small",sx:{width:22,height:22}})}),saveButtonMobile:(e,t)=>{let{setErrors:n}=t;return(0,Gt.jsx)(Yx,{title:u("rpm_Save"),children:(0,Gt.jsx)(Kp,{onClick:()=>e.id?W(e,{setErrors:n}):H(e,{setErrors:n}),color:"primary",sx:{background:"#2c387e2b",padding:"5px"},children:(0,Gt.jsx)(Nbe.A,{})})})},fileUploadButton:U,fileModal:M,downloadFile:z,fileUploadIconButton:q,patientData:t,program:n}),(0,Gt.jsx)(kbe,{openModal:null===M||void 0===M?void 0:M.open,onCloseModal:R,actionFunction:D,onFileUpload:G,initialValues:m,onLocalFileDelete:N,fileModal:M,onCloudFilesDelete:B}),(0,Gt.jsx)(Ebe,{openModal:T.open,onCloseModal:P,actionFunction:()=>V(T),dataName:"",options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteBodyText"),btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,Gt.jsx)(AZ,{isTour:c,path:"fmedicalHistoryTour",setRenderer:a}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:o})]})};function Bbe(e){return(0,sr.Ay)("MuiRadioGroup",e)}(0,ar.A)("MuiRadioGroup",["root","row","error"]);const zbe=We.createContext(void 0),Hbe=["actions","children","className","defaultValue","name","onChange","value"],Wbe=We.forwardRef(function(e,t){const{actions:n,children:r,className:i,defaultValue:o,name:a,onChange:s,value:l}=e,c=(0,nn.A)(e,Hbe),d=We.useRef(null),u=(e=>{const{classes:t,row:n,error:r}=e,i={root:["root",n&&"row",r&&"error"]};return(0,ir.A)(i,Bbe,t)})(e),[p,h]=(0,Nx.A)({controlled:l,default:o,name:"RadioGroup"});We.useImperativeHandle(n,()=>({focus:()=>{let e=d.current.querySelector("input:not(:disabled):checked");e||(e=d.current.querySelector("input:not(:disabled)")),e&&e.focus()}}),[]);const m=(0,Ln.A)(t,d),f=(0,Rx.A)(a),g=We.useMemo(()=>({name:f,onChange(e){h(e.target.value),s&&s(e,e.target.value)},value:p}),[f,s,h,p]);return(0,Gt.jsx)(zbe.Provider,{value:g,children:(0,Gt.jsx)(Eue,(0,Ft.A)({role:"radiogroup",ref:m,className:(0,nr.A)(u.root,i)},c,{children:r}))})}),Vbe=Wbe,Ube=(0,dy.A)((0,Gt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),qbe=(0,dy.A)((0,Gt.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),Gbe=(0,Un.Ay)("span",{name:"MuiRadioButtonIcon",shouldForwardProp:Ju.A})({position:"relative",display:"flex"}),Ybe=(0,Un.Ay)(Ube,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),Zbe=(0,Un.Ay)(qbe,{name:"MuiRadioButtonIcon"})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},n.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})});const Kbe=function(e){const{checked:t=!1,classes:n={},fontSize:r}=e,i=(0,Ft.A)({},e,{checked:t});return(0,Gt.jsxs)(Gbe,{className:n.root,ownerState:i,children:[(0,Gt.jsx)(Ybe,{fontSize:r,className:n.background,ownerState:i}),(0,Gt.jsx)(Zbe,{fontSize:r,className:n.dot,ownerState:i})]})};var Xbe=n(6593);function Qbe(e){return(0,sr.Ay)("MuiRadio",e)}const Jbe=(0,ar.A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),eje=["checked","checkedIcon","color","icon","name","onChange","size","className"],tje=(0,Un.Ay)(cC,{shouldForwardProp:e=>(0,Ju.A)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t["size".concat((0,Fu.A)(n.size))],t["color".concat((0,Fu.A)(n.color))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(Jbe.checked)]:{color:(t.vars||t).palette[n.color].main}},{["&.".concat(Jbe.disabled)]:{color:(t.vars||t).palette.action.disabled}})});const nje=(0,Gt.jsx)(Kbe,{checked:!0}),rje=(0,Gt.jsx)(Kbe,{}),ije=We.forwardRef(function(e,t){var n,r;const i=(0,$t.b)({props:e,name:"MuiRadio"}),{checked:o,checkedIcon:a=nje,color:s="primary",icon:l=rje,name:c,onChange:d,size:u="medium",className:p}=i,h=(0,nn.A)(i,eje),m=(0,Ft.A)({},i,{color:s,size:u}),f=(e=>{const{classes:t,color:n,size:r}=e,i={root:["root","color".concat((0,Fu.A)(n)),"medium"!==r&&"size".concat((0,Fu.A)(r))]};return(0,Ft.A)({},t,(0,ir.A)(i,Qbe,t))})(m),g=We.useContext(zbe);let v=o;const x=(0,Xbe.A)(d,g&&g.onChange);let y=c;return g&&("undefined"===typeof v&&(v=function(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}(g.value,i.value)),"undefined"===typeof y&&(y=g.name)),(0,Gt.jsx)(tje,(0,Ft.A)({type:"radio",icon:We.cloneElement(l,{fontSize:null!=(n=rje.props.fontSize)?n:u}),checkedIcon:We.cloneElement(a,{fontSize:null!=(r=nje.props.fontSize)?r:u}),ownerState:m,classes:f,name:y,checked:v,onChange:x,ref:t,className:(0,nr.A)(f.root,p)},h))}),oje=ije;function aje(e){var t;let{allDiseaseList:n,personalDiseaseList:r,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,personalDiseaseHead:d,checkState:u,onCheck:p,isSelection:h,nodata:m,fetchDiseaseList:f,pageDetails:g,editButton:v,closeButton:x,deleteButton:y,saveButton:b,fileUploadButton:j,filterOtherHistory:w,updateOtherHistory:_,omhEdit:C,handleOtherHistory:S,downloadFile:A,fileModal:k,fileUploadIconButton:M,patientData:O,program:T,handleCancel:E}=e;const{t:P}=vg(),D=Nt(),R=so(),N=Xy(),L=(0,We.useRef)(null),I=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},F=[{name:P("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===T||void 0===T?void 0:T.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===T||void 0===T?void 0:T.code,"/patients")},{name:"".concat((null===O||void 0===O?void 0:O.first_name)||""," ").concat((null===O||void 0===O?void 0:O.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===T||void 0===T?void 0:T.code,"/patients/").concat(null===O||void 0===O?void 0:O.id,"/dashboard")},{name:P("rpm_medicalHistory"),url:""}],$={diseaseList:null===r||void 0===r?void 0:r.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:null===e||void 0===e?void 0:e.custom_duration}))},B=e=>{let{name:t,errors:n}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",placeholder:P("message:rpm_RemarkPlaceHolder"),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:P("message:rpm_DiseaseRemarkHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:t,children:e=>(0,Gt.jsx)(iw,{error:!0,children:P(e,{field:P("rpm_Remark")})})}),(0,Gt.jsx)(iw,{error:!0,children:n.remark})]})},z=e=>{let{name:t,diseaseName:r,setFieldValue:o,errors:a}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{component:Gb,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",value:r||null,options:n||[],filterOptions:(e,t)=>{const n=N(e,t),{inputValue:r}=t,i=e.some(e=>r===e.disease_name);return""===r||i||n.push({inputValue:r,disease_name:'Add "'.concat(r,'"')}),n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.disease_name,renderOption:(e,t)=>(0,Gt.jsx)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{children:t.disease_name})),onChange:(e,n)=>{"string"===typeof n?o(t,n||""):n&&n.inputValue?o(t,n.inputValue?n.inputValue:""):o(t,null!==n&&void 0!==n&&n.disease_name?n.disease_name:"")},freeSolo:!0,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:P("rpm_DiseaseName")}))}),(0,Gt.jsx)(Xz,{name:t,children:e=>(0,Gt.jsx)(iw,{error:!0,children:P(e,{field:P("rpm_SelectDisease")})})}),(0,Gt.jsx)(iw,{error:!0,children:P(a.disease_name,{field:P("rpm_DiseaseName")})})]})},H=e=>{let{name:t,data:n,setFieldValue:r,errors:o}=e;return(0,Gt.jsx)(Gt.Fragment,{children:"CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)||"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)?(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:5,children:(0,Gt.jsxs)(Eu,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,views:["year"],size:"small",label:"From",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),onPaste:e=>{e.preventDefault()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),maxDate:new Date})}),(0,Gt.jsx)(iw,{error:!0,children:P(o.start_date,{field:P("rpm_From")})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:5,children:["CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,Gt.jsxs)(Eu,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,views:["year"],size:"small",label:"To",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),onPaste:e=>{e.preventDefault()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),minDate:n.start_date?(()=>{const e=new Date(n.start_date),t=e.setFullYear(e.getFullYear()+1);return new Date(t)})(n.start_date):void 0,maxDate:new Date})}),(0,Gt.jsx)(iw,{error:!0,children:P(o.end_date,{field:P("rpm_To")})})]}),"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,Gt.jsx)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:P("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ed||void 0===ed?void 0:ed.map(e=>(0,Gt.jsx)($m,{value:e.value,children:P("rpm_".concat(e.name))},e.value))})})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:P("rpm_Close"),children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>r(t.unit,""),children:(0,Gt.jsx)(ube.A,{fontSize:"small",sx:{width:16,height:16}})})})})]}):(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsxs)(Eu,{className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:t.value,name:t.value,variant:"outlined",type:"number",placeholder:P("message:rpm_DurationValuePlaceHolder"),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:P("message:rpm_DurationValueHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:t.value,children:e=>(0,Gt.jsx)(iw,{error:!0,children:P(e,{field:P("rpm_Duration")})})}),(0,Gt.jsx)(iw,{error:!0,children:o.duration})]})}),(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:P("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ed||void 0===ed?void 0:ed.map(e=>(0,Gt.jsx)($m,{value:e.value,children:P("rpm_".concat(e.name))},e.value))}),(0,Gt.jsx)(Xz,{name:null===t||void 0===t?void 0:t.unit,children:e=>(0,Gt.jsx)(iw,{error:!0,children:P(e,{field:P("rpm_Duration")})})})]})})]})})},W=e=>{var t,n,r,i;let{diseaseObj:o}=e;const[a,s]=We.useState(2),l=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,Gt.jsxs)(Gt.Fragment,{children:[null===o||void 0===o||null===(t=o.files)||void 0===t||null===(n=t.slice(0,a))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},"data-id":e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:l(e.file_name),variant:"outlined",onDelete:()=>A(e),deleteIcon:(0,Gt.jsx)(mbe.A,{color:"primary"})},e.id)),(null===o||void 0===o||null===(r=o.files)||void 0===r?void 0:r.length)>2&&(0,Gt.jsx)(Yx,{title:(null===o||void 0===o||null===(i=o.files)||void 0===i?void 0:i.length)===a?P("rpm_Less"):P("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;a===(null===o||void 0===o||null===(e=o.files)||void 0===e?void 0:e.length)?s(2):s(null===o||void 0===o||null===(t=o.files)||void 0===t?void 0:t.length)},children:"..."})})]})},V=e=>{let{remark:t}=e;const[n,r]=We.useState(150);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===t||void 0===t?void 0:t.substring(0,n),(null===t||void 0===t?void 0:t.length)>150&&(0,Gt.jsx)(Yx,{title:(null===t||void 0===t?void 0:t.length)===n?P("rpm_Less"):P("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{n===(null===t||void 0===t?void 0:t.length)?r(150):r(null===t||void 0===t?void 0:t.length)},children:"..."})})]})},U=()=>{var e,t,n,r,i,o,a;return!as(null===k||void 0===k||null===(e=k.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===k||void 0===k||null===(r=k.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"outlined"},t)))};return We.useEffect(()=>{const e={breadcrumb:F};as(T)||as(O)||D(w_(e))},[T,O]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Iz,{initialValues:as(null===$||void 0===$?void 0:$.diseaseList)?{diseaseList:[]}:$,enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:i,setErrors:w,errors:_}=e;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},position:"relative",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,sx:{display:{xs:"none",md:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:P("rpm_MedicalHistory")})}),(0,Gt.jsx)(df,{item:!0,xs:!0,sx:{display:{xs:"block",md:"none"}},children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:P("rpm_MedicalHistory")})})}),(0,Gt.jsx)(df,{item:!0,children:(null===T||void 0===T?void 0:T.is_hospital)&&(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>R("family"),className:"medicalHistory-tour-step2",children:P("rpm_FamilyMedicalHistory")})}),(0,Gt.jsx)(df,{item:!0,sx:{display:"none"},children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(t=r.diseaseList)||void 0===t||null===(n=t.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===n?void 0:n.isEdit,onClick:()=>L.current.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0}),children:P("rpm_AddDisease")})})]})}),null!==T&&void 0!==T&&T.is_hospital?(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:o,orderBy:a,setOrder:s,setOrderBy:l,data:as(null===r||void 0===r?void 0:r.diseaseList)?[{}]:null===r||void 0===r?void 0:r.diseaseList,headCells:d,dataParameter:c,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,skeletonVrows:6,className:"theme_scroll",children:(0,Gt.jsx)(Zz,{name:"diseaseList",children:e=>{var t,n,o,a;return L.current=e,(0,Gt.jsx)(Gt.Fragment,{children:as(null===r||void 0===r?void 0:r.diseaseList)?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsxs)(rC,{colSpan:6,style:{textAlign:"center"},children:[(0,Gt.jsx)("img",{src:m,style:{display:"block",margin:"auto"}}),(null===T||void 0===T||null===(n=T.permissions)||void 0===n?void 0:n.showAddMedicalHistoryBtn)&&(0,Gt.jsxs)(Vp,{className:"medicalHistory-tour-step0",variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(o=r.diseaseList)||void 0===o||null===(a=o.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===a?void 0:a.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0,relationship:"SELF"}),children:[(0,Gt.jsx)(oue.A,{}),P("rpm_AddNewDisease")]})]})})}):null===r||void 0===r||null===(t=r.diseaseList)||void 0===t?void 0:t.map((t,n)=>{var o,a,s,l,c,d,u,p,h,m;return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{sx:{minWidth:250},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(z,{diseaseName:t,name:"diseaseList.".concat(n,".disease_name"),setFieldValue:i,errors:_}):null===t||void 0===t?void 0:t.disease_name}),(0,Gt.jsx)(rC,{sx:{minWidth:"CUSTOM"===(null===t||void 0===t?void 0:t.duration_unit)?350:250},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(H,{errors:_,data:t,setFieldValue:i,name:{value:"diseaseList.".concat(n,".duration"),unit:"diseaseList.".concat(n,".duration_unit"),start_date:"diseaseList.".concat(n,".start_date"),end_date:"diseaseList.".concat(n,".end_date")}}):(0,Gt.jsx)(Gt.Fragment,{children:t.custom_duration?t.custom_duration+" "+(null===t||void 0===t?void 0:t.duration_unit):I(t.duration_unit,null===t||void 0===t?void 0:t.start_date,t.end_date)})}),(0,Gt.jsx)(rC,{sx:{minWidth:250,whiteSpace:"normal"},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(B,{name:"diseaseList.".concat(n,".remark"),errors:_}):null!==t&&void 0!==t&&t.remark?(0,Gt.jsx)(V,{remark:null===t||void 0===t?void 0:t.remark}):"NA"}),(0,Gt.jsx)(rC,{sx:{maxWidth:"240px",whiteSpace:"normal"},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(U,{}),as(null===k||void 0===k||null===(o=k.data)||void 0===o||null===(a=o.local_files)||void 0===a||null===(s=a.local)||void 0===s?void 0:s.files)?j("diseaseList.".concat(n,".reports"),t):M("diseaseList.".concat(n,".reports"),t)]}):(0,Gt.jsx)(W,{diseaseObj:t})}),(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Eu,{className:"medicalHistory-tour-step3",children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsxs)(Gt.Fragment,{children:[b(t,{setErrors:w}),x(t,e.remove,n)]}):(0,Gt.jsxs)(Gt.Fragment,{children:[(null===T||void 0===T||null===(l=T.permissions)||void 0===l?void 0:l.showEditMedicalHistoryBtn)&&v(t),(null===T||void 0===T||null===(c=T.permissions)||void 0===c?void 0:c.showDeleteMedicalHistoryBtn)&&y(t)]})})})]}),(null===T||void 0===T||null===(d=T.permissions)||void 0===d?void 0:d.showAddMedicalHistoryBtn)&&(null===r||void 0===r||null===(u=r.diseaseList)||void 0===u?void 0:u.length)-1===n&&(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:5,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,className:(null===T||void 0===T||null===(p=T.permissions)||void 0===p?void 0:p.showAddMedicalHistoryBtn)&&"medicalHistory-tour-step0",disabled:null===r||void 0===r||null===(h=r.diseaseList)||void 0===h||null===(m=h.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===m?void 0:m.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0,relationship:"SELF"}),children:[(0,Gt.jsx)(oue.A,{}),P("rpm_AddNewDisease")]})})})]},n)})})}})})})}):(0,Gt.jsxs)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,Gt.jsx)("img",{src:D_,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,Gt.jsx)(Eu,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",children:P("rpm_To_Explore_This")})]})]})}},"addMedicalHistory_formik"),(null===T||void 0===T?void 0:T.is_hospital)&&(0,Gt.jsx)(Eu,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,Gt.jsx)(IO,{pageDetails:g,fetchListFunction:f})})]}),(null===T||void 0===T?void 0:T.is_hospital)&&(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:e=>({p:2,bgcolor:e.palette.common.white}),children:(0,Gt.jsxs)(Eu,{sx:{mb:2.5},position:"relative",children:[(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,md:4,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:P("rpm_OtherHealthIssues")})})}),null!==T&&void 0!==T&&null!==(t=T.permissions)&&void 0!==t&&t.showSocialHistoryList?(0,Gt.jsx)(Iz,{initialValues:{other_histories:w},onSubmit:_,enableReinitialize:!0,children:e=>{var t;let{values:n,setFieldValue:r,resetForm:i}=e;return(0,Gt.jsxs)(Wz,{children:[(null===T||void 0===T||null===(t=T.permissions)||void 0===t?void 0:t.editSocialHistoryList)&&(0,Gt.jsx)(df,{container:!0,spacing:2,justifyContent:"end",position:"absolute",top:"15px",children:C?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>E(i),children:P("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:P("rpm_Save")})})]}):(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:S,className:"medicalHistory-tour-step1",children:P("rpm_Edit")})})}),(0,Gt.jsx)(Zz,{name:"other_histories",children:()=>{var e;return(0,Gt.jsx)(Gt.Fragment,{children:null===n||void 0===n||null===(e=n.other_histories)||void 0===e?void 0:e.map((e,t)=>(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",mt:.05,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,md:7,lg:5,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"start"},children:[(0,Gt.jsx)(gye.A,{fontSize:"small",sx:{fontSize:8,mt:1,color:"grey.700"}}),(0,Gt.jsx)(Ym,{variant:"body1",sx:{pl:.5},children:null===e||void 0===e?void 0:e.question})]})}),C?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Hz,{row:!0,as:Vbe,id:"other_histories.".concat(t,".answer"),name:"other_histories.".concat(t,".answer"),value:null===e||void 0===e?void 0:e.answer,onChange:e=>r("other_histories.".concat(t,".answer"),e.target.value),children:[(0,Gt.jsx)(uO,{value:"Yes",control:(0,Gt.jsx)(oje,{}),label:"Yes"}),(0,Gt.jsx)(uO,{value:"No",control:(0,Gt.jsx)(oje,{}),label:"No"})]})})}):(0,Gt.jsx)(df,{item:!0,children:null===e||void 0===e?void 0:e.answer})]},t))})}})]})}}):(0,Gt.jsx)(__,{})]})})})]})})})}aje.defaultProps={allDiseaseList:[],personalDiseaseHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",personalDiseaseList:[],otherDiseaseList:[],familyDiseaseList:[],fetchDiseaseList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},isEdit:!1,saveButton:()=>{},fileUploadButton:()=>{},editRow:[],closeButton:()=>{},filterOtherHistory:[],updateOtherHistory:()=>{},omhEdit:!1,handleOtherHistory:()=>{},downloadFile:()=>{},fileModal:{},fileUploadIconButton:()=>{},patientData:{},program:{},setFilterOtherHistory:()=>{},handleCancel:()=>{}};const sje=aje;var lje=n(45604),cje=n(37602),dje=n(95540),uje=n(76164);const pje=(0,dy.A)((0,Gt.jsx)("path",{d:"M6 3v6c0 2.97 2.16 5.43 5 5.91V19H8v2h8v-2h-3v-4.09c2.84-.48 5-2.94 5-5.91V3zm10 5H8V5h8z"}),"WineBar"),hje=(0,dy.A)((0,Gt.jsx)("path",{d:"M2 16h15v3H2zm18.5 0H22v3h-1.5zM18 16h1.5v3H18zm.85-8.27c.62-.61 1-1.45 1-2.38C19.85 3.5 18.35 2 16.5 2v1.5c1.02 0 1.85.83 1.85 1.85S17.52 7.2 16.5 7.2v1.5c2.24 0 4 1.83 4 4.07V15H22v-2.24c0-2.22-1.28-4.14-3.15-5.03m-2.82 2.47H14.5c-1.02 0-1.85-.98-1.85-2s.83-1.75 1.85-1.75v-1.5c-1.85 0-3.35 1.5-3.35 3.35s1.5 3.35 3.35 3.35h1.53c1.05 0 1.97.74 1.97 2.05V15h1.5v-1.64c0-1.81-1.6-3.16-3.47-3.16"}),"SmokingRooms");function mje(e){var t;let{allDiseaseList:n,personalDiseaseList:r,nodata:o,closeButtonMobile:a,mobileDeleteButton:s,editIcon:l,saveButtonMobile:c,fileUploadButton:d,filterOtherHistory:u,updateOtherHistory:p,omhEdit:h,handleOtherHistory:m,downloadFile:f,fileModal:g,fileUploadIconButton:v,patientData:x,program:y,handleCancel:b}=e;const j=MM({label:{fontSize:"14px !important",color:"#7986cb",fontWeight:"600 !important",letterSpacing:"0.02em"},subTitle:{fontSize:"16px",color:"#000000de"},shorttextOverflow:{textOverflow:"ellipsis",maxWidth:"170px",overflow:"hidden",whiteSpace:"nowrap",width:"100%"},downloadButton:{maxWidth:"260px",margin:"5px 0",background:"#3f51b517",border:"1px solid #3f51b517",flexDirection:"row-reverse","& .MuiChip-label":{paddingLeft:"5px"},"& .MuiChip-deleteIcon":{color:"#3f51b5b0"}},newDiseaseaccordian:{"& .MuiPaper-root":{borderRadius:"4px",background:"#e8eaf6"},"& .MuiButtonBase-root":{width:"100%",justifyContent:"flex-end",minHeight:"30px",flexDirection:"row-reverse","& .MuiTypography-caption":{width:"100%",textAlign:"center"}},"& .MuiAccordionSummary-content":{margin:"8px 0","& .MuiTypography-root":{fontWeight:"600",color:"#3f51b5"}},"& .MuiAccordionDetails-root":{background:"#ffffff"},"& .MuiAccordionSummary-expandIconWrapper":{background:"#3f51b5",borderRadius:"50px",height:"20px",width:"20px",marginRight:"10px","& .MuiSvgIcon-root":{color:"#ffffff",fontSize:"20px"}}},durationDataField:{"& .MuiSvgIcon-root":{width:"21px",height:"21px"}},diseaseNameField:{"& .MuiCardHeader-content":{width:"100%"}},labelHistory:{border:"1px solid #efefef",display:"flex",alignItems:"center",boxShadow:"0px 1px 2px 0px #cdcdcd",borderRadius:"40px",margin:"6px 3px","& .MuiButtonBase-root":{padding:"3px"}},successHistory:{background:"#e8eaf6",color:"#2c387e","& .MuiSvgIcon-root":{color:"#2c387e"}},errorHistory:{background:"#f5f5f5",color:"#a3a3a3","& .MuiSvgIcon-root":{color:"#a3a3a3"}},fieldWidth:{width:"140px"},diseaseButton:{fontSize:"16px",fontWeight:"600",padding:"0"},mainUploads:{"& .MuiChip-root":{maxWidth:"200px",marginBottom:"5px"}}})(),[w,_]=(0,We.useState)(!1),C=()=>{_(!w)},{t:S}=vg(),A=Nt(),k=so(),M=Xy(),O=(0,We.useRef)(null),T=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},E=[{name:S("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===y||void 0===y?void 0:y.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===y||void 0===y?void 0:y.code,"/patients")},{name:"".concat((null===x||void 0===x?void 0:x.first_name)||""," ").concat((null===x||void 0===x?void 0:x.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===y||void 0===y?void 0:y.code,"/patients/").concat(null===x||void 0===x?void 0:x.id,"/dashboard")},{name:S("rpm_medicalHistory"),url:""}],P={diseaseList:null===r||void 0===r?void 0:r.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:null===e||void 0===e?void 0:e.custom_duration}))},D=e=>{let{name:t,errors:n}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",placeholder:S("message:rpm_RemarkPlaceHolder"),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:S("message:rpm_DiseaseRemarkHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:t,children:e=>(0,Gt.jsx)(iw,{error:!0,children:S(e,{field:S("rpm_Remark")})})}),(0,Gt.jsx)(iw,{error:!0,children:n.remark})]})},R=e=>{let{name:t,diseaseName:r,setFieldValue:o,errors:a}=e;return(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{component:Gb,fullWidth:!0,size:"small",id:t,name:t,variant:"outlined",value:r||null,options:n||[],filterOptions:(e,t)=>{const n=M(e,t),{inputValue:r}=t,i=e.some(e=>r===e.disease_name);return""===r||i||n.push({inputValue:r,disease_name:'Add "'.concat(r,'"')}),n},getOptionLabel:e=>"string"===typeof e?e:e.inputValue?e.inputValue:e.disease_name,renderOption:(e,t)=>(0,Gt.jsx)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{children:t.disease_name})),onChange:(e,n)=>{"string"===typeof n?o(t,n||""):n&&n.inputValue?o(t,n.inputValue?n.inputValue:""):o(t,null!==n&&void 0!==n&&n.disease_name?n.disease_name:"")},freeSolo:!0,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:S("rpm_DiseaseName")}))}),(0,Gt.jsx)(Xz,{name:t,children:e=>(0,Gt.jsx)(iw,{error:!0,children:S(e,{field:S("rpm_SelectDisease")})})}),(0,Gt.jsx)(iw,{error:!0,children:S(a.disease_name,{field:S("rpm_DiseaseName")})})]})},N=e=>{let{name:t,data:n,setFieldValue:r,errors:o}=e;return(0,Gt.jsx)(Gt.Fragment,{children:"CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)||"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)?(0,Gt.jsxs)(df,{container:!0,spacing:1,className:j.durationDataField,children:[(0,Gt.jsx)(df,{item:!0,xs:5,children:(0,Gt.jsxs)(Eu,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,views:["year"],size:"small",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),onPaste:e=>{e.preventDefault()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{onKeyDown:e=>{e.preventDefault()}})),maxDate:new Date})}),(0,Gt.jsx)(iw,{error:!0,children:S(o.start_date,{field:S("rpm_From")})})]})}),(0,Gt.jsx)(df,{item:!0,xs:7,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",children:[(0,Gt.jsxs)(Eu,{children:["CUSTOM"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,Gt.jsxs)(Eu,{className:"pres_inputTab",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,views:["year"],size:"small",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),onPaste:e=>{e.preventDefault()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({className:j.fieldWidth},e),{},{onKeyDown:e=>{e.preventDefault()}})),minDate:n.start_date?(()=>{const e=new Date(n.start_date),t=e.setFullYear(e.getFullYear()+1);return new Date(t)})(n.start_date):void 0,maxDate:new Date})}),(0,Gt.jsx)(iw,{error:!0,children:S(o.end_date,{field:S("rpm_To")})})]}),"PRESENT"===(null===n||void 0===n?void 0:n.duration_unit)&&(0,Gt.jsx)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",className:j.fieldWidth,endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:S("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ed||void 0===ed?void 0:ed.map(e=>(0,Gt.jsx)($m,{value:e.value,children:S("rpm_".concat(e.name))},e.value))})})]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>r(t.unit,""),sx:{width:"max-content",justifyContent:"flex-start"},children:(0,Gt.jsx)(ube.A,{fontSize:"small",sx:{width:18,height:18}})})})]})})]}):(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsxs)(Eu,{className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:t.value,name:t.value,variant:"outlined",type:"number",placeholder:S("message:rpm_DurationValuePlaceHolder"),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:S("message:rpm_DurationValueHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:t.value,children:e=>(0,Gt.jsx)(iw,{error:!0,children:S(e,{field:S("rpm_Duration")})})}),(0,Gt.jsx)(iw,{error:!0,children:o.duration})]})}),(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:null===t||void 0===t?void 0:t.unit,name:null===t||void 0===t?void 0:t.unit,value:null===n||void 0===n?void 0:n.duration_unit,variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:S("message:rpm_DiseaseDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ed||void 0===ed?void 0:ed.map(e=>(0,Gt.jsx)($m,{value:e.value,children:S("rpm_".concat(e.name))},e.value))}),(0,Gt.jsx)(Xz,{name:null===t||void 0===t?void 0:t.unit,children:e=>(0,Gt.jsx)(iw,{error:!0,children:S(e,{field:S("rpm_Duration")})})})]})})]})})},L=e=>{var t,n,r,i;let{diseaseObj:o}=e;const[a,s]=We.useState(2),l=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,Gt.jsxs)(Gt.Fragment,{children:[null===o||void 0===o||null===(t=o.files)||void 0===t||null===(n=t.slice(0,a))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{"data-id":e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:l(e.file_name),variant:"outlined",onDelete:()=>f(e),deleteIcon:(0,Gt.jsx)(mbe.A,{color:"primary"})},e.id)),(null===o||void 0===o||null===(r=o.files)||void 0===r?void 0:r.length)>2&&(0,Gt.jsx)(Yx,{title:(null===o||void 0===o||null===(i=o.files)||void 0===i?void 0:i.length)===a?S("rpm_Less"):S("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;a===(null===o||void 0===o||null===(e=o.files)||void 0===e?void 0:e.length)?s(2):s(null===o||void 0===o||null===(t=o.files)||void 0===t?void 0:t.length)},children:"..."})})]})},I=e=>{let{remark:t}=e;const[n,r]=We.useState(150);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===t||void 0===t?void 0:t.substring(0,n),(null===t||void 0===t?void 0:t.length)>150&&(0,Gt.jsx)(Yx,{title:(null===t||void 0===t?void 0:t.length)===n?S("rpm_Less"):S("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{n===(null===t||void 0===t?void 0:t.length)?r(150):r(null===t||void 0===t?void 0:t.length)},children:"..."})})]})},F=()=>{var e,t,n,r,i,o,a;return!as(null===g||void 0===g||null===(e=g.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===g||void 0===g||null===(r=g.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{className:"textIcon",sx:{mt:1},icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"outlined",deleteIcon:(0,Gt.jsx)(mbe.A,{color:"primary"})},t)))};return We.useEffect(()=>{const e={breadcrumb:E};as(y)||as(x)||A(w_(e))},[y,x]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Iz,{initialValues:as(null===P||void 0===P?void 0:P.diseaseList)?{diseaseList:[]}:P,enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:i,setErrors:u,errors:p}=e;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{position:"relative",children:(0,Gt.jsx)(Eu,{position:"absolute",top:"-48px",left:"40px",sx:{display:{xs:"block",md:"none"}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontSize:16,children:S("rpm_MedicalHistory")})})}),(null===y||void 0===y?void 0:y.is_hospital)&&(0,Gt.jsx)(Eu,{children:as(null===r||void 0===r?void 0:r.diseaseList)?null:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{fullWidth:!0,variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(t=r.diseaseList)||void 0===t||null===(n=t.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===n?void 0:n.isEdit,onClick:()=>O.current.unshift({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0,relationship:"SELF"}),children:[(0,Gt.jsx)(Sbe.A,{}),S("rpm_AddDisease")]})})}),null!==y&&void 0!==y&&y.is_hospital?(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(df,{container:!0,spacing:1,children:(0,Gt.jsx)(Zz,{name:"diseaseList",children:e=>{var t,n,h,m,f;return O.current=e,(0,Gt.jsx)(Gt.Fragment,{children:as(null===r||void 0===r?void 0:r.diseaseList)?(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{textAlign:"center",children:[(null===y||void 0===y||null===(n=y.permissions)||void 0===n?void 0:n.showAddMedicalHistoryBtn)&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Eu,{className:j.newDiseaseaccordian,mb:1,children:(0,Gt.jsxs)(lU,{expanded:w,onChange:C,children:[(0,Gt.jsx)(jU,{expandIcon:w?(0,Gt.jsx)(uje.A,{}):(0,Gt.jsx)(Sbe.A,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,Gt.jsx)(Vp,{className:j.diseaseButton,disableElevation:!0,disabled:null===r||void 0===r||null===(h=r.diseaseList)||void 0===h||null===(m=h.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===m?void 0:m.isEdit,onClick:()=>e.push({disease_name:"",duration:"",duration_unit:"",start_date:null,end_date:null,remark:"",reports:"",isEdit:!0,relationship:"SELF"}),children:S("rpm_AddNewDisease")})}),(0,Gt.jsx)(hU,{children:as(null===r||void 0===r?void 0:r.diseaseList)?(0,Gt.jsx)("div",{children:"No diseases found"}):null===r||void 0===r||null===(f=r.diseaseList)||void 0===f?void 0:f.map((e,t)=>{var n,r,o;return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(qj,{htmlFor:"diseasename",className:j.label,sx:{mb:.5},children:[S("rpm_DiseaseName"),"*"]}),(0,Gt.jsx)(R,{diseaseName:e,name:"diseaseList.".concat(t,".disease_name"),setFieldValue:i,errors:p}),e.name]}),(0,Gt.jsxs)(Eu,{sx:{minWidth:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)?350:250},children:[(0,Gt.jsx)(qj,{htmlFor:"diseasename",className:j.label,sx:{mb:.5,mt:1},children:S("rpm_Duration")}),(0,Gt.jsx)(N,{errors:p,data:e,setFieldValue:i,name:{value:"diseaseList.".concat(t,".duration"),unit:"diseaseList.".concat(t,".duration_unit"),start_date:"diseaseList.".concat(t,".start_date"),end_date:"diseaseList.".concat(t,".end_date")}})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(qj,{htmlFor:"diseasename",className:j.label,sx:{mb:.5,mt:1},children:S("rpm_Remarks")}),(0,Gt.jsx)(D,{name:"diseaseList.".concat(t,".remark"),errors:p})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(qj,{htmlFor:"diseasename",className:j.label,sx:{mb:.5,mt:1},children:S("rpm_UploadReports")}),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(F,{}),as(null===g||void 0===g||null===(n=g.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(o=r.local)||void 0===o?void 0:o.files)?d("diseaseList.".concat(t,".reports"),e):v("diseaseList.".concat(t,".reports"),e,{style:{display:"none"}})]})]}),(0,Gt.jsxs)(Eu,{display:"flex",mt:1.5,children:[(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",sx:{mr:1},children:"Cancel"}),(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",children:"Save"})]})]},t)})})]})})}),(0,Gt.jsxs)(Eu,{bgcolor:"white",p:1,children:[(0,Gt.jsx)("img",{src:o,style:{display:"block",margin:"auto",maxWidth:"80px"}}),(0,Gt.jsx)("p",{style:{fontSize:"12px",fontWeight:"600",letterSpacing:"0.02em",margin:"0"},children:"No Disease found."})]})]})}):null===r||void 0===r||null===(t=r.diseaseList)||void 0===t?void 0:t.map((t,n)=>{var r,o,h,m,f;return(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(aH,{sx:{marginTop:"15px",marginBottom:"5px",borderLeft:"4px solid #868fcd",overflow:"auto"},children:[(0,Gt.jsx)(Eu,{className:jn("MuiCardHeader-action",{"newidth-class":null===t||void 0===t?void 0:t.isEdit}),children:(0,Gt.jsx)(WH,{className:j.diseaseNameField,sx:{display:(null!==t&&void 0!==t&&t.isEdit,"flex"),paddingBottom:"0",flexDirection:null!==t&&void 0!==t&&t.isEdit?"row":"unset",width:"100%",maxWidth:null!==t&&void 0!==t&&t.isEdit?"340px":"100%"},action:(0,Gt.jsx)(Eu,{sx:{alignItems:(null!==t&&void 0!==t&&t.isEdit,"center"),marginTop:null!==t&&void 0!==t&&t.isEdit?"25px":"0",marginLeft:null!==t&&void 0!==t&&t.isEdit?"13px":"0",display:"flex",justifyContent:(null!==t&&void 0!==t&&t.isEdit,"end")},children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{mb:1.5,children:[c(t,{setErrors:u}),a(t,e.remove,n)]})}):(0,Gt.jsxs)(Gt.Fragment,{children:[(null===y||void 0===y||null===(r=y.permissions)||void 0===r?void 0:r.showEditMedicalHistoryBtn)&&l(t),(null===y||void 0===y||null===(o=y.permissions)||void 0===o?void 0:o.showDeleteMedicalHistoryBtn)&&s(t)]})}),title:(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsxs)(Ym,{component:"span",variant:"body1",className:j.label,children:[S("rpm_DiseaseName"),"*"]}),null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(R,{diseaseName:t,name:"diseaseList.".concat(n,".disease_name"),setFieldValue:i,errors:p,fullWidth:!0}):(0,Gt.jsx)(Ym,{component:"span",variant:"body1",className:j.subTitle,children:null===t||void 0===t?void 0:t.disease_name})]})})}),(0,Gt.jsxs)(uH,{children:[(0,Gt.jsxs)(Eu,{sx:{justifyContent:"space-between"},children:[(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body1",className:j.label,children:S("rpm_Remarks")}),null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(D,{name:"diseaseList.".concat(n,".remark"),errors:p}):(0,Gt.jsx)(Ym,{variant:"body1",className:"".concat(j.subTitle," shortext"),children:null!==t&&void 0!==t&&t.remark?(0,Gt.jsx)(I,{remark:null===t||void 0===t?void 0:t.remark}):"NA"})]}),(0,Gt.jsx)(Af,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:"10px"}}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",children:[(0,Gt.jsxs)(Ym,{variant:"body1",className:j.label,children:[S("rpm_Duration"),"*"]}),(0,Gt.jsx)(Ym,{variant:"body1",className:j.subTitle,children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(N,{errors:p,data:t,setFieldValue:i,name:{value:"diseaseList.".concat(n,".duration"),unit:"diseaseList.".concat(n,".duration_unit"),start_date:"diseaseList.".concat(n,".start_date"),end_date:"diseaseList.".concat(n,".end_date")}}):(0,Gt.jsx)(Ym,{children:t.custom_duration?t.custom_duration+" "+(null===t||void 0===t?void 0:t.duration_unit):T(t.duration_unit,null===t||void 0===t?void 0:t.start_date,t.end_date)})})]})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",pt:"16px",children:[null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Ym,{variant:"body1",className:j.label,children:S("rpm_UploadReports")})}):(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Ym,{variant:"body1",className:j.label,children:S("rpm_ViewReports")})}),(0,Gt.jsx)(Eu,{className:j.mainUploads,children:null!==t&&void 0!==t&&t.isEdit?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(F,{}),as(null===g||void 0===g||null===(h=g.data)||void 0===h||null===(m=h.local_files)||void 0===m||null===(f=m.local)||void 0===f?void 0:f.files)?d("diseaseList.".concat(n,".reports"),t):v("diseaseList.".concat(n,".reports"),t)]}):as(null===t||void 0===t?void 0:t.files)?(0,Gt.jsx)(Ym,{children:"NA"}):(0,Gt.jsx)(L,{diseaseObj:t})})]})]})]})},n)})})}})})}):(0,Gt.jsxs)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,Gt.jsx)("img",{src:D_,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,Gt.jsx)(Eu,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",children:S("rpm_To_Explore_This")})]})]})}},"addMedicalHistory_formik"),(0,Gt.jsx)(Eu,{sx:e=>({borderRadius:1.5,bgcolor:e.palette.common.white,boxShadow:"0px 2px 1px -1px #00000033, 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12)"}),children:(0,Gt.jsxs)(Eu,{sx:{mt:"8px",mb:"10px"},position:"relative",children:[(0,Gt.jsx)(Eu,{bgcolor:"#e8eaf6",sx:{borderRadius:"4px 4px 0 0",padding:"8px 16px"},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{fontSize:"18px",fontWeight:"600",color:"#3f51b5"},children:S("rpm_OtherHealthIssues")})}),(0,Gt.jsx)(Eu,{p:1,children:null!==y&&void 0!==y&&null!==(t=y.permissions)&&void 0!==t&&t.showSocialHistoryList?(0,Gt.jsx)(Iz,{initialValues:{other_histories:u},onSubmit:p,enableReinitialize:!0,children:e=>{var t;let{values:n,setFieldValue:r,resetForm:i}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:10,children:(0,Gt.jsx)(Zz,{name:"other_histories",children:()=>{var e;return(0,Gt.jsx)(Gt.Fragment,{children:null===n||void 0===n||null===(e=n.other_histories)||void 0===e?void 0:e.map((e,t)=>{const n={alcohol:{icon:(0,Gt.jsx)(pje,{}),label:"Drinking Alcohol"},smoke:{icon:(0,Gt.jsx)(hje,{}),label:"Smoking Frequently"},caffeine:{icon:(0,Gt.jsx)(lje.A,{}),label:"Consuming Caffeine"},sedentary:{icon:(0,Gt.jsx)(cje.A,{}),label:"Sedentary Lifestyle"}},i=Object.keys(n).find(t=>e.question.toLowerCase().includes(t)),{icon:o,label:a}=n[i];return(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",children:(0,Gt.jsx)(Eu,{onClick:()=>{if(h){const n="Yes"===e.answer?"No":"Yes";r("other_histories.".concat(t,".answer"),n)}},className:"".concat(j.labelHistory," ").concat("Yes"===e.answer?j.successHistory:j.errorHistory," randomClass"),children:(0,Gt.jsxs)(Ym,{variant:"body",sx:{paddingRight:"5px",fontSize:"12px",fontWeight:"500",display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Kp,{sx:{flex:"0 0 30px"},children:o}),(0,Gt.jsx)("span",{children:a})]})})},t)})})}})}),(0,Gt.jsx)(df,{item:!0,xs:2,children:(null===y||void 0===y||null===(t=y.permissions)||void 0===t?void 0:t.editSocialHistoryList)&&(0,Gt.jsx)(df,{container:!0,spacing:2,justifyContent:"end",children:h?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Kp,{color:"error",disableElevation:!0,onClick:()=>b(i),sx:{background:"#d32f2f1a",padding:"5px"},children:(0,Gt.jsx)(Lbe.A,{})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Kp,{color:"primary",disableElevation:!0,type:"submit",sx:{background:"#2c387e2b",padding:"5px"},children:(0,Gt.jsx)(Nbe.A,{})})})]}):(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Kp,{color:"primary",disableElevation:!0,onClick:m,className:"medicalHistory-tour-step1",children:(0,Gt.jsx)(dje.A,{sx:{fontSize:"20px"}})})})})})]})})}}):(0,Gt.jsx)(__,{})})]})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Vp,{fullWidth:!0,variant:"contained",color:"primary",disableElevation:!0,onClick:()=>k("family"),className:"medicalHistory-tour-step2",sx:{marginRight:"10px",alignItems:"flex-start",whiteSpace:"nowrap"},children:[(0,Gt.jsx)(Sbe.A,{}),"Add Family Medical History"]})})]})})})})}mje.defaultProps={allDiseaseList:[],personalDiseaseHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",personalDiseaseList:[],otherDiseaseList:[],familyDiseaseList:[],fetchDiseaseList:()=>{},editIcon:()=>{},viewButton:()=>{},mobileDeleteButton:()=>{},isEdit:!1,saveButtonMobile:()=>{},fileUploadButton:()=>{},editRow:[],closeButtonMobile:()=>{},filterOtherHistory:[],updateOtherHistory:()=>{},omhEdit:!1,handleOtherHistory:()=>{},downloadFile:()=>{},fileModal:{},fileUploadIconButton:()=>{},patientData:{},program:{},setFilterOtherHistory:()=>{},handleCancel:()=>{}};const fje=mje,gje=["content"];const vje=function(e){var t;let{patientData:n,program:r}=e;const o=Nt(),a=window.innerWidth,s=Ct(qd),l=!("true"===ls(s,"user_principal.attributes.skip_tour[0]","")),c=Ct(Nd),{t:d}=vg(),[u,p]=We.useState(""),{programId:h,patientId:m}=lo(),[f,g]=We.useState((0,i.A)({},{local:{files:[]},onCloud:{files:[]}})),[v,x]=(0,We.useState)("desc"),[y,b]=(0,We.useState)("updated_at"),[j,w]=We.useState(null),[_,C]=We.useState(null),[S,A]=We.useState(null),[k,M]=We.useState(null),[O,T]=We.useState(null),[E,P]=We.useState(!1),[D,R]=(0,We.useState)([]),[N,L]=(0,We.useState)((0,i.A)({},Fc)),[I,F]=We.useState(null),[$,B]=We.useState({open:!1,data:{}}),[z,H]=We.useState({open:!1,data:{}}),W=e=>{H((0,i.A)((0,i.A)({},z),{},{open:!z.open,data:e}))},V=e=>{B((0,i.A)((0,i.A)({},$),{},{open:!$.open,data:(0,i.A)((0,i.A)({},e.disease),{},{local_files:f})}))},U=()=>{let e=(0,i.A)({},f);e.local.files.splice(0,e.local.files.length),g(e),B((0,i.A)((0,i.A)({},$),{},{open:!1}))},q=function(e){let t=(0,i.A)({},f);t.local.files.splice(e,1),g(t)},G=()=>{P(!E)},Y=e=>{P(!E),e({values:{other_histories:I}})},Z=e=>{if(Array.isArray(e))return R(e.map(e=>e.toString()));const t=e.target.name;D.includes(t)?R(D.filter(e=>e!==t)):R(e=>[...e,t])},K=e=>{const t=null===S||void 0===S?void 0:S.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id}));A(t)},X=(e,t,n)=>{if(U(),e.id){const t=null===S||void 0===S?void 0:S.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id&&!1}));A(t)}else t(n)},Q=async()=>{const e=(0,i.A)((0,i.A)({},N),{},{kind:"SELF"});try{const{data:t}=await o(al(h,m,e)),n=t||{},{content:r}=n,a=Ko(n,gje),s=r.filter(e=>"SELF"===e.kind),l=r.filter(e=>"OTHER"===e.kind),c=r.filter(e=>"FAMILY"===e.kind);A(s),M(l),T(c),L(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(t){console.log(t)}},J=async()=>{try{const{data:e}=await o(ul(h,m));w(e)}catch(e){console.log(e)}},ee=async e=>{const t=null===e||void 0===e?void 0:e.other_histories;try{await o(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(e,"/").concat(t,"/medical-question");return await du(r,n)}finally{r(na(!1))}})(h,m,t)),J(),G(),o(Zo({subTitle:"message:rpm_SocialHistoryUpdateSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?o(Zo({subTitle:"error:rpm_SocialHistoryUpdateFailed",severity:$c})):o(Zo({subTitle:bd(e,"error:rpm_SocialHistoryUpdateFailed"),severity:$c}))}},te=async(e,t)=>{try{await o(pl(h,m,e.id,t)),Q(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);B((0,i.A)((0,i.A)({},$),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),o(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?o(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:$c})):o(Zo({subTitle:bd(e,"error:rpm_FileDeleteFailed"),severity:$c}))}},ne=async e=>{try{await o(hl(h,m,e)),o(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(t){const e=ls(t,"response.data.code","");as(e)?o(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:$c})):o(Zo({subTitle:bd(e,"error:rpm_DownloadFileFailed"),severity:$c}))}},re=async(e,t)=>{var n,r;let{setErrors:i}=t,a=null===e||void 0===e?void 0:e.start_date,s=null===e||void 0===e?void 0:e.end_date;"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?(a=sa()(a).startOf("year").valueOf(),s=sa()(s).startOf("year").valueOf()):(s=sa()().valueOf(),a=sa()(s).subtract(null===e||void 0===e?void 0:e.duration,"".concat(null===e||void 0===e?void 0:e.duration_unit).toLowerCase()).valueOf());const l={disease_name:null===e||void 0===e?void 0:e.disease_name,start_date:a?sa()(a).format():null,end_date:s?sa()(s).format():null,remark:null===e||void 0===e?void 0:e.remark,duration_unit:null!==e&&void 0!==e&&e.duration_unit?null===e||void 0===e?void 0:e.duration_unit:"YEAR",custom_duration:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?0:null===e||void 0===e?void 0:e.duration,kind:"SELF",upload:as(null===$||void 0===$||null===(n=$.data)||void 0===n?void 0:n.local_files)?[]:null===$||void 0===$||null===(r=$.data)||void 0===r?void 0:r.local_files};vV.addNewDisease.validate(e,{abortEarly:!1}).then(async()=>{try{await o(sl(h,m,l)),Q(),U(),o(Zo({subTitle:"message:rpm_DiseaseCreatedSuccessfully",severity:Bc}))}catch(e){const t=ls(e,"response.data.code","");as(t)?o(Zo({subTitle:"error:rpm_DiseaseCreatedFailed",severity:$c})):o(Zo({subTitle:bd(t,"error:rpm_DiseaseCreatedFailed"),severity:$c}))}}).catch(e=>{const t=Array.from(e.inner||[]).reduce((e,t)=>(e[t.path]=t.message,e),{});i(t)})},ie=async(e,t)=>{var n,r;let{setErrors:i}=t,a=null===e||void 0===e?void 0:e.start_date,s=null===e||void 0===e?void 0:e.end_date;"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?(a=sa()(a).startOf("year").valueOf(),s=sa()(s).startOf("year").valueOf()):(s=sa()().valueOf(),a=sa()(s).subtract(null===e||void 0===e?void 0:e.duration,"".concat(null===e||void 0===e?void 0:e.duration_unit).toLowerCase()).valueOf());const l={id:null===e||void 0===e?void 0:e.id,disease_name:null===e||void 0===e?void 0:e.disease_name,start_date:a?sa()(a).format():null,end_date:s?sa()(s).format():null,remark:null===e||void 0===e?void 0:e.remark,duration_unit:null===e||void 0===e?void 0:e.duration_unit,custom_duration:"CUSTOM"===(null===e||void 0===e?void 0:e.duration_unit)||"PRESENT"===(null===e||void 0===e?void 0:e.duration_unit)?0:null===e||void 0===e?void 0:e.duration,kind:null===e||void 0===e?void 0:e.kind,upload:as(null===$||void 0===$||null===(n=$.data)||void 0===n?void 0:n.local_files)?[]:null===$||void 0===$||null===(r=$.data)||void 0===r?void 0:r.local_files};vV.editNewDisease.validate(e,{abortEarly:!1}).then(async()=>{try{await o(ll(h,m,l)),Q(),U(),o(Zo({subTitle:"message:rpm_DiseaseUpdateSuccessfully",severity:Bc}))}catch(e){const t=ls(e,"response.data.code","");as(t)?o(Zo({subTitle:"error:rpm_DiseaseUpdateFailed",severity:$c})):o(Zo({subTitle:bd(t,"error:rpm_DiseaseUpdateFailed"),severity:$c}))}}).catch(e=>{const t=Array.from(e.inner||[]).reduce((e,t)=>(e[t.path]=t.message,e),{});i(t)})},oe=async e=>{try{var t;await o(dl(h,m,null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id)),Q(),H((0,i.A)((0,i.A)({},z),{},{open:!z.open})),o(Zo({subTitle:"message:rpm_DiseaseDeleteSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?o(Zo({subTitle:"error:rpm_DiseaseUpdateFailed",severity:$c})):o(Zo({subTitle:bd(e,"error:rpm_DiseaseDeleteFailed"),severity:$c}))}},ae=(e,t)=>(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{variant:"text",color:"primary",disableElevation:!0,onClick:()=>V({name:e,disease:t}),sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3,width:"100%"},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsxs)(Eu,{sx:{flex:1,pl:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},children:d("rpm_UploadReport")}),(0,Gt.jsx)(Ym,{variant:"caption",sx:{textAlign:"center",width:"100%"},children:".PDF, .PNG, .JPEG"})]})]})})}),se=(e,t)=>(0,Gt.jsx)(Yx,{title:d("rpm_UploadMore"),children:(0,Gt.jsx)(Kp,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50",ml:1,mb:0},onClick:()=>V({name:e,disease:t}),children:(0,Gt.jsx)(dbe.A,{fontSize:"small",sx:{width:16,height:16}})})}),le=function(e){const t=e.target.files;let n=(0,i.A)({},f.local);t&&Array.from(t).forEach(e=>{var t;return as(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?o(Zo({subTitle:"error:rpm_ImageSize",severity:$c})):(e.url=URL.createObjectURL(e),void n.files.push(e)):o(Zo({subTitle:"error:rpm_SameFileName",severity:$c}))}),g(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),e.target.value=""},ce=e=>(0,Gt.jsx)(Yx,{title:d("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})});We.useEffect(()=>{c&&(Q(),(async()=>{try{const{data:e}=od,{content:t}=e||{};C(t)}catch(e){console.log(e)}})())},[c]),We.useEffect(()=>{c&&J()},[c]),We.useEffect(()=>{(()=>{let e=[];null===sd||void 0===sd||sd.forEach((t,n)=>{var r;(null===t||void 0===t?void 0:t.question)===(null===j||void 0===j||null===(r=j.other_histories[n])||void 0===r?void 0:r.question)?null===e||void 0===e||e.push((0,i.A)({},null===j||void 0===j?void 0:j.other_histories[n])):null===e||void 0===e||e.push((0,i.A)({},t))}),F(e)})()},[j]),We.useEffect(()=>{o(w_({activeMenuItem:"patient_history"}))},[]);const de=[{id:"disease",label:d("rpm_DiseaseName")+"*",isSort:!1,sortProperty:"disease"},{id:"duration",label:d("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:d("rpm_Remarks"),isSort:!1,sortProperty:"remarks"},{id:"reports",label:d("rpm_AddReports"),isSort:!1,sortProperty:"reports"},{id:"action",label:d("rpm_Actions"),isSort:!1,sortProperty:"action"}];return as(r)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showMedicalHistoryList?a>=575?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(sje,{order:v,orderBy:y,setOrder:x,setOrderBy:b,dataParameter:"id",checkState:D,onCheck:Z,isSelection:!1,nodata:D_,allDiseaseList:_,personalDiseaseHead:de,otherDiseaseList:k,familyDiseaseList:O,personalDiseaseList:S,fetchDiseaseList:Q,pageDetails:N,editButton:e=>(0,Gt.jsx)(Yx,{title:d("rpm_Edit"),children:(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>K(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),closeButton:(e,t,n)=>(0,Gt.jsx)(Yx,{title:d("rpm_Cancel"),children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>X(e,t,n),children:(0,Gt.jsx)(ube.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:ce,deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),saveButton:(e,t)=>{let{setErrors:n}=t;return(0,Gt.jsx)(Yx,{title:d("rpm_Save"),children:(0,Gt.jsx)(Kp,{onClick:()=>e.id?ie(e,{setErrors:n}):re(e,{setErrors:n}),color:"primary",children:(0,Gt.jsx)(hbe.A,{fontSize:"small"})})})},fileUploadButton:ae,filterOtherHistory:I,setFilterOtherHistory:F,updateOtherHistory:ee,omhEdit:E,handleOtherHistory:G,fileModal:$,downloadFile:ne,fileUploadIconButton:se,patientData:n,program:r,handleCancel:Y}),(0,Gt.jsx)(PU,{openModal:z.open,onCloseModal:W,actionFunction:()=>oe(z),dataName:"",options:{primaryText:d("message:rpm_DeleteTitle"),secondaryText:d("message:rpm_DeleteBodyText"),btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(Cbe,{openModal:null===$||void 0===$?void 0:$.open,onCloseModal:U,actionFunction:V,onFileUpload:le,initialValues:f,onLocalFileDelete:q,fileModal:$,onCloudFilesDelete:te})]}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(fje,{order:v,orderBy:y,setOrder:x,setOrderBy:b,dataParameter:"id",checkState:D,onCheck:Z,isSelection:!1,nodata:D_,allDiseaseList:_,personalDiseaseHead:de,otherDiseaseList:k,familyDiseaseList:O,personalDiseaseList:S,fetchDiseaseList:Q,pageDetails:N,editIcon:e=>(0,Gt.jsx)(Yx,{title:d("rpm_Edit"),children:(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>K(e),children:(0,Gt.jsx)(Ibe.A,{fontSize:"small"})})}),closeButtonMobile:(e,t,n)=>(0,Gt.jsx)(Yx,{title:d("rpm_Cancel"),children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>X(e,t,n),variant:"outlined",sx:{marginLeft:"5px",background:"#d32f2f1a",padding:"5px"},children:(0,Gt.jsx)(Lbe.A,{})})}),viewButton:ce,mobileDeleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,Gt.jsx)(Rbe.A,{fontSize:"small",sx:{width:22,height:22}})}),saveButtonMobile:(e,t)=>{let{setErrors:n}=t;return(0,Gt.jsx)(Yx,{title:d("rpm_Save"),children:(0,Gt.jsx)(Kp,{onClick:()=>e.id?ie(e,{setErrors:n}):re(e,{setErrors:n}),color:"primary",sx:{background:"#2c387e2b",padding:"5px"},children:(0,Gt.jsx)(Nbe.A,{})})})},fileUploadButton:ae,filterOtherHistory:I,setFilterOtherHistory:F,updateOtherHistory:ee,omhEdit:E,handleOtherHistory:G,fileModal:$,downloadFile:ne,fileUploadIconButton:se,patientData:n,program:r,handleCancel:Y}),(0,Gt.jsx)(Ebe,{openModal:z.open,onCloseModal:W,actionFunction:()=>oe(z),dataName:"",options:{primaryText:d("message:rpm_DeleteTitle"),secondaryText:d("message:rpm_DeleteBodyText"),btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(kbe,{openModal:null===$||void 0===$?void 0:$.open,onCloseModal:U,actionFunction:V,onFileUpload:le,initialValues:f,onLocalFileDelete:q,fileModal:$,onCloudFilesDelete:te})]}):(0,Gt.jsx)(__,{}),(0,Gt.jsx)(AZ,{isTour:l,path:"medicalHistoryTour",setRenderer:p}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:u})]})};var xje=n(79167);function yje(e){let{notesList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,notesHead:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchNoteList:p,pageDetails:h,editButton:m,viewButton:f,deleteButton:g}=e;const{t:v}=vg(),x=so(),{programId:y,patientId:b}=lo(),j=[{name:"Programs",url:"".concat(Lc.DOCTOR.PROGRAM),icon:(0,Gt.jsx)(Nl,{width:14,height:14})},{name:"Patients",url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(y,"/patients")},{name:"Notes",url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(y,"/patients/").concat(b,"/notes")}],[w,_]=We.useState("Other");return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Eu,{sx:{mb:2.5},children:[(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,Gt.jsxs)(df,{item:!0,xs:!0,children:[(0,Gt.jsx)(kH,{labels:j}),(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",sx:{pt:5},children:v("rpm_Notes")})]})}),(0,Gt.jsxs)(Eu,{display:"inline-flex",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>x("prescription"),children:v("rpm_NotePrescription")})}),(0,Gt.jsx)(df,{item:!0,ml:2,children:(0,Gt.jsx)(Vp,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>x("resolve-alerts"),children:v("rpm_NoteResolvedAlerts")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center",marginLeft:"15px","& .MuiSelect-select":{p:.45}},children:(0,Gt.jsxs)(Dw,{sx:{maxWidth:200,color:"primary.theme.600",borderColor:"primary.theme.600"},fullWidth:!0,variant:"outlined",size:"small",value:w,onChange:e=>{_(e.target.value)},children:[(0,Gt.jsx)($m,{value:"Other",disabled:!0,children:"Other Notes"}),[{name:"consultation Notes",path:"consultation-note"},{name:"Summary Notes",path:"summary-note"},{name:"Admin Notes",path:"admin-note"}].map(e=>(0,Gt.jsx)($m,{value:e.name,onClick:()=>x(e.path),children:e.name},e.name))]})})})]})]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:s,dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:p,pageDetails:h,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[d&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:c,checked:l.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),(0,Gt.jsx)(rC,{children:e.snum}),(0,Gt.jsx)(rC,{children:e.title}),(0,Gt.jsx)(rC,{children:e.description}),(0,Gt.jsx)(rC,{children:e.created_at}),(0,Gt.jsx)(rC,{children:e.modified_at}),(0,Gt.jsxs)(rC,{children:[(0,Gt.jsx)(Kp,{children:(0,Gt.jsx)(xje.A,{sx:{fontSize:"14px"}})}),m(e),!1,g(e)]})]},e.id))})}),(0,Gt.jsx)(IO,{pageDetails:h,fetchListFunction:p})]})})})})}yje.defaultProps={notesHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",notesList:[],otherDiseaseList:[],familyDiseaseList:[],fetchNoteList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{}};const bje=yje,jje=["content"],wje={data:{content:[{id:1,snum:"1",title:"Note 1",vital:"BP",description:"Heart problems",created_at:"12 Aug 2022 09:35 AM",modified_at:"12 Aug 2022 09:35 AM"},{id:2,snum:"2",title:"Note 2",vital:"GLUCOSE",description:"Leukemia problems",created_at:"12 Aug 2022 09:35 AM",modified_at:"12 Aug 2022 09:35 AM"},{id:3,snum:"3",title:"Note 3",vital:"SPO2",description:"Smoking problems",created_at:"12 Aug 2022 09:35 AM",modified_at:"12 Aug 2022 09:35 AM"}],from:1,last_page:1,per_page:20,to:3,total:3,current_page:1},statusOk:200};const _je=function(){const e=Nt(),t=Ct(Nd),{t:n}=vg(),[r,o]=(0,We.useState)("desc"),[a,s]=(0,We.useState)("updated_at"),[l,c]=We.useState(null),[d,u]=(0,We.useState)([]),[p,h]=(0,We.useState)((0,i.A)({},Fc)),[m,f]=We.useState({open:!1,data:{}}),g=e=>{f((0,i.A)((0,i.A)({},m),{},{open:!m.open,data:e}))},v=async()=>{try{const{data:e}=wje,t=e||{},{content:n}=t,r=Ko(t,jje);c(n),h(e=>(0,i.A)((0,i.A)({},e),{},{last_page:r.last_page,current_page:r.current_page,from:r.from,per_page:r.per_page,to:r.to,total:r.total}))}catch(e){console.log(e)}};We.useEffect(()=>{t&&v()},[t]),We.useEffect(()=>{e(w_({activeMenuItem:"notes"}))},[]);const x=[{id:"vitaltype",label:n("rpm_VitalType"),isSort:!1,sortProperty:"vitaltype"},{id:"medication",label:n("rpm_Medication"),isSort:!1,sortProperty:"medication"},{id:"c",label:n("rpm_Frequency"),isSort:!1,sortProperty:"rpm_Frequency"},{id:"duration",label:n("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"comments",label:n("rpm_Comments"),isSort:!1,sortProperty:"comments"},{id:"action",label:n("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(bje,{order:r,orderBy:a,setOrder:o,setOrderBy:s,dataParameter:"id",checkState:d,onCheck:e=>{if(Array.isArray(e))return u(e.map(e=>e.toString()));const t=e.target.name;d.includes(t)?u(d.filter(e=>e!==t)):u(e=>[...e,t])},isSelection:!1,nodata:D_,notesHead:x,notesList:l,fetchNoteList:v,pageDetails:p,editButton:e=>(0,Gt.jsx)(Yx,{title:n("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,Gt.jsx)(Yx,{title:n("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",sx:{bgcolor:"primary.theme.50"},onClick:()=>{},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>g(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})}),(0,Gt.jsx)(PU,{openModal:m.open,onCloseModal:g,actionFunction:()=>console.log(m),dataName:m.data.title,options:{primaryText:n("message:rpm_DeleteTitle"),secondaryText:n("message:rpm_DeleteBodyText"),descText:n("message:rpm_DeleteSubText"),btn:{primaryText:n("rpm_Delete"),secondaryText:n("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};var Cje=n(21825),Sje=n(18527);const Aje=(0,dy.A)((0,Gt.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),kje=["form","field","label","nameKey","valueKey","InputProps","onClear","onValueChange","dependent","placeholder"],Mje=e=>{const{form:t,field:n,label:r,nameKey:o,valueKey:a,InputProps:s,onClear:l,onValueChange:c,dependent:d,placeholder:u}=e,p=Ko(e,kje),{name:h}=n,m=(0,We.useRef)(null),[f,g]=(0,We.useState)([]),[v,x]=(0,We.useState)(!1),y=()=>{g([]),l(),t.setFieldValue(h,[])};return(0,We.useEffect)(()=>{ta()(t.values[h])&&!d||g(t.values[h]||[])},[t.values[h]]),(0,We.useEffect)(()=>{var e;const t=null===m||void 0===m||null===(e=m.current)||void 0===e?void 0:e.getElementsByClassName("MuiAutocomplete-clearIndicator")[0];if(t)return t.addEventListener("click",y),()=>{var e;const t=null===m||void 0===m||null===(e=m.current)||void 0===e?void 0:e.getElementsByClassName("MuiAutocomplete-clearIndicator")[0];t&&t.removeEventListener("click",y)}},[]),(0,Gt.jsx)(Gb,(0,i.A)((0,i.A)((0,i.A)({ref:m},e),n),{},{open:v,onInputChange:(e,t)=>{x(!!t)},multiple:!0,getOptionLabel:e=>e[o]||"",value:f,onChange:(e,n,r)=>{if(n&&n.inputValue){const e={[o]:n.inputValue,[a]:n.inputValue};g([...f,e]),t.setFieldValue(h,[...f,e])}else g(n||[]),t.setFieldValue(h,n||[]);"function"===typeof c&&c(e,n,r)},filterOptions:(e,t)=>{const n=e.filter(e=>e.name.toLowerCase().includes(t.inputValue.toLowerCase()));return""===t.inputValue||n.find(e=>e.name===t.inputValue)||n.push({name:t.inputValue,use_count:0}),n},renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t[a]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t[o]})})),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)((0,i.A)({variant:p.variant,label:r,placeholder:u},e),s),{},{InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Aje,{sx:{position:"absolute",right:"10px",top:"9px",color:e=>e.palette.grey[500]}})})})}))}))};Mje.defaultProps={form:{},label:"",placeholder:"",options:[],field:{},nameKey:"name",valueKey:"name",onKeyssDown:()=>{},onClear:()=>{},onValueChange:()=>{},dependent:!1};const Oje=Mje;function Tje(e,t){var n;const r=ST({props:e,name:t}),i=PT(),o=null!=(n=r.ampm)?n:i.is12HourCycleInCurrentLocale(),a=RT().openTimePickerDialogue;return(0,Ft.A)({ampm:o,openTo:"hours",views:["hours","minutes"],acceptRegex:o?/[\dapAP]/gi:/\d/gi,disableMaskedInput:!1,getOpenDialogAriaText:a,inputFormat:o?i.formats.fullTime12h:i.formats.fullTime24h},r,{components:(0,Ft.A)({OpenPickerIcon:GT},r.components)})}const Eje={emptyValue:null,parseInput:IT,getTodayValue:e=>e.date(),areValuesEqual:(e,t,n)=>e.isEqual(t,n),valueReducer:(e,t,n)=>t&&e.isValid(n)?e.mergeDateAndTime(t,n):n};function Pje(e){return(0,sr.Ay)("PrivatePickersToolbarText",e)}const Dje=(0,ar.A)("PrivatePickersToolbarText",["root","selected"]),Rje=["className","selected","value"],Nje=(0,Un.Ay)(Ym,{name:"PrivatePickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&.".concat(Dje.selected)]:t.selected}]})(e=>{let{theme:t}=e;return{transition:t.transitions.create("color"),color:t.palette.text.secondary,["&.".concat(Dje.selected)]:{color:t.palette.text.primary}}}),Lje=We.forwardRef(function(e,t){const{className:n,value:r}=e,i=(0,nn.A)(e,Rje),o=(e=>{const{classes:t,selected:n}=e,r={root:["root",n&&"selected"]};return(0,ir.A)(r,Pje,t)})(e);return(0,Gt.jsx)(Nje,(0,Ft.A)({ref:t,className:jn(n,o.root),component:"span"},i,{children:r}))}),Ije=["align","className","selected","typographyClassName","value","variant"],Fje=(0,Un.Ay)(Vp,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),$je=We.forwardRef(function(e,t){const n=ST({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:i,selected:o,typographyClassName:a,value:s,variant:l}=n,c=(0,nn.A)(n,Ije),d=(e=>{const{classes:t}=e;return(0,ir.A)({root:["root"]},ZT,t)})(n);return(0,Gt.jsx)(Fje,(0,Ft.A)({variant:"text",ref:t,className:jn(i,d.root)},c,{children:(0,Gt.jsx)(Lje,{align:r,className:a,variant:l,value:s,selected:o})}))});function Bje(e){return(0,sr.Ay)("MuiTimePickerToolbar",e)}const zje=(0,ar.A)("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Hje=["ampm","ampmInClock","parsedValue","isLandscape","isMobileKeyboardViewOpen","onChange","openView","setOpenView","toggleMobileKeyboardView","toolbarTitle","views","disabled","readOnly"],Wje=(0,Un.Ay)(tE,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({["& .".concat(KT.penIconButtonLandscape)]:{marginTop:"auto"}}),Vje=(0,Un.Ay)(Lje,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),Uje=(0,Un.Ay)("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{["&.".concat(zje.hourMinuteLabelLandscape)]:t.hourMinuteLabelLandscape,["&.".concat(zje.hourMinuteLabelReverse)]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})(e=>{let{theme:t,ownerState:n}=e;return(0,Ft.A)({display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},n.isLandscape&&{marginTop:"auto"},"rtl"===t.direction&&{flexDirection:"row-reverse"})}),qje=(0,Un.Ay)("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[".".concat(zje.ampmLabel)]:t.ampmLabel},{["&.".concat(zje.ampmLandscape)]:t.ampmLandscape},t.ampmSelection]})(e=>{let{ownerState:t}=e;return(0,Ft.A)({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12},t.isLandscape&&{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"},{["& .".concat(zje.ampmLabel)]:{fontSize:17}})});function Gje(e){const t=ST({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,parsedValue:i,isLandscape:o,isMobileKeyboardViewOpen:a,onChange:s,openView:l,setOpenView:c,toggleMobileKeyboardView:d,toolbarTitle:u,views:p,disabled:h,readOnly:m}=t,f=(0,nn.A)(t,Hje),g=PT(),v=RT(),x=null!=u?u:v.timePickerDefaultToolbarTitle,y=In(),b=Boolean(n&&!r),{meridiemMode:j,handleMeridiemChange:w}=nP(i,n,s),_=t,C=(e=>{const{theme:t,isLandscape:n,classes:r}=e,i={root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",n&&"hourMinuteLabelLandscape","rtl"===t.direction&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]};return(0,ir.A)(i,Bje,r)})((0,Ft.A)({},_,{theme:y})),S=(0,Gt.jsx)(Vje,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:C.separator});return(0,Gt.jsxs)(Wje,(0,Ft.A)({viewType:"clock",landscapeDirection:"row",toolbarTitle:x,isLandscape:o,isMobileKeyboardViewOpen:a,toggleMobileKeyboardView:d,ownerState:_,className:C.root},f,{children:[(0,Gt.jsxs)(Uje,{className:C.hourMinuteLabel,ownerState:_,children:[uE(p,"hours")&&(0,Gt.jsx)($je,{tabIndex:-1,variant:"h3",onClick:()=>c("hours"),selected:"hours"===l,value:i?(e=>n?g.format(e,"hours12h"):g.format(e,"hours24h"))(i):"--"}),uE(p,["hours","minutes"])&&S,uE(p,"minutes")&&(0,Gt.jsx)($je,{tabIndex:-1,variant:"h3",onClick:()=>c("minutes"),selected:"minutes"===l,value:i?g.format(i,"minutes"):"--"}),uE(p,["minutes","seconds"])&&S,uE(p,"seconds")&&(0,Gt.jsx)($je,{variant:"h3",onClick:()=>c("seconds"),selected:"seconds"===l,value:i?g.format(i,"seconds"):"--"})]}),b&&(0,Gt.jsxs)(qje,{className:C.ampmSelection,ownerState:_,children:[(0,Gt.jsx)($je,{disableRipple:!0,variant:"subtitle2",selected:"am"===j,typographyClassName:C.ampmLabel,value:g.getMeridiemText("am"),onClick:m?void 0:()=>w("am"),disabled:h}),(0,Gt.jsx)($je,{disableRipple:!0,variant:"subtitle2",selected:"pm"===j,typographyClassName:C.ampmLabel,value:g.getMeridiemText("pm"),onClick:m?void 0:()=>w("pm"),disabled:h})]})]}))}const Yje=e=>{let{adapter:t,value:n,props:r}=e;const{minTime:i,maxTime:o,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l}=r,c=t.utils.date(n),d=tP(l,t.utils);if(null===n)return null;switch(!0){case!t.utils.isValid(n):return"invalidDate";case Boolean(i&&d(i,c)):return"minTime";case Boolean(o&&d(c,o)):return"maxTime";case Boolean(s&&s(t.utils.getHours(c),"hours")):return"shouldDisableTime-hours";case Boolean(s&&s(t.utils.getMinutes(c),"minutes")):return"shouldDisableTime-minutes";case Boolean(s&&s(t.utils.getSeconds(c),"seconds")):return"shouldDisableTime-seconds";case Boolean(a&&t.utils.getMinutes(c)%a!==0):return"minutesStep";default:return null}},Zje=(e,t)=>e===t,Kje=e=>yP(e,Yje,Zje),Xje=["onChange","PaperProps","PopperProps","ToolbarComponent","TransitionComponent","value","components","componentsProps"],Qje=We.forwardRef(function(e,t){const n=Tje(e,"MuiDesktopTimePicker"),r=null!==Kje(n),{pickerProps:i,inputProps:o,wrapperProps:a}=VD(n,Eje),{PaperProps:s,PopperProps:l,ToolbarComponent:c=Gje,TransitionComponent:d,components:u,componentsProps:p}=n,h=(0,nn.A)(n,Xje),m=(0,Ft.A)({},o,h,{components:u,componentsProps:p,ref:t,validationError:r});return(0,Gt.jsx)(xE,(0,Ft.A)({},a,{DateInputProps:m,KeyboardDateInputComponent:RD,PopperProps:l,PaperProps:s,TransitionComponent:d,components:u,componentsProps:p,children:(0,Gt.jsx)(WD,(0,Ft.A)({},i,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:c,DateInputProps:m,components:u,componentsProps:p},h))}))}),Jje=["ToolbarComponent","value","onChange","components","componentsProps"],ewe=We.forwardRef(function(e,t){const n=Tje(e,"MuiMobileTimePicker"),r=null!==Kje(n),{pickerProps:i,inputProps:o,wrapperProps:a}=VD(n,Eje),{ToolbarComponent:s=Gje,components:l,componentsProps:c}=n,d=(0,nn.A)(n,Jje),u=(0,Ft.A)({},o,d,{components:l,componentsProps:c,ref:t,validationError:r});return(0,Gt.jsx)(XD,(0,Ft.A)({},d,a,{DateInputProps:u,PureDateInputComponent:QD,components:l,componentsProps:c,children:(0,Gt.jsx)(WD,(0,Ft.A)({},i,{autoFocus:!0,toolbarTitle:n.label||n.toolbarTitle,ToolbarComponent:s,DateInputProps:u,components:l,componentsProps:c},d))}))}),twe=["desktopModeMediaQuery","DialogProps","PopperProps","TransitionComponent"],nwe=We.forwardRef(function(e,t){const n=ST({props:e,name:"MuiTimePicker"}),{desktopModeMediaQuery:r="@media (pointer: fine)",DialogProps:i,PopperProps:o,TransitionComponent:a}=n,s=(0,nn.A)(n,twe);return P_(r,{defaultMatches:!0})?(0,Gt.jsx)(Qje,(0,Ft.A)({ref:t,PopperProps:o,TransitionComponent:a},s)):(0,Gt.jsx)(ewe,(0,Ft.A)({ref:t,DialogProps:i},s))});function rwe(e){var t;let{open:n,setOpen:r,medicationList:o,setFieldValue:a,modalIndex:s,setFieldTouched:l}=e;const{defaultTenant:c}=$o.getUrl(),d=()=>{const e=o.timing.every(e=>null===(null===e||void 0===e?void 0:e.start_time)),t=o.timing.every(e=>null!==(null===e||void 0===e?void 0:e.start_time));if(o.repetition_kind===qc){null===o.timing[0].start_time&&cs(o.timing[0].interval)||null!==o.timing[0].start_time&&!cs(o.timing[0].interval)?r(!1):l("medicationList.".concat(s,".timing.",0,".interval"),!1)}else e||t?r(!1):l("medicationList.".concat(s,".timing"),!0)};return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"xs",open:n,onClose:d,className:"custom-reminder-popup",children:[(0,Gt.jsxs)(n_,{display:"flex",alignItems:"center",style:{background:"#efefef"},className:"reminderClock",children:[(0,Gt.jsx)(Ec,{}),(0,Gt.jsx)(Ym,{variant:"h6",fontWeight:600,sx:{fontSize:"18px",color:"black"},ml:2,children:"Set Medicine Reminders"}),(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:d,sx:{position:"absolute",right:15,top:13},children:(0,Gt.jsx)(Bw.A,{})})]}),(0,Gt.jsxs)(s_,{sx:{margin:"10px 35px"},className:"medicineReminder",children:[null===o||void 0===o||null===(t=o.timing)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsxs)(Eu,{className:"boxContentIntervel",component:"form",sx:{display:"flex",flexDirection:"row",width:"100%",gap:"10px"},mb:1,mt:1,children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(nwe,{ampm:!1,minutesStep:"rpmsystem"===c?1:10,autoComplete:"off",renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({fullWidth:!0},e),{},{inputProps:(0,i.A)((0,i.A)({},e.inputProps),{},{autoComplete:"off",placeholder:"Dose ".concat(t+1),readOnly:!0}),onKeyDown:e=>{8===(null===e||void 0===e?void 0:e.keyCode)||46===e.keyCode||e.preventDefault()}})),name:"medicationList.".concat(s,".timing.").concat(t,".start_time"),value:null===e||void 0===e?void 0:e.start_time,onChange:e=>a("medicationList.".concat(s,".timing.").concat(t,".start_time"),e)})}),(null===o||void 0===o?void 0:o.repetition_kind)===qc&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)($w,{label:"Interval",fullWidth:!0,type:"number",onKeyDown:e=>ld.includes(e.key)&&e.preventDefault(),name:"medicationList.".concat(s,".timing.").concat(t,".interval"),value:(null===e||void 0===e?void 0:e.interval)||null,onChange:e=>a("medicationList.".concat(s,".timing.").concat(t,".interval"),e.target.value)}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(s,".timing.").concat(t,".interval"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_VitalType")})})})]})]},t)),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(s,".timing"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:"rpm_vital"})})})]})]})})}rwe.defaultProps={open:!1,setOpen:()=>{},setFieldValue:()=>{},medicationList:{},modalIndex:0,setFieldTouched:()=>{}};const iwe=["children","onClose"],owe=e=>{const{children:t,onClose:n}=e,r=Ko(e,iwe);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:16,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};function awe(e){let{dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o,children:a,showButton:s=!0}=e;return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"sm",open:r,onClose:i,className:"custom-reminder-popup",children:[(0,Gt.jsxs)(owe,{sx:{px:3},onClose:i,children:[o.primaryText,t&&(0,Gt.jsx)(Ym,{component:"p",variant:"subtitle2",children:"(".concat(t,")")})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(s_,{sx:{px:3,py:2},children:a?a({dataName:t,actionFunction:n,openModal:r,onCloseModal:i,options:o}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{component:"p",variant:"h6",children:o.secondaryText}),o.descText&&(0,Gt.jsx)(Ym,{component:"p",variant:"body1",children:o.descText})]}),s?(0,Gt.jsx)(Eu,{mt:2.5,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,direction:o.btnSwap?"row-reverse":"row",children:[(0,Gt.jsx)(df,{item:!0,xs:o.btnSwap,children:(0,Gt.jsx)(Vp,{color:o.btn.secondaryColor,variant:"outlined",onClick:i,children:o.btn.secondaryText})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:o.btn.primaryColor,disableElevation:!0,variant:"contained",onClick:n,children:o.btn.primaryText})})]})}):null]})})]})})}const swe=e=>{let{open:t,children:n,onClose:r,title:i,actionFunction:o,disableButton:a}=e;return(0,Gt.jsxs)(Kw,{open:t,onClose:r,fullWidth:!0,maxWidth:"sm",children:[(0,Gt.jsxs)(n_,{sx:{m:0,p:2},children:[i,r?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(s_,{children:n}),(0,Gt.jsxs)(iO,{children:[(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"outlined",onClick:r,style:{marginBottom:"10px"},children:"Cancel"}),(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",onClick:o,style:{marginBottom:"10px"},disabled:a,children:"Save"})]})]})},lwe=e=>{var t,n,r,o,a;let{notesHead:s,nodata:l,addNewPrescription:c,prescriptionData:d,editPrescription:u,templateModal:p,setTemplateModal:h,saveTemplate:m,allTemplates:f,template:g,setTemplate:v,getTemplateById:x,prescriptionId:y,openMedicineTimings:b,timingBox:j,setTimingBox:w,addTimings:_,imageBox:C,setImageBox:S,closeImageBox:A,handleConfirmModalToggle:k,rowDelete:M,setRowDelete:O,chips:T,handleComplaints:E,handleDiagnosis:P,notifications:D,medicineSuggestions:R,getMedicineData:N,state:L,newHeads:I,handleReminderConfirmModalToggle:F,reminderError:$}=e;const{t:B}=vg(),{enqueueSnackbar:z}=hi(),H=so(),[W,V]=(0,We.useState)(null),[U,q]=(0,We.useState)(!1),[G,Y]=(0,We.useState)(!1),[Z,K]=(0,We.useState)(!1),[X,Q]=(0,We.useState)(!1),[J,ee]=(0,We.useState)(!1),[te,ne]=(0,We.useState)(s),re=G?null===T||void 0===T?void 0:T.complaints:null===T||void 0===T||null===(t=T.complaints)||void 0===t?void 0:t.slice(0,10),ie=Z?null===T||void 0===T?void 0:T.tests:null===T||void 0===T||null===(n=T.tests)||void 0===n?void 0:n.slice(0,10),oe=X?null===T||void 0===T?void 0:T.diagnosis:null===T||void 0===T||null===(r=T.diagnosis)||void 0===r?void 0:r.slice(0,10),[ae,se]=(0,We.useState)({vital:null!==L&&void 0!==L&&null!==(o=L.schedule)&&void 0!==o&&o.vital_name?null===L||void 0===L||null===(a=L.schedule)||void 0===a?void 0:a.vital_name:"others",templateName:"",complaints:[],complaintDetails:[],diagnosis:[],diagnosisDetails:[],tests:[],followUpDays:"",followUpDate:null,followUpReminder:!0,followUpReminderDate:null,followUpTime:null,daysDifference:null,medicationList:[{id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",dose:null,salt_composition:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:null,repetition_kind:Uc,timing:[],frequency:"",comments:"",showMore:!1}],advices:[]}),le=ss((e,t,n)=>{e({q:t,index:n})},500),ce=(0,We.useCallback)((e,t,n)=>{le(N,t,n)},[N]);We.useEffect(()=>{if(!as(d)&&!as(T)){var e;const t=null===(e=d.tests)||void 0===e?void 0:e.map(e=>{var t;return null===T||void 0===T||null===(t=T.tests)||void 0===t?void 0:t.find(t=>(null===t||void 0===t?void 0:t.name)===e)}).filter(e=>void 0!==e);se(e=>(0,i.A)((0,i.A)((0,i.A)({},e),d),{},{tests:t}))}},[d,T]),We.useEffect(()=>{as(D)||se(e=>(0,i.A)((0,i.A)({},e),{},{followUpReminder:D.send_follow_up_reminder_flag,daysDifference:D.follow_up_day,followUpTime:Ts(D.follow_up_time,zc)}))},[D]);const de=()=>{const e=["form","saltComposition","shape","comments"],t=te.filter(t=>!e.includes(t.id));ne(t)};return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{mb:1},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:B("rpm_consultation")})})})})})})}),(0,Gt.jsx)(Iz,{initialValues:(0,i.A)((0,i.A)({},ae),{},{buttonType:""}),validationSchema:vV.addPrescriptionNote,onSubmit:async(e,t)=>{let{setErrors:n}=t;if("template"===(null===e||void 0===e?void 0:e.buttonType))try{await vV.addPrescriptionNote.validate(e,{abortEarly:!1}),h(!0)}catch(r){const e={};r.inner.forEach(t=>{e[t.path]=t.message}),n(e)}else try{as(y)?await c(e):await(as(g)?u(e):c(e))}catch(r){console.log(r)}},enableReinitialize:!0,children:e=>{var t,n,r,o,a;let{values:c,setFieldValue:d,setFieldTouched:u,validateForm:y}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Eu,{display:"flex",sx:{alignItems:"center",justifyContent:"end"},children:[(0,Gt.jsxs)(Xj,{sx:{flexDirection:"row",alignItems:"center"},className:"vitalTypeWebTop",children:[(0,Gt.jsxs)(zj,{id:"demo-row-radio-buttons-group-label",sx:{flex:"0 0 80px",fontWeight:"600",fontSize:"14px"},children:[B("rpm_VitalType"),":"]}),(0,Gt.jsx)(Hz,{name:"vital",className:"usualFonts",children:e=>{let{field:t}=e;return(0,Gt.jsx)(Vbe,(0,i.A)((0,i.A)({row:!0,"aria-labelledby":"demo-row-radio-buttons-group-label"},t),{},{children:null===dd||void 0===dd?void 0:dd.map(e=>(0,Gt.jsx)(uO,{sx:{"& .MuiFormControlLabel-label":{fontSize:"14px"}},value:e.value,control:(0,Gt.jsx)(oje,{}),label:B("rpm_".concat(e.name)),disabled:!as(L)},e.key))}))}})]}),(0,Gt.jsx)(Eu,{width:"100%",marginTop:"-15px",children:(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:B(e,{field:B("rpm_VitalType")})})})})]})}),(0,Gt.jsxs)(Eu,{position:"relative",children:[L?(0,Gt.jsx)(Eu,{mb:2,children:(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,md:12,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"start",children:[(0,Gt.jsxs)(Eu,{mr:1,display:"flex",children:[(0,Gt.jsx)(Ym,{pr:1,children:"Attached Course:"}),(0,Gt.jsxs)(Ym,{fontWeight:600,children:[" ",null===L||void 0===L||null===(t=L.schedule)||void 0===t?void 0:t.name]})]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"start",children:["(",(0,Gt.jsx)(Eu,{pr:1,children:null!==L&&void 0!==L&&L.start_date?sa()(null===L||void 0===L?void 0:L.start_date).format("DD MMM YYYY"):""}),(0,Gt.jsx)(Eu,{children:"-"}),(0,Gt.jsx)(Eu,{pl:1,children:null!==L&&void 0!==L&&L.end_date?sa()(null===L||void 0===L?void 0:L.end_date).format("DD MMM YYYY"):""}),")"]})]})})})}):"",(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("rpm_Symptoms")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsxs)(uH,{sx:{py:2,":last-child":{pb:2}},className:"symptomsTypeWeb",children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,lg:6,pt:0,children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Hz,{name:"complaints",component:Oje,placeholder:"e.g. Fever, Cough",options:(null===T||void 0===T?void 0:T.complaints)||[],onValueChange:(e,t,n)=>{E(e,t,n,c,d)},variant:"outlined",margin:"normal",fullWidth:!0})}),!as(null===c||void 0===c?void 0:c.complaints)&&(0,Gt.jsx)(Vp,{color:"primary",onClick:()=>q(!U),sx:{marginLeft:"5px",height:"38px"},children:B(U?"rpm_Collapse":"rpm_Expand")})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"14px",marginRight:"6px",flex:"0 0 60px"},children:"Related:"}),(0,Gt.jsxs)(Eu,{sx:{flex:"1"},children:[" ",null===re||void 0===re?void 0:re.map((e,t)=>{var n;const r=null===c||void 0===c||null===(n=c.complaints)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{label:e.name,style:{marginRight:"5px",marginBottom:"5px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onClick:t=>{E(t,[e],"selectOption",c,d)}},t)}),(0,Gt.jsx)(Vp,{sx:{fontWeight:"600",fontSize:"12px"},color:"primary",onClick:()=>Y(e=>!e),children:B(G?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]}),U&&(null===c||void 0===c||null===(n=c.complaintDetails)||void 0===n?void 0:n.map((e,t)=>(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,md:3,children:(0,Gt.jsxs)(Eu,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"complaintDetails.".concat(t,".name"),name:"complaintDetails.".concat(t,".name"),variant:"outlined"})]})}),(0,Gt.jsxs)(df,{item:!0,md:3,children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Severity"}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},minWidth:130,children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"complaintDetails.".concat(t,".severity"),name:"complaintDetails.".concat(t,".severity"),variant:"outlined",fontSize:12,children:nd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:"".concat(e.name)},e.value))})})]}),(0,Gt.jsxs)(df,{item:!0,md:3,children:[(0,Gt.jsx)(qj,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Frequency"}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},minWidth:130,children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"complaintDetails.".concat(t,".frequency"),name:"complaintDetails.".concat(t,".frequency"),variant:"outlined",children:rd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:"".concat(e.name)},e.value))})})]}),(0,Gt.jsx)(df,{item:!0,md:3,display:"flex",alignItems:"center",children:(0,Gt.jsxs)(Eu,{width:"100%",children:[(0,Gt.jsx)(qj,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Duration"}),(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Hz,{as:Rj,type:"number",size:"small",width:"100%",id:"complaintDetails.".concat(t,".duration"),name:"complaintDetails.".concat(t,".duration"),onWheel:e=>e.target.blur(),onKeyDown:e=>{ld.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px",width:"100%"}}),(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"complaintDetails.".concat(t,".duration_unit"),name:"complaintDetails.".concat(t,".duration_unit"),variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0",width:"175px",background:"#f9f9ff"},className:"customListSelect",children:td.map(e=>(0,Gt.jsx)($m,{value:e.value,children:"".concat(e.name)},e.value))})]})]})})]})},t)))]})]}),(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("rpm_diagnosis")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsxs)(uH,{sx:{py:2,":last-child":{pb:2}},className:"fieldSizing",children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,lg:6,pt:0,className:"DiagosisModule",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Hz,{name:"diagnosis",component:Oje,placeholder:"e.g. Hypertension, Gastritis",options:(null===T||void 0===T?void 0:T.diagnosis)||[],onValueChange:(e,t,n)=>{P(e,t,n,c,d)},variant:"outlined",margin:"normal",fullWidth:!0})}),!as(null===c||void 0===c?void 0:c.diagnosis)&&(0,Gt.jsx)(Vp,{color:"primary",onClick:()=>ee(!J),sx:{marginLeft:"5px",height:"38px"},children:B(J?"rpm_Collapse":"rpm_Expand")})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"14px",marginRight:"6px",flex:"0 0 60px"},children:"Related:"}),(0,Gt.jsxs)(Eu,{className:"diagosisChipsWeb",sx:{flex:"1"},children:[null===oe||void 0===oe?void 0:oe.map((e,t)=>{var n;const r=null===c||void 0===c||null===(n=c.diagnosis)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{label:e.name,style:{marginRight:"5px",marginBottom:"5px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onClick:t=>{P(t,[e],"selectOption",c,d)}},t)}),(0,Gt.jsx)(Vp,{sx:{fontWeight:"600",fontSize:"12px"},color:"primary",onClick:()=>Q(e=>!e),children:B(X?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]}),J&&(null===c||void 0===c||null===(r=c.diagnosisDetails)||void 0===r?void 0:r.map((e,t)=>(0,Gt.jsx)(Eu,{mt:3,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,md:6,children:(0,Gt.jsxs)(Eu,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"diagnosisDetails.".concat(t,".name"),name:"diagnosisDetails.".concat(t,".name"),variant:"outlined"})]})}),(0,Gt.jsx)(df,{item:!0,md:6,display:"flex",alignItems:"center",children:(0,Gt.jsxs)(Eu,{width:"100%",children:[(0,Gt.jsx)(qj,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Duration"}),(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Hz,{as:Rj,type:"number",size:"small",width:"100%",id:"diagnosisDetails.".concat(t,".duration"),name:"diagnosisDetails.".concat(t,".duration"),onWheel:e=>e.target.blur(),onKeyDown:e=>{ld.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px",width:"100%"}}),(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"diagnosisDetails.".concat(t,".duration_unit"),name:"diagnosisDetails.".concat(t,".duration_unit"),variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0",width:"175px",background:"#f9f9ff"},className:"customListSelect",children:td.map(e=>(0,Gt.jsx)($m,{value:e.value,children:"".concat(e.name)},e.value))})]})]})})]})},t)))]})]}),(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,md:8,sm:6,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("Rx")})}),(0,Gt.jsx)(df,{item:!0,md:4,sm:6,xs:!0,children:(0,Gt.jsx)(Eu,{display:"flex",gap:1,flexWrap:"wrap",alignItems:"center",justifyContent:"end",children:(0,Gt.jsx)(Gb,{disableClearable:!0,value:g,size:"small",onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(x(null===t||void 0===t?void 0:t.id),v(t)),"clear"===n&&v(null)},options:f,getOptionLabel:e=>e.name,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{label:"Select Template",sx:{bgcolor:"white",minWidth:"200px",borderRadius:1}})),renderOption:(e,t)=>(0,Gt.jsx)("li",(0,i.A)((0,i.A)({},e),{},{style:{borderRadius:1,display:"flex",justifyContent:"space-between"},children:t.name})),className:"borderRadius-2"})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsxs)(uH,{sx:{py:2,":last-child":{pb:2}},children:[(0,Gt.jsx)(Eu,{className:"pres_inputTab",children:(0,Gt.jsx)(Eu,{display:"flex",children:(0,Gt.jsx)(Eu,{display:"flex",sx:{flex:"1",overflowX:"auto"},children:(0,Gt.jsxs)(EM,{data:as(null===c||void 0===c?void 0:c.notesList)?[{}]:null===c||void 0===c?void 0:c.notesList,headCells:te,noDataImage:l,skeletonVrows:6,className:"theme_scroll",children:[(0,Gt.jsx)(Zz,{name:"medicationList",validateOnChange:!1,children:e=>{var t,n,r;return(0,Gt.jsx)(Gt.Fragment,{children:as(null===c||void 0===c?void 0:c.medicationList)?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,Gt.jsx)("img",{src:l,style:{display:"block",margin:"auto",maxWidth:"200px"}})})}),(0,Gt.jsx)(K_,{children:(0,Gt.jsxs)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,Gt.jsx)(Ym,{}),(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===c||void 0===c||null===(n=c.medicationList)||void 0===n||null===(r=n.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===r?void 0:r.isEdit,onClick:()=>e.push({id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:Uc,timing:[],frequency:"",comments:""}),children:B("rpm_AddNewConsultation")})]})})]}):null===c||void 0===c||null===(t=c.medicationList)||void 0===t?void 0:t.map((t,n)=>{var r,o,a;return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},className:(null===c||void 0===c?void 0:c.medicationList[n].showMore)&&"removeOrder",children:[(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Gb,{freeSolo:!0,options:as(R)?[]:R,id:"medicationList.".concat(n,".medicine"),name:"medicationList.".concat(n,".medicine"),value:(null===c||void 0===c||null===(r=c.medicationList[n])||void 0===r?void 0:r.medicine)||null,getOptionLabel:e=>(null===e||void 0===e?void 0:e.medicine)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,onInputChange:(e,t)=>ce(e,t,n),onChange:async(e,t,r)=>{await d("medicationList.".concat(n,".medicine"),t),u("medicationList.".concat(n,".medicine"),!0),d("medicationList.".concat(n,".salt_composition"),null===t||void 0===t?void 0:t.salt_composition),d("medicationList.".concat(n,".medicine_form"),null===t||void 0===t?void 0:t.product_form),"clear"===r&&(d("medicationList.".concat(n,".salt_composition"),""),d("medicationList.".concat(n,".medicine_form"),""))},renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.medicine})})),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",variant:"outlined",placeholder:"Medicine",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,Gt.jsxs)(H_,{position:"end",children:[(0,Gt.jsx)(Yx,{title:B("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})}),e.InputProps.endAdornment]})})}))}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".medicine"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:B(e,{field:B("rpm_MedicineName")})})})]})}),(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{minWidth:150,sx:{whiteSpace:"normal",verticalAlign:"top"},children:[(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".frequency"),name:"medicationList.".concat(n,".frequency"),onChange:e=>{d("medicationList",c.medicationList.map((t,r)=>n===r?(0,i.A)((0,i.A)({},t),{},{frequency:e.target.value,repetition_kind:e.target.value>4?qc:Uc,timing:[..._(e.target.value)]}):t))},variant:"outlined",defaultValue:"",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,Gt.jsx)(Yx,{title:B("message:rpm_FrequencyHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ud||void 0===ud?void 0:ud.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".frequency"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:B(e,{field:B("rpm_Frequency")})})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Vp,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,disabled:!c.medicationList[n].frequency||"0"===c.medicationList[n].frequency,onClick:()=>{V(n),b()},children:[(0,Gt.jsx)(Cje.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),B("setReminder")]})}),(0,Gt.jsx)(Eu,{display:"flex",flexWrap:"wrap",children:(null===t||void 0===t?void 0:t.timing)&&(null===t||void 0===t?void 0:t.timing.map((e,t)=>(0,Gt.jsx)(Eu,{pr:.5,pb:.5,children:(0,Gt.jsx)(Ym,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"},children:null!==e&&void 0!==e&&e.start_time?sa()(e.start_time).format("hh:mm a"):""})},t)))})]})}),(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{minWidth:200,sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",type:"number",placeholder:"in days",id:"medicationList.".concat(n,".days"),name:"medicationList.".concat(n,".days"),variant:"outlined",value:c.medicationList[n].days||null,onWheel:e=>e.target.blur(),onKeyDown:e=>ld.includes(e.key)&&e.preventDefault(),onChange:async e=>{const t=parseInt(e.target.value);await d("medicationList.".concat(n,".days"),t),u("medicationList.".concat(n,".days"),!0),d("medicationList.".concat(n,".end_date"),ns(c.medicationList[n].start_date,t))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:B("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".days"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:B(e,{field:B("rpm_Days")})})})]})}),(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsxs)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{padding:"10px",fontSize:"14px"}}),mr:1,display:"flex",minWidth:370,width:"100%",children:[(0,Gt.jsxs)(Eu,{width:"100%",children:[(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"From",id:"medicationList.".concat(n,".start_date"),name:"medicationList.".concat(n,".start_date"),value:c.medicationList[n].start_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{d("medicationList.".concat(n,".start_date"),e);const t=ts(e,c.medicationList[n].end_date);d("medicationList.".concat(n,".days"),t)},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()},sx:{width:"100%"}})),disablePast:!0}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".start_date"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:B(e,{field:B("rpm_Date")})})})]}),(0,Gt.jsx)(Eu,{}),(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",pl:1,children:"-"}),(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),ml:1,width:"100%",children:(0,Gt.jsx)(Hz,{fullWidth:!0,as:nR,size:"small",label:"To",id:"medicationList.".concat(n,".end_date"),name:"medicationList.".concat(n,".end_date"),value:t.end_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{d("medicationList.".concat(n,".end_date"),e);const t=ts(c.medicationList[n].start_date,e);d("medicationList.".concat(n,".days"),t)},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()},sx:{width:"100%"}})),minDate:t.start_date?t.start_date:new Date})})]})})}),(null===c||void 0===c?void 0:c.medicationList[n].showMore)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(rC,{style:{verticalAlign:"top",minWidth:"150px"},children:(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".medicine_form"),name:"medicationList.".concat(n,".medicine_form"),placeholder:"Form",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:B("message:rpm_FormHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})}),(0,Gt.jsx)(rC,{style:{verticalAlign:"top"},children:(0,Gt.jsx)(Hz,{sx:{minWidth:"400px"},as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".salt_composition"),name:"medicationList.".concat(n,".salt_composition"),placeholder:"Salt Composition",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:B("message:rpm_CompositionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})}),(0,Gt.jsx)(rC,{style:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{display:"flex",gap:2,sx:{height:"40px"},minWidth:150,children:(0,Gt.jsxs)(Hz,{as:Dw,size:"small",displayEmpty:!0,fullWidth:!0,id:"medicationList.".concat(n,".icon_type"),name:"medicationList.".concat(n,".icon_type"),variant:"outlined",className:"shapeDropDown",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:B("message:rpm_MedicineShapeIconHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"",sx:{display:"none",opacity:"0.6",color:"red"},children:(0,Gt.jsx)("span",{style:{color:"#c6c6c6"},children:"Shape"})}),null===hd||void 0===hd?void 0:hd.map(e=>(0,Gt.jsx)($m,{value:e.key,children:e.text},e.key))]})}),(0,Gt.jsxs)(Eu,{children:[cs(null===t||void 0===t?void 0:t.image)?(0,Gt.jsxs)(Eu,{className:"upload-input-text",children:[(0,Gt.jsx)("input",{id:"medicationList.".concat(n,".image"),name:"medicationList.".concat(n,".image"),type:"file",onChange:e=>{d("medicationList.".concat(n,".image"),e.currentTarget.files[0])}}),(0,Gt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:B("uploadImage")}),(0,Gt.jsx)(Eu,{clone:!0,mr:1,color:"primary",children:(0,Gt.jsx)(sue,{width:22,height:22})})]})]}):(0,Gt.jsxs)(Eu,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",onClick:()=>{const e=URL.createObjectURL(t.image);S({open:!0,data:e})},children:null===t||void 0===t||null===(o=t.image)||void 0===o?void 0:o.name}),(0,Gt.jsx)(Eu,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,Gt.jsx)(Kp,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{d("medicationList.".concat(n,".image"),"")},children:(0,Gt.jsx)(Ql,{width:22,height:22})})})]}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".image"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:B(e,{field:B("rpm_image")})})})]})]})}),(0,Gt.jsx)(rC,{style:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},minWidth:300,children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(n,".comments"),placeholder:"Enter Comments",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:B("message:rpm_CommentsHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".comments"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:B(e,{field:B("rpm_Comment")})})})]})})]}),(0,Gt.jsxs)(rC,{sx:{textAlign:"center",verticalAlign:"top"},children:[(0,Gt.jsx)(Yx,{placement:"top-start",title:"Show more Fields",children:(0,Gt.jsx)(Kp,{color:"primary",sx:{fontSize:"12"},onClick:()=>{if(c.medicationList[n].showMore){let e=[...c.medicationList];e.splice(n,1),-1===(null===e||void 0===e?void 0:e.findIndex(e=>null===e||void 0===e?void 0:e.showMore))&&de(),d("medicationList.".concat(n,".showMore"),!1)}else(()=>{let e=s.slice(0,-1);ne([...e,...I])})(),d("medicationList.".concat(n,".showMore"),!0)},children:c.medicationList[n].showMore?(0,Gt.jsx)(uje.A,{}):(0,Gt.jsx)(Sbe.A,{})})}),(0,Gt.jsx)(Kp,{color:"error",onClick:()=>{var t;null!==(t=c.medicationList[n].medicine)&&void 0!==t&&t.medicine?O((0,i.A)((0,i.A)({},M),{},{open:!M.open,data:()=>e.remove(n)})):e.remove(n);let r=[...c.medicationList];r.splice(n,1),-1===(null===r||void 0===r?void 0:r.findIndex(e=>null===e||void 0===e?void 0:e.showMore))&&de()},children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})]})]}),(null===c||void 0===c||null===(a=c.medicationList)||void 0===a?void 0:a.length)-1===n&&(0,Gt.jsxs)(Vp,{color:"primary",onClick:()=>{N(""),e.push({id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:Uc,timing:[],frequency:"",comments:""})},children:[(0,Gt.jsx)(Due,{fontSize:"small",sx:{width:18,height:18}}),B("rpm_AddMore")]})]},n)})})}}),(0,Gt.jsx)(rwe,{open:j,setOpen:w,medicationList:null===c||void 0===c?void 0:c.medicationList[W],modalIndex:W,setFieldValue:d,setFieldTouched:u}),(0,Gt.jsx)(c_,{open:C.open,imageUrl:C.data,onClose:A,imageWidthHeight:{width:"400",height:"400"}}),(0,Gt.jsx)(PU,{openModal:M.open,onCloseModal:k,actionFunction:()=>{var e;M.data(),k(),1===(null===c||void 0===c||null===(e=c.medicationList)||void 0===e?void 0:e.length)&&v(null)},options:{primaryText:B("message:rpm_DeleteTitle"),secondaryText:B("message:rpm_DeleteBodyText"),btn:{primaryText:B("rpm_Delete"),secondaryText:B("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})})})}),(0,Gt.jsx)(Eu,{mt:3,justifyContent:"flex-end",display:"flex",gap:1,children:(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"text",type:"submit",disabled:!(null!==c&&void 0!==c&&c.medicationList.length),onClick:()=>d("buttonType","template"),children:B("rpm_SaveAsTemplate")})})]})]}),(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,placeholder:"Advice...",children:B("rpm_advice")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsxs)(uH,{sx:{py:2,":last-child":{pb:2}},children:[(0,Gt.jsx)(Eu,{mb:2,children:null===T||void 0===T||null===(o=T.advices)||void 0===o?void 0:o.map((e,t)=>{var n,r;return(0,Gt.jsx)(gb,{className:"adviceChips",label:e.name,onClick:()=>{const t=null===c||void 0===c?void 0:c.advices;let n=[];n=null!==t&&void 0!==t&&t.includes(e.name)?t.filter(t=>t!==e.name):[...t,e.name],d("advices",n)},onDelete:null!==c&&void 0!==c&&null!==(n=c.advices)&&void 0!==n&&n.includes(e.name)?()=>{var t;return d("advices",null===c||void 0===c||null===(t=c.advices)||void 0===t?void 0:t.filter(t=>t!==e.name))}:void 0,style:{marginRight:"3px",marginBottom:"5px",backgroundColor:null!==c&&void 0!==c&&null!==(r=c.advices)&&void 0!==r&&r.includes(e.name)?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},t)})}),(0,Gt.jsx)(Hz,{component:$w,multiline:!0,rows:4,variant:"outlined",id:"advices",name:"advices",fullWidth:!0,value:null===c||void 0===c||null===(a=c.advices)||void 0===a?void 0:a.join(", "),onChange:e=>{e.preventDefault();const t=e.target.value.split("|").map(e=>e);d("advices",t)}})]})]}),(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("rpm_testrequest")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{sx:{py:2,":last-child":{pb:2}},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,md:6,className:"symptomsTypeWeb",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Type"}),(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Hz,{name:"tests",component:Oje,options:(null===T||void 0===T?void 0:T.tests)||[],variant:"outlined",placeholder:"Select Tests",margin:"normal",fullWidth:!0})})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"14px",marginRight:"6px",flex:"0 0 60px"},children:"Related:"}),(0,Gt.jsxs)(Eu,{sx:{flex:"1"},children:[null===ie||void 0===ie?void 0:ie.map((e,t)=>{var n;const r=null===c||void 0===c||null===(n=c.tests)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{className:"adviceChips",label:e.name,onClick:()=>{if(r)return!1;d("tests",[...c.tests,e])},style:{marginRight:"3px",marginBottom:"5px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},t)}),(0,Gt.jsx)(Vp,{sx:{fontWeight:"600",fontSize:"12px"},color:"primary",onClick:()=>K(e=>!e),children:B(Z?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:B("rpm_followUpDate")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsxs)(uH,{sx:{py:2,":last-child":{pb:2}},children:[(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,md:6,children:(0,Gt.jsxs)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),mr:1,children:[(0,Gt.jsxs)(qj,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:[B("rpm_Duration")," (in days)"]}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",type:"number",onPaste:e=>e.preventDefault(),id:"followUpDays",name:"followUpDays",variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>ld.includes(e.key)&&e.preventDefault(),onChange:e=>{const t=parseInt(e.target.value);d("followUpDays",t);const n=ns(sa()(new Date),t),r=sa()(n).add(1,"days");d("followUpDate",r.valueOf());const i=sa()(r).subtract(null===c||void 0===c?void 0:c.daysDifference,"days").startOf("day").valueOf();d("followUpReminderDate",i)},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:B("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"followUpDays",children:e=>(0,Gt.jsx)(iw,{error:!0,children:B(e,{field:B("rpm_Days")})})})]})}),(0,Gt.jsx)(df,{item:!0,md:6,className:"symptomsTypeWeb",children:(0,Gt.jsxs)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{}}),mr:1,children:[(0,Gt.jsx)(qj,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"14px"},children:"Date"}),(0,Gt.jsx)(Hz,{as:nR,size:"small",placeholder:"To",id:"followUpDate",name:"followUpDate",value:null===c||void 0===c?void 0:c.followUpDate,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{d("followUpDate",sa()(e).endOf("day").valueOf());const t=ts(sa()(new Date),e)-parseInt(1);d("followUpDays",t);const n=sa()(e).subtract(null===c||void 0===c?void 0:c.daysDifference,"days").startOf("day").valueOf();d("followUpReminderDate",n)},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:sa()(new Date).add(1,"days")})]})})]})}),(0,Gt.jsx)(Eu,{mt:2,children:(null===c||void 0===c?void 0:c.followUpReminder)&&(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(jC,{defaultChecked:!0,disabled:!0}),label:"Send reminder and WhatsApp message to this patient on ".concat(null!==c&&void 0!==c&&c.followUpReminderDate?" ".concat(sa()(null===c||void 0===c?void 0:c.followUpReminderDate).format("DD/MM/YYYY")," at ").concat(null===c||void 0===c?void 0:c.followUpTime):"")})})]})]}),(0,Gt.jsx)(swe,{open:p,onClose:()=>h(!1),actionFunction:()=>m(c),title:B("rpm_SaveTemplate"),disableButton:null===c||void 0===c||!c.templateName,children:(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",gutterBottom:!0,children:B("rpm_TemplateName")}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"templateName",name:"templateName",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:B("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})]})})]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Eu,{mb:3,display:"flex",gap:1,flexWrap:"wrap",children:[(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:()=>H(-1),sx:{marginRight:"10px"},children:B("rpm_Cancel")}),(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:!(null!==c&&void 0!==c&&c.medicationList.length),onClick:async()=>{d("buttonType","update");const e=await y();Object.keys(e).length&&z(B("message:rpm_FormikFieldError"),{variant:"error"})},children:B("rpm_Save")})]})})]})})}}),(0,Gt.jsx)(awe,{showButton:!1,openModal:$.open,onCloseModal:F,options:{primaryText:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",children:[(0,Gt.jsx)("span",{style:{background:"#3f51b5",color:"#ffffff",fontSize:"16px",fontWeight:"900",width:"20px",height:"20px",borderRadius:"50px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"15px"},children:"!"}),(0,Gt.jsx)(Ym,{variant:"h2",component:"h2",sx:{fontSize:"18px",fontWeight:"700"},children:B("message:rpm_SaveTitle")})]})}),secondaryText:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",children:[(0,Gt.jsx)(Ec,{}),(0,Gt.jsx)("p",{style:{margin:"0",display:"flex"},children:$.data.conflicts.map((e,t)=>(0,Gt.jsx)("p",{style:{display:"flex",padding:"0 15px",fontWeight:"600",margin:"0"},children:e},t))})]}),(0,Gt.jsx)("p",{style:{fontSize:"18px",color:e=>e.palette.grey[700]},children:"There are already scheduled medicine reminders for these times. Please check the time you have added."})]}),btn:{primaryText:B("rpm_Save"),secondaryText:B("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})};lwe.defaultProps={order:"",orderBy:"",notesHead:[],checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},fetchNoteList:()=>{},addNewPrescription:()=>{},editPrescription:()=>{},openMedicineTimings:()=>{},timingBox:!1,setTimingBox:()=>{},prescriptionData:{},templateModal:!1,setTemplateModal:()=>{},saveTemplate:()=>{},allTemplates:[],template:"",setTemplate:()=>{},getTemplateById:()=>{},deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{},prescriptionId:"",addTimings:()=>{},imageBox:{},setImageBox:()=>{},closeImageBox:()=>{},rowDelete:{},setRowDelete:()=>{},handleConfirmModalToggle:()=>{},handleComplaints:()=>{},handleDiagnosis:()=>{},chips:{},notifications:{},medicineSuggestions:[],getMedicineData:()=>{},setMedicineSuggestions:()=>{},state:{},newHeads:[],handleReminderConfirmModalToggle:()=>{},setReminderError:()=>{},reminderError:{},fetchRxDocument:()=>{},programId:"",rxData:{},modifyRxData:()=>{},loading:!1};const cwe=lwe,dwe=(0,dy.A)((0,Gt.jsx)("path",{d:"M19 13H5v-2h14z"}),"Remove"),uwe=MM({selectTemplateLabel:{transform:"translate(14px, -4px) !important"}}),pwe=e=>{let{open:t,children:n,onClose:r,title:i,actionFunction:o,disableButton:a}=e;return(0,Gt.jsxs)(Kw,{open:t,onClose:r,fullWidth:!0,maxWidth:"sm",children:[(0,Gt.jsxs)(n_,{sx:{m:0,p:2},children:[i,r?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(s_,{children:n}),(0,Gt.jsxs)(iO,{children:[(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"outlined",onClick:r,style:{marginBottom:"10px"},children:"Cancel"}),(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",onClick:o,style:{marginBottom:"10px"},disabled:a,children:"Save"})]})]})},hwe=e=>{var t,n,r,o,a;let{nodata:s,addNewPrescription:l,prescriptionData:c,editPrescription:d,templateModal:u,setTemplateModal:p,saveTemplate:h,allTemplates:m,template:f,setTemplate:g,getTemplateById:v,handleComplaints:x,handleDiagnosis:y,prescriptionId:b,chips:j,notifications:w,medicineSuggestions:_,getMedicineData:C}=e;const S=uwe(),A=so(),{state:k}=oo(),[M,O]=(0,We.useState)(!1),[T,E]=(0,We.useState)(null),[P,D]=(0,We.useState)({open:!1,data:""}),[R,N]=(0,We.useState)({open:!1,data:""}),[L,I]=(0,We.useState)(!1),[F,$]=(0,We.useState)(!1),[B,z]=(0,We.useState)(!1),[H,W]=(0,We.useState)(!1),[V,U]=(0,We.useState)(!1),q=F?null===j||void 0===j?void 0:j.complaints:null===j||void 0===j||null===(t=j.complaints)||void 0===t?void 0:t.slice(0,10),G=B?null===j||void 0===j?void 0:j.tests:null===j||void 0===j||null===(n=j.tests)||void 0===n?void 0:n.slice(0,10),Y=H?null===j||void 0===j?void 0:j.diagnosis:null===j||void 0===j||null===(r=j.diagnosis)||void 0===r?void 0:r.slice(0,10),Z=(0,We.useRef)(),K=()=>{N((0,i.A)((0,i.A)({},R),{},{open:!R.open,data:""}))},[X,Q]=(0,We.useState)(null),J=e=>(t,n)=>{Q(n?e:null)},[ee,te]=(0,We.useState)({vital:null!==k&&void 0!==k&&null!==(o=k.schedule)&&void 0!==o&&o.vital_name?null===k||void 0===k||null===(a=k.schedule)||void 0===a?void 0:a.vital_name:"others",templateName:"",complaints:[],complaintDetails:[],diagnosis:[],diagnosisDetails:[],tests:[],followUpDays:"",followUpDate:null,followUpReminder:!0,followUpReminderDate:null,followUpTime:null,medicationList:[{id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:null,repetition_kind:Uc,timing:[],frequency:"",comments:""}],advices:[]}),ne=ss((e,t,n)=>{e({q:t,index:n})},500),re=(0,We.useCallback)((e,t,n)=>{ne(C,t,n)},[C]);We.useEffect(()=>{if(!as(c)&&!as(j)){var e;const t=null===(e=c.tests)||void 0===e?void 0:e.map(e=>{var t;return null===j||void 0===j||null===(t=j.tests)||void 0===t?void 0:t.find(t=>(null===t||void 0===t?void 0:t.name)===e)}).filter(e=>void 0!==e);te(e=>(0,i.A)((0,i.A)((0,i.A)({},e),c),{},{tests:t}))}},[c,j]),We.useEffect(()=>{as(w)||te(e=>(0,i.A)((0,i.A)({},e),{},{followUpReminder:w.send_follow_up_reminder_flag,daysDifference:w.follow_up_day,followUpTime:Ts(w.follow_up_time,zc)}))},[w]);const ie=()=>{D({open:!1,data:""})},oe=e=>{let t=[],n=e>4?1:e;for(var r=0;r<n;r++)t.push({start_time:null,interval:null});return t};return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},position:"relative",children:(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{position:"absolute",top:"-48px",bottom:"0",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:we("rpm_consultation")})})})})}),(0,Gt.jsx)(Iz,{initialValues:(0,i.A)((0,i.A)({},ee),{},{buttonType:""}),validationSchema:vV.addPrescriptionNote,onSubmit:async(e,t)=>{let{setErrors:n}=t;if("template"===(null===e||void 0===e?void 0:e.buttonType))try{await vV.addPrescriptionNote.validate(e,{abortEarly:!1}),p(!0)}catch(r){const e={};r.inner.forEach(t=>{e[t.path]=t.message}),n(e)}else try{as(b)?await l(e):await(as(f)?d(e):l(e))}catch(r){console.log(r)}},enableReinitialize:!0,children:e=>{var t,n,r,o;let{values:a,setFieldValue:l,setFieldTouched:c}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsxs)(Eu,{mb:1,width:"100%",className:"vitalTypeMobile",children:[(0,Gt.jsxs)(Xj,{display:"flex",sx:{flexDirection:"row",width:"100%",alignItems:"center"},children:[(0,Gt.jsxs)(zj,{id:"demo-row-radio-buttons-group-label",sx:{flex:"0 0 70px",fontWeight:"600",fontSize:"12px",color:"#3f51b5"},children:[we("rpm_VitalType"),":"]}),(0,Gt.jsx)(Hz,{name:"vital",children:e=>{let{field:t}=e;return(0,Gt.jsx)(Vbe,(0,i.A)((0,i.A)({row:!0,"aria-labelledby":"demo-row-radio-buttons-group-label"},t),{},{children:null===dd||void 0===dd?void 0:dd.map(e=>(0,Gt.jsx)(uO,{value:e.value,control:(0,Gt.jsx)(oje,{}),label:we("rpm_".concat(e.name)),disabled:!as(k)},e.value))}))}})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_VitalType")})})})]}),(0,Gt.jsx)(Eu,{className:"mobileAccordian",mb:2,children:(0,Gt.jsxs)(lU,{expanded:"panel1"===X,onChange:J("panel1"),children:[(0,Gt.jsx)(jU,{expandIcon:"panel1"===X?(0,Gt.jsx)(dwe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,Gt.jsx)(Due,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel1bh-content",id:"panel1bh-header",children:(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:we("rpm_Symptoms")})}),(0,Gt.jsxs)(hU,{className:"symptomsBox",children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,position:"relative",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Type"}),(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Hz,{name:"complaints",component:Oje,placeholder:"e.g. Fever, Cough",options:(null===j||void 0===j?void 0:j.complaints)||[],onValueChange:(e,t,n)=>{x(e,t,n,a,l)},variant:"outlined",margin:"normal",fullWidth:!0})}),!as(null===a||void 0===a?void 0:a.complaints)&&(0,Gt.jsx)(Vp,{color:"primary",onClick:()=>I(!L),sx:{fontSize:"10px",fontWeight:"700"},children:we(L?"rpm_Collapse":"rpm_Expand")})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,lg:6,pt:0,className:"topExtraPadding",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px",marginTop:"10px",padding:"0 10px"},children:"Related:"}),(0,Gt.jsxs)(Eu,{children:[null===q||void 0===q?void 0:q.map((e,t)=>{var n;const r=null===a||void 0===a||null===(n=a.complaints)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onClick:t=>{x(t,[e],"selectOption",a,l)}},t)}),(0,Gt.jsx)(Vp,{color:"primary",onClick:()=>$(e=>!e),sx:{fontSize:"10px",fontWeight:"700",padding:"0"},children:we(F?"rpm_ViewLess":"rpm_ViewAll")})]})]})]}),L&&(null===a||void 0===a||null===(t=a.complaintDetails)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsx)(Eu,{mt:1,className:"typeofSymptoms",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:6,position:"relative",children:(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Type"}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[" ",(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"complaintDetails.".concat(t,".name"),name:"complaintDetails.".concat(t,".name"),variant:"outlined",className:"autoCompletePlaceholder"})]})]})}),(0,Gt.jsxs)(df,{item:!0,xs:6,position:"relative",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Severity"}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"complaintDetails.".concat(t,".severity"),name:"complaintDetails.".concat(t,".severity"),variant:"outlined",className:"complaintDetailsSelect",children:nd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:"".concat(e.name)},e.value))})})]}),(0,Gt.jsxs)(df,{item:!0,xs:6,position:"relative",children:[(0,Gt.jsx)(qj,{fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Frequency"}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"complaintDetails.".concat(t,".frequency"),name:"complaintDetails.".concat(t,".frequency"),variant:"outlined",className:"complaintDetailsSelect",children:rd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:"".concat(e.name)},e.value))})})]}),(0,Gt.jsx)(df,{item:!0,xs:6,display:"flex",alignItems:"center",position:"relative",children:(0,Gt.jsxs)(Eu,{width:"100%",children:[(0,Gt.jsx)(qj,{fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Duration"}),(0,Gt.jsxs)(Eu,{display:"flex",height:"32px",children:[(0,Gt.jsx)(Hz,{as:Rj,type:"number",size:"small",width:"100%",id:"complaintDetails.".concat(t,".duration"),name:"complaintDetails.".concat(t,".duration"),onWheel:e=>e.target.blur(),onKeyDown:e=>{ld.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px",width:"100%",fontSize:"10px"},className:"durationDays"}),(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"complaintDetails.".concat(t,".duration_unit"),name:"complaintDetails.".concat(t,".duration_unit"),variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0",width:"140px",fontSize:"10px",backgroundColor:"rgb(115 128 194 / 21%)",color:"#000000       "},className:"customListSelect",children:td.map(e=>(0,Gt.jsx)($m,{value:e.value,children:"".concat(e.name)},e.value))})]})]})})]})},t)))]})]})}),(0,Gt.jsx)(Eu,{className:"mobileAccordian",mb:2,children:(0,Gt.jsxs)(lU,{expanded:"panel2"===X,onChange:J("panel2"),children:[(0,Gt.jsx)(jU,{expandIcon:"panel2"===X?(0,Gt.jsx)(dwe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,Gt.jsx)(Due,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel2bh-content",id:"panel2bh-header",children:(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:we("rpm_diagnosis")})}),(0,Gt.jsxs)(hU,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,lg:6,pt:0,position:"relative",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px"},className:"ShrinkLabel",children:"Type"}),(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Hz,{className:"DiagnosisFieldMobile",name:"diagnosis",component:Oje,placeholder:"e.g. Hypertension, Gastritis",options:(null===j||void 0===j?void 0:j.diagnosis)||[],onValueChange:(e,t,n)=>{y(e,t,n,a,l)},variant:"outlined",margin:"normal",fullWidth:!0})}),!as(null===a||void 0===a?void 0:a.diagnosis)&&(0,Gt.jsx)(Vp,{color:"primary",onClick:()=>U(!V),sx:{fontSize:"10px",fontWeight:"700"},children:we(V?"rpm_Collapse":"rpm_Expand")})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,lg:6,pt:0,children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px",padding:"0 10px"},children:"Related:"}),null===Y||void 0===Y?void 0:Y.map((e,t)=>{var n;const r=null===a||void 0===a||null===(n=a.diagnosis)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onClick:t=>{y(t,[e],"selectOption",a,l)}},t)}),(0,Gt.jsx)(Vp,{color:"primary",onClick:()=>W(e=>!e),sx:{fontSize:"10px",fontWeight:"700",padding:"0"},children:we(H?"rpm_ViewLess":"rpm_ViewAll")})]})]}),V&&(null===a||void 0===a||null===(n=a.diagnosisDetails)||void 0===n?void 0:n.map((e,t)=>(0,Gt.jsx)(Eu,{mt:3,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,md:3,xs:6,position:"relative",children:(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"8px",fontSize:"10px"},className:"ShrinkLabel",children:"Type"}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"diagnosisDetails.".concat(t,".name"),name:"diagnosisDetails.".concat(t,".name"),variant:"outlined",sx:{fontSize:"10px"}})]})}),(0,Gt.jsx)(df,{item:!0,md:3,xs:6,display:"flex",alignItems:"center",position:"relative",children:(0,Gt.jsxs)(Eu,{width:"100%",children:[(0,Gt.jsx)(qj,{fontWeight:600,sx:{marginBottom:"8px",fontSize:"10px"},className:"ShrinkLabel",children:"Duration"}),(0,Gt.jsxs)(Eu,{display:"flex",height:"32px",children:[(0,Gt.jsx)(Hz,{as:Rj,type:"number",size:"small",width:"100%",id:"diagnosisDetails.".concat(t,".duration"),name:"diagnosisDetails.".concat(t,".duration"),onWheel:e=>e.target.blur(),onKeyDown:e=>{ld.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px",width:"100%",fontSize:"10px"}}),(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"diagnosisDetails.".concat(t,".duration_unit"),name:"diagnosisDetails.".concat(t,".duration_unit"),variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0",width:"175px"},className:"customListSelect",children:td.map(e=>(0,Gt.jsx)($m,{value:e.value,children:"".concat(e.name)},e.value))})]})]})})]})},t)))]})]})}),(0,Gt.jsx)(Eu,{className:"mobileAccordian",mb:2,children:(0,Gt.jsxs)(lU,{expanded:"panel3"===X,onChange:J("panel3"),children:[(0,Gt.jsx)(jU,{expandIcon:"panel3"===X?(0,Gt.jsx)(dwe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,Gt.jsx)(Due,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel3bh-content",id:"panel3bh-header",children:(0,Gt.jsx)(df,{container:!0,alignItems:"center",justifyContent:"space-between",children:(0,Gt.jsx)(df,{item:!0,md:2,children:(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:we("Rx")})})})}),(0,Gt.jsx)(hU,{children:(0,Gt.jsxs)(Eu,{className:"emptyRowDeclear",children:[(0,Gt.jsx)(Eu,{position:"relative",width:"100%",children:(0,Gt.jsxs)(Eu,{className:"selectTemplateBorder",sx:{margin:"4px 0",width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel ".concat(S.selectTemplateLabel),children:"Select Template"}),(0,Gt.jsx)(Gb,{fullWidth:!0,disableClearable:!0,value:f,size:"small",onChange:(e,t,n)=>{null!==t&&void 0!==t&&t.id&&(v(null===t||void 0===t?void 0:t.id),g(t)),"clear"===n&&g(null)},options:m,getOptionLabel:e=>e.name,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({fullWidth:!0,className:"medicateFormField ".concat(S.selectTemplateClass)},e),{},{sx:{bgcolor:"white",borderRadius:"10px",border:"0",fontSize:"12px"}})),renderOption:(e,t)=>(0,Gt.jsx)("li",(0,i.A)((0,i.A)({},e),{},{style:{borderRadius:1,display:"flex",justifyContent:"space-between"},children:t.name}))})]})}),(0,Gt.jsxs)(Eu,{className:"pres_inputTab",children:[(0,Gt.jsx)(Zz,{name:"medicationList",validateOnChange:!1,children:e=>{var t,n,r;return(0,Gt.jsx)(Gt.Fragment,{children:as(null===a||void 0===a?void 0:a.medicationList)?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(K_,{className:"emptyRow",children:(0,Gt.jsx)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,Gt.jsx)("img",{src:s,style:{display:"block",margin:"auto",maxWidth:"100px"}})})}),(0,Gt.jsx)(K_,{children:(0,Gt.jsxs)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,Gt.jsx)(Ym,{}),(0,Gt.jsx)(Vp,{sx:{fontSize:"10px"},variant:"contained",color:"primary",disableElevation:!0,disabled:null===a||void 0===a||null===(n=a.medicationList)||void 0===n||null===(r=n.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===r?void 0:r.isEdit,onClick:()=>e.push({id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:Uc,timing:[],frequency:"",comments:""}),children:"Add New Consultation"})]})})]}):null===a||void 0===a||null===(t=a.medicationList)||void 0===t?void 0:t.map((t,n)=>{var r,o,s;return(0,Gt.jsx)(Eu,{ref:Z,style:{marginBottom:"10px",marginTop:"15px"},className:"saveTemplateShow",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:6,position:"relative",children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:we("rpm_Medication")}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Gb,{options:as(_)?[]:_,id:"medicationList.".concat(n,".medicine"),name:"medicationList.".concat(n,".medicine"),value:(null===a||void 0===a||null===(r=a.medicationList[n])||void 0===r?void 0:r.medicine)||null,getOptionLabel:e=>(null===e||void 0===e?void 0:e.medicine)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,onInputChange:(e,t)=>re(e,t,n),onChange:async(e,t,r)=>{await l("medicationList.".concat(n,".medicine"),t),c("medicationList.".concat(n,".medicine"),!0),l("medicationList.".concat(n,".salt_composition"),null===t||void 0===t?void 0:t.salt_composition),l("medicationList.".concat(n,".medicine_form"),null===t||void 0===t?void 0:t.medicine_form),"clear"===r&&(l("medicationList.".concat(n,".salt_composition"),""),l("medicationList.".concat(n,".medicine_form"),""))},renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.medicine})})),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({className:"medicateFormField"},e),{},{fullWidth:!0,size:"small",variant:"outlined",placeholder:"Medicine",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,Gt.jsxs)(H_,{position:"end",children:[(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{pr:1.8},className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})}),e.InputProps.endAdornment]})})}))}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".medicine"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_MedicineName")})})})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:6,position:"relative",children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:we("rpm_Form")}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{sx:{fontSize:"10px"},as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".medicine_form"),name:"medicationList.".concat(n,".medicine_form"),placeholder:"Form",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{pr:0},className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{display:"flex",gap:1,children:[" ",(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,position:"relative",children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Shape"}),(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".icon_type"),name:"medicationList.".concat(n,".icon_type"),variant:"outlined",className:"shapeDropDown",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineIconHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:hd.map(e=>(0,Gt.jsx)($m,{value:e.key,children:e.text},e.key))})]})})})]}),(0,Gt.jsxs)(Eu,{sx:{height:"15px"},children:[cs(null===t||void 0===t?void 0:t.image)?(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"flex-end",color:"customClr.bp",fontSize:"14px",children:[" ",(0,Gt.jsxs)(Eu,{className:"upload-input-text",children:[(0,Gt.jsx)("input",{id:"medicationList.".concat(n,".image"),name:"medicationList.".concat(n,".image"),type:"file",onChange:e=>{l("medicationList.".concat(n,".image"),e.currentTarget.files[0])}}),(0,Gt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:we("uploadImage")}),(0,Gt.jsx)(Eu,{clone:!0,mr:1,color:"primary",children:(0,Gt.jsx)(sue,{width:22,height:22})})]})]})]}):(0,Gt.jsxs)(Eu,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",onClick:()=>{const e=URL.createObjectURL(t.image);D({open:!0,data:e})},children:null===t||void 0===t||null===(o=t.image)||void 0===o?void 0:o.name}),(0,Gt.jsx)(Eu,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,Gt.jsx)(Kp,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{l("medicationList.".concat(n,".image"),"")},children:(0,Gt.jsx)(Ql,{width:22,height:22})})})]}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".image"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_image")})})})]})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,pt:0,position:"relative",children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:we("rpm_Composition")}),(0,Gt.jsx)(Eu,{display:"flex",className:"customHeight",children:(0,Gt.jsx)(Hz,{sx:{fontSize:"10px"},as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".salt_composition"),name:"medicationList.".concat(n,".salt_composition"),placeholder:"Salt Composition",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{pr:1.8},className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:6,pt:0,position:"relative",children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:[we("rpm_Frequency"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{className:"complaintDetailsSelect",as:Dw,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".frequency"),name:"medicationList.".concat(n,".frequency"),onChange:e=>{l("medicationList",a.medicationList.map((t,r)=>n===r?(0,i.A)((0,i.A)({},t),{},{frequency:e.target.value,repetition_kind:e.target.value>4?qc:Uc,timing:[...oe(e.target.value)]}):t))},variant:"outlined",defaultValue:"",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_FrequencyHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ud||void 0===ud?void 0:ud.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".frequency"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Frequency")})})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Vp,{sx:{padding:"5px 0",fontSize:"10px"},variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,disabled:!a.medicationList[n].frequency||"0"===a.medicationList[n].frequency,onClick:()=>{E(n),O(!M)},children:[(0,Gt.jsx)(Cje.A,{fontSize:"small",sx:{width:14,height:14,mr:.5}}),we("setReminder")]})}),(0,Gt.jsx)(Eu,{display:"flex",flexWrap:"wrap",children:(null===t||void 0===t?void 0:t.timing)&&(null===t||void 0===t?void 0:t.timing.map((e,t)=>(0,Gt.jsx)(Eu,{pr:.5,pb:.5,children:(0,Gt.jsx)(Ym,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"10px",color:"#6B7280"},children:null!==e&&void 0!==e&&e.start_time?sa()(e.start_time).format("hh:mm a"):""})},t)))})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:6,pt:0,position:"relative",children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:[we("rpm_Days"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{className:"complaintDetailsSelect",as:Rj,fullWidth:!0,size:"small",type:"number",id:"medicationList.".concat(n,".days"),name:"medicationList.".concat(n,".days"),variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>(null===ld||void 0===ld?void 0:ld.includes(e.key))&&e.preventDefault(),onChange:async e=>{const t=parseInt(e.target.value);await l("medicationList.".concat(n,".days"),t),c("medicationList.".concat(n,".days"),!0),l("medicationList.".concat(n,".end_date"),ns(a.medicationList[n].start_date,t))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".days"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Days")})})})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,className:"durationFieldLabels",children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"8px",fontSize:"10px"},children:[we("rpm_Duration"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsxs)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{padding:"10px",fontSize:"10px"}}),mr:1,display:"flex",width:"100%",children:[(0,Gt.jsx)(Hz,{className:"MuiGridPadddingTop",as:nR,size:"small",label:"From",id:"medicationList.".concat(n,".start_date"),name:"medicationList.".concat(n,".start_date"),value:t.start_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{l("medicationList.".concat(n,".start_date"),e);const t=ts(e,a.medicationList[n].end_date);l("medicationList.".concat(n,".days"),t)},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),disablePast:!0}),(0,Gt.jsx)(Eu,{}),(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",pl:1,children:"-"}),(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),ml:1,width:"100%",children:(0,Gt.jsx)(Hz,{className:"MuiGridPadddingTop",width:"100%",as:nR,size:"small",label:"To",id:"medicationList.".concat(n,".end_date"),name:"medicationList.".concat(n,".end_date"),value:t.end_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},onChange:e=>{l("medicationList.".concat(n,".end_date"),e);const t=ts(a.medicationList[n].start_date,e);l("medicationList.".concat(n,".days"),t)},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:t.start_date?t.start_date:new Date})})]})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,position:"relative",children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:we("rpm_Comments")}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},className:"commentFieldMobile",children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(n,".comments"),placeholder:"Enter Comments",sx:{fontSize:"10px"},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_CommentsHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".comments"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Comment")})})})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{display:"flex",justifyContent:"space-between",children:[(0,Gt.jsx)(Kp,{color:"error",className:"lightDanger",onClick:()=>{a.medicationList[n].medicine?N((0,i.A)((0,i.A)({},R),{},{open:!R.open,data:()=>e.remove(n)})):e.remove(n)},children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),(null===a||void 0===a||null===(s=a.medicationList)||void 0===s?void 0:s.length)-1===n&&(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>{C(""),e.push({id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:Uc,timing:[],frequency:"",comments:""}),setTimeout(()=>{Z.current.lastChild.scrollIntoView({behavior:"smooth",block:"nearest"})},0)},children:(0,Gt.jsx)(Due,{fontSize:"small",sx:{width:18,height:18}})})]})})]})},n)})})}}),(0,Gt.jsx)(rwe,{open:M,setOpen:O,medicationList:null===a||void 0===a?void 0:a.medicationList[T],modalIndex:T,setFieldValue:l,setFieldTouched:c}),(0,Gt.jsx)(c_,{open:P.open,imageUrl:P.data,onClose:ie,imageWidthHeight:{width:"400",height:"400"}}),(0,Gt.jsx)(PU,{openModal:R.open,onCloseModal:K,actionFunction:()=>{R.data(),K()},options:{primaryText:we("message:rpm_DeleteTitle"),secondaryText:we("message:rpm_DeleteBodyText"),btn:{primaryText:we("rpm_Delete"),secondaryText:we("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(Eu,{mt:1,justifyContent:"flex-end",display:"flex",gap:1,children:(0,Gt.jsx)(Vp,{className:"saveTemplateHide",color:"primary",disableElevation:!0,variant:"text",type:"submit",disabled:!(null!==a&&void 0!==a&&a.medicationList.length),onClick:()=>l("buttonType","template"),sx:{fontSize:"10px"},children:we("rpm_SaveAsTemplate")})})]}),(0,Gt.jsx)(pwe,{open:u,onClose:()=>p(!1),actionFunction:()=>h(a),title:we("rpm_SaveTemplate"),disableButton:null===a||void 0===a||!a.templateName,children:(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",gutterBottom:!0,children:we("rpm_TemplateName")}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"templateName",name:"templateName",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})]})})]})})]})}),(0,Gt.jsx)(Eu,{className:"mobileAccordian",mb:2,children:(0,Gt.jsxs)(lU,{expanded:"panel4"===X,onChange:J("panel4"),children:[(0,Gt.jsx)(jU,{expandIcon:"panel4"===X?(0,Gt.jsx)(dwe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,Gt.jsx)(Due,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel4bh-content",id:"panel4bh-header",children:(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:we("rpm_advice")})}),(0,Gt.jsxs)(hU,{children:[" ",(0,Gt.jsx)(Eu,{mt:1,mb:1,sx:{whiteSpace:"nowrap",overflow:"auto"},children:null===j||void 0===j||null===(r=j.advices)||void 0===r?void 0:r.map((e,t)=>{var n,r;return(0,Gt.jsx)(gb,{className:"adviceChips",label:e.name,onClick:()=>{const t=a.advices;let n=[];n=null!==t&&void 0!==t&&t.includes(e.name)?t.filter(t=>t!==e.name):[...t,e.name],l("advices",n)},onDelete:null!==a&&void 0!==a&&null!==(n=a.advices)&&void 0!==n&&n.includes(e.name)?()=>l("advices",a.advices.filter(t=>t!==e.name)):void 0,style:{marginRight:"10px",marginBottom:"10px",backgroundColor:null!==a&&void 0!==a&&null!==(r=a.advices)&&void 0!==r&&r.includes(e.name)?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},t)})}),(0,Gt.jsx)(Hz,{className:"adviceChipsColum",component:$w,multiline:!0,rows:4,variant:"outlined",id:"advices",name:"advices",fullWidth:!0,value:null===a||void 0===a||null===(o=a.advices)||void 0===o?void 0:o.join(", "),onChange:e=>{e.preventDefault();const t=e.target.value.split("|").map(e=>e);l("advices",t)}})]})]})}),(0,Gt.jsx)(Eu,{className:"mobileAccordian",mb:2,position:"relative",children:(0,Gt.jsxs)(lU,{expanded:"panel5"===X,onChange:J("panel5"),children:[(0,Gt.jsx)(jU,{expandIcon:"panel5"===X?(0,Gt.jsx)(dwe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,Gt.jsx)(Due,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel5bh-content",id:"panel5bh-header",children:(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:we("rpm_testrequest")})}),(0,Gt.jsxs)(hU,{position:"relative",class:"paddingTopAccordian",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{marginBottom:"5px",fontSize:"10px"},className:"ShrinkLabel",children:"Type"}),(0,Gt.jsx)(Xj,{fullWidth:!0,className:"symptomsBox",children:(0,Gt.jsx)(Hz,{name:"tests",component:Oje,options:(null===j||void 0===j?void 0:j.tests)||[],variant:"outlined",placeholder:"Select Tests",margin:"normal",fullWidth:!0})}),(0,Gt.jsxs)(Eu,{mt:1,className:"testRequired",children:[null===G||void 0===G?void 0:G.map((e,t)=>{var n;const r=null===a||void 0===a||null===(n=a.tests)||void 0===n?void 0:n.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{label:e.name,onClick:()=>{if(r)return!1;l("tests",[...a.tests,e])},style:{marginRight:"3px",marginBottom:"3px",backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},t)}),(0,Gt.jsx)(Vp,{color:"primary",onClick:()=>z(e=>!e),sx:{fontSize:"10px",fontWeight:"700",padding:"0"},children:we(B?"rpm_ViewLess":"rpm_ViewAll")})]})]})]})}),(0,Gt.jsx)(Eu,{className:"mobileAccordian",mb:1,children:(0,Gt.jsxs)(lU,{expanded:"panel6"===X,onChange:J("panel6"),children:[(0,Gt.jsx)(jU,{expandIcon:"panel6"===X?(0,Gt.jsx)(dwe,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}):(0,Gt.jsx)(Due,{sx:{backgroundColor:"#7F8BCB",height:"25px",width:"25px",marginRight:"10px",color:"white",borderRadius:"50px"}}),"aria-controls":"panel6bh-content",id:"panel6bh-header",children:(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:"700",fontSize:10,children:we("rpm_followUpDate")})}),(0,Gt.jsx)(hU,{position:"relative",class:"paddingTopAccordian",children:(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",className:"symptomsBox",children:(0,Gt.jsxs)(TT,{dateAdapter:jI,children:[(0,Gt.jsxs)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),mr:1,width:"100%",children:[(0,Gt.jsxs)(qj,{fontWeight:600,sx:{fontSize:"10px",marginBottom:"5px"},className:"ShrinkLabel",children:[we("rpm_Duration")," (in days)"]}),(0,Gt.jsx)(Hz,{className:"complaintDetailsSelect",as:Rj,fullWidth:!0,size:"small",type:"number",id:"followUpDays",name:"followUpDays",variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>ld.includes(e.key)&&e.preventDefault(),onChange:e=>{const t=parseInt(e.target.value);l("followUpDays",t);const n=ns(sa()(new Date),t),r=sa()(n).add(1,"days");l("followUpDate",r.valueOf());const i=sa()(r).subtract(null===a||void 0===a?void 0:a.daysDifference,"days").startOf("day").valueOf();l("followUpReminderDate",i)},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},className:"helpIconButton",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"followUpDays",children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Days")})})})]}),(0,Gt.jsxs)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{}}),mr:1,width:"100%",children:[(0,Gt.jsx)(qj,{fontWeight:600,sx:{fontSize:"10px",marginBottom:"5px"},className:"ShrinkLabel",children:"Date"}),(0,Gt.jsx)(Hz,{as:nR,size:"small",placeholder:"To",id:"followUpDate",name:"followUpDate",inputFormat:"dd/MM/yyyy",className:"datePickerField",onPaste:e=>{e.preventDefault()},onChange:e=>{l("followUpDate",sa()(e).valueOf());const t=ts(sa()(new Date),e)-parseInt(1);l("followUpDays",t);const n=sa()(e).subtract(null===a||void 0===a?void 0:a.daysDifference,"days").startOf("day").valueOf();l("followUpReminderDate",n)},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:sa()(new Date).add(1,"days")})]})]})})})]})}),(0,Gt.jsx)(Eu,{mb:2,className:"notifyFollowUp",children:(null===a||void 0===a?void 0:a.followUpReminder)&&(0,Gt.jsx)(uO,{fontSize:10,control:(0,Gt.jsx)(jC,{defaultChecked:!0,disabled:!0}),label:"Send reminder and WhatsApp message to this patient on ".concat(null!==a&&void 0!==a&&a.followUpReminderDate?" ".concat(sa()(null===a||void 0===a?void 0:a.followUpReminderDate).format("DD/MM/YYYY")," at ").concat(null===a||void 0===a?void 0:a.followUpTime):"")})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:!(null!==a&&void 0!==a&&a.medicationList.length),onClick:()=>l("buttonType","update"),sx:{marginRight:"10px"},children:we("rpm_Save")}),(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:()=>A(-1),children:we("rpm_Back")})]})]})})}})]})};hwe.defaultProps={order:"",orderBy:"",notesHead:[],checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},fetchNoteList:()=>{},addNewPrescription:()=>{},editPrescription:()=>{},initialData:{},prescriptionData:{},templateModal:!1,setTemplateModal:()=>{},saveTemplate:()=>{},allTemplates:[],template:"",setTemplate:()=>{},getTemplateById:()=>{},deleteTemplate:()=>{},templateDelete:{},notifications:{},setTemplateDelete:()=>{},handleComplaints:()=>{},handleDiagnosis:()=>{},prescriptionId:"",medicineSuggestions:[],getMedicineData:()=>{},setMedicineSuggestions:()=>{}};const mwe=hwe,fwe=n.p+"static/media/add-notes.f11813b992fbd52b8549.png",gwe=e=>{let{patientData:t,program:n}=e;const r=Nt(),o=window.innerWidth,{programId:a,patientId:s,presId:l}=lo(),c=Ct(Nd),[d,u]=(0,We.useState)({}),[p,h]=We.useState({}),m=so(),[f,g]=(0,We.useState)(!1),[v,x]=(0,We.useState)([]),[y,b]=(0,We.useState)(null),[j,w]=(0,We.useState)(!1),[_,C]=(0,We.useState)({open:!1,data:""}),[S,A]=(0,We.useState)({open:!1,data:""}),[k,M]=(0,We.useState)({open:!1,data:{errorMessage:"",conflicts:[]}}),[O,T]=(0,We.useState)({}),[E,P]=We.useState(null),[D,R]=We.useState(""),{state:N}=oo(),L=[{name:we("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===n||void 0===n?void 0:n.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients")},{name:"".concat((null===t||void 0===t?void 0:t.first_name)||""," ").concat((null===t||void 0===t?void 0:t.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===n||void 0===n?void 0:n.code,"/patients/").concat(null===t||void 0===t?void 0:t.id,"/dashboard")},{name:we("rpm_consultation"),url:""}];We.useEffect(()=>{const e={breadcrumb:L};as(n)||as(t)||r(w_(e))},[n,t]);const I=[{id:"medication",label:we("rpm_Medication")+"*",isSort:!1,sortProperty:"medication"},{id:"dosage",label:we("rpm_Frequency")+"*",isSort:!1,sortProperty:"dosage"},{id:"days",label:we("rpm_Days")+"*",isSort:!1,sortProperty:"days"},{id:"duration",label:we("rpm_Duration")+"*",isSort:!1,sortProperty:"duration"},{id:"action",label:we("rpm_Actions"),isSort:!1,sortProperty:"action"}],F=[{id:"form",label:we("rpm_Form"),isSort:!1,sortProperty:"form"},{id:"saltComposition",label:we("rpm_Composition"),isSort:!1,sortProperty:"saltComposition"},{id:"shape",label:we("rpm_Shape"),isSort:!1,sortProperty:"shape"},{id:"comments",label:we("rpm_Comments"),isSort:!1,sortProperty:"comments"},{id:"action",label:we("rpm_Actions"),isSort:!1,sortProperty:"action"}],$=e=>{const t=e.match(/\[(.*?)\]/),n=(t?t[1].split(", "):[]).map(e=>Ts(e,zc));return n||[]},B=async e=>{var t,n,o,l;const c=(0,i.A)((0,i.A)({},e),{},{course:{id:(null===N||void 0===N?void 0:N.id)||null,tenant_id:(null===N||void 0===N||null===(t=N.schedule)||void 0===t?void 0:t.tenant_id)||null,program:(null===N||void 0===N||null===(n=N.schedule)||void 0===n?void 0:n.program)||null,name:(null===N||void 0===N||null===(o=N.schedule)||void 0===o?void 0:o.name)||null,vital_name:(null===N||void 0===N||null===(l=N.schedule)||void 0===l?void 0:l.vital_name)||null,start_date:(null===N||void 0===N?void 0:N.start_date)||null,end_date:(null===N||void 0===N?void 0:N.end_date)||null},program:a});try{await r(((e,t,n)=>async r=>{r(na(!0));const o=await Dl((0,i.A)((0,i.A)({},n),{},{course:null===n||void 0===n?void 0:n.course}));try{const n="".concat(ua.prescription,"/").concat(e,"/").concat(t);return await du(n,o)}finally{r(na(!1))}})(a,s,c)),r(Zo({subTitle:"message:rpm_PrescriptionCreatedSuccessfully",severity:Bc})),m("".concat(Lc.DOCTOR.PROGRAM,"/").concat(a,"/patients/").concat(s,"/consultations"))}catch(d){const e=ls(d,"response.data._embedded.errors[0]",{}).message||"",t=$(e);if(as(t)){const e=ls(d,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_PrescriptionCreatedFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_err_medicine_start_date_cannot_be_after_end_date"),severity:$c}))}else M({open:!0,data:{errorMessage:e,conflicts:t}})}},z=async e=>{try{await r(((e,t,n,r)=>async o=>{o(na(!0));const a=await Dl((0,i.A)((0,i.A)({},n),{},{course:null}));try{const n="".concat(ua.prescription,"/").concat(e,"/").concat(t,"/").concat(r);return await uu(n,a)}finally{o(na(!1))}})(a,s,e,l)),r(Zo({subTitle:"message:rpm_PrescriptionUpdateSuccessfully",severity:Bc})),m("".concat(Lc.DOCTOR.PROGRAM,"/").concat(a,"/patients/").concat(s,"/consultations"))}catch(t){const e=ls(t,"response.data._embedded.errors[0]",{}).message||"",n=$(e);if(as(n)){const e=ls(t,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_PrescriptionUpdateFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_err_medicine_start_date_cannot_be_after_end_date"),severity:$c}))}else M({open:!0,data:{errorMessage:e,conflicts:n}})}};function H(e){var t,n;const{vital:r,medications_list:o,intervals:a,start_date:s,end_date:l,id:c,created_by:d,name:u,days:p}=e,h=null===o||void 0===o?void 0:o.map(e=>{const t=function(e,t){if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null}(e.image,"".concat(e.medicine,".jpg")),n=[],r=a.some(t=>{var n;return(null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id))&&null===t.start_time});if(e.frequency>=1&&e.frequency<=4&&r)for(let i=0;i<e.frequency;i++)n.push({start_time:null,interval:null});else a.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).forEach(e=>{let{id:t,start_time:r,stop_after:i}=e;n.push({id:t,start_time:r?Ts(r,Hc):null,interval:i})});return{id:e.id,medicine:{medicine:e.medicine,medicine_form:e.medicine_form,salt_composition:e.salt_composition,color:null,dose:null,icon_type:null,image:null,unit:null,id:e.id},medicine_form:e.medicine_form,salt_composition:e.salt_composition,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:t,start_date:sa()(new Date).valueOf(),days:u?p:null,end_date:u?ns(sa()(new Date).valueOf(),p):null,repetition_kind:e.frequency>4?qc:Uc,timing:n,frequency:e.frequency,comments:e.comments}});return(0,i.A)((0,i.A)({},e),{},{followUpDays:null,followUpDate:null,followUpReminder:null===e||void 0===e||null===(t=e.follow_up)||void 0===t||!t.send_reminder_flag||(null===e||void 0===e||null===(n=e.follow_up)||void 0===n?void 0:n.send_reminder_flag),followUpReminderDate:null,complaintDetails:null!==e&&void 0!==e&&e.complaints?null===e||void 0===e?void 0:e.complaints:[],diagnosisDetails:null!==e&&void 0!==e&&e.diagnosis?null===e||void 0===e?void 0:e.diagnosis:[],tests:null!==e&&void 0!==e&&e.tests?null===e||void 0===e?void 0:e.tests:[],vital:r,presId:c,pres_start_date:s,pres_end_date:l,created_by:d,medicationList:h})}const W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:D,index:0};try{const{data:t}=await r(Ml({q:e.q}));(null===t||void 0===t?void 0:t.length)>0?P(t):P([{id:Math.random(),medicine:e.q,salt_composition:null,medicine_form:null,icon_type:null,image:null,color:null,dose:null,unit:null}])}catch(t){console.log(t)}},V=async e=>{try{await r(Ol(a,{values:e,flag:!1})),g(!1),r(Zo({subTitle:"message:rpm_TemplateCreatedSuccessfully",severity:Bc}))}catch(t){const e=ls(t,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_TemplateCreatedFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_err_template_name_already_exist"),severity:$c}))}},U=async e=>{try{const{data:t}=await r(Tl(a,e)),n=await H(t);u(n)}catch(t){console.log(t)}},q=async()=>{try{const{data:e}=await r((e=>async t=>{try{const t="".concat(ua.template,"/").concat(e);return await cu(t,{})}finally{t(na(!1))}})(a));x(e)}catch(e){console.log(e)}},G=(e,t,n,r,i)=>{if("selectOption"===n){const e=t.filter(e=>!r.complaints.some(t=>t.name===e.name));i("complaints",[...r.complaints,...e]);const n=e.map(e=>({name:null===e||void 0===e?void 0:e.name,severity:"",frequency:"",duration:"1",duration_unit:"DAY"}));i("complaintDetails",[...r.complaintDetails,...n])}else if("removeOption"==n){var o;const e=null===(o=r.complaints.find(e=>!t.includes(e)))||void 0===o?void 0:o.name;if(e){i("complaintDetails",r.complaintDetails.filter(t=>t.name!==e))}}else i("complaints",[]),i("complaintDetails",[])},Y=(e,t,n,r,i)=>{if("selectOption"===n){const e=t.filter(e=>{var t;return!(null!==r&&void 0!==r&&null!==(t=r.diagnosis)&&void 0!==t&&t.some(t=>t.name===e.name))});i("diagnosis",[...r.diagnosis,...e]);const n=null===e||void 0===e?void 0:e.map(e=>({name:null===e||void 0===e?void 0:e.name,duration:"1",duration_unit:"DAY"}));i("diagnosisDetails",[...r.diagnosisDetails,...n])}else if("removeOption"==n){var o;const e=null===(o=r.diagnosis.find(e=>!t.includes(e)))||void 0===o?void 0:o.name;if(e){i("diagnosisDetails",r.diagnosisDetails.filter(t=>t.name!==e))}}else i("diagnosis",[]),i("diagnosisDetails",[])};return We.useEffect(()=>{c&&!as(l)&&(async()=>{try{const{data:e}=await r(kl(a,s,l)),t=await H(e);u(t)}catch(e){console.log(e)}})()},[l,c]),We.useEffect(()=>{c&&W()},[c,D]),We.useEffect(()=>{c&&n&&(q(),(async e=>{const{data:t}=await r(Al(e));T(t[0])})(null===n||void 0===n?void 0:n.code),(async e=>{try{const{data:t}=await r(Tg(e));h(t)}catch(t){console.log(t)}})(null===n||void 0===n?void 0:n.code))},[c,n]),We.useEffect(()=>{r(w_({activeMenuItem:"consultations"}))},[]),(0,Gt.jsx)("div",{children:o>=575?(0,Gt.jsx)(cwe,{notesHead:I,addNewPrescription:B,editPrescription:z,nodata:fwe,prescriptionData:d,templateModal:f,setTemplateModal:g,saveTemplate:V,allTemplates:v,template:y,setTemplate:b,getTemplateById:U,prescriptionId:l,openMedicineTimings:()=>{w(!j)},setTimingBox:w,timingBox:j,addTimings:e=>{let t=[],n=e>4?1:e;for(var r=0;r<n;r++)t.push({start_time:null,interval:null});return t},imageBox:_,setImageBox:C,closeImageBox:()=>{C({open:!1,data:""})},handleConfirmModalToggle:()=>{A((0,i.A)((0,i.A)({},S),{},{open:!S.open,data:""}))},rowDelete:S,chips:O,handleComplaints:G,handleDiagnosis:Y,notifications:null===p||void 0===p?void 0:p.follow_up_notification,medicineSuggestions:E,getMedicineData:W,setMedicineSuggestions:P,setSearchText:R,state:N,newHeads:F,setRowDelete:A,setReminderError:M,reminderError:k,handleReminderConfirmModalToggle:()=>{M((0,i.A)((0,i.A)({},k),{},{open:!k.open,data:{errorMessage:"",conflicts:[]}}))}}):(0,Gt.jsx)(mwe,{notesHead:I,addNewPrescription:B,editPrescription:z,nodata:fwe,prescriptionData:d,templateModal:f,setTemplateModal:g,saveTemplate:V,allTemplates:v,template:y,setTemplate:b,getTemplateById:U,prescriptionId:l,chips:O,handleComplaints:G,handleDiagnosis:Y,notifications:null===p||void 0===p?void 0:p.follow_up_notification,medicineSuggestions:E,getMedicineData:W,setMedicineSuggestions:P})})};var vwe=n(75824),xwe=n(92823),ywe=n.n(xwe);const bwe=function(e){let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,setShowFilterColor:a}=e;const{t:s}=vg();return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Iz,{initialValues:{vital:"",start_date:null,end_date:null},children:()=>(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{className:"WhiteBG prescription-tour-step0",sx:{borderRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:3,children:(0,Gt.jsxs)(Eu,{p:1,py:.6,pr:.6,display:"flex",children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center",width:"88%"},children:[(0,Gt.jsx)(qj,{id:"vital",children:s("rpm_VitalType")}),(0,Gt.jsx)(Hz,{as:Dw,sx:{borderRadius:2,bgcolor:"white"},fullWidth:!0,name:"vital",labelId:"vital",label:"vital type",variant:"outlined",size:"small",value:n.vital,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{vital:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:s("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:s("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Af,{orientation:"vertical",flexItem:!0,sx:{ml:2}})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:12,md:12,lg:9,display:"flex",alignItems:"center",className:"consultaionFilterMobile",children:[(0,Gt.jsxs)(df,{container:!0,alignItems:"center",spacing:1,lg:7,xs:12,children:[(0,Gt.jsx)(df,{item:!0,xs:3,children:(0,Gt.jsx)(Ym,{color:"primary",fontWeight:600,sx:{fontSize:12},ml:1,className:"responsiveFonts",children:s("rpm_Duration")})}),(0,Gt.jsx)(df,{item:!0,xs:5,md:!0,className:"durationOnMobile",children:(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),children:(0,Gt.jsxs)(TT,{dateAdapter:jI,children:[(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"From",name:"start_date",value:n.start_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),maxDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{start_date:e}))}}),(0,Gt.jsx)(Eu,{})]})})}),(0,Gt.jsx)(df,{item:!0,xs:4,md:!0,className:"durationOnMobile",children:(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),ml:1,children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"To",name:"end_date",value:n.end_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:n.start_date?new Date(n.start_date):void 0,maxDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{end_date:e}))}})})})})]}),(0,Gt.jsx)(df,{item:!0,xs:12,lg:5,children:(0,Gt.jsxs)(Eu,{py:.5,display:"flex",alignItems:"center",children:[(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,sx:{ml:2,whiteSpace:"nowrap"},onClick:()=>{o.current_page=1,t(n),""===n.vital&&null===n.start_date&&null===n.start_date||a(!0)},children:s("rpm_ApplyFilters")}),(0,Gt.jsx)(Vp,{variant:"text",disableElevation:!0,onClick:()=>{o.current_page=1,r({vital:"",start_date:null,end_date:null}),t({vital:"",start_date:null,end_date:null}),a(!1)},type:"reset",children:(0,Gt.jsx)(Bw.A,{})})]})})]})]})})})})})};const jwe=function(e){let{handleToggleAddNote:t,showFilterColor:n}=e;const{t:r}=vg();return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{p:1,children:[(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",mb:2,children:(0,Gt.jsx)("img",{src:n?D_:fwe,style:{display:"block",margin:"auto",maxWidth:"200px"},className:"emptyNotesImage"})}),(0,Gt.jsx)(Eu,{textAlign:"center",children:(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:!n&&(0,Gt.jsxs)(Vp,{className:"notes-tour-step3",variant:"contained",onClick:t,disableElevation:!0,children:[(0,Gt.jsx)(oue.A,{}),r("rpm_AddNewNote")]})})})})]})})};function wwe(e){var t;let{editButton:n,deleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,fileUploadButton:c,fileModal:d,fileUploadIconButton:u,notesList:p,editableNoteId:h,downloadFile:m,setToggleAddNote:f,toggleAddNote:g,closeEditMode:v,editNote:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:w,onLocalFileDelete:_,onCloudFilesDelete:C,patientData:S,program:A,noteTypesDropdown:k}=e;const{t:M}=vg(),O=Nt(),{programId:T,patientId:E}=lo(),P=so(),D=[{name:M("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:M("rpm_AdminNotes"),url:""}],R=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],N=We.useRef(null),L=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),I=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},F=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,Gt.jsxs)(Gt.Fragment,{children:[!as(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>_(t),icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!as(null===d||void 0===d||null===(s=d.data)||void 0===s?void 0:s.files)&&(null===d||void 0===d||null===(l=d.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>C(null===d||void 0===d?void 0:d.data,null===e||void 0===e?void 0:e.id,t),icon:(0,Gt.jsx)(mbe.A,{}),onClick:()=>{m({noteId:h,file:e})},label:I(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},$=()=>{f(!g),h&&v()},B=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{color:"primary.theme.500",borderRadius:"0",textDecoration:"underline",height:"inherit"},"data-id":e.id,label:I(e.file_name),variant:"string",className:"attachment_btn",onClick:()=>{m({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,Gt.jsx)(Yx,{title:M("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:D};as(A)||as(S)||O(w_(e))},[A,S]),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,md:6,children:(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:M("rpm_Notes")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:M("rpm_Notes")})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,md:6,children:(0,Gt.jsxs)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[(0,Gt.jsx)(Vp,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>P("".concat(Lc.DOCTOR.PROGRAM,"/").concat(T,"/patients/").concat(E,"/notes/resolve-alerts")),children:M("rpm_NoteResolvedAlerts")}),k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{variant:"ADMIN"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>P("".concat(Lc.DOCTOR.PROGRAM,"/").concat(T,"/patients/").concat(E,"/notes/").concat(e.toLowerCase(),"-note")),children:M("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})}),!as(k.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center"},children:(0,Gt.jsxs)(Dw,{sx:k.nonExistingNoteTypes.includes("ADMIN")?{maxWidth:180,color:"white",backgroundColor:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("ADMIN")?"ADMIN":"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:M("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>P("".concat(Lc.DOCTOR.PROGRAM,"/").concat(T,"/patients/").concat(E,"/notes/").concat(e.toLowerCase(),"-note")),children:M("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})})]})})]})}),(0,Gt.jsx)(Eu,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,md:12,lg:9,xl:8,children:(0,Gt.jsx)(bwe,{fetchListFunction:y,filterState:j,setFilterState:w,pageDetails:b,showFilterColor:s,setShowFilterColor:l})})})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(Eu,{bgcolor:"white",p:2,children:[as(p)&&!g&&(0,Gt.jsx)(jwe,{handleToggleAddNote:$,showFilterColor:s}),!as(p)&&(0,Gt.jsx)(Gt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(Sbe.A,{}),onClick:$,color:"primary",sx:{fontWeight:"600",marginBottom:"10px"},children:M("rpm_AddNewNote")})}),g&&(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,validationSchema:vV.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,className:"EditorPageNotes",spacing:2,mb:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:5,children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(qj,{id:"vital",children:M("rpm_VitalType")}),(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:M("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:M("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:M("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_VitalType")})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:9,children:[(0,Gt.jsxs)(Eu,{className:" text-editor",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:L,formats:R,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:N}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_Note")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:$,sx:{marginRight:"10px"},children:M("rpm_Cancel")})," ",(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:M("rpm_Save")})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(F,{}),as(null===d||void 0===d||null===(t=d.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?c("upload",{}):u("upload",{})]})})})]})})}}),p.map(e=>{var t,i;return(0,Gt.jsx)(Gt.Fragment,{children:h!==e.id?(0,Gt.jsxs)(df,{container:!0,spacing:2,mb:2,children:[(0,Gt.jsx)(df,{item:!0,xs:11,children:(0,Gt.jsxs)(Eu,{sx:{bgcolor:"primary.theme.50",borderRadius:1,p:1},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:600,children:M("rpm_".concat(e.vital))}),(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all"},className:"savemode"}),(0,Gt.jsxs)(Ym,{variant:"body2",mb:.6,children:[(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},children:[M("rpm_Attachment"),":\xa0"]}),(0,Gt.jsx)(Eu,{component:"span",sx:{color:"primary.theme.500",fontWeight:"600",pl:"0"},children:(0,Gt.jsx)(B,{noteObj:e})})]}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px"},children:["Created by \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px"},children:["Last Updated by \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:1,children:(0,Gt.jsxs)(Eu,{sx:{margin:1},className:"BGbtnGrp",children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})})]}):(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,onSubmit:x,validationSchema:vV.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,className:"EditorPageNotes",mt:2,mb:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:5,children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(qj,{id:"vital",children:M("rpm_VitalType")}),(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:M("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:M("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:M("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_VitalType")})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:9,children:[(0,Gt.jsxs)(Eu,{className:" text-editor",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:L,formats:R,value:o.description,onChange:e=>a("description",e),ref:N}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_Note")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:v,sx:{marginRight:"10px"},children:M("rpm_Cancel")})," ",(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:M("rpm_Save")})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(F,{}),as(null===d||void 0===d||null===(n=d.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?c("upload",e):u("upload",e)]})})})]})})})}})})}),(0,Gt.jsx)(Eu,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,Gt.jsx)(IO,{pageDetails:b,fetchListFunction:y})})]})]})}wwe.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},fileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const _we=wwe;var Cwe=n(3);const Swe=MM({drawerHeader:{display:"flex",alignItems:"center","& .MuiSvgIcon-root":{color:"#7986cb"}},filterContent:{minHeight:"190px",paddingBottom:"60px",paddingTop:"6px",maxHeight:"400px","& .MuiInputBase-root":{textAlign:"left"},"& .MuiInputLabel-root":{transform:"translate(14px, 9px) scale(1)"},"& .MuiInputLabel-shrink":{transform:"translate(14px, -9px) scale(0.75)"},"& .MuiFormControl-root":{margin:"0px 0 15px 0"},"& .MuiInputBase-root.MuiOutlinedInput-root":{height:"40px"}},applyFilterBtn:{width:"calc(100% - 77px)"}});const Awe=function(e){let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,setShowFilterColor:a,filterVariant:s,filterName:l,mobileFilterBG:c}=e;const{t:d}=vg(),u=Swe(),[p,h]=We.useState(!1),m=()=>{h(e=>!e)};return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Iz,{initialValues:{vital:"",start_date:null,end_date:null},children:()=>(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{className:c?"mobileFiterButton prescription-tour-step0":"WhiteBG prescription-tour-step0",sx:{borderRadius:"8px"},position:"relative",children:[(0,Gt.jsxs)(Vp,{variant:s,onClick:m,sx:{marginLeft:"10px"},children:[(0,Gt.jsx)(Xxe.A,{}),l]}),(0,Gt.jsx)(Lf,{anchor:"bottom",open:p,onClose:m,transitionDuration:500,PaperProps:{sx:{borderRadius:"16px 16px 0 0"}},children:(0,Gt.jsxs)(Eu,{sx:{textAlign:"center"},children:[(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",px:"20px",py:1,mb:2,bgcolor:"#f2f2fe",color:"#7986cb",children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{display:"flex",alignItems:"center"},children:(0,Gt.jsxs)(Eu,{className:u.drawerHeader,children:[(0,Gt.jsx)(Xxe.A,{sx:{marginRight:"7px"}}),(0,Gt.jsx)(Ym,{color:"primary",variant:"h6",children:"Filters"})]})}),(0,Gt.jsx)(Kp,{onClick:m,children:(0,Gt.jsx)(Bw.A,{})})]}),(0,Gt.jsxs)(Eu,{px:2.5,className:u.filterContent,sx:{display:"flex",flexDirection:"column"},children:[(0,Gt.jsxs)(Xj,{fullWidth:!0,children:[(0,Gt.jsx)(qj,{id:"vital",children:d("rpm_VitalType")}),(0,Gt.jsx)(Hz,{as:Dw,sx:{borderRadius:2,bgcolor:"white"},fullWidth:!0,name:"vital",labelId:"vital",label:"vital type",variant:"outlined",size:"small",value:n.vital,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{vital:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:d("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:d("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Ym,{color:"primary",fontWeight:600,sx:{fontSize:14,marginBottom:"8px"},textAlign:"start",children:d("rpm_Duration")}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",justifyContent:"space-between",children:[(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),children:(0,Gt.jsxs)(TT,{dateAdapter:jI,children:[(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"From",name:"start_date",value:n.start_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),maxDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{start_date:e}))}}),(0,Gt.jsx)(Eu,{})]})}),(0,Gt.jsx)(Eu,{mx:.9,children:"-"}),(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"To",name:"end_date",value:n.end_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:n.start_date?new Date(n.start_date):void 0,maxDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{end_date:e}))}})})})]}),(0,Gt.jsxs)(Eu,{py:.5,display:"flex",alignItems:"center",width:"100%",position:"fixed",bottom:"0",left:"0",pl:"20px",borderTop:"1px solid #efefef",children:[(0,Gt.jsx)(Vp,{className:u.applyFilterBtn,variant:"contained",disableElevation:!0,disabled:""===n.vital&&null===n.start_date&&null===n.end_date,sx:{mt:1,mr:2,height:"40px"},onClick:()=>{o.current_page=1,t(n),""===n.vital&&null===n.start_date&&null===n.end_date||a(!0),m()},children:d("rpm_ApplyFilters")}),(0,Gt.jsx)(Vp,{variant:"outlined",disableElevation:!0,onClick:()=>{o.current_page=1,r({vital:"",start_date:null,end_date:null}),t({vital:"",start_date:null,end_date:null}),a(!1)},type:"reset",sx:{mt:1},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,Gt.jsx)(xxe.A,{fontSize:"small"})})]})]})]})})]})})})})},kwe=MM(()=>({filterSpace:{"& .MuiButtonBase-root":{padding:"3px 6px !Important",fontSize:"12px",svg:{height:"12px"}}},addnewBtn:{whiteSpace:"nowrap","& .MuiButton-startIcon":{marginRight:"0"}},titles:{fontSize:"14px !important",color:"#7986cb",fontWeight:"600 !important",letterSpacing:"0.02em"},attachment_btn:{backgroundColor:"transparent","& .MuiChip-label":{paddingLeft:"0"}}}));var Mwe=n(21338);function Owe(e){var t;let{MobileeditButton:n,MobiledeleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,MobilefileUploadButton:c,fileModal:d,fileUploadIconButton:u,notesList:p,editableNoteId:h,downloadFile:m,setToggleAddNote:f,toggleAddNote:g,closeEditMode:v,editNote:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:w,onLocalFileDelete:_,onCloudFilesDelete:C,patientData:S,program:A,noteTypesDropdown:k}=e;const M=kwe(),{t:O}=vg(),T=Nt(),{programId:E,patientId:P}=lo(),D=so(),[R,N]=(0,We.useState)(!1),L=e=>()=>{N(e)},I=[{name:O("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:O("rpm_AdminNotes"),url:""}],F=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],$=We.useRef(null),B=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),z=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},H=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,Gt.jsxs)(Gt.Fragment,{children:[!as(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>_(t),icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!as(null===d||void 0===d||null===(s=d.data)||void 0===s?void 0:s.files)&&(null===d||void 0===d||null===(l=d.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>C(null===d||void 0===d?void 0:d.data,null===e||void 0===e?void 0:e.id,t),icon:(0,Gt.jsx)(mbe.A,{}),onClick:()=>{m({noteId:h,file:e})},label:z(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},W=()=>{f(!g),h&&v()},V=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{color:"black",borderRadius:"0",textDecoration:"underline",height:"inherit",pl:"0 !important"},"data-id":e.id,label:z(e.file_name),variant:"string",className:M.attachment_btn,onClick:()=>{m({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,Gt.jsx)(Yx,{title:O("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:I};as(A)||as(S)||T(w_(e))},[A,S]),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{position:"absolute",top:"-45px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontSize:16,children:O("rpm_Notes")})}),(0,Gt.jsx)(Eu,{position:"absolute",top:"-50px",right:"0px",children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Kp,{onClick:L(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,Gt.jsx)(Cwe.A,{color:"primary",sx:{padding:"0"}})})})})]}),(0,Gt.jsx)(Lf,{anchor:"left",open:R,onClose:L(!1),children:(0,Gt.jsxs)("div",{style:{width:230},children:[(0,Gt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,Gt.jsx)(Ym,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:O("rpm_Notes")}),(0,Gt.jsx)(Kp,{onClick:L(!1),children:(0,Gt.jsx)(Bw.A,{})})]}),(0,Gt.jsx)(Eu,{sx:{padding:"10px"},children:(0,Gt.jsxs)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{fullWidth:!0,variant:"ADMIN"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>D("".concat(Lc.DOCTOR.PROGRAM,"/").concat(E,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})}),!as(k.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,Gt.jsxs)(Dw,{sx:k.nonExistingNoteTypes.includes("ADMIN")?{color:"primary.theme.500",fontWeight:"500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"13px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("ADMIN")?"ADMIN":"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:O("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>D("".concat(Lc.DOCTOR.PROGRAM,"/").concat(E,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})}),(0,Gt.jsx)(Vp,{fullWidth:!0,variant:"outlined",size:"small",disableElevation:!0,onClick:()=>D("".concat(Lc.DOCTOR.PROGRAM,"/").concat(E,"/patients/").concat(P,"/notes/resolve-alerts")),endIcon:(0,Gt.jsx)(Mwe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:O("rpm_NoteResolvedAlerts")})]})})]})})]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Awe,{fetchListFunction:y,filterState:j,setFilterState:w,pageDetails:b,showFilterColor:s,setShowFilterColor:l,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0})}),(0,Gt.jsx)(Eu,{children:!as(p)&&(0,Gt.jsx)(Gt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(Sbe.A,{}),onClick:W,color:"primary",sx:{fontWeight:"600",fontSize:"12px"},className:M.addnewBtn,children:O("rpm_AddNew")})})})]}),(0,Gt.jsxs)(Eu,{children:[as(p)&&!g&&(0,Gt.jsx)(Eu,{bgcolor:"white",className:"noDataAddedField",children:(0,Gt.jsx)(jwe,{handleToggleAddNote:W,showFilterColor:s})}),g&&(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,validationSchema:vV.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,Gt.jsxs)(Eu,{className:"vitalEdits",children:[(0,Gt.jsx)(Ym,{variant:"span",id:"vital",sx:{marginBottom:"5px"},children:O("rpm_VitalType")}),(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})})," "]}),(0,Gt.jsxs)(Eu,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:B,formats:F,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:$}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsx)(Eu,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(H,{}),as(null===d||void 0===d||null===(t=d.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?c("upload",{}):u("upload",{})]})})}),(0,Gt.jsxs)(Eu,{mt:2,display:"flex",children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:W,sx:{marginRight:"10px"},fullWidth:!0,children:O("rpm_Cancel")})," ",(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:O("rpm_Save")})]})]})})}}),p.map(e=>{var t,i;return(0,Gt.jsx)(Gt.Fragment,{children:h!==e.id?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{bgcolor:"white",borderRadius:"8px"},children:(0,Gt.jsxs)(Eu,{sx:{background:"#eaeaff",color:"#7986cb",fontWeight:"600",padding:"8px 16px",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:600,children:O("rpm_".concat(e.vital))}),(0,Gt.jsxs)(Eu,{className:M.actionButtons,children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})]})}),(0,Gt.jsxs)(Eu,{sx:{bgcolor:"white",borderRadius:"0 0 8px 8px ",p:"8px 16px",mb:"10px"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Description:"}),(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all",marginTop:"0"},className:"savemode"}),(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:[O("rpm_Attachment"),":"]}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsx)(Eu,{component:"span",sx:{color:"black",fontWeight:"600",pl:"0 !important"},className:"fileObjectName",children:(0,Gt.jsx)(V,{noteObj:e})})}),(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Created by:"}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.created_by,(0,Gt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})}),(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Last Updated by :"}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.updated_by||e.created_by,(0,Gt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})})]})]}):(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,onSubmit:x,validationSchema:vV.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,Gt.jsxs)(Eu,{className:"vitalEdits",children:[(0,Gt.jsx)(Ym,{variant:"span",id:"vital",sx:{marginBottom:"5px"},children:O("rpm_VitalType")}),(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:B,formats:F,value:o.description,onChange:e=>a("description",e),ref:$}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsx)(Eu,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(H,{}),as(null===d||void 0===d||null===(n=d.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?c("upload",e):u("upload",e)]})})}),(0,Gt.jsxs)(Eu,{mt:2,display:"flex",children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:v,sx:{marginRight:"10px"},fullWidth:!0,children:O("rpm_Cancel")})," ",(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:O("rpm_Save")})]})]})})})}})})})]})]})}Owe.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},MobilefileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const Twe=Owe;var Ewe=n(44314);const Pwe=["content"];const Dwe=function(e){var t;let{patientData:n,program:r}=e;const o=window.innerWidth,a=Nt(),s=Ct(Nd),{t:l}=vg(),[c,d]=(0,We.useState)("desc"),[u,p]=(0,We.useState)("updated_at"),[h,m]=We.useState(!1),[f,g]=(0,We.useState)([]),[v,x]=(0,We.useState)((0,i.A)({},Fc)),[y,b]=We.useState({open:!1,data:{}}),[j,w]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),_=e=>{b((0,i.A)((0,i.A)({},y),{},{open:!y.open,data:e}))},C=e=>{if(Array.isArray(e))return g(e.map(e=>e.toString()));const t=e.target.name;f.includes(t)?g(f.filter(e=>e!==t)):g(e=>[...e,t])},S=e=>(0,Gt.jsx)(Yx,{title:l("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),A={local:{files:[]},onCloud:{files:[]}},{programId:k,patientId:M}=lo(),[O,T]=We.useState({open:!1,data:{}}),[E,P]=(0,We.useState)((0,i.A)({},A)),[D,R]=We.useState([]),[N,L]=We.useState(""),[I,F]=(0,We.useState)(!1),[$,B]=(0,We.useState)({description:"",vital:""}),[z,H]=We.useState({vital:"",start_date:null,end_date:null}),W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z;try{const t={sort_by:u,sort_order:c},{data:n}=await a(vl(k,M,{type:"ADMIN"},(0,i.A)((0,i.A)({},v),t),e)),r=n||{},{content:o}=r,s=Ko(r,Pwe);R(o),x(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){console.log(t)}},V=function(e){const t=e.target.files;let n=(0,i.A)({},E.local);t&&Array.from(t).forEach(e=>{var t;return as(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?a(Zo({subTitle:"error:rpm_ImageSize",severity:$c})):(e.url=URL.createObjectURL(e),void n.files.push(e)):a(Zo({subTitle:"error:rpm_SameFileName",severity:$c}))}),P(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),T(e=>({open:!e.open,data:(0,i.A)((0,i.A)({},e.data),{},{local_files:(0,i.A)((0,i.A)({},E),{},{local:n})})})),e.target.value=""},U=function(e){let t=(0,i.A)({},E);t.local.files.splice(e,1),P(t)},q=async(e,t)=>{try{await a(_l(k,M,{noteId:e.id,fileId:t,type:"ADMIN"})),W(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);T((0,i.A)((0,i.A)({},O),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),a(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_FileDeleteFailed"),severity:$c}))}},G=()=>{let e=(0,i.A)({},E);e.local.files.splice(0,e.local.files.length),P(e),T({data:{},open:!1})},Y=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"ADMIN",upload:as(null===O||void 0===O||null===(n=O.data)||void 0===n?void 0:n.local_files)?[]:null===O||void 0===O||null===(r=O.data)||void 0===r?void 0:r.local_files};try{if(await a(xl(k,M,o)),v.current_page=1,W({vital:"",start_date:null,end_date:null}),F(!1),B({description:"",vital:""}),j.nonExistingNoteTypes.includes("ADMIN")){const{data:e}=await a(Cl(k,M));w({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})}W(),G(),a(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:Bc}))}catch(s){const e=ls(s,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_NoteCreatedFailed"),severity:$c}))}},Z=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={id:N,vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"ADMIN",upload:as(null===O||void 0===O||null===(n=O.data)||void 0===n?void 0:n.local_files)?[]:null===O||void 0===O||null===(r=O.data)||void 0===r?void 0:r.local_files};try{await a(bl(k,M,o)),X(),W(),G(),a(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:Bc}))}catch(s){const e=ls(s,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_NoteUpdateFailed"),severity:$c}))}},K=async e=>{try{var t;if(await a(jl(k,M,{noteId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id,type:"ADMIN"})),W(),b((0,i.A)((0,i.A)({},y),{},{open:!y.open})),1===D.length){const{data:e}=await a(Cl(k,M));w({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})}a(Zo({subTitle:"message:rpm_NoteDeleteSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_NoteDeleteFailed"),severity:$c}))}},X=()=>{L(""),B({description:"",vital:""}),T({open:!1,data:{}}),P((0,i.A)({},A))},Q=(e,t)=>(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsx)(Yx,{title:l("rpm_UploadMore"),component:"span",children:(0,Gt.jsxs)(Kp,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:V}),(0,Gt.jsx)(dbe.A,{fontSize:"small",sx:{width:16,height:16}})]})})}),J=async e=>{let{noteId:t,file:n}=e;try{await a(wl(k,M,{noteId:t,type:"ADMIN",fileData:n})),a(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(r){const e=ls(r,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_DownloadFileFailed"),severity:$c}))}};return We.useEffect(()=>{s&&W(),as(r)||as(n)||(async()=>{const{data:e}=await a(Cl(k,M));w({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})})()},[s,c,u,r,n]),We.useEffect(()=>{a(w_({activeMenuItem:"notes"}))},[]),as(r)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsx)(Gt.Fragment,{children:null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showNoteList?o>=575?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(_we,{order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:f,onCheck:C,isSelection:!1,nodata:fwe,showFilterColor:h,setShowFilterColor:m,notesList:D,fetchNoteList:W,pageDetails:v,editButton:e=>(0,Gt.jsx)(Yx,{title:l("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{L(e.id),F(!1),B({description:e.note,vital:e.vital}),P((0,i.A)({},A)),T((0,i.A)((0,i.A)({},O),{},{data:(0,i.A)({},e)}))},children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:S,deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>_(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:Y,editNote:Z,editableNoteId:N,closeEditMode:X,initialFormValues:$,toggleAddNote:I,setToggleAddNote:F,fileModal:O,fileUploadButton:()=>(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsxs)(Vp,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:V}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsxs)(Eu,{sx:{flex:1,pl:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},children:l("rpm_UploadReport")}),(0,Gt.jsx)(Ym,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})]})}),fileUploadIconButton:Q,downloadFile:J,filterState:z,setFilterState:H,onLocalFileDelete:U,onCloudFilesDelete:q,patientData:n,program:r,noteTypesDropdown:j}),(0,Gt.jsx)(PU,{openModal:y.open,onCloseModal:_,actionFunction:()=>K(y),dataName:y.data.title,options:{primaryText:l("message:rpm_DeleteTitle"),secondaryText:l("message:rpm_DeleteBodyText"),descText:l("message:rpm_DeleteSubText"),btn:{primaryText:l("rpm_Delete"),secondaryText:l("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Twe,{order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:f,onCheck:C,isSelection:!1,nodata:fwe,showFilterColor:h,setShowFilterColor:m,notesList:D,fetchNoteList:W,pageDetails:v,MobileeditButton:e=>(0,Gt.jsx)(Yx,{title:l("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{L(e.id),F(!1),B({description:e.note,vital:e.vital}),P((0,i.A)({},A)),T((0,i.A)((0,i.A)({},O),{},{data:(0,i.A)({},e)}))},sx:{padding:"0"},children:(0,Gt.jsx)(vwe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:S,MobiledeleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>_(e),children:(0,Gt.jsx)(Ewe.A,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:Y,editNote:Z,editableNoteId:N,closeEditMode:X,initialFormValues:$,toggleAddNote:I,setToggleAddNote:F,fileModal:O,MobilefileUploadButton:()=>(0,Gt.jsxs)("label",{htmlFor:"file",children:[(0,Gt.jsxs)(Vp,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"#eaeaff85",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},fullWidth:!0,children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:V}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsx)(Eu,{sx:{flex:1,pl:2},children:(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},fontSize:14,children:l("rpm_UploadReport")})})]})]}),(0,Gt.jsx)(Eu,{textAlign:"center",fontStyle:"italic",children:(0,Gt.jsx)(Ym,{variant:"caption",fontSize:8,children:".PDF, .PNG, .JPEG"})})]}),fileUploadIconButton:Q,downloadFile:J,filterState:z,setFilterState:H,onLocalFileDelete:U,onCloudFilesDelete:q,patientData:n,program:r,noteTypesDropdown:j}),(0,Gt.jsx)(Ebe,{openModal:y.open,onCloseModal:_,actionFunction:()=>K(y),dataName:y.data.title,options:{primaryText:l("message:rpm_DeleteTitle"),secondaryText:l("message:rpm_DeleteBodyText"),btn:{primaryText:l("rpm_Delete"),secondaryText:l("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,Gt.jsx)(__,{})})},Rwe=(0,Un.Ay)(rC)(()=>({["&.".concat(J_.head)]:{padding:"8px 16px",fontWeight:"600"}})),Nwe=We.forwardRef((e,t)=>{var n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T,E,P,D,R,N,L,I;const{patientId:F}=lo(),{t:$}=vg(),B=so(),z=Nt(),H=(null===e||void 0===e||null===(n=e.state)||void 0===n?void 0:n.doctor)||(null===e||void 0===e?void 0:e.doctor);let W=function(e){const{vital:t,medications_list:n,intervals:r,start_date:o,end_date:a,id:s,created_by:l,created_at:c}=e,d=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ts(r,zc):"",interval:null}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:e.image,start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:Uc,timing:t,frequency:e.frequency,comments:e.comments}});return(0,i.A)((0,i.A)({},e),{},{vital:t,presId:s,pres_start_date:o,pres_end_date:a,created_by:l,created_at:c,medicationList:d})}(null===e||void 0===e?void 0:e.state);const V=null===W||void 0===W||null===(r=W.advices)||void 0===r?void 0:r.join(", "),U=null===W||void 0===W||null===(o=W.tests)||void 0===o?void 0:o.join(", "),{years:q}=hs(null===(a=e.patientData)||void 0===a?void 0:a.birth_date),G=!!cs(null===W||void 0===W?void 0:W.diagnosis)||(null===W||void 0===W||null===(s=W.diagnosis)||void 0===s?void 0:s.every(e=>as(null===e||void 0===e?void 0:e.name))),Y=!!cs(null===W||void 0===W?void 0:W.complaints)||(null===W||void 0===W||null===(l=W.complaints)||void 0===l?void 0:l.every(e=>as(null===e||void 0===e?void 0:e.name))),Z=!!cs(null===W||void 0===W?void 0:W.advices)||(null===W||void 0===W||null===(c=W.advices)||void 0===c?void 0:c.every(e=>as(e))),K=!!cs(null===W||void 0===W?void 0:W.tests)||(null===W||void 0===W||null===(d=W.tests)||void 0===d?void 0:d.every(e=>as(e)));const X=[{name:$("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===e||void 0===e||null===(u=e.program)||void 0===u?void 0:u.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===e||void 0===e||null===(p=e.program)||void 0===p?void 0:p.code,"/patients")},{name:"".concat((null===e||void 0===e||null===(h=e.patientData)||void 0===h?void 0:h.first_name)||""," ").concat((null===e||void 0===e||null===(m=e.patientData)||void 0===m?void 0:m.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===e||void 0===e||null===(f=e.program)||void 0===f?void 0:f.code,"/patients/").concat(null===e||void 0===e||null===(g=e.patientData)||void 0===g?void 0:g.id,"/dashboard")},{name:$("rpm_consultation"),url:""}];return We.useEffect(()=>{const t={breadcrumb:X};as(null===e||void 0===e?void 0:e.program)||as(null===e||void 0===e?void 0:e.patientData)||z(w_(t))},[null===e||void 0===e?void 0:e.program,null===e||void 0===e?void 0:e.patientData]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{position:"relative",children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"40px",top:"-50px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:"View Consultation"})}),(0,Gt.jsxs)(Eu,{height:"100%",children:[(0,Gt.jsx)(Eu,{sx:{wordBreak:"break-all",mx:"auto",flexDirection:"column",height:"100%",display:"flex"},border:1,bgcolor:"white",borderColor:"grey.400",ref:t,height:"100%",children:(0,Gt.jsxs)(Eu,{className:"prescritionPaper",children:[(0,Gt.jsx)(Eu,{bgcolor:"customClr.bp",p:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,sm:12,md:3,xs:12,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Ym,{component:"h3",fontWeight:"bold",color:"white",children:["Dr. ",null===H||void 0===H?void 0:H.first_name," ",null===H||void 0===H?void 0:H.last_name]}),(0,Gt.jsxs)(Ym,{component:"h4",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:[" ",null===H||void 0===H||null===(v=H.attributes)||void 0===v?void 0:v.qualification]})]})}),(null===H||void 0===H||null===(x=H.attributes)||void 0===x?void 0:x.registration)&&(0,Gt.jsx)(df,{item:!0,xs:12,sm:12,md:3,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"400",color:"white",children:$("rpm_Registration")}),(0,Gt.jsx)(Ym,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:null!==H&&void 0!==H&&null!==(y=H.attributes)&&void 0!==y&&y.registration?" ".concat(null===H||void 0===H||null===(b=H.attributes)||void 0===b?void 0:b.registration):""})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:12,md:3,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"400",color:"white",children:$("rpm_MobileNumber")}),(0,Gt.jsx)(Ym,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:null!==H&&void 0!==H&&null!==(j=H.attributes)&&void 0!==j&&j.mobile?"".concat(null===H||void 0===H||null===(w=H.attributes)||void 0===w?void 0:w.mobile):""})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:12,md:3,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"400",color:"white",children:$("rpm_AddressInformation")}),(0,Gt.jsxs)(Ym,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:[null===e||void 0===e||null===(_=e.program)||void 0===_?void 0:_.address,(null===e||void 0===e||null===(C=e.program)||void 0===C?void 0:C.address)&&","," ",null===e||void 0===e||null===(S=e.program)||void 0===S?void 0:S.city,",",null===e||void 0===e||null===(A=e.program)||void 0===A?void 0:A.state]})]})})]})}),(0,Gt.jsxs)(df,{container:!0,spacing:1,p:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[(0,Gt.jsx)(Eu,{display:"flex",children:(0,Gt.jsx)(Ym,{component:"h4",fontSize:16,sx:{flex:"1"},fontWeight:"bold",children:(null===e||void 0===e||null===(k=e.patientData)||void 0===k?void 0:k.first_name)+" "+(null===e||void 0===e||null===(M=e.patientData)||void 0===M?void 0:M.last_name)})}),(0,Gt.jsx)(Eu,{display:"flex",children:(0,Gt.jsxs)(Ym,{component:"span",fontSize:14,sx:{flex:"1"},children:[$("rpm_AgeYears",{count:q})," ",(null===e||void 0===e||null===(O=e.patientData)||void 0===O||null===(T=O.profile)||void 0===T?void 0:T.gender)&&"/"," ",null===e||void 0===e||null===(E=e.patientData)||void 0===E||null===(P=E.profile)||void 0===P?void 0:P.gender]})})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsx)(Eu,{display:"flex",className:"viewMobileFont",children:(0,Gt.jsx)(Ym,{component:"h4",fontSize:16,sx:{flex:"1",textAlign:"end"},fontWeight:"bold",children:"".concat(sa()(null===W||void 0===W?void 0:W.created_at).format("DD MMM YYYY"))})})})]}),(0,Gt.jsx)(Af,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,Gt.jsxs)(df,{container:!0,spacing:1,p:2,children:[!Y&&(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[(0,Gt.jsx)(Eu,{display:"flex",children:(0,Gt.jsxs)(Ym,{component:"h4",fontSize:16,sx:{flex:"1"},fontWeight:"bold",children:[$("rpm_Symptoms"),":"]})}),(0,Gt.jsx)(Eu,{display:"flex",sx:{wordBreak:"break-word"},children:as(null===W||void 0===W?void 0:W.complaints)?"N/A":null===W||void 0===W||null===(D=W.complaints)||void 0===D?void 0:D.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})]}),!G&&(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[(0,Gt.jsx)(Eu,{display:"flex",children:(0,Gt.jsxs)(Ym,{component:"h4",fontSize:16,sx:{flex:"1",textAlign:"start"},fontWeight:"bold",children:[$("rpm_diagnosis"),":"]})}),(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",justifyContent:"start",sx:{wordBreak:"break-word"},children:as(null===W||void 0===W?void 0:W.diagnosis)?"N/A":null===W||void 0===W||null===(R=W.diagnosis)||void 0===R?void 0:R.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})]})]}),(!Y||!G)&&(0,Gt.jsx)(Af,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,Gt.jsx)(Eu,{p:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"bold",children:"Rx"})}),(0,Gt.jsx)(df,{item:!0,xs:12,pt:0,children:(0,Gt.jsx)(PC,{children:(0,Gt.jsxs)(kC,{"aria-label":"simple table",children:[(0,Gt.jsx)(cS,{sx:{backgroundColor:"#F3F3F9"},children:(0,Gt.jsxs)(K_,{children:[(0,Gt.jsx)(Rwe,{width:"120px",whiteSpace:"initial",children:(0,Gt.jsx)(Eu,{children:$("rpm_MedicineName")})}),(0,Gt.jsx)(Rwe,{children:$("rpm_Dosage")}),(0,Gt.jsx)(Rwe,{children:$("rpm_Duration&Time")}),(0,Gt.jsx)(Rwe,{children:$("rpm_Comments")})]})}),(0,Gt.jsx)(nS,{children:null===W||void 0===W||null===(N=W.medicationList)||void 0===N?void 0:N.map(e=>{var t;return(0,Gt.jsxs)(K_,{sx:{"td, &:last-child th":{border:0,borderBottom:1,borderColor:"grey.400"},td:{padding:"8px 16px"}},children:[(0,Gt.jsx)(rC,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"25%"},children:(0,Gt.jsxs)(Eu,{whiteSpace:"initial",children:[e.medicine," ",as(null===e||void 0===e?void 0:e.dose)||as(null===e||void 0===e?void 0:e.unit)?"":"- "+e.dose+" "+e.unit]})}),(0,Gt.jsx)(rC,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"20%"},children:(0,Gt.jsx)(Eu,{whiteSpace:"initial",children:null===(t=ud.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text})}),(0,Gt.jsx)(rC,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"25%"},children:(0,Gt.jsxs)(Eu,{whiteSpace:"initial",children:[(0,Gt.jsxs)("div",{children:[null===e||void 0===e?void 0:e.days," days"," ","(".concat(sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM")," - ").concat(sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM"),")")," "]}),e.timing.map((t,n)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)("span",{children:[t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"From":""," ",t.start_time," ",t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"onwards":"",n<e.timing.length-1&&", "]})},n))]})}),(0,Gt.jsx)(rC,{sx:{whiteSpace:"normal",wordBreak:"break-word",width:"30%"},children:(0,Gt.jsx)(Eu,{whiteSpace:"initial",children:e.comments||"NA"})})]},e.medicine)})})]})})})]})}),!Z&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{p:2,children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"600",children:$("rpm_GeneralAdvice")}),as(null===W||void 0===W?void 0:W.advices)?(0,Gt.jsx)(Ym,{variant:"body1",fontSize:14,children:"N/A"}):(0,Gt.jsx)(Ym,{variant:"body1",fontSize:14,children:V})]}),(0,Gt.jsx)(Af,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}})]}),!K&&(0,Gt.jsxs)(Eu,{p:2,className:"testRequired",children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"600",children:$("rpm_TestRequired")}),as(null===W||void 0===W?void 0:W.tests)?(0,Gt.jsx)(Ym,{variant:"body1",fontSize:14,children:"N/A"}):(0,Gt.jsx)(Ym,{variant:"body1",fontSize:14,children:U})]}),(null===W||void 0===W||null===(L=W.follow_up)||void 0===L?void 0:L.date)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Af,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,Gt.jsxs)(Eu,{p:2,children:[(0,Gt.jsx)(Ym,{variant:"h5",fontWeight:"600",fontSize:16,children:$("rpm_NextFollowUpDate")}),(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"500",color:"grey.400",children:sa()(null===W||void 0===W||null===(I=W.follow_up)||void 0===I?void 0:I.date).format("DD/MM/YYYY")})]})]})]})}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"start",mb:2,mt:2,children:[(0,Gt.jsx)(Vp,{variant:"outlined",type:"submit",disableElevation:!0,onClick:()=>B(-1),sx:{borderRadius:"4px",padding:"8px 16px"},children:$("rpm_Cancel")}),(0,Gt.jsx)(Vp,{variant:"contained",type:"submit",onClick:()=>{var t,n;B("/rpm/program/".concat(null===e||void 0===e||null===(t=e.program)||void 0===t?void 0:t.code,"/patients/").concat(null===e||void 0===e||null===(n=e.patientData)||void 0===n?void 0:n.id,"/consultations/edit-consultation/").concat(null===W||void 0===W?void 0:W.id))},disableElevation:!0,sx:{borderRadius:"4px",padding:"8px 16px",ml:2},children:$("rpm_Edit")}),(0,Gt.jsx)(Vp,{variant:"contained",type:"submit",onClick:()=>Ad(z,F,e.state.id),disableElevation:!0,sx:{borderRadius:"4px",padding:"8px 16px",ml:2},children:$("rpm_Print")})]})]})]})})});Nwe.displayName="ViewConsultation";const Lwe=Nwe,Iwe=MM(()=>({viewConsulation:{"& .MuiTypography-root":{fontSize:"12px",wordBreak:"break-word"}},labelFonts:{fontSize:"12px",color:"white"},MuiBoxPadding:{"& .MuiBox-root":{marginBottom:"5px"}},rxTemplate:{"& .MuiCardContent-root":{padding:"8px"},"& .MuiCardContent-root:last-child":{paddingBottom:"14px"}},textPrimary:{fontSize:"14px !important",color:"#3f51b5"},textSecondaryColor:{color:"#00000099",fontSize:"12px !important",marginLeft:"5px","& .MuiTypography-root":{fontSize:"12px !important"}},PrintIcon:{background:"#3f51b5 !important",padding:"8px !important",minWidth:"10px !important",marginLeft:"auto !important",borderRadius:"35px !important",boxShadow:"0px 0px 9px 0px #00000017 !important"}}));var Fwe=n(63709);const $we=We.forwardRef((e,t)=>{var n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T,E,P,D,R,N,L,I;const F=Iwe(),{patientId:$}=lo(),{t:B}=vg(),z=so(),H=Nt(),W=(null===e||void 0===e||null===(n=e.state)||void 0===n?void 0:n.doctor)||(null===e||void 0===e?void 0:e.doctor);let V=function(e){const{vital:t,medications_list:n,intervals:r,start_date:o,end_date:a,id:s,created_by:l,created_at:c}=e,d=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ts(r,zc):"",interval:null}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:e.image,start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:Uc,timing:t,frequency:e.frequency,comments:e.comments}});return(0,i.A)((0,i.A)({},e),{},{vital:t,presId:s,pres_start_date:o,pres_end_date:a,created_by:l,created_at:c,medicationList:d})}(null===e||void 0===e?void 0:e.state);const U=null===V||void 0===V||null===(r=V.advices)||void 0===r?void 0:r.join(", "),q=null===V||void 0===V||null===(o=V.tests)||void 0===o?void 0:o.join(", "),{years:G}=hs(null===(a=e.patientData)||void 0===a?void 0:a.birth_date),Y=!!cs(null===V||void 0===V?void 0:V.diagnosis)||(null===V||void 0===V||null===(s=V.diagnosis)||void 0===s?void 0:s.every(e=>as(null===e||void 0===e?void 0:e.name))),Z=!!cs(null===V||void 0===V?void 0:V.complaints)||(null===V||void 0===V||null===(l=V.complaints)||void 0===l?void 0:l.every(e=>as(null===e||void 0===e?void 0:e.name))),K=!!cs(null===V||void 0===V?void 0:V.advices)||(null===V||void 0===V||null===(c=V.advices)||void 0===c?void 0:c.every(e=>as(e))),X=!!cs(null===V||void 0===V?void 0:V.tests)||(null===V||void 0===V||null===(d=V.tests)||void 0===d?void 0:d.every(e=>as(e)));const Q=[{name:B("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===e||void 0===e||null===(u=e.program)||void 0===u?void 0:u.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===e||void 0===e||null===(p=e.program)||void 0===p?void 0:p.code,"/patients")},{name:"".concat((null===e||void 0===e||null===(h=e.patientData)||void 0===h?void 0:h.first_name)||""," ").concat((null===e||void 0===e||null===(m=e.patientData)||void 0===m?void 0:m.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===e||void 0===e||null===(f=e.program)||void 0===f?void 0:f.code,"/patients/").concat(null===e||void 0===e||null===(g=e.patientData)||void 0===g?void 0:g.id,"/dashboard")},{name:B("rpm_consultation"),url:""}];return We.useEffect(()=>{const t={breadcrumb:Q};as(null===e||void 0===e?void 0:e.program)||as(null===e||void 0===e?void 0:e.patientData)||H(w_(t))},[null===e||void 0===e?void 0:e.program,null===e||void 0===e?void 0:e.patientData]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{position:"relative",children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"38px",top:"-44px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontSize:16,children:"View Consultation"})}),(0,Gt.jsxs)(Eu,{height:"100%",className:F.viewConsulation,children:[(0,Gt.jsx)(Eu,{sx:{wordBreak:"break-all",mx:"auto",flexDirection:"column",height:"100%",display:"flex"},border:1,bgcolor:"white",borderColor:"grey.400",ref:t,height:"100%",children:(0,Gt.jsxs)(Eu,{className:"prescritionPaper",children:[(0,Gt.jsxs)(Eu,{bgcolor:"customClr.bp",p:2,className:F.MuiBoxPadding,children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Ym,{component:"h1",fontWeight:"bold",color:"white",children:["Dr. ",null===W||void 0===W?void 0:W.first_name," ",null===W||void 0===W?void 0:W.last_name]}),(0,Gt.jsx)("label",{className:F.labelFonts,children:null===W||void 0===W||null===(v=W.attributes)||void 0===v?void 0:v.qualification})]}),(0,Gt.jsx)(Eu,{children:(null===W||void 0===W||null===(x=W.attributes)||void 0===x?void 0:x.registration)&&(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"400",color:"white",children:B("rpm_Registration")}),(0,Gt.jsx)(Ym,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:null!==W&&void 0!==W&&null!==(y=W.attributes)&&void 0!==y&&y.registration?" ".concat(null===W||void 0===W||null===(b=W.attributes)||void 0===b?void 0:b.registration):""})]})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"400",color:"white",children:B("rpm_MobileNumber")}),(0,Gt.jsx)(Ym,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:null!==W&&void 0!==W&&null!==(j=W.attributes)&&void 0!==j&&j.mobile?"".concat(null===W||void 0===W||null===(w=W.attributes)||void 0===w?void 0:w.mobile):""})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"400",color:"white",children:B("rpm_AddressInformation")}),(0,Gt.jsxs)(Ym,{component:"h3",fontWeight:"bold",color:"white",sx:{wordBreak:"break-word"},children:[null===e||void 0===e||null===(_=e.program)||void 0===_?void 0:_.address,(null===e||void 0===e||null===(C=e.program)||void 0===C?void 0:C.address)&&","," ",null===e||void 0===e||null===(S=e.program)||void 0===S?void 0:S.city,",",null===e||void 0===e||null===(A=e.program)||void 0===A?void 0:A.state]})]})]}),(0,Gt.jsxs)(Eu,{sx:{padding:"8px 16px"},display:"flex",children:[(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{flex:"1"},children:[(0,Gt.jsx)(Ym,{component:"h4",fontWeight:"bold",sx:{wordBreak:"break-word"},children:(null===e||void 0===e||null===(k=e.patientData)||void 0===k?void 0:k.first_name)+" "+(null===e||void 0===e||null===(M=e.patientData)||void 0===M?void 0:M.last_name)}),(0,Gt.jsxs)(Ym,{component:"span",children:[B("rpm_AgeYears",{count:G})," ",(null===e||void 0===e||null===(O=e.patientData)||void 0===O||null===(T=O.profile)||void 0===T?void 0:T.gender)&&"/"," ",null===e||void 0===e||null===(E=e.patientData)||void 0===E||null===(P=E.profile)||void 0===P?void 0:P.gender]})]}),(0,Gt.jsx)(Ym,{component:"h4",sx:{textAlign:"end"},fontWeight:"bold",children:"".concat(sa()(null===V||void 0===V?void 0:V.created_at).format("DD MMM YYYY"))})]}),(0,Gt.jsx)(Af,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,Gt.jsxs)(df,{container:!0,spacing:1,p:2,children:[!Z&&(0,Gt.jsxs)(df,{item:!0,xs:6,pr:.5,children:[(0,Gt.jsx)(Eu,{display:"flex",children:(0,Gt.jsxs)(Ym,{component:"h4",sx:{flex:"1"},fontWeight:"bold",children:[B("rpm_Symptoms"),":"]})}),(0,Gt.jsx)(Eu,{display:"flex",sx:{wordBreak:"break-word"},children:(0,Gt.jsx)(Ym,{component:"span",children:as(null===V||void 0===V?void 0:V.complaints)?"N/A":null===V||void 0===V||null===(D=V.complaints)||void 0===D?void 0:D.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})})]}),!Y&&(0,Gt.jsxs)(df,{item:!0,xs:6,sx:{borderLeft:"1px solid #efefef",paddingLeft:"8px"},children:[(0,Gt.jsx)(Eu,{display:"flex",children:(0,Gt.jsxs)(Ym,{component:"h4",sx:{flex:"1",textAlign:"start"},fontWeight:"bold",children:[B("rpm_diagnosis"),":"]})}),(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",justifyContent:"start",sx:{wordBreak:"break-word"},children:(0,Gt.jsx)(Ym,{component:"span",children:as(null===V||void 0===V?void 0:V.diagnosis)?"N/A":null===V||void 0===V||null===(R=V.diagnosis)||void 0===R?void 0:R.map(e=>null===e||void 0===e?void 0:e.name).join(", ")})})]})]}),(!Z||!Y)&&(0,Gt.jsx)(Af,{sx:{borderColor:"# C6C8CD",borderWidth:"1px"}}),(0,Gt.jsxs)(Eu,{sx:{padding:"8px 16px"},className:F.rxTemplate,children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"bold",children:"Rx"}),null===V||void 0===V||null===(N=V.medicationList)||void 0===N?void 0:N.map(e=>{var t;return(0,Gt.jsx)(aH,{sx:{mt:1,marginBottom:1,display:"flex",flexDirection:"column",borderLeft:"4px solid #3f51b5"},children:(0,Gt.jsxs)(uH,{sx:{paddingBottom:"14px"},children:[(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:[(0,Gt.jsxs)(Ym,{fontWeight:"600",gutterBottom:!1,className:F.textPrimary,children:[e.medicine," ",as(null===e||void 0===e?void 0:e.dose)||as(null===e||void 0===e?void 0:e.unit)?"":"- "+e.dose+" "+e.unit]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",className:F.textSecondaryColor,children:["(",(0,Gt.jsx)(Ym,{variant:"body2",children:null===(t=ud.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text}),")"]})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",mt:1,children:[(0,Gt.jsx)(Ym,{variant:"body2",children:(0,Gt.jsxs)("strong",{children:[B("rpm_Duration&Time"),": "]})}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",flexWrap:"wrap",children:[(0,Gt.jsxs)(Ym,{variant:"body2",color:"textSecondary",children:[null===e||void 0===e?void 0:e.days," days"," ","(".concat(sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM")," - ").concat(sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM"),")")]}),(0,Gt.jsx)(Ym,{sx:{margin:"0 3px"},children:","}),e.timing.map((t,n)=>(0,Gt.jsxs)(Ym,{variant:"body2",color:"textSecondary",children:[t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"From":""," ",t.start_time," ",t.start_time&&"Intervals"===(null===t||void 0===t?void 0:t.repetition_kind)?"onwards":"",n<e.timing.length-1&&", "]},n))]})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",mt:1,children:[(0,Gt.jsx)(Ym,{variant:"body2",children:(0,Gt.jsxs)("strong",{children:[B("rpm_Comments"),": "]})}),(0,Gt.jsx)(Ym,{variant:"body2",color:"textSecondary",children:e.comments||"NA"})]})]})},e.medicine)})]}),!K&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Af,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px",mb:"10px"}}),(0,Gt.jsxs)(Eu,{sx:{padding:"0 8px 8px 16px"},children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"700",children:B("rpm_GeneralAdvice")}),as(null===V||void 0===V?void 0:V.advices)?(0,Gt.jsx)(Ym,{variant:"body1",children:"N/A"}):(0,Gt.jsx)(Ym,{variant:"body1",sx:{wordBreak:"break-word"},children:U})]})]}),!X&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Af,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,Gt.jsxs)(Eu,{sx:{padding:"8px 16px"},className:"testRequired",children:[(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"600",children:B("rpm_TestRequired")}),as(null===V||void 0===V?void 0:V.tests)?(0,Gt.jsx)(Ym,{variant:"body1",children:"N/A"}):(0,Gt.jsx)(Ym,{variant:"body1",children:q})]})]}),(null===V||void 0===V||null===(L=V.follow_up)||void 0===L?void 0:L.date)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Af,{sx:{borderColor:"# C6C8CD",borderWidth:"1px",mt:"5px"}}),(0,Gt.jsxs)(Eu,{sx:{padding:"8px 16px"},children:[(0,Gt.jsx)(Ym,{variant:"h5",fontWeight:"700",fontSize:16,children:B("rpm_NextFollowUpDate")}),(0,Gt.jsx)(Ym,{variant:"span",fontWeight:"500",color:"grey.400",children:sa()(null===V||void 0===V||null===(I=V.follow_up)||void 0===I?void 0:I.date).format("DD/MM/YYYY")})]})]})]})}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"start",mb:2,mt:2,children:[(0,Gt.jsx)(Vp,{variant:"outlined",type:"submit",disableElevation:!0,onClick:()=>z(-1),children:B("rpm_Cancel")}),(0,Gt.jsx)(Vp,{variant:"contained",type:"submit",onClick:()=>{var t,n;z("/rpm/program/".concat(null===e||void 0===e||null===(t=e.program)||void 0===t?void 0:t.code,"/patients/").concat(null===e||void 0===e||null===(n=e.patientData)||void 0===n?void 0:n.id,"/consultations/edit-consultation/").concat(null===V||void 0===V?void 0:V.id))},disableElevation:!0,sx:{marginLeft:"10px"},children:B("rpm_Edit")}),(0,Gt.jsx)(Vp,{className:F.PrintIcon,variant:"contained",type:"submit",onClick:()=>Ad(H,$,e.state.id),disableElevation:!0,children:(0,Gt.jsx)(Fwe.A,{})})]})]})]})})});$we.displayName="ViewConsultation";const Bwe=$we,zwe=e=>{let{patientData:t,program:n}=e;const r=window.innerWidth,o=Nt(),a=Ct(Nd),{programId:s,patientId:l,consultId:c}=lo(),[d,u]=We.useState([]),p=async(e,t,n)=>{try{const{data:r}=await o(kl(e,t,n)),a=await function(e){var t,n,r,o,a;const{vital:s,medications_list:l,intervals:c,start_date:d,end_date:u,id:p,created_by:h,name:m,days:f}=e,g=null===l||void 0===l?void 0:l.map(e=>{const t=function(e,t){if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null}(e.image,"".concat(e.medicine,".jpg")),n=[],r=c.some(t=>{var n;return(null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id))&&null===t.start_time});if(e.frequency>=1&&e.frequency<=4&&r)for(let i=0;i<e.frequency;i++)n.push({start_time:null,interval:null});else c.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).forEach(e=>{let{id:t,start_time:r,stop_after:i}=e;n.push({id:t,start_time:r?Ts(r,Hc):null,interval:i})});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:t,start_date:sa()(new Date).valueOf(),days:m?f:null,end_date:m?ns(sa()(new Date).valueOf(),f):null,repetition_kind:e.frequency>4?qc:Uc,timing:n,frequency:e.frequency,comments:e.comments}});return(0,i.A)((0,i.A)({},e),{},{followUpDays:null===e||void 0===e||null===(t=e.follow_up)||void 0===t?void 0:t.days,followUpDate:null===e||void 0===e||null===(n=e.follow_up)||void 0===n?void 0:n.date,followUpReminder:null===e||void 0===e||null===(r=e.follow_up)||void 0===r?void 0:r.send_reminder_flag,followUpReminderDate:null===e||void 0===e||null===(o=e.follow_up)||void 0===o?void 0:o.follow_up_reminder_date,followUpTime:Ts(null===e||void 0===e||null===(a=e.follow_up)||void 0===a?void 0:a.reminder_time,Hc),complaintDetails:null===e||void 0===e?void 0:e.complaints,vital:s,presId:p,pres_start_date:d,pres_end_date:u,created_by:h,medicationList:g})}(r),s=null!==a&&void 0!==a&&a.dummy?xd:await(async e=>{try{const{data:t}=await o(Fg(e));return t}catch(t){console.log(t)}})(null===a||void 0===a?void 0:a.doctor_id);u((0,i.A)((0,i.A)({},a),{},{doctor:s}))}catch(r){console.log(r)}};return We.useEffect(()=>{if(!as(t)&&!as(n)){o(w_({activeMenuItem:"consultations"}))}},[t,n]),We.useEffect(()=>{!a||as(t)||as(n)||p(s,l,c)},[a,t,n]),(0,Gt.jsx)("div",{children:r>=575?(0,Gt.jsx)(Lwe,{patientData:t,program:n,state:d}):(0,Gt.jsx)(Bwe,{patientData:t,program:n,state:d})})};function Hwe(e){var t;let{editButton:n,deleteButton:r,viewButton:i,notesList:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,editNote:c,editableNoteId:d,closeEditMode:u,initialFormValues:p,toggleAddNote:h,setToggleAddNote:m,fileModal:f,fileUploadButton:g,fileUploadIconButton:v,downloadFile:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:w,onLocalFileDelete:_,onCloudFilesDelete:C,patientData:S,program:A,noteTypesDropdown:k}=e;const M=window.innerWidth,{t:O}=vg(),T=Nt(),E=so(),{programId:P,patientId:D}=lo(),R=Ct(qd),[N,L]=We.useState(""),I=!("true"===ls(R,"user_principal.attributes.skip_tour[0]","")),F=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),$=We.useRef(null),B=[{name:O("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:O("rpm_DoctorNotes"),url:""}],z=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],H=()=>{m(!h),d&&u()},W=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2),s=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,Gt.jsxs)(Gt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{color:"primary.theme.500",borderRadius:"0",textDecoration:"underline",height:"inherit"},"data-id":e.id,label:s(e.file_name),variant:"string",className:"attachment_btn",onClick:()=>{x({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,Gt.jsx)(Yx,{title:O("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})},V=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},U=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,Gt.jsxs)(Gt.Fragment,{children:[!as(null===f||void 0===f||null===(e=f.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===f||void 0===f||null===(r=f.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>_(t),icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!as(null===f||void 0===f||null===(s=f.data)||void 0===s?void 0:s.files)&&(null===f||void 0===f||null===(l=f.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>C(null===f||void 0===f?void 0:f.data,null===e||void 0===e?void 0:e.id,t),icon:(0,Gt.jsx)(mbe.A,{}),onClick:()=>{x({noteId:d,file:e})},label:V(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})};return We.useEffect(()=>{const e={breadcrumb:B};as(A)||as(S)||T(w_(e))},[A,S]),(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:O("rpm_Notes")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:O("rpm_Notes")})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[(0,Gt.jsx)(Vp,{className:"notes-tour-step2",variant:"outlined",size:"small",disableElevation:!0,onClick:()=>E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(P,"/patients/").concat(D,"/notes/resolve-alerts")),children:O("rpm_NoteResolvedAlerts")}),k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{variant:"DOCTOR"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(P,"/patients/").concat(D,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})}),!as(k.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center"},children:(0,Gt.jsxs)(Dw,{className:"notes-tour-step1",sx:k.nonExistingNoteTypes.includes("DOCTOR")?{maxWidth:180,color:"white",backgroundColor:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",backgroundColor:"transparent",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("DOCTOR")?"DOCTOR":"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:O("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(P,"/patients/").concat(D,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})})]})})]}),(0,Gt.jsx)(Eu,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,md:12,lg:9,xl:8,className:"notes-tour-step0",children:M>=575?(0,Gt.jsx)(bwe,{fetchListFunction:y,filterState:j,setFilterState:w,pageDetails:b,showFilterColor:s,setShowFilterColor:l}):(0,Gt.jsx)(Awe,{fetchListFunction:y,filterState:j,setFilterState:w,pageDetails:b,showFilterColor:s,setShowFilterColor:l,filterVariant:"contained",filterName:"Filters",mobileFilterBG:!1})})})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(Eu,{bgcolor:"white",p:2,children:[as(o)&&!h&&(0,Gt.jsx)(jwe,{handleToggleAddNote:H,showFilterColor:s}),!as(o)&&(0,Gt.jsx)(Gt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreatePrescriptionNoteList_showCreateNoteList)&&(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(Sbe.A,{}),onClick:H,color:"primary",sx:{fontWeight:"600",marginBottom:"10px"},children:O("rpm_AddNewNote")})}),h&&(0,Gt.jsx)(Iz,{initialValues:p,enableReinitialize:!0,validationSchema:vV.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,className:"EditorPageNotes note-quill-contianer",spacing:2,mb:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:5,children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(qj,{id:"vital",children:O("rpm_VitalType")}),(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:9,children:[(0,Gt.jsxs)(Eu,{className:" text-editor",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:F,formats:z,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:$}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",onClick:H,sx:{marginRight:1},children:O("rpm_Cancel")}),(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,type:"submit",children:O("rpm_Save")})," "]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(U,{}),as(null===f||void 0===f||null===(t=f.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?g("upload",{}):v("upload",{})]})})})]})})}}),o.map(e=>{var t,i;return(0,Gt.jsx)(Gt.Fragment,{children:d!==e.id?(0,Gt.jsxs)(df,{container:!0,spacing:2,mb:2,children:[(0,Gt.jsx)(df,{item:!0,xs:11,children:(0,Gt.jsxs)(Eu,{sx:{bgcolor:"primary.theme.50",borderRadius:1,p:1},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:600,children:O("rpm_".concat(e.vital))}),(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all"},className:"savemode"}),(0,Gt.jsxs)(Ym,{variant:"body2",mb:.6,children:[(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},children:[O("rpm_Attachment"),":\xa0"]}),(0,Gt.jsx)(Eu,{component:"span",sx:{color:"primary.theme.500",fontWeight:"600",pl:"0"},children:(0,Gt.jsx)(W,{noteObj:e})})]}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px"},children:["Created by \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px"},children:["Last Updated by \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:1,children:(0,Gt.jsxs)(Eu,{sx:{margin:1},className:"BGbtnGrp",children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditPrescriptionNote_showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeletePrescriptionList_showDeleteList)&&r({id:e.id})]})})]}):(0,Gt.jsx)(Iz,{initialValues:p,enableReinitialize:!0,onSubmit:c,validationSchema:vV.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,className:"EditorPageNotes note-quill-contianer",mt:1,mb:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:5,children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(qj,{id:"vital",children:O("rpm_VitalType")}),(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:9,children:[(0,Gt.jsxs)(Eu,{className:" text-editor",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:F,formats:z,value:o.description,onChange:e=>a("description",e),ref:$}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:u,sx:{marginRight:"10px"},children:O("rpm_Cancel")}),(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:O("rpm_Save")})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(U,{}),as(null===f||void 0===f||null===(n=f.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?g("upload",e):v("upload",e)]})})})]})})}})})}),(0,Gt.jsx)(Eu,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,Gt.jsx)(IO,{pageDetails:b,fetchListFunction:y})})]}),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:I,path:"notesTour",setRenderer:L}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:N})]})]})}Hwe.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",notesList:[],otherResolvedAlertList:[],resolvedAlertList:[],addNewNote:()=>{},editNote:()=>{},editableNoteId:"",closeEditMode:()=>{},initialFormValues:{},toggleAddNote:!1,setToggleAddNote:()=>{},showFilterColor:{},setShowFilterColor:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{}};const Wwe=Hwe;function Vwe(e){var t;let{MobileeditButton:n,MobiledeleteButton:r,viewButton:i,notesList:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,editNote:c,editableNoteId:d,closeEditMode:u,initialFormValues:p,toggleAddNote:h,setToggleAddNote:m,fileModal:f,MobilefileUploadButton:g,fileUploadIconButton:v,downloadFile:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:w,onLocalFileDelete:_,onCloudFilesDelete:C,patientData:S,program:A,noteTypesDropdown:k}=e;const M=kwe(),{t:O}=vg(),T=Nt(),E=so(),{programId:P,patientId:D}=lo(),[R,N]=(0,We.useState)(!1),L=e=>()=>{N(e)},I=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),F=We.useRef(null),$=[{name:O("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:O("rpm_DoctorNotes"),url:""}],B=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],z=()=>{m(!h),d&&u()},H=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2),s=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,Gt.jsxs)(Gt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{color:"black",borderRadius:"0",textDecoration:"underline",height:"inherit",pl:"0"},"data-id":e.id,label:s(e.file_name),variant:"string",className:M.attachment_btn,onClick:()=>{x({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,Gt.jsx)(Yx,{title:O("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})},W=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},V=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,Gt.jsxs)(Gt.Fragment,{children:[!as(null===f||void 0===f||null===(e=f.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===f||void 0===f||null===(r=f.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>_(t),icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!as(null===f||void 0===f||null===(s=f.data)||void 0===s?void 0:s.files)&&(null===f||void 0===f||null===(l=f.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>C(null===f||void 0===f?void 0:f.data,null===e||void 0===e?void 0:e.id,t),icon:(0,Gt.jsx)(mbe.A,{}),onClick:()=>{x({noteId:d,file:e})},label:W(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})};return We.useEffect(()=>{const e={breadcrumb:$};as(A)||as(S)||T(w_(e))},[A,S]),(0,Gt.jsxs)(Eu,{sx:{width:"100%"},position:"relative",children:[(0,Gt.jsx)(Eu,{position:"absolute",top:"-45px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontSize:16,children:O("rpm_Notes")})}),(0,Gt.jsx)(Eu,{position:"absolute",top:"-50px",right:"0px",children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Kp,{onClick:L(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,Gt.jsx)(Cwe.A,{color:"primary",sx:{padding:"0"}})})})}),(0,Gt.jsx)(Lf,{anchor:"left",open:R,onClose:L(!1),children:(0,Gt.jsxs)("div",{style:{width:230},children:[(0,Gt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,Gt.jsx)(Ym,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:O("rpm_Notes")}),(0,Gt.jsx)(Kp,{onClick:L(!1),children:(0,Gt.jsx)(Bw.A,{})})]}),(0,Gt.jsxs)(Eu,{sx:{padding:"10px"},children:[(0,Gt.jsx)(Eu,{children:!as(k.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,Gt.jsxs)(Dw,{sx:k.nonExistingNoteTypes.includes("DOCTOR")?{color:"primary.theme.500",fontWeight:"500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",mb:"10px",fontSize:"13px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",backgroundColor:"transparent",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("DOCTOR")?"DOCTOR":"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:O("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(P,"/patients/").concat(D,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Vp,{variant:"outlined",size:"small",disableElevation:!0,fullWidth:!0,onClick:()=>E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(P,"/patients/").concat(D,"/notes/resolve-alerts")),endIcon:(0,Gt.jsx)(Mwe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:O("rpm_NoteResolvedAlerts")}),k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{variant:"DOCTOR"===e?"contained":"outlined",size:"small",disableElevation:!0,fullWidth:!0,onClick:()=>E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(P,"/patients/").concat(D,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})})]})]})]})}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Awe,{fetchListFunction:y,filterState:j,setFilterState:w,pageDetails:b,showFilterColor:s,setShowFilterColor:l,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0})}),(0,Gt.jsx)(Eu,{children:!as(o)&&(0,Gt.jsx)(Gt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreatePrescriptionNoteList_showCreateNoteList)&&(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(Sbe.A,{}),onClick:z,color:"primary",sx:{fontWeight:"600",fontSize:"12px"},className:M.addnewBtn,children:O("rpm_AddNew")})})})]}),as(o)&&!h&&(0,Gt.jsx)(Eu,{bgcolor:"white",className:"noDataAddedField",children:(0,Gt.jsx)(jwe,{handleToggleAddNote:z,showFilterColor:s})}),(0,Gt.jsxs)(Eu,{children:[h&&(0,Gt.jsx)(Iz,{initialValues:p,enableReinitialize:!0,validationSchema:vV.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,Gt.jsxs)(Eu,{className:"vitalEdits",children:[(0,Gt.jsx)(Ym,{variant:"span",sx:{marginBottom:"5px"},children:"Vital Type"}),(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},sx:{marginTop:"15px"},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:I,formats:B,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:F}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsx)(Eu,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(V,{}),as(null===f||void 0===f||null===(t=f.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?g("upload",{}):v("upload",{})]})})}),(0,Gt.jsxs)(Eu,{mt:2,display:"flex",children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",onClick:z,sx:{marginRight:1},fullWidth:!0,children:O("rpm_Cancel")}),(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,type:"submit",fullWidth:!0,children:O("rpm_Save")})," "]})]})})}}),o.map(e=>{var t,i;return(0,Gt.jsx)(Gt.Fragment,{children:d!==e.id?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{sx:{bgcolor:"white",borderRadius:"8px",marginBottom:"10px"},children:[(0,Gt.jsxs)(Eu,{sx:{background:"#eaeaff",color:"#7986cb",fontWeight:"600",padding:"8px 16px",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:600,children:O("rpm_".concat(e.vital))}),(0,Gt.jsxs)(Eu,{className:M.actionButtons,children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditPrescriptionNote_showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeletePrescriptionList_showDeleteList)&&r({id:e.id})]})]}),(0,Gt.jsxs)(Eu,{sx:{padding:"8px 16px"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Description:"}),(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-word"},className:"savemode"}),(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:[O("rpm_Attachment"),":"]}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsx)(Eu,{component:"span",sx:{color:"black",fontWeight:"600",pl:"0 !important"},className:"fileObjectName",children:(0,Gt.jsx)(H,{noteObj:e})})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Created by:"}),(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px",marginBottom:"5px"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Last Updated by:"}),(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})]})}):(0,Gt.jsx)(Iz,{initialValues:p,enableReinitialize:!0,onSubmit:c,validationSchema:vV.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:[(0,Gt.jsx)(qj,{id:"vital",children:O("rpm_VitalType")}),(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})}),(0,Gt.jsxs)(Eu,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:I,formats:B,value:o.description,onChange:e=>a("description",e),ref:F}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsx)(Eu,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(V,{}),as(null===f||void 0===f||null===(n=f.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?g("upload",e):v("upload",e)]})})}),(0,Gt.jsxs)(Eu,{mt:2,display:"flex",children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:u,sx:{marginRight:"10px"},fullWidth:!0,children:O("rpm_Cancel")}),(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:O("rpm_Save")})]})]})})}})})})]})]})}Vwe.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",notesList:[],otherResolvedAlertList:[],resolvedAlertList:[],addNewNote:()=>{},editNote:()=>{},editableNoteId:"",closeEditMode:()=>{},initialFormValues:{},toggleAddNote:!1,setToggleAddNote:()=>{},showFilterColor:{},setShowFilterColor:()=>{},fileModal:{},MobilefileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{}};const Uwe=Vwe,qwe=["content"];const Gwe=function(e){var t;let{patientData:n,program:r}=e;const o={local:{files:[]},onCloud:{files:[]}},a=window.innerWidth,s=Nt(),l=Ct(Nd),{t:c}=vg(),{programId:d,patientId:u}=lo(),[p,h]=(0,We.useState)("desc"),[m,f]=(0,We.useState)("created_at"),[g,v]=(0,We.useState)((0,i.A)({},o)),[x,y]=(0,We.useState)({description:"",vital:""}),[b,j]=We.useState(!1),[w,_]=(0,We.useState)([]),[C,S]=(0,We.useState)(!1),[A,k]=We.useState([]),[M,O]=We.useState({open:!1,data:{}}),[T,E]=We.useState(""),[P,D]=(0,We.useState)((0,i.A)({},Fc)),[R,N]=We.useState({vital:"",start_date:null,end_date:null}),[L,I]=We.useState({open:!1,data:{}}),[F,$]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),B=e=>{I((0,i.A)((0,i.A)({},L),{},{open:!L.open,data:e}))},z=e=>{if(Array.isArray(e))return _(e.map(e=>e.toString()));const t=e.target.name;w.includes(t)?_(w.filter(e=>e!==t)):_(e=>[...e,t])},H=()=>{let e=(0,i.A)({},g);e.local.files.splice(0,e.local.files.length),v(e),O({data:{},open:!1})},W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R;try{const t={sort_by:m,sort_order:p},{data:n}=await s(vl(d,u,{type:"DOCTOR"},(0,i.A)((0,i.A)({},P),t),e)),r=n||{},{content:o}=r,a=Ko(r,qwe);k(o),D(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total,sort_by:m,sort_order:p}))}catch(t){console.log(t)}},V=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"DOCTOR",upload:as(null===M||void 0===M||null===(n=M.data)||void 0===n?void 0:n.local_files)?[]:null===M||void 0===M||null===(r=M.data)||void 0===r?void 0:r.local_files};try{if(await s(xl(d,u,o)),P.current_page=1,W({vital:"",start_date:null,end_date:null}),S(!1),y({description:"",vital:""}),F.nonExistingNoteTypes.includes("DOCTOR")){const{data:e}=await s(Cl(d,u));$({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})}W(),H(),s(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:Bc}))}catch(a){const e=ls(a,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_NoteCreatedFailed"),severity:$c}))}},U=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={id:T,vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"DOCTOR",upload:as(null===M||void 0===M||null===(n=M.data)||void 0===n?void 0:n.local_files)?[]:null===M||void 0===M||null===(r=M.data)||void 0===r?void 0:r.local_files};try{await s(bl(d,u,o)),G(),W(),H(),s(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:Bc}))}catch(a){const e=ls(a,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_NoteUpdateFailed"),severity:$c}))}},q=async e=>{try{var t;if(await s(jl(d,u,{noteId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id,type:"DOCTOR"})),W(),I((0,i.A)((0,i.A)({},L),{},{open:!L.open})),1===A.length){const{data:e}=await s(Cl(d,u));$({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})}s(Zo({subTitle:"message:rpm_NoteDeleteSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_NoteDeleteFailed"),severity:$c}))}},G=()=>{E(""),y({description:"",vital:""}),O({open:!1,data:{}}),v((0,i.A)({},o))},Y=e=>(0,Gt.jsx)(Yx,{title:c("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),Z=async e=>{let{noteId:t,file:n}=e;try{await s(wl(d,u,{noteId:t,type:"DOCTOR",fileData:n})),s(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(r){const e=ls(r,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_DownloadFileFailed"),severity:$c}))}},K=function(e){const t=e.target.files;let n=(0,i.A)({},g.local);t&&Array.from(t).forEach(e=>{var t;return as(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?s(Zo({subTitle:"error:rpm_ImageSize",severity:$c})):(e.url=URL.createObjectURL(e),void n.files.push(e)):s(Zo({subTitle:"error:rpm_SameFileName",severity:$c}))}),v(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),O(e=>({open:!e.open,data:(0,i.A)((0,i.A)({},e.data),{},{local_files:(0,i.A)((0,i.A)({},g),{},{local:n})})})),e.target.value=""},X=(e,t)=>(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsx)(Yx,{title:c("rpm_UploadMore"),component:"span",children:(0,Gt.jsxs)(Kp,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:K}),(0,Gt.jsx)(dbe.A,{fontSize:"small",sx:{width:16,height:16}})]})})}),Q=function(e){let t=(0,i.A)({},g);t.local.files.splice(e,1),v(t)},J=async(e,t)=>{try{await s(_l(d,u,{noteId:e.id,fileId:t,type:"DOCTOR"})),W(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);O((0,i.A)((0,i.A)({},M),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),s(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_FileDeleteFailed"),severity:$c}))}};return We.useEffect(()=>{l&&W(),as(r)||as(n)||(async()=>{const{data:e}=await s(Cl(d,u));$({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})})()},[l,p,m,r,n]),We.useEffect(()=>{s(w_({activeMenuItem:"notes"}))},[]),as(r)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsx)(Gt.Fragment,{children:null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showPrescriptionNoteList_showNoteList?a>=575?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Wwe,{order:p,orderBy:m,setOrder:h,setOrderBy:f,dataParameter:"id",checkState:w,onCheck:z,isSelection:!1,nodata:fwe,showFilterColor:b,setShowFilterColor:j,notesList:A,fetchNoteList:W,pageDetails:P,editButton:e=>(0,Gt.jsx)(Yx,{title:c("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{E(e.id),S(!1),y({description:e.note,vital:e.vital}),v((0,i.A)({},o)),O((0,i.A)((0,i.A)({},M),{},{data:(0,i.A)({},e)}))},children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:Y,deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>B(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:V,editNote:U,editableNoteId:T,closeEditMode:G,initialFormValues:x,toggleAddNote:C,setToggleAddNote:S,fileModal:M,fileUploadButton:()=>(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsxs)(Vp,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:K}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsxs)(Eu,{sx:{flex:1,pl:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},children:c("rpm_UploadReport")}),(0,Gt.jsx)(Ym,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})]})}),fileUploadIconButton:X,downloadFile:Z,filterState:R,setFilterState:N,onLocalFileDelete:Q,onCloudFilesDelete:J,patientData:n,program:r,noteTypesDropdown:F}),(0,Gt.jsx)(PU,{openModal:L.open,onCloseModal:B,actionFunction:()=>q(L),dataName:L.data.title,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),descText:c("message:rpm_DeleteSubText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Uwe,{order:p,orderBy:m,setOrder:h,setOrderBy:f,dataParameter:"id",checkState:w,onCheck:z,isSelection:!1,nodata:fwe,showFilterColor:b,setShowFilterColor:j,notesList:A,fetchNoteList:W,pageDetails:P,MobileeditButton:e=>(0,Gt.jsx)(Yx,{title:c("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{E(e.id),S(!1),y({description:e.note,vital:e.vital}),v((0,i.A)({},o)),O((0,i.A)((0,i.A)({},M),{},{data:(0,i.A)({},e)}))},sx:{padding:"0"},children:(0,Gt.jsx)(vwe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:Y,MobiledeleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>B(e),sx:{padding:"0",ml:"10px"},children:(0,Gt.jsx)(Ewe.A,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:V,editNote:U,editableNoteId:T,closeEditMode:G,initialFormValues:x,toggleAddNote:C,setToggleAddNote:S,fileModal:M,MobilefileUploadButton:()=>(0,Gt.jsxs)("label",{htmlFor:"file",children:[(0,Gt.jsxs)(Vp,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"#eaeaff85",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},fullWidth:!0,children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:K}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsx)(Eu,{sx:{flex:1,pl:2},children:(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},fontSize:14,children:c("rpm_UploadReport")})})]})]}),(0,Gt.jsx)(Eu,{textAlign:"center",fontStyle:"italic",children:(0,Gt.jsx)(Ym,{variant:"caption",fontSize:8,children:".PDF, .PNG, .JPEG"})})]}),fileUploadIconButton:X,downloadFile:Z,filterState:R,setFilterState:N,onLocalFileDelete:Q,onCloudFilesDelete:J,patientData:n,program:r,noteTypesDropdown:F}),(0,Gt.jsx)(Ebe,{openModal:L.open,onCloseModal:B,actionFunction:()=>q(L),dataName:L.data.title,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,Gt.jsx)(__,{})})},Ywe=["children","onClose"],Zwe=e=>{const{children:t,onClose:n}=e,r=Ko(e,Ywe);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))},Kwe=[],Xwe=e=>{let{isModalOpen:t,toggleProgramModal:n}=e;return(0,Gt.jsx)(Kw,{fullWidth:!0,maxWidth:"sm",open:t,onClose:n,children:(0,Gt.jsx)(Iz,{onSubmit:function(){},enableReinitialize:!0,children:()=>(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Zwe,{sx:{px:4},onClose:n,children:we("rpm_AddMedicine")}),(0,Gt.jsx)(s_,{sx:{p:4,pt:2},dividers:!0,children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Medication")}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Form")}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineFormHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:pd.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Shape&Color")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{display:"flex",gap:1,children:[(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,variant:"outlined",className:"shapeDropDown",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineIconHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,variant:"outlined",MenuProps:{className:"horizontalList"},children:fd.map(e=>(0,Gt.jsx)($m,{value:e.color,children:(0,Gt.jsx)(Eu,{display:"flex",gap:1,children:(0,Gt.jsx)(Ym,{variant:"span",className:"circleIcon ".concat(e.color)})})},e.key))})]}),(0,Gt.jsx)(Eu,{children:cs(null===Kwe||void 0===Kwe?void 0:Kwe.image)?(0,Gt.jsxs)(Eu,{className:"upload-input-text",children:[(0,Gt.jsx)("input",{type:"file"}),(0,Gt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:we("uploadImage")}),(0,Gt.jsx)(Eu,{clone:!0,mr:1,color:"primary",children:(0,Gt.jsx)(sue,{width:22,height:22})})]})]}):(0,Gt.jsxs)(Eu,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden"}),(0,Gt.jsx)(Eu,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,Gt.jsx)(Kp,{size:"small",color:"error","aria-label":"remove file",children:(0,Gt.jsx)(Ql,{width:22,height:22})})})]})})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Strength")}),(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Hz,{as:Rj,type:"number",size:"small",fullWidth:!0,onWheel:e=>e.target.blur(),onKeyDown:e=>{ld.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px"}}),(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0"},className:"customListSelect",children:md.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[we("rpm_Frequency"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,variant:"outlined",defaultValue:"",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_FrequencyHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ud||void 0===ud?void 0:ud.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Vp,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,sx:{p:"0"},children:[(0,Gt.jsx)(Cje.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),we("setReminder")]})}),(0,Gt.jsx)(Eu,{display:"flex",flexWrap:"wrap",children:(null===Kwe||void 0===Kwe?void 0:Kwe.timing)&&(null===Kwe||void 0===Kwe?void 0:Kwe.timing.map((e,t)=>(0,Gt.jsx)(Eu,{pr:.5,pb:.5,children:(0,Gt.jsx)(Ym,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"}})},t)))})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[we("rpm_Days"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",type:"number",variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>ld.includes(e.key)&&e.preventDefault(),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",mb:.5,children:[we("rpm_Duration"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsxs)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{padding:"10px",fontSize:"14px"}}),mr:1,display:"flex",children:[(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"From",value:Kwe.start_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),disablePast:!0}),(0,Gt.jsx)(Eu,{}),(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",pl:1,children:"-"}),(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),ml:1,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"To",value:Kwe.end_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:Kwe.start_date?Kwe.start_date:new Date})})]})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Comments")}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",placeholder:"Enter Comments",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_CommentsHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]})]})})}),(0,Gt.jsx)(iO,{sx:{py:3,px:4},children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",sx:{mr:2},children:we("rpm_Submit")}),(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",children:we("rpm_Cancel")})]})})]})},"program_formik")})};const Qwe=function(){const e=[],[t,n]=(0,We.useState)(null),[r,o]=(0,We.useState)(!1),[a,s]=(0,We.useState)(!1),l=()=>{s(!a)};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Iz,{enableReinitialize:!0,children:t=>{let{values:a,setFieldValue:s,setFieldTouched:c}=t;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Medication")}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Form")}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineFormHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:pd.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Shape&Color")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{display:"flex",gap:1,children:[(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,variant:"outlined",className:"shapeDropDown",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineIconHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,variant:"outlined",MenuProps:{className:"horizontalList"},children:fd.map(e=>(0,Gt.jsx)($m,{value:e.color,children:(0,Gt.jsx)(Eu,{display:"flex",gap:1,children:(0,Gt.jsx)(Ym,{variant:"span",className:"circleIcon ".concat(e.color)})})},e.key))})]}),(0,Gt.jsx)(Eu,{children:cs(null===e||void 0===e?void 0:e.image)?(0,Gt.jsxs)(Eu,{className:"upload-input-text",children:[(0,Gt.jsx)("input",{type:"file"}),(0,Gt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:we("uploadImage")}),(0,Gt.jsx)(Eu,{clone:!0,mr:1,color:"primary",children:(0,Gt.jsx)(sue,{width:22,height:22})})]})]}):(0,Gt.jsxs)(Eu,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden"}),(0,Gt.jsx)(Eu,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,Gt.jsx)(Kp,{size:"small",color:"error","aria-label":"remove file",children:(0,Gt.jsx)(Ql,{width:22,height:22})})})]})})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Strength")}),(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Hz,{as:Rj,type:"number",size:"small",fullWidth:!0,onWheel:e=>e.target.blur(),onKeyDown:e=>{ld.includes(e.key)&&e.preventDefault()},variant:"outlined",style:{borderRight:"0",borderRadius:"8px 0 0 8px"}}),(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,variant:"outlined",style:{borderLeft:"0",borderRadius:"0 8px 8px 0"},className:"customListSelect",children:md.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[we("rpm_Frequency"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,variant:"outlined",defaultValue:"",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_FrequencyHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ud||void 0===ud?void 0:ud.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Vp,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,onClick:()=>{n(),o(!r)},sx:{p:"0"},children:[(0,Gt.jsx)(Cje.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),we("setReminder")]})}),(0,Gt.jsx)(Eu,{display:"flex",flexWrap:"wrap",children:(null===e||void 0===e?void 0:e.timing)&&(null===e||void 0===e?void 0:e.timing.map((e,t)=>(0,Gt.jsx)(Eu,{pr:.5,pb:.5,children:(0,Gt.jsx)(Ym,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"}})},t)))})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[we("rpm_Days"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",type:"number",variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>ld.includes(e.key)&&e.preventDefault(),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",mb:.5,children:[we("rpm_Duration"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsxs)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]},"& .MuiOutlinedInput-input":{padding:"10px",fontSize:"14px"}}),mr:1,display:"flex",children:[(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"From",value:e.start_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),disablePast:!0}),(0,Gt.jsx)(Eu,{}),(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",pl:1,children:"-"}),(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800]}}),ml:1,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"To",value:e.end_date,inputFormat:"dd/MM/yyyy",onPaste:e=>{e.preventDefault()},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{autoComplete:"off",onKeyDown:e=>{e.preventDefault()}})),minDate:e.start_date?e.start_date:new Date})})]})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Comments")}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",placeholder:"Enter Comments",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_CommentsHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",sx:{mr:2},children:we("rpm_savePrescription")}),(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:l,children:we("rpm_AddMedicine")}),(0,Gt.jsx)(Kp,{color:"error",children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})]})})]})})})}}),(0,Gt.jsx)(Xwe,{isModalOpen:a,toggleProgramModal:l})]})};const Jwe=function(){return(0,Gt.jsx)("div",{children:(0,Gt.jsx)(Qwe,{})})};function e_e(e){var t;let{editButton:n,deleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,fileUploadButton:c,fileModal:d,fileUploadIconButton:u,notesList:p,editableNoteId:h,downloadFile:m,setToggleAddNote:f,toggleAddNote:g,closeEditMode:v,editNote:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:w,onLocalFileDelete:_,onCloudFilesDelete:C,patientData:S,program:A,noteTypesDropdown:k}=e;const{t:M}=vg(),O=Nt(),{programId:T,patientId:E}=lo(),P=so(),D=[{name:M("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:M("rpm_OtherNotes"),url:""}],R=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],N=We.useRef(null),L=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),I=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},F=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,Gt.jsxs)(Gt.Fragment,{children:[!as(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},onDelete:()=>_(t),icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!as(null===d||void 0===d||null===(s=d.data)||void 0===s?void 0:s.files)&&(null===d||void 0===d||null===(l=d.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},onDelete:()=>C(null===d||void 0===d?void 0:d.data,null===e||void 0===e?void 0:e.id,t),icon:(0,Gt.jsx)(mbe.A,{}),onClick:()=>{m({noteId:h,file:e})},label:I(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},$=()=>{f(!g),h&&v()},B=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{color:"primary.theme.500",borderRadius:"0",textDecoration:"underline",height:"inherit"},"data-id":e.id,label:I(e.file_name),variant:"string",className:"attachment_btn",onClick:()=>{m({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,Gt.jsx)(Yx,{title:M("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:D};as(A)||as(S)||O(w_(e))},[A,S]),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,children:(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:M("rpm_Notes")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:M("rpm_Notes")})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[(0,Gt.jsx)(Vp,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>P("".concat(Lc.DOCTOR.PROGRAM,"/").concat(T,"/patients/").concat(E,"/notes/resolve-alerts")),children:M("rpm_NoteResolvedAlerts")}),k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{variant:"OTHER"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>P("".concat(Lc.DOCTOR.PROGRAM,"/").concat(T,"/patients/").concat(E,"/notes/").concat(e.toLowerCase(),"-note")),children:M("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})}),!as(k.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center"},children:(0,Gt.jsxs)(Dw,{sx:k.nonExistingNoteTypes.includes("OTHER")?{maxWidth:180,color:"white",backgroundColor:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("OTHER")?"OTHER":"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:M("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>P("".concat(Lc.DOCTOR.PROGRAM,"/").concat(T,"/patients/").concat(E,"/notes/").concat(e.toLowerCase(),"-note")),children:M("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})})]})})]})}),(0,Gt.jsx)(Eu,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,md:12,lg:9,xl:8,children:(0,Gt.jsx)(bwe,{fetchListFunction:y,pageDetails:b,filterState:j,setFilterState:w,showFilterColor:s,setShowFilterColor:l})})})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(Eu,{bgcolor:"white",p:2,children:[as(p)&&!g&&(0,Gt.jsx)(jwe,{handleToggleAddNote:$,showFilterColor:s}),!as(p)&&(0,Gt.jsx)(Gt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(Sbe.A,{}),onClick:$,color:"primary",sx:{fontWeight:"600",marginBottom:"8px"},children:M("rpm_AddNewNote")})}),g&&(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,validationSchema:vV.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,className:"EditorPageNotes",spacing:2,mb:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:5,children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(qj,{id:"vital",children:M("rpm_VitalType")}),(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:M("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:M("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:M("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_VitalType")})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:9,children:[(0,Gt.jsxs)(Eu,{className:" text-editor",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:L,formats:R,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:N}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_Note")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:$,sx:{marginRight:"10px"},children:M("rpm_Cancel")}),(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:M("rpm_Save")})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(F,{}),as(null===d||void 0===d||null===(t=d.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?c("upload",{}):u("upload",{})]})})})]})})}}),p.map(e=>{var t,i;return(0,Gt.jsx)(Gt.Fragment,{children:h!==e.id?(0,Gt.jsxs)(df,{container:!0,spacing:2,mb:2,children:[(0,Gt.jsx)(df,{item:!0,xs:11,children:(0,Gt.jsxs)(Eu,{sx:{bgcolor:"primary.theme.50",borderRadius:1,p:1},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:600,children:M("rpm_".concat(e.vital))}),(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all"},className:"savemode"}),(0,Gt.jsxs)(Ym,{variant:"body2",mb:.6,children:[(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},children:[M("rpm_Attachment"),":\xa0"]}),(0,Gt.jsx)(Eu,{component:"span",sx:{color:"primary.theme.500",fontWeight:"600",pl:"0"},children:(0,Gt.jsx)(B,{noteObj:e})})]}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px"},children:["Created by \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px"},children:["Last Updated by \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:1,children:(0,Gt.jsxs)(Eu,{sx:{margin:1},className:"BGbtnGrp",children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})})]}):(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,onSubmit:x,validationSchema:vV.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,className:"EditorPageNotes",mt:1,mb:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:5,children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(qj,{id:"vital",children:M("rpm_VitalType")}),(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:M("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:M("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:M("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_VitalType")})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:9,children:[(0,Gt.jsxs)(Eu,{className:" text-editor",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:L,formats:R,value:o.description,onChange:e=>a("description",e),ref:N}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_Note")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:v,children:M("rpm_Cancel")})," ",(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:M("rpm_Save")})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(F,{}),as(null===d||void 0===d||null===(n=d.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?c("upload",e):u("upload",e)]})})})]})})}})})}),(0,Gt.jsx)(Eu,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,Gt.jsx)(IO,{pageDetails:b,fetchListFunction:y})})]})]})}e_e.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},fileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const t_e=e_e;function n_e(e){var t;let{MobileeditButton:n,MobiledeleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,showFilterColor:s,setShowFilterColor:l,MobilefileUploadButton:c,fileModal:d,fileUploadIconButton:u,notesList:p,editableNoteId:h,downloadFile:m,setToggleAddNote:f,toggleAddNote:g,closeEditMode:v,editNote:x,fetchNoteList:y,pageDetails:b,filterState:j,setFilterState:w,onLocalFileDelete:_,onCloudFilesDelete:C,patientData:S,program:A,noteTypesDropdown:k}=e;const M=kwe(),{t:O}=vg(),T=Nt(),{programId:E,patientId:P}=lo(),D=so(),[R,N]=(0,We.useState)(!1),L=e=>()=>{N(e)},I=[{name:O("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===A||void 0===A?void 0:A.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients")},{name:"".concat((null===S||void 0===S?void 0:S.first_name)||""," ").concat((null===S||void 0===S?void 0:S.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===A||void 0===A?void 0:A.code,"/patients/").concat(null===S||void 0===S?void 0:S.id,"/dashboard")},{name:O("rpm_OtherNotes"),url:""}],F=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],$=We.useRef(null),B=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),z=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},H=()=>{var e,t,n,r,i,o,a,s,l,c;return(0,Gt.jsxs)(Gt.Fragment,{children:[!as(null===d||void 0===d||null===(e=d.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===d||void 0===d||null===(r=d.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},onDelete:()=>_(t),icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!as(null===d||void 0===d||null===(s=d.data)||void 0===s?void 0:s.files)&&(null===d||void 0===d||null===(l=d.data)||void 0===l||null===(c=l.files)||void 0===c?void 0:c.map((e,t)=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},onDelete:()=>C(null===d||void 0===d?void 0:d.data,null===e||void 0===e?void 0:e.id,t),icon:(0,Gt.jsx)(mbe.A,{}),onClick:()=>{m({noteId:h,file:e})},label:z(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},W=()=>{f(!g),h&&v()},V=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{color:"black",borderRadius:"0",textDecoration:"underline",height:"inherit",pl:"0 !important"},"data-id":e.id,label:z(e.file_name),variant:"string",className:M.attachment_btn,onClick:()=>{m({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,Gt.jsx)(Yx,{title:O("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:I};as(A)||as(S)||T(w_(e))},[A,S]),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{position:"absolute",top:"-45px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontSize:16,children:O("rpm_Notes")})}),(0,Gt.jsx)(Eu,{position:"absolute",top:"-50px",right:"0px",children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Kp,{onClick:L(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,Gt.jsx)(Cwe.A,{color:"primary",sx:{padding:"0"}})})})})]}),(0,Gt.jsx)(Lf,{anchor:"left",open:R,onClose:L(!1),children:(0,Gt.jsxs)("div",{style:{width:230},children:[(0,Gt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,Gt.jsx)(Ym,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:O("rpm_Notes")}),(0,Gt.jsx)(Kp,{onClick:L(!1),children:(0,Gt.jsx)(Bw.A,{})})]}),(0,Gt.jsx)(Eu,{sx:{padding:"10px"},children:(0,Gt.jsxs)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[k.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{fullWidth:!0,variant:"OTHER"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>D("".concat(Lc.DOCTOR.PROGRAM,"/").concat(E,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})}),!as(k.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,Gt.jsxs)(Dw,{sx:k.nonExistingNoteTypes.includes("OTHER")?{color:"primary.theme.500",fontWeight:"500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"13px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:k.nonExistingNoteTypes.includes("OTHER")?"OTHER":"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:O("rpm_AdditionalNotes")}),k.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>D("".concat(Lc.DOCTOR.PROGRAM,"/").concat(E,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})}),(0,Gt.jsx)(Vp,{fullWidth:!0,variant:"outlined",size:"small",disableElevation:!0,onClick:()=>D("".concat(Lc.DOCTOR.PROGRAM,"/").concat(E,"/patients/").concat(P,"/notes/resolve-alerts")),endIcon:(0,Gt.jsx)(Mwe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:O("rpm_NoteResolvedAlerts")})]})})]})})]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Awe,{fetchListFunction:y,pageDetails:b,filterState:j,setFilterState:w,showFilterColor:s,setShowFilterColor:l,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0})}),(0,Gt.jsx)(Eu,{children:!as(p)&&(0,Gt.jsx)(Gt.Fragment,{children:(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(Sbe.A,{}),onClick:W,color:"primary",sx:{fontWeight:"600",fontSize:"12px"},className:M.addnewBtn,children:O("rpm_AddNew")})})})]}),as(p)&&!g&&(0,Gt.jsx)(Eu,{bgcolor:"white",className:"noDataAddedField",children:(0,Gt.jsx)(jwe,{handleToggleAddNote:W,showFilterColor:s})}),(0,Gt.jsxs)(Eu,{children:[g&&(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,validationSchema:vV.noteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,Gt.jsxs)(Eu,{className:"vitalEdits",children:[(0,Gt.jsx)(Ym,{variant:"span",id:"vital",sx:{marginBottom:"5px"},children:O("rpm_VitalType")}),(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,className:"text-editor quilldesign",width:"100%",mb:2,children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:B,formats:F,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:$}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsx)(Eu,{mt:2,mb:2,width:"100%",sx:{margin:"auto"},children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(H,{}),as(null===d||void 0===d||null===(t=d.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?c("upload",{}):u("upload",{})]})}),(0,Gt.jsxs)(Eu,{mt:2,display:"flex",children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:W,sx:{marginRight:"10px"},fullWidth:!0,children:O("rpm_Cancel")}),(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:O("rpm_Save")})]})]})})}}),p.map(e=>{var t,i;return(0,Gt.jsx)(Gt.Fragment,{children:h!==e.id?(0,Gt.jsxs)(Eu,{sx:{bgcolor:"white",borderRadius:"8px"},children:[(0,Gt.jsxs)(Eu,{sx:{background:"#eaeaff",color:"#7986cb",fontWeight:"600",padding:"8px 16px",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:600,children:O("rpm_".concat(e.vital))}),(0,Gt.jsxs)(Eu,{className:M.actionButtons,children:[(null===A||void 0===A||null===(t=A.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===A||void 0===A||null===(i=A.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})]}),(0,Gt.jsxs)(Eu,{sx:{p:"8px 16px",mb:"10px"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Description:"}),(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all",marginTop:"0"},className:"savemode"}),(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:[O("rpm_Attachment"),":"]}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsx)(Eu,{component:"span",sx:{color:"black",fontWeight:"600",pl:"0 !important"},className:"fileObjectName",children:(0,Gt.jsx)(V,{noteObj:e})})}),(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Created by:"}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.created_by,(0,Gt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})}),(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Last Updated by :"}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.updated_by||e.created_by,(0,Gt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})})]})]}):(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,onSubmit:x,validationSchema:vV.noteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,Gt.jsxs)(Eu,{className:"vitalEdits",children:[(0,Gt.jsx)(Ym,{variant:"span",id:"vital",sx:{marginBottom:"5px"},children:O("rpm_VitalType")}),(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,className:"text-editor quilldesign",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:B,formats:F,value:o.description,onChange:e=>a("description",e),ref:$}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsx)(Eu,{mt:2,mb:2,width:"100%",sx:{margin:"auto"},children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(H,{}),as(null===d||void 0===d||null===(n=d.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?c("upload",e):u("upload",e)]})}),(0,Gt.jsxs)(Eu,{mt:2,display:"flex",children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:v,sx:{marginRight:"10px"},fullWidth:!0,children:O("rpm_Cancel")}),(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",type:"submit",fullWidth:!0,children:O("rpm_Save")})]})," "]})})}})})})]})]})}n_e.defaultProps={alertsHead:[],order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},MobilefileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},pageDetails:{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const r_e=n_e,i_e=["content"];const o_e=function(e){var t;let{patientData:n,program:r}=e;const o=window.innerWidth,a=Nt(),s=Ct(Nd),{t:l}=vg(),[c,d]=(0,We.useState)("desc"),[u,p]=(0,We.useState)("updated_at"),[h,m]=We.useState(!1),[f,g]=(0,We.useState)([]),[v,x]=(0,We.useState)((0,i.A)({},Fc)),[y,b]=We.useState({vital:"",start_date:null,end_date:null}),[j,w]=We.useState({open:!1,data:{}}),_=e=>{w((0,i.A)((0,i.A)({},j),{},{open:!j.open,data:e}))},C=e=>{if(Array.isArray(e))return g(e.map(e=>e.toString()));const t=e.target.name;f.includes(t)?g(f.filter(e=>e!==t)):g(e=>[...e,t])},S=e=>(0,Gt.jsx)(Yx,{title:l("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),A={local:{files:[]},onCloud:{files:[]}},{programId:k,patientId:M}=lo(),[O,T]=We.useState({open:!1,data:{}}),[E,P]=(0,We.useState)((0,i.A)({},A)),[D,R]=We.useState([]),[N,L]=We.useState(""),[I,F]=(0,We.useState)(!1),[$,B]=(0,We.useState)({description:"",vital:""}),[z,H]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;try{const t={sort_by:u,sort_order:c},{data:n}=await a(vl(k,M,{type:"OTHER"},(0,i.A)((0,i.A)({},v),t),e)),r=n||{},{content:o}=r,s=Ko(r,i_e);R(o),x(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){console.log(t)}},V=function(e){const t=e.target.files;let n=(0,i.A)({},E.local);t&&Array.from(t).forEach(e=>{var t;return as(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?a(Zo({subTitle:"error:rpm_ImageSize",severity:$c})):(e.url=URL.createObjectURL(e),void n.files.push(e)):a(Zo({subTitle:"error:rpm_SameFileName",severity:$c}))}),P(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),T(e=>({open:!e.open,data:(0,i.A)((0,i.A)({},e.data),{},{local_files:(0,i.A)((0,i.A)({},E),{},{local:n})})})),e.target.value=""},U=function(e){let t=(0,i.A)({},E);t.local.files.splice(e,1),P(t)},q=async(e,t)=>{try{await a(_l(k,M,{noteId:e.id,fileId:t,type:"OTHER"})),W(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);T((0,i.A)((0,i.A)({},O),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),a(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_FileDeleteFailed"),severity:$c}))}},G=()=>{let e=(0,i.A)({},E);e.local.files.splice(0,e.local.files.length),P(e),T({data:{},open:!1})},Y=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"OTHER",upload:as(null===O||void 0===O||null===(n=O.data)||void 0===n?void 0:n.local_files)?[]:null===O||void 0===O||null===(r=O.data)||void 0===r?void 0:r.local_files};try{if(await a(xl(k,M,o)),v.current_page=1,W({vital:"",start_date:null,end_date:null}),F(!1),z.nonExistingNoteTypes.includes("OTHER")){const{data:e}=await a(Cl(k,M));H({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})}W(),B({description:"",vital:""}),G(),a(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:Bc}))}catch(s){const e=ls(s,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_NoteCreatedFailed"),severity:$c}))}},Z=async(e,t)=>{var n,r;let{setErrors:i}=t;const o={id:N,vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"OTHER",upload:as(null===O||void 0===O||null===(n=O.data)||void 0===n?void 0:n.local_files)?[]:null===O||void 0===O||null===(r=O.data)||void 0===r?void 0:r.local_files};try{await a(bl(k,M,o)),X(),W(),G(),a(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:Bc}))}catch(s){const e=ls(s,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_NoteUpdateFailed"),severity:$c}))}},K=async e=>{try{var t;if(await a(jl(k,M,{noteId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id,type:"OTHER"})),W(),w((0,i.A)((0,i.A)({},j),{},{open:!j.open})),1===D.length){const{data:e}=await a(Cl(k,M));H({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})}a(Zo({subTitle:"message:rpm_NoteDeleteSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_NoteDeleteFailed"),severity:$c}))}},X=()=>{L(""),B({description:"",vital:""}),T({open:!1,data:{}}),P((0,i.A)({},A))},Q=(e,t)=>(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsx)(Yx,{title:l("rpm_UploadMore"),component:"span",children:(0,Gt.jsxs)(Kp,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:V}),(0,Gt.jsx)(dbe.A,{fontSize:"small",sx:{width:16,height:16}})]})})}),J=async e=>{let{noteId:t,file:n}=e;try{await a(wl(k,M,{noteId:t,type:"OTHER",fileData:n})),a(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(r){const e=ls(r,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_DownloadFileFailed"),severity:$c}))}};return We.useEffect(()=>{s&&W(),as(r)||as(n)||(async()=>{const{data:e}=await a(Cl(k,M));H({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})})()},[s,c,u,r,n]),We.useEffect(()=>{a(w_({activeMenuItem:"notes"}))},[]),as(r)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsx)(Gt.Fragment,{children:null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showNoteList?o>=575?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(t_e,{order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:f,onCheck:C,isSelection:!1,nodata:fwe,showFilterColor:h,setShowFilterColor:m,notesList:D,fetchNoteList:W,pageDetails:v,editButton:e=>(0,Gt.jsx)(Yx,{title:l("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{L(e.id),F(!1),B({description:e.note,vital:e.vital}),P((0,i.A)({},A)),T((0,i.A)((0,i.A)({},O),{},{data:(0,i.A)({},e)}))},children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:S,deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>_(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:Y,editNote:Z,editableNoteId:N,closeEditMode:X,initialFormValues:$,toggleAddNote:I,setToggleAddNote:F,fileModal:O,fileUploadButton:()=>(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsxs)(Vp,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:V}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsxs)(Eu,{sx:{flex:1,pl:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},children:l("rpm_UploadReport")}),(0,Gt.jsx)(Ym,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})]})}),fileUploadIconButton:Q,downloadFile:J,filterState:y,setFilterState:b,onLocalFileDelete:U,onCloudFilesDelete:q,patientData:n,program:r,noteTypesDropdown:z}),(0,Gt.jsx)(PU,{openModal:j.open,onCloseModal:_,actionFunction:()=>K(j),dataName:j.data.title,options:{primaryText:l("message:rpm_DeleteTitle"),secondaryText:l("message:rpm_DeleteBodyText"),descText:l("message:rpm_DeleteSubText"),btn:{primaryText:l("rpm_Delete"),secondaryText:l("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(r_e,{order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:f,onCheck:C,isSelection:!1,nodata:fwe,showFilterColor:h,setShowFilterColor:m,notesList:D,fetchNoteList:W,pageDetails:v,MobileeditButton:e=>(0,Gt.jsx)(Yx,{title:l("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{L(e.id),F(!1),B({description:e.note,vital:e.vital}),P((0,i.A)({},A)),T((0,i.A)((0,i.A)({},O),{},{data:(0,i.A)({},e)}))},sx:{padding:"0"},children:(0,Gt.jsx)(vwe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:S,MobiledeleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>_(e),children:(0,Gt.jsx)(Ewe.A,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:Y,editNote:Z,editableNoteId:N,closeEditMode:X,initialFormValues:$,toggleAddNote:I,setToggleAddNote:F,fileModal:O,MobilefileUploadButton:()=>(0,Gt.jsxs)("label",{htmlFor:"file",children:[(0,Gt.jsxs)(Vp,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"#eaeaff85",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},fullWidth:!0,children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:V}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsx)(Eu,{sx:{flex:1,pl:2},children:(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},fontSize:14,children:l("rpm_UploadReport")})})]})]}),(0,Gt.jsx)(Eu,{textAlign:"center",fontStyle:"italic",children:(0,Gt.jsx)(Ym,{variant:"caption",fontSize:8,children:".PDF, .PNG, .JPEG"})})]}),fileUploadIconButton:Q,downloadFile:J,filterState:y,setFilterState:b,onLocalFileDelete:U,onCloudFilesDelete:q,patientData:n,program:r,noteTypesDropdown:z}),(0,Gt.jsx)(Ebe,{openModal:j.open,onCloseModal:_,actionFunction:()=>K(j),dataName:j.data.title,options:{primaryText:l("message:rpm_DeleteTitle"),secondaryText:l("message:rpm_DeleteBodyText"),btn:{primaryText:l("rpm_Delete"),secondaryText:l("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,Gt.jsx)(__,{})})};const a_e=function(e){var t,n,r,i,o,a,s,l,c,d;let{openModal:u,onCloseModal:p,onFileUpload:h,onLocalFileDelete:m,fileModal:f,actionFunction:g,onCloudFilesDelete:v,onCloudFileDownload:x}=e;const{t:y}=vg(),b=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]};return(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"md",open:u,onClose:p,scroll:"paper",children:[(0,Gt.jsx)(n_,{children:y("rpm_AddReports")}),(0,Gt.jsxs)(s_,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{p:2,py:6,borderRadius:1,textAlign:"center",border:"1px dashed #818181"},children:[(0,Gt.jsxs)(Eu,{mb:3,children:[(0,Gt.jsx)(xbe.A,{sx:{color:"grey.400",fontSize:"h3.fontSize"}}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:500,sx:{color:"grey.500"},children:y("rpm_AddReportsHere")})]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsxs)(Vp,{startIcon:(0,Gt.jsx)(dbe.A,{}),variant:"contained",color:"primary",component:"span",size:"large",disableElevation:!0,children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:h}),y("rpm_ChooseFile")]})})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[!as(null===f||void 0===f||null===(t=f.data)||void 0===t?void 0:t.files)&&(0,Gt.jsx)(Gt.Fragment,{children:null===f||void 0===f||null===(n=f.data)||void 0===n||null===(r=n.files)||void 0===r?void 0:r.map((e,t)=>(0,Gt.jsxs)(XO,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"large"}),onClose:()=>v(null===f||void 0===f?void 0:f.data,null===e||void 0===e?void 0:e.id,t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,Gt.jsx)(_be,{title:b(null===e||void 0===e?void 0:e.file_name),sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:b(null===e||void 0===e?void 0:e.file_name)}),(0,Gt.jsx)(Eu,{children:"Uploaded"}),(0,Gt.jsx)(Kp,{onClick:()=>{var t;x({noteId:null===f||void 0===f||null===(t=f.data)||void 0===t?void 0:t.id,file:e})},children:(0,Gt.jsx)(mbe.A,{color:"primary"})})]},t))}),!as(null===f||void 0===f||null===(i=f.data)||void 0===i||null===(o=i.local_files)||void 0===o||null===(a=o.local)||void 0===a?void 0:a.files)&&(0,Gt.jsx)(Af,{sx:{mb:2}}),null===f||void 0===f||null===(s=f.data)||void 0===s||null===(l=s.local_files)||void 0===l||null===(c=l.local)||void 0===c||null===(d=c.files)||void 0===d?void 0:d.map((e,t)=>(0,Gt.jsxs)(XO,{"data-index":t,"data-id":null===e||void 0===e?void 0:e.id,icon:(0,Gt.jsx)(fbe.A,{fontSize:"large"}),onClose:()=>m(t),sx:{mb:1.5,color:"primary.theme.900",backgroundColor:"primary.theme.50","& .MuiAlert-icon":{color:"primary.main"}},children:[(0,Gt.jsx)(_be,{children:null===e||void 0===e?void 0:e.name}),(0,Gt.jsxs)("strong",{children:[Math.ceil((null===e||void 0===e?void 0:e.size)/1024),"KB"]})]},t))]})]}),(0,Gt.jsx)(Eu,{mt:2.5,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"error",disableElevation:!0,onClick:p,children:y("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{g(null===f||void 0===f?void 0:f.data,{})},children:y("rpm_Submit")})})]})})]})]})};var s_e=n(93141);const l_e=["children","onClose"],c_e=e=>{const{children:t,onClose:n}=e,r=Ko(e,l_e);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};function d_e(e){let{order:t,orderBy:n,openModal:r,setOrderBy:o,onCloseModal:a,setOrder:s,prescriptionNotesModal:l,dataParameter:c,checkState:d,onCheck:u,isSelection:p,nodata:h,pageDetails:m,addNewNote:f}=e;const{t:g}=vg(),v=Ct(Id),x=e=>{let{name:t,data:n,setFieldValue:r}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsx)(Eu,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"From",id:t.start_date,name:t.start_date,value:n.start_date,onChange:e=>r(t.start_date,e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:new Date})})})}),(0,Gt.jsx)(df,{item:!0,xs:6,children:(0,Gt.jsx)(Eu,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"To",id:t.end_date,name:t.end_date,value:n.end_date,onChange:e=>r(t.end_date,e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:n.start_date?n.start_date:new Date})})})})]})})};return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(Kw,{fullWidth:!0,maxWidth:"lg",open:r.open,onClose:a,children:(0,Gt.jsx)(Iz,{initialValues:{vital:"",note:"",medicationList:[{medication:"",frequency:"",comments:"",start_date:null,end_date:null}]},validationSchema:vV.addPrescriptionNote,onSubmit:f,enableReinitialize:!0,children:e=>{let{values:r,setFieldValue:i}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(c_e,{sx:{px:4},onClose:a,children:(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"left"},children:[(0,Gt.jsxs)(Hz,{as:Dw,sx:{borderRadius:2,bgcolor:"white",maxWidth:"150px"},fullWidth:!0,name:"vital",variant:"outlined",size:"small",displayEmpty:!0,endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:g("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"",disabled:!0,sx:{display:"none"},children:g("rpm_VitalType")}),null===cd||void 0===cd?void 0:cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:g("rpm_".concat(e.name))},e.value))]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_VitalType")})})})]})}),(0,Gt.jsx)(s_,{sx:{p:4},dividers:!0,children:(0,Gt.jsx)(df,{container:!0,spacing:2,direction:"column",children:(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{className:"pres_inputTab",children:(0,Gt.jsx)(EM,{order:t,orderBy:n,setOrder:s,setOrderBy:o,data:as(null===r||void 0===r?void 0:r.medicationList)?[{}]:null===r||void 0===r?void 0:r.medicationList,headCells:l,dataParameter:c,selected:d,setSelected:u,isSelection:p,noDataImage:h,pageDetails:m,skeletonVrows:5,className:"theme_scroll",children:(0,Gt.jsx)(Zz,{name:"medicationList",validateOnChange:!1,children:e=>{var t,n,o;return(0,Gt.jsx)(Gt.Fragment,{children:as(null===r||void 0===r?void 0:r.medicationList)?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,Gt.jsx)("img",{src:h,style:{display:"block",margin:"auto",maxWidth:"200px"}})})}),(0,Gt.jsx)(K_,{children:(0,Gt.jsxs)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,Gt.jsx)(Ym,{}),(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(n=r.medicationList)||void 0===n||null===(o=n.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===o?void 0:o.isEdit,onClick:()=>e.push({medication:"",frequency:"",start_date:null,end_date:null,comments:""}),children:g("rpm_AddNewNote")})]})})]}):null===r||void 0===r||null===(t=r.medicationList)||void 0===t?void 0:t.map((t,n)=>{var o;return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{sx:{minWidth:250,whiteSpace:"normal"},children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,name:"medicationList.".concat(n,".medication"),size:"small",variant:"outlined",placeholder:g("rpm_MedicationName"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:g("message:rpm_MedicationNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".medication"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_Medication")})})})]})}),(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Xj,{sx:{minWidth:150,whiteSpace:"normal"},children:[(0,Gt.jsx)(qj,{id:"medicationList.".concat(n,".frequency"),children:g("rpm_Frequency")}),(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,variant:"outlined",size:"small",name:"medicationList.".concat(n,".frequency"),labelId:"medicationList.".concat(n,".frequency"),label:g("rpm_Frequency"),onChange:e=>{i("medicationList.".concat(n,".frequency"),e.target.value)},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:g("message:rpm_FrequencyTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:ud.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.key,"/").concat(e.text)},e.key))}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".frequency"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_Frequency")})})})]})}),(0,Gt.jsxs)(rC,{sx:{minWidth:"custom"===(null===t||void 0===t?void 0:t.duration_unit)?350:257},children:[(0,Gt.jsx)(x,{data:t,setFieldValue:i,name:{value:"medicationList.".concat(n,".duration"),unit:"medicationList.".concat(n,".duration_unit"),start_date:"medicationList.".concat(n,".start_date"),end_date:"medicationList.".concat(n,".end_date")}}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".start_date"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_StartDate")})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".end_date"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_EndDate")})})})]}),(0,Gt.jsxs)(rC,{sx:{minWidth:300,whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(n,".comments"),placeholder:g("message:rpm_commentsPlaceHolder"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:g("message:rpm_CommentsHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".comments"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:g(e,{field:g("rpm_Note")})})})]}),(0,Gt.jsx)(rC,{className:"BGbtnGrp",children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>e.remove(n),className:"lightDanger",children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})]}),(null===r||void 0===r||null===(o=r.medicationList)||void 0===o?void 0:o.length)-1===n&&(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:7,children:(0,Gt.jsx)(Vp,{variant:"text",color:"primary",disableElevation:!0,onClick:()=>e.push({medication:"",frequency:"",start_date:null,end_date:null,comments:""}),sx:{fontWeight:"bold"},children:g("rpm_AddNewMedication")})})})]},n)})})}})})}),(0,Gt.jsx)(Eu,{sx:e=>({pr:2,bgcolor:e.palette.common.white})})]})})})}),(0,Gt.jsx)(iO,{sx:{py:3,px:4},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:a,children:g("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(CT,{loading:v,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:g("rpm_Save")})})]})})]})})}},"program_formik")})})}function u_e(e){var t,n,r,o;let{order:a,orderBy:s,setOrder:l,setOrderBy:c,prescriptionList:d,dataParameter:u,notesHead:p,checkState:h,onCheck:m,isSelection:f,nodata:g,showFilterColor:v,setShowFilterColor:x,fetchPrescriptionList:y,pageDetails:b,editButton:j,viewButton:w,prescriptionNotesModal:_,deleteButton:C,downloadFile:S,filterState:A,setFilterState:k,presModal:M,handlePresModalToggle:O,program:T,patientData:E,addNewNote:P,initialHeadcells:D,setHeadCells:R,settingModal:N,handleSettingModalToggle:L,doctor:I}=e;const F=window.innerWidth,{t:$}=vg(),B=Nt(),{programId:z,patientId:H}=lo(),[W,V]=We.useState({}),U=so(),q=We.useRef(),[G,Y]=We.useState(0),[Z,K]=We.useState(1),[X,Q]=We.useState(20),[J,ee]=(0,We.useState)(!1),[te,ne]=(0,We.useState)(!1),re=()=>{ee(!J)},ie=function(e,t){K(t),Y(t-1)},oe=e=>{Q(parseInt(e.target.value,10)),Y(0)},ae=We.useCallback(()=>q.current,[q.current]),se=(0,s_e.useReactToPrint)({content:ae,onAfterPrint:()=>{V({})}}),le=!!cs(null===W||void 0===W?void 0:W.diagnosis)||(null===W||void 0===W||null===(t=W.diagnosis)||void 0===t?void 0:t.every(e=>as(null===e||void 0===e?void 0:e.name))),ce=!!cs(null===W||void 0===W?void 0:W.complaints)||(null===W||void 0===W||null===(n=W.complaints)||void 0===n?void 0:n.every(e=>as(null===e||void 0===e?void 0:e.name))),de=!!cs(null===W||void 0===W?void 0:W.advices)||(null===W||void 0===W||null===(r=W.advices)||void 0===r?void 0:r.every(e=>as(e))),ue=!!cs(null===W||void 0===W?void 0:W.tests)||(null===W||void 0===W||null===(o=W.tests)||void 0===o?void 0:o.every(e=>as(e))),pe=[{name:$("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===T||void 0===T?void 0:T.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===T||void 0===T?void 0:T.code,"/patients")},{name:"".concat((null===E||void 0===E?void 0:E.first_name)||""," ").concat((null===E||void 0===E?void 0:E.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===T||void 0===T?void 0:T.code,"/patients/").concat(null===E||void 0===E?void 0:E.id,"/dashboard")},{name:$("rpm_consultation"),url:""}],he=(e,t)=>{const n=sa().unix(e/1e3),r=sa().unix(t/1e3),i=r.diff(n,"year"),o=r.diff(n,"months"),a=r.diff(n,"days"),s=r.diff(n,"year");n.add(s,"years");const l=r.diff(n,"months");n.add(l,"months");const c=r.diff(n,"days");return s&&l?o:s?i:l?o:c?a:s&&l&&c?(s?"".concat(s," years "):"")+(l?"".concat(l," months "):"")+(c?"".concat(c," days"):""):void 0},me=(e,t)=>{const n=sa().unix(e/1e3),r=sa().unix(t/1e3),i=r.diff(n,"year");n.add(i,"years");const o=r.diff(n,"months");n.add(o,"months");const a=r.diff(n,"days");return i&&o?"m":i?"y":o?"m":a?"d":void 0},fe={prescriptionList:null===d||void 0===d?void 0:d.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:he(null===e||void 0===e?void 0:e.start_date,null===e||void 0===e?void 0:e.end_date),duration_unit:me(null===e||void 0===e?void 0:e.start_date,null===e||void 0===e?void 0:e.end_date),startDate:sa()(e.start_date).format("DD MMM YYYY"),endDate:sa()(e.end_date).format("DD MMM YYYY")}))};return We.useEffect(()=>{const e={breadcrumb:pe};as(T)||as(E)||B(w_(e))},[T,E]),We.useEffect(()=>{as(W.id)||se()},[W.id]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},position:"relative",children:(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",className:"headingInMobile",children:$("rpm_consultation")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",bottom:"0",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",className:"headingInMobile",children:$("rpm_consultation")})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsx)(Eu,{mb:3,textAlign:"right",className:"addConsultationBtn",children:(0,Gt.jsxs)(Vp,{className:"prescription-tour-step1",onClick:()=>U("".concat(Lc.DOCTOR.PROGRAM,"/").concat(z,"/patients/").concat(H,"/consultations/add-consultation")),variant:"contained",disableElevation:!0,style:{marginRight:"5px"},children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Eu,{className:"responsiveHidden",children:$("rpm_AddConsultation")})]})})})]})}),(0,Gt.jsx)(Eu,{bgcolor:"white",className:"UseNoteFilter",pt:1,pb:1,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,lg:9,xl:8,children:F>=575?(0,Gt.jsx)(bwe,{onApply:re,fetchListFunction:y,filterState:A,setFilterState:k,pageDetails:b,showFilterColor:v,setShowFilterColor:x}):(0,Gt.jsx)(Awe,{onApply:re,fetchListFunction:y,filterState:A,setFilterState:k,pageDetails:b,showFilterColor:v,setShowFilterColor:x,filterVariant:"contained",filterName:"Filters",mobileFilterBG:!1})}),(0,Gt.jsx)(df,{item:!0,ml:"auto",children:(0,Gt.jsx)(Eu,{textAlign:"right",children:(0,Gt.jsx)(Yx,{title:$("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",marginRight:"10px"},size:"small",color:"primary",onClick:L,children:(0,Gt.jsx)(N_.A,{onClick:()=>{ne(!te)},disabled:!J,fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,Gt.jsx)(Iz,{initialValues:as(null===fe||void 0===fe?void 0:fe.prescriptionList)?{prescriptionList:[]}:fe,validationSchema:vV.addPrescriptionNote,enableReinitialize:!0,children:e=>{var t,n,r;let{values:i}=e;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(Eu,{className:"pres_inputTab",children:(0,Gt.jsx)(EM,{order:a,orderBy:s,setOrder:l,setOrderBy:c,data:as(null===i||void 0===i?void 0:i.prescriptionList)?[{}]:null===i||void 0===i?void 0:i.prescriptionList,headCells:p.filter(e=>D.includes(e.id)),dataParameter:u,selected:h,setSelected:m,isSelection:f,noDataImage:g,pageDetails:b,skeletonVrows:6,className:"theme_scroll",children:as(null===i||void 0===i?void 0:i.prescriptionList)?(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:7,sx:{border:"none",p:2},children:(0,Gt.jsx)("img",{src:g,style:{display:"block",margin:"auto",maxWidth:"200px"}})})})}):null===i||void 0===i||null===(t=i.prescriptionList)||void 0===t||null===(n=t.slice(G*X,G*X+Number(X)))||void 0===n?void 0:n.map((e,t)=>{var n;return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[D.includes("duration")&&(0,Gt.jsx)(rC,{children:sa()(e.created_at).format("DD MMM YYYY")}),D.includes("vitaltype")&&(0,Gt.jsxs)(rC,{sx:{minWidth:170,whiteSpace:"normal"},children:[" ","bp"===(null===e||void 0===e?void 0:e.vital)&&(0,Gt.jsxs)(Ym,{color:"#3F51B5",fontWeight:600,component:"span",fontSize:14,children:[" ",$("rpm_".concat(null===e||void 0===e?void 0:e.vital))]}),"glucose"===(null===e||void 0===e?void 0:e.vital)&&(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",$("rpm_".concat(null===e||void 0===e?void 0:e.vital))]}),"others"===e.vital&&(0,Gt.jsxs)(Ym,{color:"grey",fontWeight:600,component:"span",fontSize:14,children:[" ",$("rpm_Others")]})," "]}),D.includes("prescriptionID")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.id}),D.includes("prescription_duration")&&(0,Gt.jsxs)(rC,{children:[sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM YYYY")," -"," ",sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM YYYY")]}),D.includes("createdBy")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.created_by}),D.includes("status")&&(0,Gt.jsx)(rC,{children:e.status?(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Active"})}):(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Inactive"})})}),D.includes("action")&&(0,Gt.jsx)(rC,{className:"BGbtnGrp",children:(0,Gt.jsx)(Eu,{className:"prescription-tour-step2",children:(0,Gt.jsxs)(Gt.Fragment,{children:[w(e),j(e),(0,Gt.jsx)(Yx,{title:$("rpm_print"),children:(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>Ad(B,H,null===e||void 0===e?void 0:e.id),children:(0,Gt.jsx)(Fwe.A,{fontSize:"small",sx:{width:16,height:16}})})}),(null===T||void 0===T||null===(n=T.permissions)||void 0===n?void 0:n.showDeletePrescriptionList_showDeleteList)&&C(e)]})})})]})},t)})})}),(0,Gt.jsx)(Eu,{py:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,Gt.jsx)(df,{item:!0,sm:!0,children:(0,Gt.jsx)(LO,{count:Math.ceil((null===i||void 0===i||null===(r=i.prescriptionList)||void 0===r?void 0:r.length)/X),page:Z,shape:"rounded",color:"primary",onChange:ie})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Ym,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,Gt.jsx)(Xj,{margin:"dense",children:(0,Gt.jsx)(Dw,{variant:"outlined",size:"small",value:X,onChange:oe,children:[10,20,30,50,100].map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))})})]})})]})})]}),(0,Gt.jsx)(Eu,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,Gt.jsx)(IO,{pageDetails:b,fetchListFunction:y})})]})}})]}),(0,Gt.jsx)(d_e,{openModal:M,onCloseModal:O,order:a,orderBy:s,setOrderBy:c,addNewProgram:()=>{},editProgram:()=>{},filterState:A,setFilterState:k,setOrder:l,notesHead:p,prescriptionNotesModal:_,dataParameter:u,checkState:h,onCheck:m,isSelection:f,nodata:g,pageDetails:b,deleteButton:C,fetchPrescriptionList:y,prescriptionList:d,addNewNote:P}),(0,Gt.jsxs)("div",{style:{display:"none"},children:[(0,Gt.jsx)(fxe,{ref:q,patientData:E,program:T,details:W,doctor:I,isAdvices:!de,isComplaints:!ce,isTests:!ue,isDiagnosis:!le}),(0,Gt.jsx)(fO,{open:N,allHeadCells:p,initialHeadcells:D,setHeadcells:R,onClose:L})]})]})}d_e.defaultProps={filterState:{},setFilterState:()=>{},order:"",orderBy:"",prescriptionNotesModal:[],dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},deleteButton:()=>{},fetchNoteList:()=>{},medicationList:[],addNewNote:()=>{}},u_e.defaultProps={notesHead:[],prescriptionNotesModal:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",prescriptionList:[],othernotesList:[],familynotesList:[],fetchPrescriptionList:()=>{},editButton:()=>{},viewButton:()=>{},PrintButton:()=>{},VisibilityIcon:()=>{},deleteButton:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},saveButton:()=>{},closeButton:()=>{},filterState:{},setFilterState:()=>{},program:{},patientData:{},addNewNote:()=>{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadCells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},doctor:{},setDoctor:()=>{},fetchDoctor:()=>{}};const p_e=u_e;function h_e(e){var t,n,r,o;let{order:a,orderBy:s,setOrder:l,setOrderBy:c,prescriptionList:d,dataParameter:u,notesHead:p,checkState:h,onCheck:m,isSelection:f,nodata:g,showFilterColor:v,setShowFilterColor:x,fetchPrescriptionList:y,pageDetails:b,editMobileButton:j,viewMobileButton:w,prescriptionNotesModal:_,deleteMobileButton:C,downloadFile:S,filterState:A,setFilterState:k,presModal:M,handlePresModalToggle:O,program:T,patientData:E,addNewNote:P,initialHeadcells:D,setHeadCells:R,settingModal:N,handleSettingModalToggle:L,doctor:I}=e;const F=MM({titles:{fontSize:"14px !important",color:"#7986cb",fontWeight:"600 !important",letterSpacing:"0.02em"},actionGrp:{"& .MuiButtonBase-root":{padding:"10px 5px !important"}}}),[$,B]=We.useState(null),z=e=>{const t=e.currentTarget.attributes["data-id"].value;B((0,i.A)((0,i.A)({},$),{},{[t]:e.currentTarget}))},H=()=>{B(null)},W=open?"simple-popover":void 0,V=F(),{t:U}=vg(),q=Nt(),{programId:G,patientId:Y}=lo(),[Z,K]=We.useState({}),X=so(),Q=We.useRef(),[J,ee]=(0,We.useState)(!1),te=We.useCallback(()=>Q.current,[Q.current]),ne=(0,s_e.useReactToPrint)({content:te,onAfterPrint:()=>{K({})}}),re=!!cs(null===Z||void 0===Z?void 0:Z.diagnosis)||(null===Z||void 0===Z||null===(t=Z.diagnosis)||void 0===t?void 0:t.every(e=>as(null===e||void 0===e?void 0:e.name))),ie=!!cs(null===Z||void 0===Z?void 0:Z.complaints)||(null===Z||void 0===Z||null===(n=Z.complaints)||void 0===n?void 0:n.every(e=>as(null===e||void 0===e?void 0:e.name))),oe=!!cs(null===Z||void 0===Z?void 0:Z.advices)||(null===Z||void 0===Z||null===(r=Z.advices)||void 0===r?void 0:r.every(e=>as(e))),ae=!!cs(null===Z||void 0===Z?void 0:Z.tests)||(null===Z||void 0===Z||null===(o=Z.tests)||void 0===o?void 0:o.every(e=>as(e))),se=[{name:U("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===T||void 0===T?void 0:T.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===T||void 0===T?void 0:T.code,"/patients")},{name:"".concat((null===E||void 0===E?void 0:E.first_name)||""," ").concat((null===E||void 0===E?void 0:E.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===T||void 0===T?void 0:T.code,"/patients/").concat(null===E||void 0===E?void 0:E.id,"/dashboard")},{name:U("rpm_consultation"),url:""}],le=(e,t)=>{const n=sa().unix(e/1e3),r=sa().unix(t/1e3),i=r.diff(n,"year"),o=r.diff(n,"months"),a=r.diff(n,"days"),s=r.diff(n,"year");n.add(s,"years");const l=r.diff(n,"months");n.add(l,"months");const c=r.diff(n,"days");return s&&l?o:s?i:l?o:c?a:s&&l&&c?(s?"".concat(s," years "):"")+(l?"".concat(l," months "):"")+(c?"".concat(c," days"):""):void 0},ce=(e,t)=>{const n=sa().unix(e/1e3),r=sa().unix(t/1e3),i=r.diff(n,"year");n.add(i,"years");const o=r.diff(n,"months");n.add(o,"months");const a=r.diff(n,"days");return i&&o?"m":i?"y":o?"m":a?"d":void 0},de={prescriptionList:null===d||void 0===d?void 0:d.map(e=>(0,i.A)((0,i.A)({},e),{},{duration:le(null===e||void 0===e?void 0:e.start_date,null===e||void 0===e?void 0:e.end_date),duration_unit:ce(null===e||void 0===e?void 0:e.start_date,null===e||void 0===e?void 0:e.end_date),startDate:sa()(e.start_date).format("DD MMM YYYY"),endDate:sa()(e.end_date).format("DD MMM YYYY")}))};return We.useEffect(()=>{const e={breadcrumb:se};as(T)||as(E)||q(w_(e))},[T,E]),We.useEffect(()=>{as(Z.id)||ne()},[Z.id]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},position:"relative",children:(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",bottom:"0",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",className:"headingInMobile",children:U("rpm_consultation")})})})})})}),(0,Gt.jsxs)(Eu,{mb:1,textAlign:"right",className:"addConsultationBtn",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,Gt.jsx)(Awe,{onApply:()=>{ee(!J)},fetchListFunction:y,filterState:A,setFilterState:k,pageDetails:b,showFilterColor:v,setShowFilterColor:x,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0}),(0,Gt.jsxs)(Vp,{className:"prescription-tour-step1",onClick:()=>X("".concat(Lc.DOCTOR.PROGRAM,"/").concat(G,"/patients/").concat(Y,"/consultations/add-consultation")),variant:"contained",disableElevation:!0,style:{marginRight:"5px"},children:[(0,Gt.jsx)(oue.A,{}),U("rpm_AddConsultation")]})]}),(0,Gt.jsx)(Iz,{initialValues:as(null===de||void 0===de?void 0:de.prescriptionList)?{prescriptionList:[]}:de,validationSchema:vV.addPrescriptionNote,enableReinitialize:!0,children:e=>{var t;let{values:n}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{className:"pres_inputTab",children:as(null===n||void 0===n?void 0:n.prescriptionList)?(0,Gt.jsxs)("div",{style:{textAlign:"center",padding:"20px"},children:[(0,Gt.jsx)("img",{src:g,alt:"No Data",style:{maxWidth:"200px",margin:"auto"}}),(0,Gt.jsx)(Ym,{variant:"body2",children:U("rpm_EmptyNotesText")})]}):(0,Gt.jsx)(df,{container:!0,spacing:2,children:null===n||void 0===n||null===(t=n.prescriptionList)||void 0===t?void 0:t.map((e,t)=>{var n;return(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,md:4,children:(0,Gt.jsxs)(aH,{sx:{marginBottom:"5px",borderLeft:"4px solid #868fcd",overflow:"auto"},children:[(0,Gt.jsx)(WH,{sx:{paddingBottom:"0"},action:(0,Gt.jsx)(Eu,{sx:{display:"flex",justifyContent:"space-between"},children:(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Eu,{item:!0,children:D.includes("status")&&(0,Gt.jsx)(XO,{severity:e.status?"success":"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:e.status?"Active":"Inactive"})})}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[(0,Gt.jsx)(Yx,{placement:"top",title:"Actions",children:(0,Gt.jsx)(Kp,{"data-id":e.id,onClick:z,style:{padding:"0 10px 0 10px"},children:(0,Gt.jsx)(Iu.A,{})})}),(0,Gt.jsx)(vm,{id:W,open:null===$||void 0===$?void 0:$[e.id],anchorEl:null===$||void 0===$?void 0:$[e.id],onClose:H,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{sx:{backgroundColor:"transparent",boxShadow:"none"}},children:D.includes("action")&&(0,Gt.jsxs)(Eu,{className:V.actionGrp,sx:{display:"flex",flexDirection:"column"},children:[w(e),j(e),(0,Gt.jsx)(Yx,{title:U("rpm_print"),children:(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>Ad(q,Y,null===e||void 0===e?void 0:e.id),sx:{background:"#3f51b529",height:"28px",marginTop:"5px",marginBottom:"5px"},children:(0,Gt.jsx)(Fwe.A,{fontSize:"small",sx:{width:16,height:16}})})}),(null===T||void 0===T||null===(n=T.permissions)||void 0===n?void 0:n.showDeletePrescriptionList_showDeleteList)&&C(e)]})})]})]})}),title:(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:V.titles,fontWeight:600,children:U("rpm_Vitals")}),D.includes("vitaltype")&&(0,Gt.jsx)(Ym,{sx:{minWidth:170,whiteSpace:"normal",fontWeight:600,fontSize:"14px"},color:"bp"===(null===e||void 0===e?void 0:e.vital)?"#000000DE":"glucose"===(null===e||void 0===e?void 0:e.vital)?"customClr.glucose":"grey",children:"bp"===(null===e||void 0===e?void 0:e.vital)||"glucose"===(null===e||void 0===e?void 0:e.vital)?U("rpm_".concat(null===e||void 0===e?void 0:e.vital)):U("rpm_Others")})]})}),(0,Gt.jsxs)(uH,{sx:{paddingTop:"8px"},children:[(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:V.titles,fontWeight:600,children:U("rpm_consultationID")}),D.includes("prescriptionID")&&(0,Gt.jsx)(Ym,{variant:"body2",children:null===e||void 0===e?void 0:e.id})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},pt:1,mt:.5,children:[(0,Gt.jsx)(Ym,{variant:"body1",className:V.titles,fontWeight:600,children:U("rpm_consultationDuration")}),D.includes("prescription_duration")&&(0,Gt.jsxs)(Ym,{variant:"body2",children:[sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM YYYY")," -"," ",sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM YYYY")]})]}),(0,Gt.jsxs)(Eu,{display:"flex",pt:1,mt:.5,children:[(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:V.titles,fontWeight:600,children:U("rpm_Created_By")}),D.includes("createdBy")&&(0,Gt.jsx)(Ym,{variant:"body2",children:null!==e&&void 0!==e&&e.created_by?e.created_by:"NA"})]}),(0,Gt.jsx)(Af,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:"10px",mb:"0"}}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},pl:1,children:[(0,Gt.jsx)(Ym,{variant:"body1",className:V.titles,fontWeight:600,children:U("rpm_Date")}),D.includes("duration")&&(0,Gt.jsx)(Ym,{variant:"body2",color:"textSecondary",children:sa()(e.created_at).format("DD MMM YYYY")})]})]})]})]})},t)})})})})})}})]}),(0,Gt.jsx)(d_e,{openModal:M,onCloseModal:O,order:a,orderBy:s,setOrderBy:c,addNewProgram:()=>{},editProgram:()=>{},filterState:A,setFilterState:k,setOrder:l,notesHead:p,prescriptionNotesModal:_,dataParameter:u,checkState:h,onCheck:m,isSelection:f,nodata:g,pageDetails:b,deleteButton:C,fetchPrescriptionList:y,prescriptionList:d,addNewNote:P}),(0,Gt.jsxs)("div",{style:{display:"none"},children:[(0,Gt.jsx)(fxe,{ref:Q,patientData:E,program:T,details:Z,doctor:I,isAdvices:!oe,isComplaints:!ie,isTests:!ae,isDiagnosis:!re}),(0,Gt.jsx)(fO,{open:N,allHeadCells:p,initialHeadcells:D,setHeadcells:R,onClose:L})]})]})}h_e.defaultProps={notesHead:[],prescriptionNotesModal:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",prescriptionList:[],othernotesList:[],familynotesList:[],fetchPrescriptionList:()=>{},editMobileButton:()=>{},viewMobileButton:()=>{},PrintMobileButton:()=>{},VisibilityIcon:()=>{},deleteMobileButton:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},saveButton:()=>{},closeButton:()=>{},filterState:{},setFilterState:()=>{},program:{},patientData:{},addNewNote:()=>{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadCells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},doctor:{},setDoctor:()=>{},fetchDoctor:()=>{}};const m_e=h_e,f_e=(0,dy.A)((0,Gt.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"RemoveRedEye");const g_e=function(e){var t;let{patientData:n,program:r}=e;const o=window.innerWidth,a=Nt(),s=Ct(qd),[l,c]=We.useState({}),d=!("true"===ls(s,"user_principal.attributes.skip_tour[0]","")),u=Ct(Nd),{t:p}=vg(),{programId:h,patientId:m}=lo(),[f,g]=We.useState([]),[v,x]=We.useState({vital:"",start_date:null,end_date:null}),[y,b]=We.useState(!1),[j,w]=We.useState("desc"),[_,C]=We.useState("created_at"),[S,A]=We.useState((0,i.A)({},{local:{files:[]},onCloud:{files:[]}})),[k,M]=We.useState({open:!1,data:{}}),[O,T]=(0,We.useState)([]),[E,P]=We.useState({open:!1,data:{}}),[D,R]=We.useState({open:!1,data:{}}),[N,L]=We.useState(""),[I,F]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),$=so(),B=e=>{P((0,i.A)((0,i.A)({},E),{},{open:!E.open,data:e}))},[z,H]=We.useState(!1),[W,V]=We.useState(as($o.getHeadCellsPrescription())?["duration","vitaltype","prescriptionID","prescription_duration","createdBy","status","action"]:$o.getHeadCellsPrescription()),U=function(e){V(e),$o.setHeadCellsPrescription(e)},q=e=>{R((0,i.A)((0,i.A)({},D),{},{open:!D.open,data:e}))},G=e=>{if(Array.isArray(e))return T(e.map(e=>e.toString()));const t=e.target.name;O.includes(t)?T(O.filter(e=>e!==t)):T(e=>[...e,t])},Y=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;try{const t={sort_by:_,sort_order:j},{data:n}=await a(Sl(h,m,(0,i.A)({},t),e));g(n)}catch(t){console.log(t)}},Z=async e=>{try{const{data:t}=await a(Fg(e));return t}catch(t){console.log(t)}},K=e=>{M((0,i.A)((0,i.A)({},k),{},{open:!k.open,data:(0,i.A)((0,i.A)({},e.note),{},{local_files:S})}))},X=(e,t)=>(0,Gt.jsx)(Kp,{p:0,onClick:()=>K({name:e,note:t}),className:"lightBlue",children:(0,Gt.jsx)(xje.A,{sx:{fontSize:"14px"}})}),Q=(e,t)=>(0,Gt.jsx)(Yx,{title:p("rpm_UploadMore"),children:(0,Gt.jsx)(Kp,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},onClick:()=>K({name:e,note:t}),children:(0,Gt.jsx)(dbe.A,{fontSize:"small",sx:{width:16,height:16}})})}),J=async e=>{let{noteId:t,file:n}=e;try{await a(wl(h,m,{noteId:t,type:"PRESCRIPTION",fileData:n})),a(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(r){const e=ls(r,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_DownloadFileFailed"),severity:$c}))}},ee=async e=>{const t=(0,i.A)((0,i.A)({},e),{},{type:"PRESCRIPTION"});try{await a(xl(h,m,t)),Y({vital:"",start_date:null,end_date:null}),ie(),B(),a(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_NoteCreatedFailed"),severity:$c}))}},te=async(e,t)=>{let{validateForm:n,setTouched:r}=t,i=null===e||void 0===e?void 0:e.start_date,o=null===e||void 0===e?void 0:e.end_date,s={};if("function"===typeof n&&(s=await n(),r(s)),as(s)){var l,c;const t={id:null===e||void 0===e?void 0:e.id,vital:null===e||void 0===e?void 0:e.vital,medication:null===e||void 0===e?void 0:e.medication,frequency:null===e||void 0===e?void 0:e.frequency,start_date:i?sa()(i).valueOf():null,end_date:o?sa()(o).valueOf():null,note:null===e||void 0===e?void 0:e.note,type:"PRESCRIPTION",upload:as(null===k||void 0===k||null===(l=k.data)||void 0===l?void 0:l.local_files)?[]:null===k||void 0===k||null===(c=k.data)||void 0===c?void 0:c.local_files};try{await a(bl(h,m,t)),Y(),ie(),a(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:Bc}))}catch(d){const e=ls(d,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_NoteUpdateFailed"),severity:$c}))}}},ne=async e=>{try{var t;await a(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.prescription,"/").concat(e,"/").concat(t,"/").concat(n.presId);return await pu(r,{})}finally{r(na(!1))}})(h,m,{presId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id})),Y(),R((0,i.A)((0,i.A)({},D),{},{open:!D.open})),a(Zo({subTitle:"message:rpm_PrescriptionDeleteSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_PrescriptionDeleteFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_PrescriptionDeleteFailed"),severity:$c}))}},re=(e,t)=>{let{validateForm:n,setTouched:r}=t;return(0,Gt.jsx)(Yx,{title:p("rpm_Save"),children:(0,Gt.jsx)(Kp,{className:"lightBlue",onClick:()=>e.id?te(e,{validateForm:n,setTouched:r}):ee(e),color:"primary",children:(0,Gt.jsx)(hbe.A,{fontSize:"small"})})})},ie=()=>{let e=(0,i.A)({},S);e.local.files.splice(0,e.local.files.length),A(e),M((0,i.A)((0,i.A)({},k),{},{open:!1}))},oe=(e,t,n)=>(0,Gt.jsx)(Yx,{title:p("rpm_Cancel"),children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>((e,t,n)=>{if(ie(),e.id){const t=null===f||void 0===f?void 0:f.map(t=>(0,i.A)((0,i.A)({},t),{},{isEdit:t.id===e.id&&!1}));g(t)}else t(n)})(e,t,n),className:"lightDanger",children:(0,Gt.jsx)(ube.A,{fontSize:"small",sx:{width:16,height:16}})})}),ae=()=>{H(!z)};We.useEffect(()=>{u&&Y(),as(r)||as(n)||(async()=>{const{data:e}=await a(Cl(h,m));F({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})})()},[u,j,_,r,n]),We.useEffect(()=>{a(w_({activeMenuItem:"consultations"}))},[]);const se=[{id:"medication",label:p("rpm_Medication"),isSort:!1,sortProperty:"medication"},{id:"dosage",label:p("rpm_Dosage"),isSort:!1,sortProperty:"rpm_Dosage"},{id:"duration",label:p("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"comments",label:p("rpm_Comments"),isSort:!1,sortProperty:"comments"},{id:"action",label:p("rpm_Actions"),isSort:!1,sortProperty:"action"}],le=[{id:"duration",label:p("rpm_Date"),isSort:!1,sortProperty:"duration"},{id:"vitaltype",label:p("rpm_Vitals"),isSort:!1,sortProperty:"vitaltype"},{id:"prescriptionID",label:p("rpm_consultationID"),isSort:!1,sortProperty:"prescriptionID"},{id:"prescription_duration",label:p("rpm_consultationDuration"),isSort:!1,sortProperty:"prescriptionDuration"},{id:"createdBy",label:p("rpm_Created_By"),isSort:!1,sortProperty:"createdBy"},{id:"status",label:p("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"action",label:p("rpm_Actions"),isSort:!1,sortProperty:"action"}];return as(r)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showConsultationList?o>=575?(0,Gt.jsx)(p_e,{order:j,orderBy:_,setOrder:w,setOrderBy:C,dataParameter:"id",checkState:O,onCheck:G,isSelection:!1,nodata:D_,notesHead:le,initialHeadcells:W,setHeadCells:U,prescriptionNotesModal:se,prescriptionList:f,fetchPrescriptionList:Y,fileModal:k,editButton:e=>(0,Gt.jsx)(Yx,{title:p("rpm_Edit"),children:(0,Gt.jsx)(Kp,{color:"primary",disabled:!!e.dummy,onClick:()=>{$("edit-consultation/".concat(null===e||void 0===e?void 0:e.id))},children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,Gt.jsx)(Yx,{title:p("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:async()=>{$("".concat(null===e||void 0===e?void 0:e.id),{state:l})},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),PrintButton:e=>(0,Gt.jsx)(Yx,{title:p("rpm_print"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,Gt.jsx)(Fwe.A,{fontSize:"small",sx:{width:16,height:16}})})}),doctor:l,setDoctor:c,fetchDoctor:Z,deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>q(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),fileUploadButton:X,fileUploadIconButton:Q,downloadFile:J,saveButton:re,closeButton:oe,showFilterColor:y,setShowFilterColor:b,filterState:v,setFilterState:x,presModal:E,handlePresModalToggle:B,patientData:n,program:r,addNewNote:ee,noteTypesDropdown:I,settingModal:z,handleSettingModalToggle:ae}):(0,Gt.jsx)(m_e,{order:j,orderBy:_,setOrder:w,setOrderBy:C,dataParameter:"id",checkState:O,onCheck:G,isSelection:!1,nodata:D_,notesHead:le,initialHeadcells:W,setHeadCells:U,prescriptionNotesModal:se,prescriptionList:f,fetchPrescriptionList:Y,fileModal:k,editMobileButton:e=>(0,Gt.jsx)(Yx,{title:p("rpm_Edit"),children:(0,Gt.jsx)(Kp,{color:"primary",disabled:!!e.dummy,onClick:()=>{$("edit-consultation/".concat(null===e||void 0===e?void 0:e.id))},sx:{background:"#3f51b529",height:"28px",marginTop:"5px"},children:(0,Gt.jsx)(vwe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewMobileButton:e=>(0,Gt.jsx)(Yx,{title:p("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:async()=>{$("".concat(null===e||void 0===e?void 0:e.id),{state:l})},sx:{background:"#3f51b529",height:"28px",marginTop:"5px"},children:(0,Gt.jsx)(f_e,{fontSize:"small",sx:{width:16,height:16}})})}),PrintMobileButton:e=>(0,Gt.jsx)(Yx,{title:p("rpm_print"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},sx:{background:"#3f51b529",height:"28px",marginTop:"5px"},children:(0,Gt.jsx)(Fwe.A,{fontSize:"small",sx:{width:16,height:16}})})}),doctor:l,setDoctor:c,fetchDoctor:Z,deleteMobileButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>q(e),disableFocusRipple:!0,disableTouchRipple:!0,sx:{background:"#ff00001c",height:"28px"},children:(0,Gt.jsx)(Rbe.A,{fontSize:"small",sx:{width:16,height:16}})}),fileUploadButton:X,fileUploadIconButton:Q,downloadFile:J,saveButton:re,closeButton:oe,showFilterColor:y,setShowFilterColor:b,filterState:v,setFilterState:x,presModal:E,handlePresModalToggle:B,patientData:n,program:r,addNewNote:ee,noteTypesDropdown:I,settingModal:z,handleSettingModalToggle:ae}):(0,Gt.jsx)(__,{}),(0,Gt.jsx)(a_e,{openModal:null===k||void 0===k?void 0:k.open,onCloseModal:ie,actionFunction:te,onFileUpload:function(e){const t=e.target.files;let n=(0,i.A)({},S.local);t&&Array.from(t).forEach(e=>{var t;return as(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?a(Zo({subTitle:"error:rpm_ImageSize",severity:$c})):(e.url=URL.createObjectURL(e),void n.files.push(e)):a(Zo({subTitle:"error:rpm_SameFileName",severity:$c}))}),A(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),e.target.value=""},initialValues:S,onLocalFileDelete:function(e){let t=(0,i.A)({},S);t.local.files.splice(e,1),A(t)},fileModal:k,onCloudFilesDelete:async(e,t)=>{try{await a(_l(h,m,{noteId:e.id,fileId:t,type:"PRESCRIPTION"})),Y(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);M((0,i.A)((0,i.A)({},k),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),a(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_FileDeleteFailed"),severity:$c}))}},onCloudFileDownload:J}),(0,Gt.jsx)(PU,{openModal:D.open,onCloseModal:q,actionFunction:()=>ne(D),dataName:D.data.disease_name,options:{primaryText:p("message:rpm_DeleteTitle"),secondaryText:p("message:rpm_DeleteBodyText"),descText:p("message:rpm_DeleteSubText"),btn:{primaryText:p("rpm_Delete"),secondaryText:p("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(AZ,{isTour:d,path:"prescriptionTour",setRenderer:L}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:N})]})};function v_e(e){let{alertsList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,alertsHead:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchResolvePatientAlerts:p,pageDetails:h,filterState:m,setFilterState:f,patientData:g,program:v,noteTypesDropdown:x,showFilterColor:y,setShowFilterColor:b,setHeadcells:j,settingModal:w,initialHeadcells:_,handleSettingModalToggle:C}=e;const{t:S}=vg(),A=Nt(),k=so(),{programId:M,patientId:O}=lo(),T=[{name:S("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:"".concat((null===g||void 0===g?void 0:g.first_name)||""," ").concat((null===g||void 0===g?void 0:g.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients/").concat(null===g||void 0===g?void 0:g.id,"/dashboard")},{name:S("rpm_NoteResolvedAlerts"),url:""}];return We.useEffect(()=>{const e={breadcrumb:T};as(v)||as(g)||A(w_(e))},[v,g]),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:S("rpm_Notes")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:S("rpm_Notes")})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",alignItems:"center",children:[(0,Gt.jsx)(Vp,{variant:"contained",size:"small",disableElevation:!0,onClick:()=>k("".concat(Lc.DOCTOR.PROGRAM,"/").concat(M,"/patients/").concat(O,"/notes/resolve-alerts")),children:S("rpm_NoteResolvedAlerts")}),x.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>k("".concat(Lc.DOCTOR.PROGRAM,"/").concat(M,"/patients/").concat(O,"/notes/").concat(e.toLowerCase(),"-note")),children:S("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})}),!as(x.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center"},children:(0,Gt.jsxs)(Dw,{sx:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",defaultValue:"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:S("rpm_AdditionalNotes")}),x.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>k("".concat(Lc.DOCTOR.PROGRAM,"/").concat(M,"/patients/").concat(O,"/notes/").concat(e.toLowerCase(),"-note")),children:S("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})})]})})]})}),(0,Gt.jsx)(Eu,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,md:12,lg:9,xl:8,children:(0,Gt.jsx)(bwe,{fetchListFunction:p,pageDetails:h,filterState:m,setFilterState:f,showFilterColor:y,setShowFilterColor:b})}),(0,Gt.jsx)(df,{item:!0,ml:"auto",children:(0,Gt.jsx)(Yx,{title:S("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:C,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})}),(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:null===s||void 0===s?void 0:s.filter(e=>_.includes(e.id)),dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:p,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>{var t,n;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[_.includes("vital")&&(0,Gt.jsxs)(rC,{children:[(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,Gt.jsx)(Eu,{component:"span",display:"inline-flex",mr:1,children:(0,Gt.jsxs)(Eu,{component:"span",children:["bp systolic"===(null===e||void 0===e?void 0:e.data_name)&&(0,Gt.jsxs)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",S("rpm_BloodPressure")]}),"bp diastolic"===(null===e||void 0===e?void 0:e.data_name)&&"","pulse"===(null===e||void 0===e?void 0:e.data_name)&&(0,Gt.jsxs)(Ym,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,children:[" ",S("rpm_Pulse")]}),"glucose"===(null===e||void 0===e?void 0:e.data_name.split(" ")[0])&&(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",S("rpm_Glucose")]})]})},t)):"NA"," "]}),_.includes("reading")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(XO,{component:"span",icon:!1,sx:e=>({bgcolor:e.palette.primary.theme[50],color:e.palette.primary.main,py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)},textTransform:"capitalize"}),children:(null===e||void 0===e||null===(n=e.alerts)||void 0===n?void 0:n.length)>0?null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,Gt.jsx)(Eu,{component:"span",display:"inline-flex",mr:1,children:(0,Gt.jsxs)(Eu,{component:"span",children:["bp systolic"===(null===e||void 0===e?void 0:e.data_name)&&"Sys: ","bp diastolic"===(null===e||void 0===e?void 0:e.data_name)&&"Dia: ","pulse"===(null===e||void 0===e?void 0:e.data_name)&&"Pulse: ",null===e||void 0===e?void 0:e.value]})},t)):"NA"})}),_.includes("description")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Eu,{component:"span",children:0===t&&(0,Gt.jsx)(Eu,{component:"span",children:S("rpm_".concat(null===e||void 0===e?void 0:e.text))})})},t))}),_.includes("created_time")&&(0,Gt.jsx)(rC,{children:e.ts}),_.includes("modified_message")&&(0,Gt.jsx)(rC,{sx:{whiteSpace:"normal"},children:e.follow_up})]},e.id)})}),(0,Gt.jsx)(IO,{pageDetails:h,fetchListFunction:p}),(0,Gt.jsx)(fO,{open:w,allHeadCells:s,initialHeadcells:_,setHeadcells:j,onClose:C})]})}v_e.defaultProps={alertsHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],fetchResolvePatientAlerts:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},filterState:{},setFilterState:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:gu().array,setHeadcells:gu().func,settingModal:gu().bool,handleSettingModalToggle:gu().func};var x_e=n(19778);function y_e(e){let{alertsList:t,fetchResolvePatientAlerts:n,pageDetails:r,filterState:i,setFilterState:o,patientData:a,program:s,noteTypesDropdown:l,showFilterColor:c,setShowFilterColor:d,initialHeadcells:u}=e;const p=kwe(),{t:h}=vg(),m=Nt(),f=so(),{programId:g,patientId:v}=lo(),[x,y]=(0,We.useState)(!1),b=e=>()=>{y(e)},j=[{name:h("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===s||void 0===s?void 0:s.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===s||void 0===s?void 0:s.code,"/patients")},{name:"".concat((null===a||void 0===a?void 0:a.first_name)||""," ").concat((null===a||void 0===a?void 0:a.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===s||void 0===s?void 0:s.code,"/patients/").concat(null===a||void 0===a?void 0:a.id,"/dashboard")},{name:h("rpm_NoteResolvedAlerts"),url:""}];return We.useEffect(()=>{const e={breadcrumb:j};as(s)||as(a)||m(w_(e))},[s,a]),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{position:"absolute",top:"-45px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontSize:16,children:h("rpm_Notes")})}),(0,Gt.jsx)(Eu,{position:"absolute",top:"-50px",right:"0px",children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Kp,{onClick:b(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,Gt.jsx)(Cwe.A,{color:"primary",sx:{padding:"0"}})})})})]}),(0,Gt.jsx)(Lf,{anchor:"left",open:x,onClose:b(!1),children:(0,Gt.jsxs)("div",{style:{width:230},children:[(0,Gt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,Gt.jsx)(Ym,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:h("rpm_Notes")}),(0,Gt.jsx)(Kp,{onClick:b(!1),children:(0,Gt.jsx)(Bw.A,{})})]}),(0,Gt.jsx)(Eu,{sx:{padding:"10px"},children:(0,Gt.jsxs)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",alignItems:"center",children:[l.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>f("".concat(Lc.DOCTOR.PROGRAM,"/").concat(g,"/patients/").concat(v,"/notes/").concat(e.toLowerCase(),"-note")),children:h("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})}),!as(l.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,Gt.jsxs)(Dw,{sx:{color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"13px",fontWeight:"600",width:"100%"},fullWidth:!0,variant:"outlined",size:"small",defaultValue:"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:h("rpm_AdditionalNotes")}),l.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>f("".concat(Lc.DOCTOR.PROGRAM,"/").concat(g,"/patients/").concat(v,"/notes/").concat(e.toLowerCase(),"-note")),children:h("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})}),(0,Gt.jsx)(Vp,{fullWidth:!0,variant:"outlined",size:"small",disableElevation:!0,onClick:()=>f("".concat(Lc.DOCTOR.PROGRAM,"/").concat(g,"/patients/").concat(v,"/notes/resolve-alerts")),endIcon:(0,Gt.jsx)(Mwe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:h("rpm_NoteResolvedAlerts")})]})})]})})]}),(0,Gt.jsx)(Awe,{fetchListFunction:n,pageDetails:r,filterState:i,setFilterState:o,showFilterColor:c,setShowFilterColor:d,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0}),null===t||void 0===t?void 0:t.map(e=>{var t,n;return(0,Gt.jsxs)(aH,{className:"theme_scroll",sx:{mt:1,mb:2},children:[(0,Gt.jsx)(Eu,{mb:1,sx:{padding:"10px 16px",background:"#e8eaf6",color:"#3f51b5"},display:"flex",alignItems:"center",children:(0,Gt.jsxs)(Ym,{fontSize:14,fontWeight:600,sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(x_e.A,{sx:{color:"green !important",fontSize:"16px",marginRight:"5px"}}),"Resolved Alerts"]})}),(0,Gt.jsx)(uH,{sx:{padding:"0 16px 16px"},children:(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",gap:1,children:[(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:p.titles,fontWeight:600,children:"Vitals:"}),u.includes("vital")&&(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,Gt.jsxs)(Eu,{component:"span",display:"inline-flex",mr:1,children:["bp systolic"===(null===e||void 0===e?void 0:e.data_name)&&(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:h("rpm_BloodPressure")}),"pulse"===(null===e||void 0===e?void 0:e.data_name)&&(0,Gt.jsx)(Ym,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,children:h("rpm_Pulse")}),"glucose"===(null===e||void 0===e?void 0:e.data_name.split(" ")[0])&&(0,Gt.jsx)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:h("rpm_Glucose")})]},t)):"NA"})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:p.titles,fontWeight:600,children:"Readings:"}),u.includes("reading")&&(0,Gt.jsx)(XO,{icon:!1,sx:e=>({bgcolor:e.palette.primary.theme[50],color:e.palette.primary.main,py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,textTransform:"capitalize",width:"fit-content"}),children:(null===e||void 0===e||null===(n=e.alerts)||void 0===n?void 0:n.length)>0?null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,Gt.jsxs)(Eu,{component:"span",display:"inline-flex",mr:1,children:["bp systolic"===(null===e||void 0===e?void 0:e.data_name)&&"Sys: ","bp diastolic"===(null===e||void 0===e?void 0:e.data_name)&&"Dia: ","pulse"===(null===e||void 0===e?void 0:e.data_name)&&"Pulse: ",null===e||void 0===e?void 0:e.value]},t)):"NA"})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:p.titles,fontWeight:600,children:"Description:"}),u.includes("description")&&(0,Gt.jsx)(Eu,{children:null===e||void 0===e?void 0:e.alerts.map((e,t)=>(0,Gt.jsx)(Eu,{children:0===t&&(0,Gt.jsx)(Ym,{fontSize:14,fontWeight:500,color:"textSecondary",children:h("rpm_".concat(null===e||void 0===e?void 0:e.text))})},t))})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:p.titles,fontWeight:600,children:"Date & Time:"}),u.includes("created_time")&&(0,Gt.jsx)(Ym,{variant:"body2",color:"textSecondary",fontSize:14,fontWeight:500,children:e.ts})]}),(0,Gt.jsxs)(Eu,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",className:p.titles,fontWeight:600,children:"Follow Up Message:"}),u.includes("modified_message")&&(0,Gt.jsx)(Ym,{variant:"body2",color:"textSecondary",sx:{whiteSpace:"normal"},fontSize:14,fontWeight:500,children:e.follow_up})]})]})})]},e.id)})]})}y_e.defaultProps={alertsHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],fetchResolvePatientAlerts:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},filterState:{},setFilterState:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:gu().array,setHeadcells:gu().func,settingModal:gu().bool,handleSettingModalToggle:gu().func};const b_e=["content"];const j_e=function(e){let{patientData:t,program:n}=e;const r=window.innerWidth,o=Nt(),a=Ct(Nd),{t:s}=vg(),l=Ct(qd),c=!("true"===ls(l,"user_principal.attributes.skip_tour[0]","")),{enqueueSnackbar:d}=hi(),{programId:u,patientId:p}=lo(),[h,m]=(0,We.useState)("desc"),[f,g]=(0,We.useState)("ts"),[v,x]=We.useState(null),[y,b]=(0,We.useState)([]),[j,w]=We.useState(!1),[_,C]=We.useState(""),[S,A]=We.useState(null),[k,M]=We.useState((0,i.A)({},Fc)),[O,T]=We.useState({vital:"",start_date:null,end_date:null}),[E,P]=(0,We.useState)((0,i.A)({},Fc)),[D,R]=We.useState({open:!1,data:{}}),[N,L]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),[I,F]=We.useState(!1),[$,B]=We.useState(as($o.getResolvedAlertsHeadcells())?["vital","reading","description","created_time","modified_message"]:$o.getResolvedAlertsHeadcells()),z=function(e){B(e),$o.setResolvedAlertsHeadcells(e)},H=()=>{F(!I)},W=e=>{R((0,i.A)((0,i.A)({},D),{},{open:!D.open,data:e}))},V=e=>{if(Array.isArray(e))return b(e.map(e=>e.toString()));const t=e.target.name;y.includes(t)?b(y.filter(e=>e!==t)):b(e=>[...e,t])},U=e=>(0,Gt.jsx)(Yx,{title:s("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),q=e=>(0,Gt.jsx)(Yx,{title:s("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),G=e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),Y=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;(async e=>{try{const{data:t}=await o(Xs(p,e)),n=t||{},{content:r}=n,a=Ko(n,b_e);x(r),A(e=>(0,i.A)((0,i.A)({},e),{},{resolveAlerts:null===a||void 0===a?void 0:a.total})),M(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(t){d(t.message,{variant:"error"})}})((0,i.A)((0,i.A)({},k),{},{sort_by:f,sort_order:h,includeDismissed:!0,vitalType:e.vital,minTs:sa()(e.start_date).valueOf(),maxTs:sa()(e.end_date).valueOf()}))};We.useEffect(()=>{a&&Y(),as(n)||as(t)||(async()=>{const{data:e}=await o(Cl(u,p));L({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})})()},[a,n,t]),We.useEffect(()=>{o(w_({activeMenuItem:"notes"}))},[]);const Z=[{id:"vital",label:s("rpm_Vitals"),isSort:!1,sortProperty:"vital"},{id:"reading",label:s("rpm_Readings"),isSort:!1,sortProperty:"reading"},{id:"description",label:s("rpm_Description"),isSort:!1,sortProperty:"description"},{id:"created_time",label:s("rpm_DateTime"),isSort:!1,sortProperty:"created_time"},{id:"modified_message",label:s("rpm_AlertMessage"),isSort:!1,sortProperty:"modified_message"}];return(0,Gt.jsxs)(Gt.Fragment,{children:[r>=575?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(v_e,{order:h,orderBy:f,setOrder:m,setOrderBy:g,dataParameter:"id",checkState:y,onCheck:V,isSelection:!1,nodata:fwe,showFilterColor:j,setShowFilterColor:w,alertsHead:Z,alertsList:v,fetchResolvePatientAlerts:Y,pageDetails:E,editButton:U,viewButton:q,deleteButton:G,filterState:O,setFilterState:T,patientData:t,program:n,noteTypesDropdown:N,setHeadcells:z,settingModal:I,initialHeadcells:$,handleSettingModalToggle:H}),(0,Gt.jsx)(PU,{openModal:D.open,onCloseModal:W,actionFunction:()=>console.log(D),dataName:D.data.title,options:{primaryText:s("message:rpm_DeleteTitle"),secondaryText:s("message:rpm_DeleteBodyText"),descText:s("message:rpm_DeleteSubText"),btn:{primaryText:s("rpm_Delete"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(y_e,{order:h,orderBy:f,setOrder:m,setOrderBy:g,dataParameter:"id",checkState:y,onCheck:V,isSelection:!1,nodata:fwe,showFilterColor:j,setShowFilterColor:w,alertsHead:Z,alertsList:v,fetchResolvePatientAlerts:Y,pageDetails:E,editButton:U,viewButton:q,deleteButton:G,filterState:O,setFilterState:T,patientData:t,program:n,noteTypesDropdown:N,setHeadcells:z,settingModal:I,initialHeadcells:$,handleSettingModalToggle:H}),(0,Gt.jsx)(Ebe,{openModal:D.open,onCloseModal:W,actionFunction:()=>console.log(D),dataName:D.data.title,options:{primaryText:s("message:rpm_DeleteTitle"),secondaryText:s("message:rpm_DeleteBodyText"),btn:{primaryText:s("rpm_Delete"),secondaryText:s("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,Gt.jsx)(AZ,{isTour:c,path:"notesTour",setRenderer:C}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:_})]})};function w_e(e){var t;let{editButton:n,deleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,fileUploadButton:s,fileModal:l,fileUploadIconButton:c,notesList:d,editableNoteId:u,downloadFile:p,setToggleAddNote:h,toggleAddNote:m,closeEditMode:f,editNote:g,fetchNoteList:v,pageDetails:x,filterState:y,setFilterState:b,onLocalFileDelete:j,onCloudFilesDelete:w,patientData:_,program:C,noteTypesDropdown:S,showFilterColor:A,setShowFilterColor:k}=e;const{t:M}=vg(),O=Nt(),T=so(),{programId:E,patientId:P}=lo(),D=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),R=We.useRef(null),N=[{name:M("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===C||void 0===C?void 0:C.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients")},{name:"".concat((null===_||void 0===_?void 0:_.first_name)||""," ").concat((null===_||void 0===_?void 0:_.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients/").concat(null===_||void 0===_?void 0:_.id,"/dashboard")},{name:M("rpm_SummaryNotes"),url:""}],L=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],I=()=>{h(!m),u&&f()},F=()=>{var e,t,n,r,i,o,a,s,c,d;return(0,Gt.jsxs)(Gt.Fragment,{children:[!as(null===l||void 0===l||null===(e=l.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===l||void 0===l||null===(r=l.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},onDelete:()=>j(t),icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!as(null===l||void 0===l||null===(s=l.data)||void 0===s?void 0:s.files)&&(null===l||void 0===l||null===(c=l.data)||void 0===c||null===(d=c.files)||void 0===d?void 0:d.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>w(null===l||void 0===l?void 0:l.data,null===e||void 0===e?void 0:e.id,t),icon:(0,Gt.jsx)(mbe.A,{}),onClick:()=>{p({noteId:u,file:e})},label:$(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},$=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},B=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{color:"primary.theme.500",borderRadius:"0",textDecoration:"underline",height:"inherit"},"data-id":e.id,label:$(e.file_name),variant:"string",className:"attachment_btn",onClick:()=>{p({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,Gt.jsx)(Yx,{title:M("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:N};as(C)||as(_)||O(w_(e))},[C,_]),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,children:(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:M("rpm_Notes")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:M("rpm_Notes")})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,children:(0,Gt.jsxs)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[(0,Gt.jsx)(Vp,{variant:"outlined",size:"small",disableElevation:!0,onClick:()=>T("".concat(Lc.DOCTOR.PROGRAM,"/").concat(E,"/patients/").concat(P,"/notes/resolve-alerts")),children:M("rpm_NoteResolvedAlerts")}),S.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{variant:"SUMMARY"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>T("".concat(Lc.DOCTOR.PROGRAM,"/").concat(E,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:M("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})}),!as(S.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7}},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center"},children:(0,Gt.jsxs)(Dw,{sx:S.nonExistingNoteTypes.includes("SUMMARY")?{maxWidth:180,color:"white",backgroundColor:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:S.nonExistingNoteTypes.includes("SUMMARY")?"SUMMARY":"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:M("rpm_AdditionalNotes")}),S.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>T("".concat(Lc.DOCTOR.PROGRAM,"/").concat(E,"/patients/").concat(P,"/notes/").concat(e.toLowerCase(),"-note")),children:M("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})})]})})]})}),(0,Gt.jsx)(Eu,{bgcolor:"white",className:"UseNoteFilter",p:2,children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,md:12,lg:9,xl:8,children:(0,Gt.jsx)(bwe,{fetchListFunction:v,pageDetails:x,filterState:y,setFilterState:b,showFilterColor:A,setShowFilterColor:k})})})}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(Eu,{bgcolor:"white",p:2,children:[as(d)&&!m&&(0,Gt.jsx)(jwe,{handleToggleAddNote:I,showFilterColor:A}),!as(d)&&(0,Gt.jsx)(Gt.Fragment,{children:(null===C||void 0===C||null===(t=C.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(Sbe.A,{}),onClick:I,color:"primary",sx:{fontWeight:"600",marginBottom:"8px"},children:M("rpm_AddNewNote")})}),m&&(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,validationSchema:vV.summaryNoteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,className:"EditorPageNotes",spacing:2,mb:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:5,children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(qj,{id:"vital",children:M("rpm_VitalType")}),(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:M("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:M("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:M("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_VitalType")})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:9,children:[(0,Gt.jsxs)(Eu,{className:" text-editor",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:D,formats:L,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:R}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_Note")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:I,sx:{marginRight:"10px"},children:M("rpm_Cancel")})," ",(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:M("rpm_Save")})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(F,{}),as(null===l||void 0===l||null===(t=l.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?s("upload",{}):c("upload",{})]})})})]})})}}),d.map(e=>{var t,i;return(0,Gt.jsx)(Gt.Fragment,{children:u!==e.id?(0,Gt.jsxs)(df,{container:!0,spacing:2,mb:2,children:[(0,Gt.jsx)(df,{item:!0,xs:11,children:(0,Gt.jsxs)(Eu,{sx:{bgcolor:"primary.theme.50",borderRadius:1,p:1},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:600,children:M("rpm_".concat(e.vital))}),(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all"},className:"savemode"}),(0,Gt.jsxs)(Ym,{variant:"body2",mb:.6,children:[(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},children:[M("rpm_Attachment"),":\xa0"]}),(0,Gt.jsx)(Eu,{component:"span",sx:{color:"primary.theme.500",fontWeight:"600",pl:"0"},children:(0,Gt.jsx)(B,{noteObj:e})})]}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px"},children:["Created by \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),"\xa0\xa0"]}),(0,Gt.jsxs)(Ym,{sx:{fontSize:"14px"},children:["Last Updated by \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_by||e.created_by}),"\xa0 on \xa0",(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")})]})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:1,children:(0,Gt.jsxs)(Eu,{sx:{margin:1},className:"BGbtnGrp",children:[(null===C||void 0===C||null===(t=C.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===C||void 0===C||null===(i=C.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})})]}):(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,onSubmit:g,validationSchema:vV.summaryNoteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,className:"EditorPageNotes",mt:2,mb:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:5,children:[(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(qj,{id:"vital",children:M("rpm_VitalType")}),(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:M("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:M("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:M("rpm_".concat(e.name))},e.value))})]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_VitalType")})})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:9,children:[(0,Gt.jsxs)(Eu,{className:" text-editor",width:"100%",children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:D,formats:L,value:o.description,onChange:e=>a("description",e),ref:R}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:M(e,{field:M("rpm_Note")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"outlined",color:"primary",onClick:f,sx:{marginRight:"10px"},children:M("rpm_Cancel")})," ",(0,Gt.jsx)(Vp,{disableElevation:!0,variant:"contained",sx:{marginRight:2},type:"submit",children:M("rpm_Save")})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(F,{}),as(null===l||void 0===l||null===(n=l.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?s("upload",e):c("upload",e)]})})})]})})}})})}),(0,Gt.jsx)(Eu,{sx:e=>({pr:2,bgcolor:e.palette.common.white}),children:(0,Gt.jsx)(IO,{pageDetails:x,fetchListFunction:v})})]})]})}w_e.defaultProps={alertsHead:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},fileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const __e=w_e;function C_e(e){var t;let{MobileeditButton:n,MobiledeleteButton:r,viewButton:i,initialFormValues:o,addNewNote:a,MobliefileUploadButton:s,fileModal:l,fileUploadIconButton:c,notesList:d,editableNoteId:u,downloadFile:p,setToggleAddNote:h,toggleAddNote:m,closeEditMode:f,editNote:g,fetchNoteList:v,pageDetails:x,filterState:y,setFilterState:b,onLocalFileDelete:j,onCloudFilesDelete:w,patientData:_,program:C,noteTypesDropdown:S,showFilterColor:A,setShowFilterColor:k}=e;const M=kwe(),{t:O}=vg(),T=Nt(),E=so(),{programId:P,patientId:D}=lo(),R=We.useMemo(()=>({toolbar:{container:[["bold","italic","underline","strike"],[{size:[]},{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],history:{delay:500,maxStack:100,userOnly:!0}},clipboard:{matchVisual:!1}}),[]),N=We.useRef(null),[L,I]=(0,We.useState)(!1),F=e=>()=>{I(e)},$=[{name:O("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===C||void 0===C?void 0:C.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients")},{name:"".concat((null===_||void 0===_?void 0:_.first_name)||""," ").concat((null===_||void 0===_?void 0:_.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===C||void 0===C?void 0:C.code,"/patients/").concat(null===_||void 0===_?void 0:_.id,"/dashboard")},{name:O("rpm_SummaryNotes"),url:""}],B=["header","bold","italic","underline","strike","blockquote","size","color","list","bullet","indent","link"],z=()=>{h(!m),u&&f()},H=()=>{var e,t,n,r,i,o,a,s,c,d;return(0,Gt.jsxs)(Gt.Fragment,{children:[!as(null===l||void 0===l||null===(e=l.data)||void 0===e||null===(t=e.local_files)||void 0===t||null===(n=t.local)||void 0===n?void 0:n.files)&&(null===l||void 0===l||null===(r=l.data)||void 0===r||null===(i=r.local_files)||void 0===i||null===(o=i.local)||void 0===o||null===(a=o.files)||void 0===a?void 0:a.map((e,t)=>(0,Gt.jsx)(gb,{sx:{ml:1,mb:1},onDelete:()=>j(t),icon:(0,Gt.jsx)(fbe.A,{fontSize:"small"}),label:null===e||void 0===e?void 0:e.name,variant:"string",className:"UplodeChip"},t))),!as(null===l||void 0===l||null===(s=l.data)||void 0===s?void 0:s.files)&&(null===l||void 0===l||null===(c=l.data)||void 0===c||null===(d=c.files)||void 0===d?void 0:d.map((e,t)=>(0,Gt.jsx)(gb,{sx:{p:1,mb:1},onDelete:()=>w(null===l||void 0===l?void 0:l.data,null===e||void 0===e?void 0:e.id,t),icon:(0,Gt.jsx)(mbe.A,{}),onClick:()=>{p({noteId:u,file:e})},label:W(null===e||void 0===e?void 0:e.file_name),variant:"string",className:"UplodeChip"},t)))]})},W=e=>{const t=null===e||void 0===e?void 0:e.split("/");return t[(null===t||void 0===t?void 0:t.length)-1]},V=e=>{var t,n,r;let{noteObj:i}=e;const[o,a]=We.useState(2);return(0,Gt.jsxs)(Gt.Fragment,{children:[null===i||void 0===i||null===(t=i.files)||void 0===t||null===(n=t.slice(0,o))||void 0===n?void 0:n.map(e=>(0,Gt.jsx)(gb,{sx:{color:"black",borderRadius:"0",textDecoration:"underline",height:"inherit",pl:"0 !important"},"data-id":e.id,label:W(e.file_name),variant:"string",className:M.attachment_btn,onClick:()=>{p({noteId:i.id,file:e})}},e.id)),(null===i||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length)>=3&&(0,Gt.jsx)(Yx,{title:O("rpm_ShowMore"),children:(0,Gt.jsx)(Kp,{disableRipple:!0,size:"small",onClick:()=>{var e,t;o===(null===i||void 0===i||null===(e=i.files)||void 0===e?void 0:e.length)?a(2):a(null===i||void 0===i||null===(t=i.files)||void 0===t?void 0:t.length)},children:"..."})})]})};return We.useEffect(()=>{const e={breadcrumb:$};as(C)||as(_)||T(w_(e))},[C,_]),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{position:"absolute",top:"-45px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontSize:16,children:O("rpm_Notes")})}),(0,Gt.jsx)(Eu,{position:"absolute",top:"-50px",right:"0px",children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Kp,{onClick:F(!0),sx:{background:"#e8eaf6",padding:"5px"},children:(0,Gt.jsx)(Cwe.A,{color:"primary",sx:{padding:"0"}})})})})]}),(0,Gt.jsx)(Lf,{anchor:"left",open:L,onClose:F(!1),children:(0,Gt.jsxs)("div",{style:{width:230},children:[(0,Gt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"#f2f2fe",padding:"5px 10px"},children:[(0,Gt.jsx)(Ym,{variant:"h6",sx:{color:"#7986cb",fontWeight:"600"},children:O("rpm_Notes")}),(0,Gt.jsx)(Kp,{onClick:F(!1),children:(0,Gt.jsx)(Bw.A,{})})]}),(0,Gt.jsx)(Eu,{sx:{padding:"10px"},children:(0,Gt.jsxs)(Eu,{display:"flex",flexWrap:"wrap",gap:1,mb:3,justifyContent:"end",children:[S.existingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{fullWidth:!0,variant:"SUMMARY"===e?"contained":"outlined",size:"small",disableElevation:!0,onClick:()=>E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(P,"/patients/").concat(D,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))})})}),!as(S.nonExistingNoteTypes)&&(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"center","& .MuiSelect-select":{p:.7},width:"100%"},className:"remove_selectborder",children:(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",width:"100%"},children:(0,Gt.jsxs)(Dw,{sx:S.nonExistingNoteTypes.includes("SUMMARY")?{color:"primary.theme.500",fontWeight:"500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"13px","& svg":{color:"#fff"}}:{maxWidth:180,color:"primary.theme.500",borderColor:"primary.theme.500",borderRadius:"4px",pl:"5px",fontSize:"14px"},fullWidth:!0,variant:"outlined",size:"small",value:S.nonExistingNoteTypes.includes("SUMMARY")?"SUMMARY":"additionalNotes",children:[(0,Gt.jsx)($m,{value:"additionalNotes",disabled:!0,sx:{display:"none"},children:O("rpm_AdditionalNotes")}),S.nonExistingNoteTypes.map(e=>{if("PRESCRIPTION"!==e)return(0,Gt.jsx)($m,{value:e,onClick:()=>E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(P,"/patients/").concat(D,"/notes/").concat(e.toLowerCase(),"-note")),children:O("rpm_".concat(ms(e.toLowerCase()),"Notes"))},e)})]})})}),(0,Gt.jsx)(Vp,{fullWidth:!0,variant:"outlined",size:"small",disableElevation:!0,onClick:()=>E("".concat(Lc.DOCTOR.PROGRAM,"/").concat(P,"/patients/").concat(D,"/notes/resolve-alerts")),endIcon:(0,Gt.jsx)(Mwe.A,{sx:{color:"#3f51b5"}}),sx:{justifyContent:"space-between"},children:O("rpm_NoteResolvedAlerts")})]})})]})})]}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Awe,{fetchListFunction:v,pageDetails:x,filterState:y,setFilterState:b,showFilterColor:A,setShowFilterColor:k,filterVariant:"text",filterName:"Filters",mobileFilterBG:!0})}),(0,Gt.jsx)(Eu,{children:!as(d)&&(0,Gt.jsx)(Gt.Fragment,{children:(null===C||void 0===C||null===(t=C.permissions)||void 0===t?void 0:t.showCreateNoteList)&&(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(Sbe.A,{}),onClick:z,color:"primary",sx:{fontWeight:"600",fontSize:"12px"},children:O("rpm_AddNew")})})})]}),(0,Gt.jsxs)(Eu,{children:[as(d)&&!m&&(0,Gt.jsx)(Eu,{bgcolor:"white",className:"noDataAddedField",children:(0,Gt.jsx)(jwe,{handleToggleAddNote:z,showFilterColor:A})}),m&&(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,validationSchema:vV.summaryNoteSchema,onSubmit:a,children:e=>{var t,n,r;let{values:i,setFieldValue:o}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,Gt.jsxs)(Eu,{className:"vitalEdits",children:[(0,Gt.jsx)(Ym,{variant:"span",id:"vital",sx:{marginBottom:"5px"},fontSize:14,children:O("rpm_VitalType")}),(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",onChange:e=>{o("vital",e.target.value)},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,className:"text-editor quilldesign",width:"100%",mb:2,children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:R,formats:B,value:null===i||void 0===i?void 0:i.description,onChange:e=>{o("description",e)},ref:N}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsx)(Eu,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(H,{}),as(null===l||void 0===l||null===(t=l.data)||void 0===t||null===(n=t.local_files)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.files)?s("upload",{}):c("upload",{})]})}),(0,Gt.jsxs)(Eu,{mt:2,display:"flex",children:[(0,Gt.jsx)(Vp,{fullWidth:!0,disableElevation:!0,variant:"outlined",color:"primary",onClick:z,sx:{marginRight:"10px"},children:O("rpm_Cancel")}),(0,Gt.jsx)(Vp,{fullWidth:!0,disableElevation:!0,variant:"contained",type:"submit",children:O("rpm_Save")})]})]})})}}),d.map(e=>{var t,i;return(0,Gt.jsx)(Gt.Fragment,{children:u!==e.id?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{bgcolor:"white",borderRadius:"8px"},children:(0,Gt.jsxs)(Eu,{sx:{background:"#eaeaff",color:"#7986cb",fontWeight:"600",padding:"8px 16px",borderRadius:"8px 8px 0 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:600,children:O("rpm_".concat(e.vital))}),(0,Gt.jsxs)(Eu,{className:M.actionButtons,children:[(null===C||void 0===C||null===(t=C.permissions)||void 0===t?void 0:t.showEditNote)&&n(e),!1,(null===C||void 0===C||null===(i=C.permissions)||void 0===i?void 0:i.showDeleteList)&&r({id:e.id})]})]})}),(0,Gt.jsxs)(Eu,{sx:{bgcolor:"white",borderRadius:"0 0 8px 8px ",p:"8px 16px",mb:"10px"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Description:"}),(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit",sx:{wordBreak:"break-all",marginTop:"0"},className:"savemode"}),(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:[O("rpm_Attachment"),":"]}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsx)(Eu,{component:"span",sx:{color:"black",fontWeight:"600",pl:"0 !important"},className:"fileObjectName",children:(0,Gt.jsx)(V,{noteObj:e})})}),(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Created by:"}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.created_by,(0,Gt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})}),(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,sx:{verticalAlign:"middle"},className:M.titles,children:"Last Updated by :"}),(0,Gt.jsx)(Ym,{variant:"body2",mb:.6,children:(0,Gt.jsxs)(Eu,{component:"span",fontWeight:600,sx:{fontSize:"14px"},children:[e.updated_by||e.created_by,(0,Gt.jsx)("span",{style:{padding:"0 5px",fontWeight:"normal"},children:"on"}),e.updated_at?sa()(e.updated_at).format("DD MMM YYYY hh:mm A"):sa()(e.created_at).format("DD MMM YYYY hh:mm A")]})})]})]}):(0,Gt.jsx)(Iz,{initialValues:o,enableReinitialize:!0,onSubmit:g,validationSchema:vV.summaryNoteSchema,children:t=>{var n,r,i;let{values:o,setFieldValue:a}=t;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(Eu,{bgcolor:"white",sx:{padding:"16px",borderRadius:"8px",marginBottom:"8px",borderTop:"5px solid #3f51b5",borderBottom:"1px solid #3f51b5",borderLeft:"1px solid #3f51b5",borderRight:"1px solid #3f51b5"},children:[(0,Gt.jsxs)(Eu,{className:"vitalEdits",children:[(0,Gt.jsx)(Ym,{variant:"span",id:"vital",sx:{marginBottom:"5px"},fontSize:14,children:O("rpm_VitalType")}),(0,Gt.jsx)(Xj,{sx:{display:"flex",alignItems:"center",marginTop:"5px"},children:(0,Gt.jsx)(Dw,{fullWidth:!0,variant:"outlined",size:"small",name:"vital",id:"vital",value:o.vital,onChange:e=>{a("vital",e.target.value)},labelId:"vital",label:O("rpm_VitalType"),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:O("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:O("rpm_".concat(e.name))},e.value))})}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_VitalType")})})})]}),(0,Gt.jsxs)(Eu,{mt:2,className:"text-editor quilldesign",width:"100%",mb:2,children:[(0,Gt.jsx)(ywe(),{theme:"snow",modules:R,formats:B,value:o.description,onChange:e=>a("description",e),ref:N}),(0,Gt.jsx)(Xz,{name:"description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:O(e,{field:O("rpm_Note")})})})]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Eu,{mt:2,mb:2,width:"100%",sx:{margin:"auto",textAlign:"center"},children:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(H,{}),as(null===l||void 0===l||null===(n=l.data)||void 0===n||null===(r=n.local_files)||void 0===r||null===(i=r.local)||void 0===i?void 0:i.files)?s("upload",e):c("upload",e)]})})}),(0,Gt.jsxs)(Eu,{mt:2,display:"flex",children:[(0,Gt.jsx)(Vp,{fullWidth:!0,disableElevation:!0,variant:"outlined",color:"primary",onClick:f,sx:{marginRight:"10px"},children:O("rpm_Cancel")}),(0,Gt.jsx)(Vp,{fullWidth:!0,disableElevation:!0,variant:"contained",type:"submit",children:O("rpm_Save")})]})]})})}})})})]})]})}C_e.defaultProps={alertsHead:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],isSelection:!1,nodata:"",alertsList:[],otherResolvedAlertList:[],resolvedAlertList:[],initialFormValues:{},addNewNote:()=>{},MobliefileUploadButton:()=>{},fileModal:{},fileUploadIconButton:()=>{},notesList:[],editableNoteId:"",downloadFile:()=>{},setToggleAddNote:()=>{},toggleAddNote:!1,closeEditMode:()=>{},editNote:()=>{},fetchNoteList:()=>{},filterState:{},setFilterState:()=>{},onLocalFileDelete:()=>{},onCloudFilesDelete:()=>{},program:{},patientData:{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{}};const S_e=C_e,A_e=["content"];const k_e=function(e){var t;let{patientData:n,program:r}=e;const o={local:{files:[]},onCloud:{files:[]}},a=window.innerWidth,s=Nt(),l=Ct(Nd),{t:c}=vg(),{programId:d,patientId:u}=lo(),[p,h]=(0,We.useState)("desc"),[m,f]=(0,We.useState)("updated_at"),[g,v]=(0,We.useState)(!1),[x,y]=(0,We.useState)({description:"",vital:""}),[b,j]=We.useState([]),[w,_]=We.useState({open:!1,data:{}}),[C,S]=(0,We.useState)([]),[A,k]=We.useState(""),[M,O]=(0,We.useState)((0,i.A)({},o)),[T,E]=We.useState(!1),[P,D]=(0,We.useState)((0,i.A)({},Fc)),[R,N]=We.useState({vital:"",start_date:null,end_date:null}),[L,I]=We.useState({open:!1,data:{}}),[F,$]=We.useState({open:!1,data:{}}),[B,z]=We.useState({existingNoteTypes:[],nonExistingNoteTypes:[]}),H=e=>{I((0,i.A)((0,i.A)({},L),{},{open:!L.open,data:e}))},W=e=>{$((0,i.A)((0,i.A)({},F),{},{open:!F.open,data:e}))},V=e=>{if(Array.isArray(e))return S(e.map(e=>e.toString()));const t=e.target.name;C.includes(t)?S(C.filter(e=>e!==t)):S(e=>[...e,t])},U=()=>{let e=(0,i.A)({},M);e.local.files.splice(0,e.local.files.length),O(e),_({data:{},open:!1})},q=async e=>{var t,n;const r={vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"SUMMARY",upload:as(null===w||void 0===w||null===(t=w.data)||void 0===t?void 0:t.local_files)?[]:null===w||void 0===w||null===(n=w.data)||void 0===n?void 0:n.local_files};try{if(await s(xl(d,u,r)),P.current_page=1,Z({vital:"",start_date:null,end_date:null}),v(!1),y({description:"",vital:""}),B.nonExistingNoteTypes.includes("SUMMARY")){const{data:e}=await s(Cl(d,u));z({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})}Z(),U(),s(Zo({subTitle:"message:rpm_NoteCreatedSuccessfully",severity:Bc}))}catch(i){const e=ls(i,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_NoteCreatedFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_NoteCreatedFailed"),severity:$c}))}},G=async e=>{var t,n;const r={id:A,vital:null===e||void 0===e?void 0:e.vital,note:null===e||void 0===e?void 0:e.description,type:"SUMMARY",upload:as(null===w||void 0===w||null===(t=w.data)||void 0===t?void 0:t.local_files)?[]:null===w||void 0===w||null===(n=w.data)||void 0===n?void 0:n.local_files};try{await s(bl(d,u,r)),K(),Z(),U(),s(Zo({subTitle:"message:rpm_NoteUpdateSuccessfully",severity:Bc}))}catch(i){const e=ls(i,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_NoteUpdateFailed"),severity:$c}))}},Y=async e=>{try{var t;if(await s(jl(d,u,{noteId:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.id,type:"SUMMARY"})),Z(),I((0,i.A)((0,i.A)({},L),{},{open:!L.open})),$((0,i.A)((0,i.A)({},F),{},{open:!F.open})),1===b.length){const{data:e}=await s(Cl(d,u));z({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})}s(Zo({subTitle:"message:rpm_NoteDeleteSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_NoteUpdateFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_NoteDeleteFailed"),severity:$c}))}},Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R;try{const t={sort_by:m,sort_order:p},{data:n}=await s(vl(d,u,{type:"SUMMARY"},(0,i.A)((0,i.A)({},P),t),e)),r=n||{},{content:o}=r,a=Ko(r,A_e);j(o),D(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(t){console.log(t)}},K=()=>{k(""),y({description:"",vital:""}),_({open:!1,data:{}}),O((0,i.A)({},o))},X=(e,t)=>(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsx)(Yx,{title:c("rpm_UploadMore"),component:"span",children:(0,Gt.jsxs)(Kp,{"data-id":t.id,color:"primary",sx:{bgcolor:"primary.theme.50"},children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:ee}),(0,Gt.jsx)(dbe.A,{fontSize:"small",sx:{width:16,height:16}})]})})}),Q=async e=>{let{noteId:t,file:n}=e;try{await s(wl(d,u,{noteId:t,type:"SUMMARY",fileData:n})),s(Zo({subTitle:"message:rpm_DownloadFileSuccessfully",severity:Bc}))}catch(r){const e=ls(r,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_DownloadFileFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_DownloadFileFailed"),severity:$c}))}},J=e=>(0,Gt.jsx)(Yx,{title:c("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),ee=function(e){const t=e.target.files;let n=(0,i.A)({},M.local);t&&Array.from(t).forEach(e=>{var t;return as(null===n||void 0===n||null===(t=n.files)||void 0===t?void 0:t.find(t=>t.name===e.name))?(null===e||void 0===e?void 0:e.size)>=5242880?s(Zo({subTitle:"error:rpm_ImageSize",severity:$c})):(e.url=URL.createObjectURL(e),void n.files.push(e)):s(Zo({subTitle:"error:rpm_SameFileName",severity:$c}))}),O(e=>(0,i.A)((0,i.A)({},e),{},{local:n})),_(e=>({open:!e.open,data:(0,i.A)((0,i.A)({},e.data),{},{local_files:(0,i.A)((0,i.A)({},M),{},{local:n})})})),e.target.value=""},te=function(e){let t=(0,i.A)({},M);t.local.files.splice(e,1),O(t)},ne=async(e,t)=>{try{await s(_l(d,u,{noteId:e.id,fileId:t,type:"SUMMARY"})),Z(),function(e,t){var n;const r=null===e||void 0===e||null===(n=e.files)||void 0===n?void 0:n.filter(e=>(null===e||void 0===e?void 0:e.id)!==t);_((0,i.A)((0,i.A)({},w),{},{data:(0,i.A)((0,i.A)({},e),{},{files:r})}))}(e,t),s(Zo({subTitle:"message:rpm_FileDeletedSuccessfully",severity:Bc}))}catch(n){const e=ls(n,"response.data.code","");as(e)?s(Zo({subTitle:"error:rpm_FileDeleteFailed",severity:$c})):s(Zo({subTitle:bd(e,"error:rpm_FileDeleteFailed"),severity:$c}))}};return We.useEffect(()=>{l&&Z(),as(r)||as(n)||(async()=>{const{data:e}=await s(Cl(d,u));z({existingNoteTypes:e,nonExistingNoteTypes:xs(Md,e)})})()},[l,p,m,r,n]),We.useEffect(()=>{s(w_({activeMenuItem:"notes"}))},[]),as(r)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[null!==r&&void 0!==r&&null!==(t=r.permissions)&&void 0!==t&&t.showNoteList?a>=575?(0,Gt.jsx)(__e,{order:p,orderBy:m,setOrder:h,setOrderBy:f,dataParameter:"id",checkState:C,onCheck:V,isSelection:!1,nodata:fwe,notesList:b,showFilterColor:T,setShowFilterColor:E,fetchNoteList:Z,pageDetails:P,editButton:e=>(0,Gt.jsx)(Yx,{title:c("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{k(e.id),v(!1),y({description:e.note,vital:e.vital}),O((0,i.A)({},o)),_((0,i.A)((0,i.A)({},w),{},{data:(0,i.A)({},e)}))},children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:J,deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>H(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:q,editNote:G,editableNoteId:A,closeEditMode:K,initialFormValues:x,toggleAddNote:g,setToggleAddNote:v,fileModal:w,fileUploadButton:()=>(0,Gt.jsx)("label",{htmlFor:"file",children:(0,Gt.jsxs)(Vp,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"grey.300",color:"grey.700",border:"1px dashed #616161",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:ee}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsxs)(Eu,{sx:{flex:1,pl:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},children:c("rpm_UploadReport")}),(0,Gt.jsx)(Ym,{variant:"caption",children:".PDF, .PNG, .JPEG"})]})]})]})}),fileUploadIconButton:X,downloadFile:Q,filterState:R,setFilterState:N,onLocalFileDelete:te,onCloudFilesDelete:ne,patientData:n,program:r,noteTypesDropdown:B}):(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(S_e,{order:p,orderBy:m,setOrder:h,setOrderBy:f,dataParameter:"id",checkState:C,onCheck:V,isSelection:!1,nodata:fwe,notesList:b,showFilterColor:T,setShowFilterColor:E,fetchNoteList:Z,pageDetails:P,MobileeditButton:e=>(0,Gt.jsx)(Yx,{title:c("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{k(e.id),v(!1),y({description:e.note,vital:e.vital}),O((0,i.A)({},o)),_((0,i.A)((0,i.A)({},w),{},{data:(0,i.A)({},e)}))},sx:{padding:"0"},children:(0,Gt.jsx)(vwe.A,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:J,MobiledeleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,Gt.jsx)(Ewe.A,{fontSize:"small",sx:{width:16,height:16}})}),addNewNote:q,editNote:G,editableNoteId:A,closeEditMode:K,initialFormValues:x,toggleAddNote:g,setToggleAddNote:v,fileModal:w,MobliefileUploadButton:()=>(0,Gt.jsxs)("label",{htmlFor:"file",children:[(0,Gt.jsxs)(Vp,{variant:"contained",component:"span",size:"large",disableElevation:!0,sx:{display:"inline-flex",backgroundColor:"#eaeaff85",color:"grey.700",border:"1px dashed #9CA3AF",textAlign:"left",px:3,"&:hover":{backgroundColor:"grey.300"}},fullWidth:!0,children:[(0,Gt.jsx)("input",{multiple:!0,type:"file",id:"file",style:{display:"none"},autoFocus:!0,onChange:ee}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(pbe.A,{fontSize:"small"}),(0,Gt.jsx)(Eu,{sx:{flex:1,pl:2},children:(0,Gt.jsx)(Ym,{variant:"body1",sx:{textTransform:"none"},fontSize:14,children:c("rpm_UploadReport")})})]})]}),(0,Gt.jsx)(Eu,{textAlign:"center",fontStyle:"italic",children:(0,Gt.jsx)(Ym,{variant:"caption",fontSize:8,children:".PDF, .PNG, .JPEG"})})]}),fileUploadIconButton:X,downloadFile:Q,filterState:R,setFilterState:N,onLocalFileDelete:te,onCloudFilesDelete:ne,patientData:n,program:r,noteTypesDropdown:B})}):(0,Gt.jsx)(__,{}),a>=575?(0,Gt.jsx)(PU,{openModal:L.open,onCloseModal:H,actionFunction:()=>Y(L),dataName:L.data.title,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),descText:c("message:rpm_DeleteSubText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}):(0,Gt.jsx)(Ebe,{openModal:F.open,onCloseModal:W,actionFunction:()=>Y(F),dataName:F.data.title,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"}}})]})};const M_e=function(e){let{initialState:t,formData:n,handleEditMode:r,updatePatientDetails:o,countries:a,fetchStates:s,states:l}=e;const{t:c}=vg(),[d,u]=We.useState(null),p=window.innerWidth;return(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(Iz,{initialValues:ds(t,n),validationSchema:vV.personalDetail,onSubmit:d?()=>{}:o,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,handleSubmit:o,setFieldTouched:d}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(aH,{sx:{bgcolor:"transparent",boxShadow:"none"},children:[(0,Gt.jsx)(WH,{sx:{px:0,pt:0,pb:2.5},title:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:c("rpm_PatientInfo")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:o,children:c("rpm_Update")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:r,children:c("rpm_Cancel")})})]})}),(0,Gt.jsx)(uH,{sx:{bgcolor:"white",border:"1px solid #e5e5e5"},children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_FirstName"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"first_name",name:"first_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_FirstNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"first_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_FirstName")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_LastName"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"last_name",name:"last_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_LastNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"last_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_LastName")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_DOB")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Eu,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",id:"birth_date",name:"birth_date",value:t.birth_date||null,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({fullWidth:!0},e)),maxDate:new Date,inputFormat:"dd/MM/yyyy",defaultCalendarMonth:ps(18,11,31),onError:e=>u(e),onChange:e=>{var t;n("age",null===(t=Es(e))||void 0===t?void 0:t.toString()),n("birth_date",e),d("age",!0)}})})}),(0,Gt.jsx)(Xz,{name:"birth_date",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_DOB")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_Age"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"age",name:"age",variant:"outlined",onChange:async e=>{if(await n("age",e.target.value),e.target.value>0){let r=sa()(t.birth_date);r.isValid()||(r=sa()().month(0).date(1)),n("birth_date",sa()().month(sa()(r).get("months")).date(sa()(r).get("date")).subtract(e.target.value,"years").valueOf()),await d("birth_date",!0)}else await n("birth_date",sa()().valueOf())},endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_AgeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"age",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Age")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Gender")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"gender",name:"gender",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_GenderHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"Male",children:"Male"}),(0,Gt.jsx)($m,{value:"Female",children:"Female"}),(0,Gt.jsx)($m,{value:"Other",children:"Other"})]}),(0,Gt.jsx)(Xz,{name:"state",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Gender")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Email")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"email",name:"email",variant:"outlined",disabled:!0,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_EmailHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"email",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Email")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_CountryCode")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",optionId:"phoneCode",name:"country_code",options:a,browserAutocomplete:!1,valueKey:"phoneCode",nameKey:"phoneCode",variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:c("message:rpm_CountryCodeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"country_code",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_CountryCode")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Mobile")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"mobile",name:"mobile",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_MobileHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"mobile",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Mobile")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_MaritalStatus")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"marital_status",name:"marital_status",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_MaritalStatusHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"Married",children:"Married"}),(0,Gt.jsx)($m,{value:"Single",children:"Single"}),(0,Gt.jsx)($m,{value:"Other",children:"Other"})]}),(0,Gt.jsx)(Xz,{name:"state",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_MaritalStatus")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Parent")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"parent",name:"parent",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_ParentHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"parent",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Parent")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_BloodGroup")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"blood_group",name:"blood_group",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_BloodGroupHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"Select",disabled:!0,sx:{display:"none"},children:"Select"}),Jc.map(e=>(0,Gt.jsx)($m,{value:e.value,children:e.label},e.id))]}),(0,Gt.jsx)(Xz,{name:"blood_group",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_BloodGroup")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Height")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"height_feet",name:"height_feet",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_HeightFeetHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[...Array(10).keys()].map(e=>e+1).map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))}),(0,Gt.jsx)(Eu,{p:.5}),(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"height_inches",name:"height_inches",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_HeightInchesHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[...Array(12).keys()].map(e=>e).map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))})]}),(0,Gt.jsx)(Xz,{name:"height_inches",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Height")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Weight")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"weight",name:"weight",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_WeightHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"weight",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Weight")})})})]})]})})]})}),(0,Gt.jsx)(df,{item:!0,xs:p<900&&12,children:(0,Gt.jsx)(Af,{orientation:p<900?"horizontal":"vertical",variant:"middle"})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Address1")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_address1",name:"adr_address1",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_Address1Help"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_address1",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Address1")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Address2")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_address2",name:"adr_address2",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_Address1Help"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_address2",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Address2")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Country")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"country",optionId:"isoCode",name:"adr_country_name",options:a,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{n("adr_state_name",""),s(t)},variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:c("message:rpm_ProgramCountryHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"country",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_ProgramCountry")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_State")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"state",optionId:"isoCode",name:"adr_state_name",options:l,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:c("message:rpm_ProgramStateHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"state",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_ProgramState")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_City")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_city",name:"adr_city",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_CityHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_city",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_City")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Pin")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_zipcode",name:"adr_zipcode",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_ZipCodeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_zipcode",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_State")})})})]})]})})]})})]})})})]})})}},"patient_formik")})};const O_e=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k;let{userData:M,patientData:O,years:T,handleEditMode:E,countries:P,states:D}=e;const{t:R}=vg(),N=window.innerWidth;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Eu,{sx:{mb:1},position:"relative",children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:R("rpm_PatientInfo")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-63px",bottom:"0",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:R("rpm_PatientInfo")})})]})}),(null===M||void 0===M?void 0:M.showUpdatePatientProfile)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{className:(null===M||void 0===M?void 0:M.showUpdatePatientProfile)&&"pd-tour-step0",variant:"contained",color:"primary",disableElevation:!0,onClick:E,disabled:!(null===O||void 0===O||!O.dummy),children:R("rpm_Edit")})})]})}),(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsx)(uH,{children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_FirstName")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null===O||void 0===O?void 0:O.first_name})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_LastName")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null===O||void 0===O?void 0:O.last_name})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_DOB")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&O.birth_date?us(null===O||void 0===O?void 0:O.birth_date,"DD/MM/YYYY"):"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Gender")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(t=O.profile)&&void 0!==t&&t.gender?null===O||void 0===O||null===(n=O.profile)||void 0===n?void 0:n.gender:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Email")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",noWrap:!0,children:null!==O&&void 0!==O&&O.email?null===O||void 0===O?void 0:O.email:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_CountryCode")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&O.mobile?"+".concat(null===(r=GQ(null===O||void 0===O?void 0:O.mobile))||void 0===r?void 0:r.countryCallingCode):"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Mobile")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&O.mobile?null===(i=GQ(null===O||void 0===O?void 0:O.mobile))||void 0===i?void 0:i.nationalNumber:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Age")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&O.birth_date?"".concat(T,"yr"):"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_MaritalStatus")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(o=O.profile)&&void 0!==o&&o.marital_status?null===O||void 0===O||null===(a=O.profile)||void 0===a?void 0:a.marital_status:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Parent")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(s=O.profile)&&void 0!==s&&s.parent?null===O||void 0===O||null===(l=O.profile)||void 0===l?void 0:l.parent:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_BloodGroup")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(c=O.profile)&&void 0!==c&&c.blood_group?null===O||void 0===O||null===(d=O.profile)||void 0===d?void 0:d.blood_group:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Height")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(u=O.patient_health_profile)&&void 0!==u&&u.height?(null===O||void 0===O||null===(p=O.patient_health_profile)||void 0===p||null===(h=p.height)||void 0===h?void 0:h.split(".")[0])+"''"+(null===O||void 0===O||null===(m=O.patient_health_profile)||void 0===m||null===(f=m.height)||void 0===f?void 0:f.split(".")[1])+" ft.":"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Weight")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(g=O.patient_health_profile)&&void 0!==g&&g.weight?null===O||void 0===O||null===(v=O.patient_health_profile)||void 0===v?void 0:v.weight:"NA"})})]})})]})}),(0,Gt.jsx)(df,{item:!0,xs:N<900&&12,children:(0,Gt.jsx)(Af,{orientation:N<900?"horizontal":"vertical",variant:"middle"})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Address1")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(x=O.profile)&&void 0!==x&&x.adr_address1?null===O||void 0===O||null===(y=O.profile)||void 0===y?void 0:y.adr_address1:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Address2")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(b=O.profile)&&void 0!==b&&b.adr_address2?null===O||void 0===O||null===(j=O.profile)||void 0===j?void 0:j.adr_address2:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Country")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null===P||void 0===P||null===(w=P.find(e=>{var t;return(null===e||void 0===e?void 0:e.isoCode)===(null===O||void 0===O||null===(t=O.profile)||void 0===t?void 0:t.adr_country_name)}))||void 0===w?void 0:w.name})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_State")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null===D||void 0===D||null===(_=D.find(e=>{var t;return(null===e||void 0===e?void 0:e.isoCode)===(null===O||void 0===O||null===(t=O.profile)||void 0===t?void 0:t.adr_state_name)}))||void 0===_?void 0:_.name})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_City")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(C=O.profile)&&void 0!==C&&C.adr_city?null===O||void 0===O||null===(S=O.profile)||void 0===S?void 0:S.adr_city:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},color:"primary",pb:.3,children:R("rpm_Pin")}),(0,Gt.jsx)(Eu,{sx:{flex:.6,bgcolor:"grey.50",p:1,py:1.5,borderRadius:"8px"},children:ta()(O)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:null!==O&&void 0!==O&&null!==(A=O.profile)&&void 0!==A&&A.adr_zipcode?null===O||void 0===O||null===(k=O.profile)||void 0===k?void 0:k.adr_zipcode:"NA"})})]})})]})})]})})})})]})};const T_e=function(e){let{initialState:t,formData:n,handleEditMode:r,updatePatientDetails:o,countries:a,fetchStates:s,states:l}=e;const{t:c}=vg(),[d,u]=We.useState(null),p=window.innerWidth;return(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(Iz,{initialValues:ds(t,n),validationSchema:vV.personalDetail,onSubmit:d?()=>{}:o,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n,handleSubmit:o,setFieldTouched:d}=e;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},position:"relative",children:(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",top:"-48px",bottom:"0",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",className:"headingInMobile",children:c("rpm_PatientInfo")})})})})})}),(0,Gt.jsx)(aH,{sx:{bgcolor:"transparent",boxShadow:"none"},position:"relative",children:(0,Gt.jsxs)(uH,{sx:{bgcolor:"white",border:"1px solid #e5e5e5"},children:[(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_FirstName"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"first_name",name:"first_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_FirstNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"first_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_FirstName")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_LastName"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"last_name",name:"last_name",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_LastNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"last_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_LastName")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_DOB")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Eu,{sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",id:"birth_date",name:"birth_date",value:t.birth_date||null,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({fullWidth:!0},e)),maxDate:new Date,inputFormat:"dd/MM/yyyy",defaultCalendarMonth:ps(18,11,31),onError:e=>u(e),onChange:e=>{var t;n("age",null===(t=Es(e))||void 0===t?void 0:t.toString()),n("birth_date",e),d("age",!0)}})})}),(0,Gt.jsx)(Xz,{name:"birth_date",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_DOB")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:[c("rpm_Age"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"age",name:"age",variant:"outlined",onChange:async e=>{await n("age",e.target.value),e.target.value>0?(n("birth_date",sa()().month(sa()(t.birth_date).get("months")).date(sa()(t.birth_date).get("date")).subtract(e.target.value,"years").valueOf()),await d("birth_date",!0)):await n("birth_date",sa()().valueOf())},endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_FirstNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"age",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Age")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Gender")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"gender",name:"gender",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_GenderHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"Male",children:"Male"}),(0,Gt.jsx)($m,{value:"Female",children:"Female"}),(0,Gt.jsx)($m,{value:"Other",children:"Other"})]}),(0,Gt.jsx)(Xz,{name:"state",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Gender")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Email")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"email",name:"email",variant:"outlined",disabled:!0,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_EmailHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"email",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Email")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Mobile")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"mobile",name:"mobile",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_MobileHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"mobile",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Mobile")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_MaritalStatus")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"marital_status",name:"marital_status",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_MaritalStatusHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"Married",children:"Married"}),(0,Gt.jsx)($m,{value:"Single",children:"Single"}),(0,Gt.jsx)($m,{value:"Other",children:"Other"})]}),(0,Gt.jsx)(Xz,{name:"state",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_MaritalStatus")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Parent")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"parent",name:"parent",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_ParentHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"parent",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Parent")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_BloodGroup")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"blood_group",name:"blood_group",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_BloodGroupHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"Select",disabled:!0,sx:{display:"none"},children:"Select"}),Jc.map(e=>(0,Gt.jsx)($m,{value:e.value,children:e.label},e.id))]}),(0,Gt.jsx)(Xz,{name:"blood_group",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_BloodGroup")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Height")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Eu,{display:"flex",children:[(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"height_feet",name:"height_feet",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_HeightFeetHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[...Array(10).keys()].map(e=>e+1).map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))}),(0,Gt.jsx)(Eu,{p:.5}),(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"height_inches",name:"height_inches",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:c("message:rpm_HeightInchesHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[...Array(12).keys()].map(e=>e).map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))})]}),(0,Gt.jsx)(Xz,{name:"height_inches",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Height")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Weight")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"weight",name:"weight",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_WeightHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"weight",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Weight")})})})]})]})})]})}),(0,Gt.jsx)(df,{item:!0,xs:p<900&&12,children:(0,Gt.jsx)(Af,{orientation:p<900?"horizontal":"vertical",variant:"middle"})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:3,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Address1")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_address1",name:"adr_address1",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_Address1Help"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_address1",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Address1")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Address2")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_address2",name:"adr_address2",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_Address1Help"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_address2",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_Address2")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Country")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"country",optionId:"isoCode",name:"adr_country_name",options:a,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{n("adr_state_name",""),s(t)},variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:c("message:rpm_ProgramCountryHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"country",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_ProgramCountry")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_State")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"state",optionId:"isoCode",name:"adr_state_name",options:l,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:c("message:rpm_ProgramStateHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.675rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"state",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_ProgramState")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_City")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_city",name:"adr_city",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_CityHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_city",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_City")})})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,children:(0,Gt.jsxs)(JM,{flexDirection:"column",children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",fontWeight:"h6.fontWeight",sx:{flex:.4},pb:1,children:c("rpm_Pin")}),(0,Gt.jsxs)(Eu,{sx:{flex:.6},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"adr_zipcode",name:"adr_zipcode",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:c("message:rpm_ZipCodeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"adr_zipcode",children:e=>(0,Gt.jsx)(iw,{error:!0,children:c(e,{field:c("rpm_State")})})})]})]})})]})})]})}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:o,sx:{marginRight:"5px"},children:c("rpm_Update")}),(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:r,children:c("rpm_Cancel")})]})]})})]})}},"patient_formik")})};const E_e=function(e){let{userData:t,initialState:n,formData:r,patientData:i,isEditMode:o,handleEditMode:a,updatePatientDetails:s,program:l,countries:c,fetchStates:d,states:u}=e;const p=window.innerWidth,{t:h}=vg(),m=Nt(),f=Es(null===i||void 0===i?void 0:i.birth_date),g=[{name:h("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===l||void 0===l?void 0:l.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===l||void 0===l?void 0:l.code,"/patients")},{name:"".concat((null===i||void 0===i?void 0:i.first_name)||""," ").concat((null===i||void 0===i?void 0:i.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===l||void 0===l?void 0:l.code,"/patients/").concat(null===i||void 0===i?void 0:i.id,"/dashboard")},{name:h("rpm_personalDetails"),url:""}];return We.useEffect(()=>{const e={breadcrumb:g};as(l)||as(i)||m(w_(e))},[l,i]),(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:o?(0,Gt.jsx)(Gt.Fragment,{children:p>=575?(0,Gt.jsx)(M_e,{initialState:n,formData:r,handleEditMode:a,updatePatientDetails:s,patientData:i,program:l,countries:c,fetchStates:d,states:u}):(0,Gt.jsx)(T_e,{initialState:n,formData:r,handleEditMode:a,updatePatientDetails:s,patientData:i,program:l,countries:c,fetchStates:d,states:u})}):(0,Gt.jsx)(O_e,{userData:t,years:f,patientData:i,handleEditMode:a,program:l,countries:c,states:u})})})})},P_e={first_name:"",last_name:"",email:"",mobile:"",gender:"",birth_date:"",age:"",parent:"",marital_status:"",adr_address1:"",adr_address2:"",adr_country_name:"",adr_state_name:"",adr_city:"",adr_zipcode:"",blood_group:"",height_feet:"",height_inches:"",weight:"",profileImage:"",sound:"",language:"",country_code:""};const D_e=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T,E,P,D,R;let{userData:N,patientData:L,fetchOnePatientDetail:I,program:F}=e;const $=Ct(Nd),{programId:B}=lo(),{t:z}=vg(),H=Nt(),W=Ct(qd),V=!("true"===ls(W,"user_principal.attributes.skip_tour[0]","")),{enqueueSnackbar:U}=hi(),[q,G]=We.useState(!1),[Y,Z]=We.useState([]),[K,X]=We.useState([]),[Q,J]=We.useState(""),ee=()=>{G(!q)},te={first_name:null!==L&&void 0!==L&&L.first_name?null===L||void 0===L?void 0:L.first_name:"",last_name:null!==L&&void 0!==L&&L.last_name?null===L||void 0===L?void 0:L.last_name:"",email:null!==L&&void 0!==L&&L.email?null===L||void 0===L?void 0:L.email:"",mobile:null!==L&&void 0!==L&&L.mobile?null===(t=GQ(null===L||void 0===L?void 0:L.mobile))||void 0===t?void 0:t.nationalNumber:"",birth_date:null!==L&&void 0!==L&&L.birth_date?null===L||void 0===L?void 0:L.birth_date:null,age:Es(null===L||void 0===L?void 0:L.birth_date),gender:null!==L&&void 0!==L&&null!==(n=L.profile)&&void 0!==n&&n.gender?null===L||void 0===L||null===(r=L.profile)||void 0===r?void 0:r.gender:"",marital_status:null!==L&&void 0!==L&&null!==(o=L.profile)&&void 0!==o&&o.marital_status?null===L||void 0===L||null===(a=L.profile)||void 0===a?void 0:a.marital_status:"",parent:null!==L&&void 0!==L&&null!==(s=L.profile)&&void 0!==s&&s.parent?null===L||void 0===L||null===(l=L.profile)||void 0===l?void 0:l.parent:"",adr_address1:null!==L&&void 0!==L&&null!==(c=L.profile)&&void 0!==c&&c.adr_address1?null===L||void 0===L||null===(d=L.profile)||void 0===d?void 0:d.adr_address1:"",adr_address2:null!==L&&void 0!==L&&null!==(u=L.profile)&&void 0!==u&&u.adr_address2?null===L||void 0===L||null===(p=L.profile)||void 0===p?void 0:p.adr_address2:"",adr_country_name:null!==L&&void 0!==L&&null!==(h=L.profile)&&void 0!==h&&h.adr_country_name?null===L||void 0===L||null===(m=L.profile)||void 0===m?void 0:m.adr_country_name:"",adr_state_name:null!==L&&void 0!==L&&null!==(f=L.profile)&&void 0!==f&&f.adr_state_name?null===L||void 0===L||null===(g=L.profile)||void 0===g?void 0:g.adr_state_name:"",adr_city:null!==L&&void 0!==L&&null!==(v=L.profile)&&void 0!==v&&v.adr_city?null===L||void 0===L||null===(x=L.profile)||void 0===x?void 0:x.adr_city:"",adr_zipcode:null!==L&&void 0!==L&&null!==(y=L.profile)&&void 0!==y&&y.adr_zipcode?null===L||void 0===L||null===(b=L.profile)||void 0===b?void 0:b.adr_zipcode:"",blood_group:null!==L&&void 0!==L&&null!==(j=L.profile)&&void 0!==j&&j.blood_group?null===L||void 0===L||null===(w=L.profile)||void 0===w?void 0:w.blood_group:"",height_feet:null!==L&&void 0!==L&&null!==(_=L.patient_health_profile)&&void 0!==_&&_.height?null===L||void 0===L||null===(C=L.patient_health_profile)||void 0===C||null===(S=C.height)||void 0===S?void 0:S.split(".")[0]:"",height_inches:null!==L&&void 0!==L&&null!==(A=L.patient_health_profile)&&void 0!==A&&A.height?null===L||void 0===L||null===(k=L.patient_health_profile)||void 0===k||null===(M=k.height)||void 0===M?void 0:M.split(".")[1]:"",weight:null!==L&&void 0!==L&&null!==(O=L.patient_health_profile)&&void 0!==O&&O.weight?null===L||void 0===L||null===(T=L.patient_health_profile)||void 0===T?void 0:T.weight:"",profileImage:null===L||void 0===L||null===(E=L.profile)||void 0===E?void 0:E.profileImage,sound:null===L||void 0===L||null===(P=L.profile)||void 0===P?void 0:P.sound,language:null===L||void 0===L||null===(D=L.profile)||void 0===D?void 0:D.language,country_code:null!==L&&void 0!==L&&L.mobile?"+".concat(null===(R=GQ(null===L||void 0===L?void 0:L.mobile))||void 0===R?void 0:R.countryCallingCode):""},ne=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:""};await H(Kde(e,"RPM",e=>{let{countries:t}=e;Z(t.content)},()=>{}))},re=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await H(Xde(e,t,"RPM",e=>{let{states:t}=e;X(t.content)},()=>{}))};return We.useEffect(()=>{H(w_({activeMenuItem:"personal_detail"}))},[]),We.useEffect(()=>{$&&L&&(ne(),(null===te||void 0===te?void 0:te.adr_country_name)&&re(null===te||void 0===te?void 0:te.adr_country_name))},[$,L]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(E_e,{userData:N,initialState:P_e,formData:te,patientData:L,isEditMode:q,handleEditMode:ee,updatePatientDetails:async e=>{const t={first_name:e.first_name,last_name:e.last_name,birth_date:e.birth_date,age:e.age,profile:{adr_address1:e.adr_address1,adr_country_name:e.adr_country_name,adr_address2:e.adr_address2,adr_state_name:e.adr_state_name,adr_city:e.adr_city,adr_zipcode:e.adr_zipcode,parent:e.parent,gender:e.gender,marital_status:e.marital_status,blood_group:e.blood_group,profileImage:e.profileImage,sound:e.sound,language:e.language},mobile:"".concat(e.country_code).concat(e.mobile),height:"".concat(e.height_feet,".").concat(e.height_inches),weight:e.weight};try{await H(((e,t,n)=>async r=>{r(na(!0));const o=(0,i.A)({},n);try{const n="".concat(ca.patients,"/").concat(e,"/").concat(t);return await uu(n,o)}finally{r(na(!1))}})(B,L.id,t)),U(z("message:rpm_PatientUpdateSuccessfully"),{variant:"success"}),ee(),I()}catch(n){U(n.message,{variant:"error"})}},program:F,fetchCountries:ne,countries:Y,fetchStates:re,states:K}),(0,Gt.jsx)(AZ,{isTour:V,path:"personalDetailsTour",setRenderer:J}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:Q})]})};var R_e=n(51720),N_e=n(12521);const L_e=function(){const e=Ct(Id);return(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,width:"100%",height:"100%",mx:"auto",bgcolor:"rgba(255,255,255,0.5)",position:"absolute",margin:"auto",top:0,bottom:0,left:0,right:0,zIndex:99,display:e?"flex":"none"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})})};const I_e=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A;let{patientData:k,program:M,headCellsItems:O,glucoseReading:T,activeCourse:E,countries:P,states:D,selfDisease:R,familyDisease:N,alertPercent:L,patientMissedReading:I,filterDate:F}=e;const{t:$}=vg(),B=so(),z=Nt(),[H,W]=We.useState([]),{years:V}=hs(null===k||void 0===k?void 0:k.birth_date),U=We.useRef(),q=(0,s_e.useReactToPrint)({content:()=>U.current,documentTitle:"".concat(null===M||void 0===M?void 0:M.code,"_").concat(null===k||void 0===k?void 0:k.first_name,"_report_").concat(null!==E&&void 0!==E&&null!==(t=E.schedule)&&void 0!==t&&t.vital_name?null===E||void 0===E||null===(n=E.schedule)||void 0===n?void 0:n.vital_name:"NA")}),G=(null===M||void 0===M?void 0:M.image)instanceof File?URL.createObjectURL(null===M||void 0===M?void 0:M.image):null===M||void 0===M?void 0:M.image,Y=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},Z=[{value:"Diabetes",color:null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.red[300],darkColor:null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.red[900]},{value:"Prediabetes",color:null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[300],darkColor:null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.orange[900]},{value:"Normal",color:null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.green[300],darkColor:null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.green[500]},{value:"Hypoglycemia",color:null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.red[200],darkColor:null===Lde||void 0===Lde||null===(d=Lde.palette)||void 0===d?void 0:d.red[500]}],K=e=>{let{legend:t}=e;return t.length>0&&(0,Gt.jsx)(Eu,{textAlign:"left",children:(0,Gt.jsx)(Eu,{component:"ul",p:0,m:0,display:"flex",flexWrap:"wrap",children:null===Z||void 0===Z?void 0:Z.map((e,t)=>(0,Gt.jsxs)(Ym,{component:"li",fontSize:12,alignItems:"center",sx:{listStyle:"none",display:"flex",alignItems:"center",mr:1.5},children:[(0,Gt.jsx)(gye.A,{sx:{width:8,color:e.color}}),(0,Gt.jsx)(Eu,{component:"span",ml:1,color:e.darkColor,children:e.value})]},t))})})};return We.useEffect(()=>{as(T)||W(kd(T))},[T]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)("style",{children:H.length>6&&"@page {size: auto; margin: 8mm 2mm 8mm 2mm; }"}),(0,Gt.jsx)(L_e,{}),(0,Gt.jsxs)(Eu,{sx:{maxWidth:700,mx:"auto"},children:[(0,Gt.jsx)(Eu,{px:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,justifyContent:"center",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",disableRipple:!0,onClick:()=>B(-1),children:$("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:q,children:$("rpm_Print")})}),(0,Gt.jsx)(df,{item:!0,children:"course"==(null===F||void 0===F?void 0:F.report)?(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{var e;return Cd(z,null===k||void 0===k?void 0:k.id,null===E||void 0===E?void 0:E.id,"glucose",null===F||void 0===F?void 0:F.start_date,null===F||void 0===F?void 0:F.end_date,null===M||void 0===M?void 0:M.code,null===E||void 0===E||null===(e=E.schedule)||void 0===e?void 0:e.id)},children:$("rpm_Download")}):(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>Cd(z,null===k||void 0===k?void 0:k.id,null===E||void 0===E?void 0:E.id,"glucose",null===F||void 0===F?void 0:F.start_date,null===F||void 0===F?void 0:F.end_date,"",""),children:$("rpm_Download")})})]})}),(0,Gt.jsx)(PC,{ref:U,sx:{p:2},children:(0,Gt.jsx)(kC,{size:"small",sx:{bgcolor:"white",border:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsxs)(nS,{sx:{"& tr td":{borderBottom:0,whiteSpace:"normal",py:.275}},children:[(0,Gt.jsxs)(K_,{children:[(0,Gt.jsx)(rC,{sx:{borderRight:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[as(G)?(0,Gt.jsx)(R_e.A,{sx:{color:"primary.theme.500",fontSize:60}}):(0,Gt.jsx)(Eu,{sx:{p:1,display:"flex",borderRadius:1,bgcolor:"primary.theme.50",flexGrow:.4,justifyContent:"center"},children:(0,Gt.jsx)("img",{src:G,width:100,height:100})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:.6,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontWeight:500,children:as(M)?(0,Gt.jsx)(ZC,{}):null!==M&&void 0!==M&&M.display_name?null===M||void 0===M?void 0:M.display_name:"NA"}),(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",sx:{mt:.5},children:[as(M)?(0,Gt.jsx)(ZC,{width:50,sx:{display:"inline-block"}}):null!==M&&void 0!==M&&M.city?(null===M||void 0===M?void 0:M.city)+", ":"NA",as(D)?(0,Gt.jsx)(ZC,{width:50,sx:{display:"inline-block",ml:1}}):null!==D&&void 0!==D&&D.name?null===D||void 0===D?void 0:D.name:"NA"]}),(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{mt:.5},children:as(P)?(0,Gt.jsx)(ZC,{width:50}):null!==P&&void 0!==P&&P.name?null===P||void 0===P?void 0:P.name:"NA"})]})]})}),(0,Gt.jsxs)(rC,{width:"40%",children:[(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_PatientName")}),(0,Gt.jsx)(Eu,{children:as(k)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:(null===k||void 0===k?void 0:k.first_name)+" "+(null===k||void 0===k?void 0:k.last_name)})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_AgeGender")}),(0,Gt.jsx)(Eu,{children:as(k)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==k&&void 0!==k&&k.birth_date?"".concat(V,"yrs"):"NA",null!==k&&void 0!==k&&null!==(u=k.profile)&&void 0!==u&&u.gender?", ".concat(null===k||void 0===k||null===(p=k.profile)||void 0===p?void 0:p.gender):""]})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Mobile")}),(0,Gt.jsx)(Eu,{children:as(k)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==k&&void 0!==k&&k.mobile?null===k||void 0===k?void 0:k.mobile:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_VitalStats")}),(0,Gt.jsx)(Eu,{children:as(k)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==k&&void 0!==k&&null!==(h=k.patient_health_profile)&&void 0!==h&&null!==(m=h.height)&&void 0!==m&&m.split(".")[0]?(null===k||void 0===k||null===(f=k.patient_health_profile)||void 0===f||null===(g=f.height)||void 0===g?void 0:g.split(".")[0])+"''"+(null===k||void 0===k||null===(v=k.patient_health_profile)||void 0===v||null===(x=v.height)||void 0===x?void 0:x.split(".")[1])+" ft.":"NA"," "," / ",null!==k&&void 0!==k&&null!==(y=k.patient_health_profile)&&void 0!==y&&y.weight?(null===k||void 0===k||null===(b=k.patient_health_profile)||void 0===b?void 0:b.weight)+"kg":"NA"]})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_BMI")}),(0,Gt.jsx)(Eu,{children:as(k)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==k&&void 0!==k&&null!==(j=k.patient_health_profile)&&void 0!==j&&j.weight?Os(null===k||void 0===k||null===(w=k.patient_health_profile)||void 0===w?void 0:w.height,null===k||void 0===k||null===(_=k.patient_health_profile)||void 0===_?void 0:_.weight):"NA"})})]})]})]}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",children:(0,Gt.jsx)(nS,{children:(0,Gt.jsxs)(K_,{children:[(0,Gt.jsxs)(rC,{width:"45%",sx:{borderRight:"1px solid",borderColor:"grey.500",verticalAlign:"top"},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:1,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:$("rpm_MedicalHistory")}),(0,Gt.jsxs)(Eu,{minHeight:92,children:[(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.5,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Condition")}),(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Duration")})]}),null===R||void 0===R||null===(C=R.slice(0,3))||void 0===C?void 0:C.map(e=>(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.5,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:null===e||void 0===e?void 0:e.disease_name}),(0,Gt.jsx)(Eu,{sx:{flex:1},children:(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):Y(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)})})]},e.id))]})]}),(0,Gt.jsxs)(rC,{sx:{verticalAlign:"top"},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:1,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:$("rpm_FamilyMedicalHistory")}),(0,Gt.jsxs)(Eu,{minHeight:92,children:[(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.5,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Relation")}),(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Condition")}),(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:$("rpm_Duration")})]}),null===N||void 0===N||null===(S=N.slice(0,3))||void 0===S?void 0:S.map(e=>(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.5,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:e.relationship}),(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:e.disease_name?e.disease_name:"NA"}),(0,Gt.jsx)(Eu,{sx:{flex:1},children:(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):Y(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)})})]},e.id))]})]})]})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:"course"===(null===F||void 0===F?void 0:F.report)?"".concat($("rpm_COURSE")," : ").concat(as(E)?"...":null===E||void 0===E||null===(A=E.schedule)||void 0===A?void 0:A.name,"                   \n                        (").concat(sa()(null===F||void 0===F?void 0:F.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===F||void 0===F?void 0:F.end_date).format("DD MMM YYYY"),")"):"".concat($("rpm_Duration")," :                 \n                      (").concat(sa()(null===F||void 0===F?void 0:F.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===F||void 0===F?void 0:F.end_date).format("DD MMM YYYY"),")")})})}),(0,Gt.jsxs)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},colSpan:2,children:[(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Eu,{display:"flex",justifyContent:"space-between",children:["course"===(null===F||void 0===F?void 0:F.report)&&(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2,mr:1.5},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"orange.50",borderRadius:1},children:(0,Gt.jsx)(N_e.A,{sx:{color:"orange.500"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:$("rpm_Status")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",children:as(I)?"NA":(0,Gt.jsx)(Gt.Fragment,{children:"NON_COMPLIANT"==(null===I||void 0===I?void 0:I.status)?(0,Gt.jsx)(Eu,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.5),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}):(0,Gt.jsx)(Eu,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"})})})]})]}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"red.50",borderRadius:1},children:(0,Gt.jsx)(vye.A,{sx:{color:"red.500"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:$("rpm_ReadingAlerts")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:L?"".concat(L,"%"):"NA"})]})]})]})}),(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2,mr:1.5},children:(0,Gt.jsx)(K,{legend:Z})})})]}),(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",sx:{maxWidth:"100%"},children:(0,Gt.jsx)(nS,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{sx:{fontSize:12,"& p":{fontSize:12}},children:as(T)?(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,Gt.jsx)(Xye,{glucoseData:T,gridWidth:4,chartWidth:200,chartHeight:125,stage:"AllStage"})})})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",sx:{maxWidth:"100%"},children:(0,Gt.jsx)(nS,{children:(0,Gt.jsxs)(K_,{children:[(0,Gt.jsxs)(rC,{sx:{width:"50%",pr:0},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:$("rpm_RecentReadings")}),T?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:T,headCells:O,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,scrollHeight:500,className:"theme_scroll",children:null===T||void 0===T?void 0:T.slice(0,10).map(e=>{var t,n;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{children:e.ts}),(0,Gt.jsx)(rC,{children:e.values.glucose?(0,Gt.jsx)(Gt.Fragment,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?(0,Gt.jsx)(Eu,{className:null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.text,display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.glucose})}):(0,Gt.jsx)(Eu,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.glucose})})}):"NA"}),(0,Gt.jsx)(rC,{children:e.values.activity?e.values.activity:"NA"})]},e.id)})})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})]}),(0,Gt.jsxs)(rC,{sx:{width:"50%",verticalAlign:"top"},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:$("rpm_DoctorNotes")}),[1,2,3,4,5,6].map(e=>(0,Gt.jsx)(Eu,{mb:.5,sx:{borderBottom:"1px solid #616161",height:30}},e)),(0,Gt.jsx)(Ym,{variant:"body2",textAlign:"right",mt:2,fontWeight:500,sx:{fontStyle:"italic"},children:$("rpm_Signature")})]})]})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:500,fontSize:10,sx:{fontStyle:"italic",color:"grey.600",textAlign:"justify"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:"DISCLAIMER:"})," ","THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)("img",{src:Kg,height:30})})]})})})]})})})]})]})};const F_e=function(e){let{patientData:t,program:n}=e;const r=$o.getPatientDefaultCourseGlucose("course_glucose"),i=$o.getFilterDate("filterDate"),o=Nt(),{t:a}=vg(),[s,l]=We.useState(null),[c,d]=We.useState({}),[u,p]=We.useState({}),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),[y,b]=We.useState(null);We.useEffect(()=>{if(!as(t)&&!as(n)){o(w_({activeMenuItem:"report"}))}},[t,n]),We.useEffect(()=>{as(t)||as(n)||as(r)||((async()=>{const e={patient_id:null===t||void 0===t?void 0:t.id,disease:"glucose",duration:[null===i||void 0===i?void 0:i.start_date,null===i||void 0===i?void 0:i.end_date]};try{const{data:t}=await o(gl(e));if(l(t),!as(t)){const e=null===t||void 0===t?void 0:t.filter(e=>e.alerts),n=Math.round(100*e.length/t.length);x(n)}}catch(n){o(Zo({subTitle:n.message,severity:$c}))}})(),(async e=>{await o(Zde({perPage:"10000",countryCode:e.country},"RPM",t=>{var n,r;let{countries:i,states:o}=t;const a=null===i||void 0===i||null===(n=i.content)||void 0===n?void 0:n.find(t=>t.isoCode===e.country),s=null===o||void 0===o||null===(r=o.content)||void 0===r?void 0:r.find(t=>t.isoCode===e.state);d(a),p(s)},()=>{}))})(n),(async()=>{const e={kind:"SELF"};try{const{data:r}=await o(al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};m(i)}catch(r){console.log(r)}})(),(async()=>{const e={kind:"FAMILY"};try{const{data:r}=await o(al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};g(i)}catch(r){console.log(r)}})(),(async()=>{try{var e;const{data:n}=await o(Ys(null===t||void 0===t?void 0:t.id,null===r||void 0===r||null===(e=r.schedule)||void 0===e?void 0:e.id,null===r||void 0===r?void 0:r.id));!as(n)&&b(n)}catch(n){console.log("fetchPatientMissedReading="+n)}})())},[t,n]);const j=[{id:"time",label:a("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"glucose",label:a("rpm_Glucose"),isSort:!1,sortProperty:"glucose"},{id:"event",label:a("rpm_Event"),isSort:!1,sortProperty:"event"}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(I_e,{program:n,patientData:t,headCellsItems:j,glucoseReading:s,activeCourse:r,states:u,countries:c,selfDisease:h,familyDisease:f,alertPercent:v,patientMissedReading:y,filterDate:i})})};function $_e(e){let{glucoseData:t,stage:n,height:r,width:i,report:o}=e;const{t:a}=vg(),[s,l]=We.useState([]),[c,d]=We.useState([]),u=["diabetes","prediabetes","hypoglycemia","normal"],p=e=>{let t=[];return u.forEach(n=>{const r=e.filter(e=>{var t,r;return(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)&&(null===e||void 0===e||null===(r=e.alerts[0])||void 0===r?void 0:r.text)===n}),i=e.filter(e=>as(null===e||void 0===e?void 0:e.alerts));r.length&&t.push({id:n,name:a("rpm_".concat(n)),value:r.length}),"normal"===n&&i.length&&t.push({id:n,name:a("rpm_".concat(n)),value:i.length})}),t},h=e=>{let t="";var n,r,i,o;"normal"===e.id&&(t=null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.green[300]);"hypoglycemia"===e.id&&(t=null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.red[200]);"prediabetes"===e.id&&(t=null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[300]);"diabetes"===e.id&&(t=null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.red[300]);return t},m=Math.PI/180,f=e=>{const{cx:t,cy:n,midAngle:r,innerRadius:i,outerRadius:o,percent:a}=e,s=i+.4*(o-i),l=t+s*Math.cos(-r*m),c=n+s*Math.sin(-r*m);return(0,Gt.jsx)("text",{x:l,y:c,fill:"white",textAnchor:l>t?"start":"middle",dominantBaseline:"central",children:0==a?null:"".concat((100*a).toFixed(0),"%")})},g=e=>{var t,n;let{active:r,payload:i}=e;const o=null!==(t=i[0])&&void 0!==t&&t.payload?null===(n=i[0])||void 0===n?void 0:n.payload:{};var a;if(r&&i&&null!==i&&void 0!==i&&i.length)return(0,Gt.jsxs)(Eu,{sx:{bgcolor:"#ffffff",border:"1px solid #cccccc",p:1.5,width:250},children:[(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:(0,Gt.jsx)(Eu,{component:"span",color:"normal"!==(null===o||void 0===o?void 0:o.id)?h(null===o||void 0===o?void 0:o.payload):Lde.palette.green[500],children:null===o||void 0===o?void 0:o.name})}),(0,Gt.jsx)(Ym,{gutterBottom:!0,variant:"body2",fontWeight:600,children:"Count:  ".concat(null===o||void 0===o||null===(a=o.payload)||void 0===a?void 0:a.value)})]})};return We.useEffect(()=>{as(c)||(()=>{let e=[];c.forEach(n=>{e.push({id:n,data:p(null===t||void 0===t?void 0:t.filter(e=>e.values.activity===n))})}),l(e)})()},[c]),We.useEffect(()=>{as(t)||d(kd(t))},[t]),(0,Gt.jsx)(df,{container:!0,spacing:2,mt:.05,children:"AllStage"===n?null===s||void 0===s?void 0:s.map(e=>{var t;return(0,Gt.jsxs)(df,{item:!0,xs:o?4:12,md:4,lg:o?4:6,xl:4,children:[!as(null===e||void 0===e?void 0:e.data)&&(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,Gt.jsx)(Eu,{sx:{height:r?"".concat(r,"px"):"200px"},children:(0,Gt.jsxs)(fde,{width:i||200,height:r||200,style:{margin:"auto"},children:[(0,Gt.jsx)(mde,{data:null===e||void 0===e?void 0:e.data,cx:"50%",cy:"50%",innerRadius:i?i/4.5:40,outerRadius:r?r/2:90,paddingAngle:0,labelLine:!1,label:f,dataKey:"value",children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsx)(sre,{fill:h(e)},"cell-".concat(t)))}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(g,{}),wrapperStyle:{zIndex:99}})]})})]},null===e||void 0===e?void 0:e.id)}):null===s||void 0===s?void 0:s.map(e=>{var t;return e.data.length>0&&(0,Gt.jsxs)(df,{item:!0,xs:12,children:[!as(null===e||void 0===e?void 0:e.data)&&(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,textAlign:"center",children:null===e||void 0===e?void 0:e.id}),(0,Gt.jsx)(Eu,{sx:{height:"400px"},children:(0,Gt.jsxs)(fde,{width:400,height:400,style:{margin:"auto"},children:[(0,Gt.jsx)(mde,{data:null===e||void 0===e?void 0:e.data,cx:"50%",cy:"50%",innerRadius:70,outerRadius:150,paddingAngle:0,labelLine:!1,label:f,dataKey:"value",children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsx)(sre,{fill:h(e)},"cell-".concat(t)))}),(0,Gt.jsx)(l5,{content:(0,Gt.jsx)(g,{}),wrapperStyle:{zIndex:99}})]})})]},null===e||void 0===e?void 0:e.id)})})}$_e.defaultProps={glucoseData:[]};const B_e=$_e;const z_e=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T;let{patientData:E,program:P,headCellsItems:D,patientGlucoseReport:R,activeGlucoseCourse:N,countries:L,states:I,selfDisease:F,familyDisease:$,alertPercent:B,socialHistory:z,personalDiseaseHead:H,notesList:W,prescribedHead:V,consultNotesList:U,consultationHead:q,patientMissedReading:G,filterDate:Y}=e;const Z=Nt(),{t:K}=vg(),X=so(),{years:Q}=hs(null===E||void 0===E?void 0:E.birth_date),J=We.useRef(),ee=(0,s_e.useReactToPrint)({content:()=>J.current,documentTitle:"".concat(null===P||void 0===P?void 0:P.code,"_").concat(null===E||void 0===E?void 0:E.first_name,"_report_").concat(null!==N&&void 0!==N&&null!==(t=N.schedule)&&void 0!==t&&t.vital_name?null===N||void 0===N||null===(n=N.schedule)||void 0===n?void 0:n.vital_name:"NA")}),te=(null===P||void 0===P?void 0:P.image)instanceof File?URL.createObjectURL(null===P||void 0===P?void 0:P.image):null===P||void 0===P?void 0:P.image,ne=[{value:"Diabetes",color:null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.red[300],darkColor:null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.red[900]},{value:"Prediabetes",color:null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[300],darkColor:null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.orange[900]},{value:"Normal",color:null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.green[300],darkColor:null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.green[500]},{value:"Hypoglycemia",color:null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.red[200],darkColor:null===Lde||void 0===Lde||null===(d=Lde.palette)||void 0===d?void 0:d.red[500]}],re=e=>{let{legend:t}=e;return t.length>0&&(0,Gt.jsx)(Eu,{textAlign:"left",children:(0,Gt.jsx)(Eu,{component:"ul",p:0,m:0,display:"flex",flexWrap:"wrap",children:null===ne||void 0===ne?void 0:ne.map((e,t)=>(0,Gt.jsxs)(Ym,{component:"li",fontSize:14,sx:{listStyle:"none",display:"flex",alignItems:"center",mr:1.5},children:[(0,Gt.jsx)(gye.A,{sx:{width:10,color:e.color}}),(0,Gt.jsx)(Eu,{component:"span",ml:1,color:e.darkColor,children:e.value})]},t))})})},ie=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):"NA"};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)("style",{children:"@page {size: auto; margin: 8mm 2mm 8mm 2mm; }"}),(0,Gt.jsx)(L_e,{}),(0,Gt.jsxs)(Eu,{sx:{maxWidth:700,mx:"auto"},children:[(0,Gt.jsx)(Eu,{px:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,justifyContent:"center",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",disableRipple:!0,onClick:()=>X(-1),children:K("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:ee,children:K("rpm_Print")})}),(0,Gt.jsx)(df,{item:!0,children:"course"==(null===Y||void 0===Y?void 0:Y.report)?(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{var e;return Sd(Z,null===E||void 0===E?void 0:E.id,null===N||void 0===N?void 0:N.id,"glucose",null===Y||void 0===Y?void 0:Y.start_date,null===Y||void 0===Y?void 0:Y.end_date,null===P||void 0===P?void 0:P.code,null===N||void 0===N||null===(e=N.schedule)||void 0===e?void 0:e.id)},children:K("rpm_Download")}):(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>Sd(Z,null===E||void 0===E?void 0:E.id,null===N||void 0===N?void 0:N.id,"glucose",null===Y||void 0===Y?void 0:Y.start_date,null===Y||void 0===Y?void 0:Y.end_date,"",""),children:K("rpm_Download")})})]})}),(0,Gt.jsx)(PC,{ref:J,sx:{p:2},children:(0,Gt.jsx)(kC,{size:"small",sx:{bgcolor:"white",border:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsxs)(nS,{sx:{"& tr td":{borderBottom:0,whiteSpace:"normal",py:.375}},children:[(0,Gt.jsxs)(K_,{children:[(0,Gt.jsx)(rC,{sx:{borderRight:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[as(te)?(0,Gt.jsx)(R_e.A,{sx:{color:"primary.theme.500",fontSize:60}}):(0,Gt.jsx)(Eu,{sx:{display:"flex",borderRadius:1,bgcolor:"primary.theme.50",flexGrow:.4,justifyContent:"center"},children:(0,Gt.jsx)("img",{src:te,width:100,height:100})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:.6,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontWeight:500,children:as(P)?(0,Gt.jsx)(ZC,{}):null!==P&&void 0!==P&&P.display_name?null===P||void 0===P?void 0:P.display_name:"NA"}),(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",sx:{mt:.5},children:[as(P)?(0,Gt.jsx)(ZC,{width:50,sx:{display:"inline-block"}}):null!==P&&void 0!==P&&P.city?(null===P||void 0===P?void 0:P.city)+", ":"NA",as(I)?(0,Gt.jsx)(ZC,{width:50,sx:{display:"inline-block",ml:1}}):null!==I&&void 0!==I&&I.name?null===I||void 0===I?void 0:I.name:"NA"]}),(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{mt:.5},children:as(L)?(0,Gt.jsx)(ZC,{width:50}):null!==L&&void 0!==L&&L.name?null===L||void 0===L?void 0:L.name:"NA"})]})]})}),(0,Gt.jsxs)(rC,{width:"40%",children:[(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_PatientName")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:(null===E||void 0===E?void 0:E.first_name)+" "+(null===E||void 0===E?void 0:E.last_name)})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_AgeGender")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==E&&void 0!==E&&E.birth_date?"".concat(Q,"yrs"):"NA",null!==E&&void 0!==E&&null!==(u=E.profile)&&void 0!==u&&u.gender?", ".concat(null===E||void 0===E||null===(p=E.profile)||void 0===p?void 0:p.gender):""]})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_Mobile")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&E.mobile?null===E||void 0===E?void 0:E.mobile:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_VitalStats")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==E&&void 0!==E&&null!==(h=E.patient_health_profile)&&void 0!==h&&null!==(m=h.height)&&void 0!==m&&m.split(".")[0]?(null===E||void 0===E||null===(f=E.patient_health_profile)||void 0===f||null===(g=f.height)||void 0===g?void 0:g.split(".")[0])+"''"+(null===E||void 0===E||null===(v=E.patient_health_profile)||void 0===v||null===(x=v.height)||void 0===x?void 0:x.split(".")[1])+" ft.":"NA"," "," / ",null!==E&&void 0!==E&&null!==(y=E.patient_health_profile)&&void 0!==y&&y.weight?(null===E||void 0===E||null===(b=E.patient_health_profile)||void 0===b?void 0:b.weight)+"kg":"NA"]})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:K("rpm_BMI")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(j=E.patient_health_profile)&&void 0!==j&&j.weight?Os(null===E||void 0===E||null===(w=E.patient_health_profile)||void 0===w?void 0:w.height,null===E||void 0===E||null===(_=E.patient_health_profile)||void 0===_?void 0:_.weight):"NA"})})]})]})]}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:"course"===(null===Y||void 0===Y?void 0:Y.report)?"".concat(K("rpm_COURSE")," : ").concat(as(N)?"...":null===N||void 0===N||null===(C=N.schedule)||void 0===C?void 0:C.name,"                   \n                        (").concat(sa()(null===Y||void 0===Y?void 0:Y.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===Y||void 0===Y?void 0:Y.end_date).format("DD MMM YYYY"),")"):"".concat(K("rpm_Duration")," :                 \n                      (").concat(sa()(null===Y||void 0===Y?void 0:Y.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===Y||void 0===Y?void 0:Y.end_date).format("DD MMM YYYY"),")")})})}),(0,Gt.jsxs)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},colSpan:2,children:[(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Eu,{display:"flex",justifyContent:"space-between",children:["course"===(null===Y||void 0===Y?void 0:Y.report)&&(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2,mr:1.5},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"orange.50",borderRadius:1},children:(0,Gt.jsx)(N_e.A,{sx:{color:"orange.500"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:K("rpm_Status")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",children:as(G)?"NA":(0,Gt.jsx)(Gt.Fragment,{children:"NON_COMPLIANT"==(null===G||void 0===G?void 0:G.status)?(0,Gt.jsx)(Eu,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.5),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}):(0,Gt.jsx)(Eu,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"})})})]})]}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"red.50",borderRadius:1},children:(0,Gt.jsx)(vye.A,{sx:{color:"red.500"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:K("rpm_ReadingAlerts")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:B?"".concat(B,"%"):"NA"})]})]})]})}),(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2,mr:1.5},children:(0,Gt.jsx)(re,{legend:ne})})})]}),(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",sx:{maxWidth:"100%"},children:(0,Gt.jsx)(nS,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{children:as(R)?(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,Gt.jsx)(Xye,{glucoseData:R,gridWidth:4,chartWidth:300,chartHeight:150,stage:"AllStage"})})})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",sx:{maxWidth:"100%"},children:(0,Gt.jsx)(nS,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{sx:{"& .MuiGrid-root>.MuiGrid-item":{pt:1,"& .MuiTypography-root":{fontSize:14},"& text":{fontSize:10}}},children:as(R)?(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,Gt.jsx)(B_e,{stage:"AllStage",glucoseData:R,height:95,width:95,report:!0})})})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_InstrumentReadings")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",sx:{maxWidth:"100%"},children:(0,Gt.jsx)(nS,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{children:R?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:R,headCells:D,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,className:"theme_scroll",children:null===R||void 0===R?void 0:R.map(e=>{var t,n;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{children:e.ts}),(0,Gt.jsx)(rC,{children:e.values.glucose?(0,Gt.jsx)(Gt.Fragment,{children:(null===e||void 0===e||null===(t=e.alerts)||void 0===t?void 0:t.length)>0?(0,Gt.jsx)(Eu,{className:null===e||void 0===e||null===(n=e.alerts[0])||void 0===n?void 0:n.text,display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.glucose})}):(0,Gt.jsx)(Eu,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values.glucose})})}):"NA"}),(0,Gt.jsx)(rC,{children:e.values.activity?e.values.activity:"NA"}),(0,Gt.jsx)(rC,{children:e.alerts?K("rpm_".concat(e.alerts[0].text)):"Normal"})]},e.id)})})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_MedicalHistory")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",children:(0,Gt.jsxs)(nS,{children:[(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsx)(Eu,{children:F?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:F,headCells:H,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,children:null===F||void 0===F?void 0:F.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{width:"25%",children:e.disease_name}),(0,Gt.jsx)(rC,{width:"25%",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):ie(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)}),(0,Gt.jsx)(rC,{children:e.remark?e.remark:"NA"})]},e.id))})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_FamilyMedicalHistory")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",children:(0,Gt.jsx)(nS,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsx)(Eu,{py:.75,children:$?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:$,headCells:H,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,children:null===$||void 0===$?void 0:$.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{width:"25%",children:e.disease_name}),(0,Gt.jsx)(rC,{width:"25%",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):ie(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)}),(0,Gt.jsx)(rC,{children:e.remark?e.remark:"NA"})]},e.id))})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_OtherHealthIssues")})})}),(0,Gt.jsx)(Eu,{p:2,children:null===z||void 0===z||null===(S=z.other_histories)||void 0===S?void 0:S.map((e,t)=>(0,Gt.jsxs)(df,{container:!0,spacing:.75,alignItems:"center",mt:.05,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"start"},children:(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{pl:.5},children:t+1+". "+(null===e||void 0===e?void 0:e.question)})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",children:null===e||void 0===e?void 0:e.answer})})]},t))})]})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_PrescribedMedications")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",children:(0,Gt.jsxs)(nS,{children:[(0,Gt.jsx)(K_,{children:(0,Gt.jsxs)(rC,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,mb:2,children:[!as(null===W||void 0===W?void 0:W.symptomsList)&&(0,Gt.jsxs)(df,{item:!0,md:6,children:[(0,Gt.jsx)(Ym,{component:"h6",fontSize:14,fontWeight:800,children:"Symptoms"}),(0,Gt.jsx)(Eu,{component:"span"}),as(null===W||void 0===W?void 0:W.symptomsList)?"N/A":null===W||void 0===W||null===(A=W.symptomsList)||void 0===A?void 0:A.map(e=>e).join(", ")]}),!as(null===W||void 0===W?void 0:W.diagnosisList)&&(0,Gt.jsxs)(df,{item:!0,md:6,children:[(0,Gt.jsx)(Ym,{component:"h6",fontSize:14,fontWeight:800,children:"Diagnosis"}),(0,Gt.jsx)(Eu,{component:"span"}),as(null===W||void 0===W?void 0:W.diagnosisList)?"N/A":null===W||void 0===W||null===(k=W.diagnosisList)||void 0===k?void 0:k.map(e=>e).join(", ")]}),!as(null===W||void 0===W?void 0:W.advicesList)&&(0,Gt.jsxs)(df,{item:!0,md:6,children:[(0,Gt.jsx)(Ym,{component:"h6",fontSize:14,fontWeight:800,children:"Advices"}),(0,Gt.jsx)(Eu,{component:"span"}),as(null===W||void 0===W?void 0:W.advicesList)?"N/A":null===W||void 0===W||null===(M=W.advicesList)||void 0===M?void 0:M.map(e=>e).join(", ")]}),!as(null===W||void 0===W?void 0:W.testsList)&&(0,Gt.jsxs)(df,{item:!0,md:6,children:[(0,Gt.jsx)(Ym,{component:"h6",fontSize:14,fontWeight:800,children:"Tests"}),(0,Gt.jsx)(Eu,{component:"span"}),as(null===W||void 0===W?void 0:W.testsList)?"N/A":null===W||void 0===W||null===(O=W.testsList)||void 0===O?void 0:O.map(e=>e).join(", ")]})]}),(0,Gt.jsx)(Eu,{children:null!==W&&void 0!==W&&W.presList?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:null===W||void 0===W?void 0:W.presList,headCells:V,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,children:null===W||void 0===W||null===(T=W.presList)||void 0===T?void 0:T.map(e=>{var t;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsxs)(rC,{children:[null!==e&&void 0!==e&&e.medicine?null===e||void 0===e?void 0:e.medicine:"NA"," ",(null===e||void 0===e?void 0:e.dose)&&(null===e||void 0===e?void 0:e.dose)+(null===e||void 0===e?void 0:e.unit)]}),(0,Gt.jsx)(rC,{children:null===ud||void 0===ud||null===(t=ud.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text}),(0,Gt.jsx)(rC,{children:"".concat(sa()(null===e||void 0===e?void 0:e.start_date).format("DD MMM")," - ").concat(sa()(null===e||void 0===e?void 0:e.end_date).format("DD MMM"))}),(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&e.comments?e.comments:"NA"})]},e.id)})})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})]})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:K("rpm_DoctorNotes")})})}),(0,Gt.jsx)(Eu,{children:U?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:U,headCells:q,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,children:null===U||void 0===U?void 0:U.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{width:"22%",children:e.created_at?sa()(e.created_at).format("DD MMM YYYY hh:mm A"):"NA"}),(0,Gt.jsx)(rC,{width:"20%",children:e.created_by}),(0,Gt.jsx)(rC,{sx:{wordBreak:"break-all","& p>p":{fontSize:12,m:0}},children:(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit"})})]},e.id))})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})]})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:500,fontSize:10,sx:{fontStyle:"italic",color:"grey.600",textAlign:"justify"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:"DISCLAIMER:"})," ","THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)("img",{src:Kg,height:30})})]})})})]})})})]})]})},H_e=["vital","medications_list","intervals"];const W_e=function(e){let{patientData:t,program:n}=e;const r=$o.getPatientDefaultCourseGlucose("course_glucose"),o=$o.getFilterDate("filterDate"),a=Nt(),{t:s}=vg(),[l,c]=We.useState(null),[d,u]=We.useState({}),[p,h]=We.useState({}),[m,f]=We.useState(null),[g,v]=We.useState(null),[x,y]=We.useState(null),[b,j]=We.useState(null),[w,_]=We.useState(null),[C,S]=We.useState(null),[A,k]=We.useState(null),M=e=>null===e||void 0===e?void 0:e.map(e=>{const{vital:t,medications_list:n,intervals:r}=e,o=Ko(e,H_e),a=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===t||void 0===t||null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ts(r,zc):"N/A",interval:null}}).map(e=>{let{start_time:t,interval:n}=e;return{start_time:t,interval:n}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type||"",dose:e.dose,unit:e.unit,color:e.color,image:e.image||"",start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:Uc,timing:t,frequency:e.frequency,comments:e.comments}});return(0,i.A)({vital:t,note:"",medicationList:a},o)});We.useEffect(()=>{if(!as(t)&&!as(n)){a(w_({activeMenuItem:"report"}))}},[t,n]),We.useEffect(()=>{as(t)||as(n)||as(r)||((async()=>{const e={patient_id:null===t||void 0===t?void 0:t.id,disease:"glucose",duration:[null===o||void 0===o?void 0:o.start_date,null===o||void 0===o?void 0:o.end_date]};try{const{data:t}=await a(gl(e));if(c(t),!as(t)){const e=null===t||void 0===t?void 0:t.filter(e=>e.alerts),n=Math.round(100*e.length/t.length);y(n)}}catch(n){a(Zo({subTitle:n.message,severity:$c}))}})(),(async e=>{await a(Zde({perPage:"10000",countryCode:e.country},"RPM",t=>{var n,r;let{countries:i,states:o}=t;const a=null===i||void 0===i||null===(n=i.content)||void 0===n?void 0:n.find(t=>t.isoCode===e.country),s=null===o||void 0===o||null===(r=o.content)||void 0===r?void 0:r.find(t=>t.isoCode===e.state);u(a),h(s)},()=>{}))})(n),(async()=>{const e={kind:"SELF"};try{const{data:r}=await a(al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};f(i)}catch(r){console.log(r)}})(),(async()=>{const e={kind:"FAMILY"};try{const{data:r}=await a(al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};v(i)}catch(r){console.log(r)}})(),(async()=>{try{const{data:e}=await a(ul(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id));j(e)}catch(e){console.log(e)}})(),(async()=>{try{const e={sort_by:"created_at",sort_order:"desc"},{data:r}=await a(Sl(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,(0,i.A)({},e),{start_date:null===o||void 0===o?void 0:o.start_date,end_date:null===o||void 0===o?void 0:o.end_date})),s=M(r),l=[],c=[],d=[],u=[],p=[];s&&Array.isArray(s)&&s.forEach(e=>{const t=null===e||void 0===e?void 0:e.medicationList,n=null===e||void 0===e?void 0:e.complaints,r=null===e||void 0===e?void 0:e.advices,i=null===e||void 0===e?void 0:e.diagnosis,o=null===e||void 0===e?void 0:e.tests;t&&Array.isArray(t)&&l.push(...t),n&&Array.isArray(n)&&c.push(...n),r&&Array.isArray(r)&&d.push(...r),i&&Array.isArray(i)&&p.push(...i),o&&Array.isArray(o)&&u.push(...o)}),_({presList:l,symptomsList:ks(c,"name"),advicesList:[...new Set(d)],testsList:[...new Set(u)],diagnosisList:ks(p,"name")})}catch(e){console.log(e)}})(),(async()=>{try{const e={sort_by:"created_at",sort_order:"desc"},{data:r}=await a(vl(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,{type:"DOCTOR"},(0,i.A)({per_page:999},e),{start_date:null===o||void 0===o?void 0:o.start_date,end_date:null===o||void 0===o?void 0:o.end_date})),{content:s}=r||{},l=null===s||void 0===s?void 0:s.filter(e=>"glucose"===e.vital);S(l)}catch(e){console.log(e)}})(),(async()=>{try{var e;const{data:n}=await a(Ys(null===t||void 0===t?void 0:t.id,null===r||void 0===r||null===(e=r.schedule)||void 0===e?void 0:e.id,null===r||void 0===r?void 0:r.id));!as(n)&&k(n)}catch(n){console.log("fetchPatientMissedReading="+n)}})())},[t,n]);const O=[{id:"time",label:s("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"glucose",label:s("rpm_Glucose"),isSort:!1,sortProperty:"glucose"},{id:"event",label:s("rpm_Event"),isSort:!1,sortProperty:"event"},{id:"condition",label:s("rpm_Condition"),isSort:!1,sortProperty:"condition"}],T=[{id:"disease",label:s("rpm_DiseaseName"),isSort:!1,sortProperty:"disease"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:s("rpm_Remarks"),isSort:!1,sortProperty:"remarks"}],E=[{id:"medicine",label:s("rpm_Medicine"),isSort:!1,sortProperty:"medicine"},{id:"frequency",label:s("rpm_Frequency"),isSort:!1,sortProperty:"frequency"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"comments",label:s("rpm_Comments"),isSort:!1,sortProperty:"comments"}],P=[{id:"date",label:s("rpm_Date"),isSort:!1,sortProperty:"date"},{id:"advised_by",label:s("rpm_AdvisedBy"),isSort:!1,sortProperty:"advised_by"},{id:"comments",label:s("rpm_Comments"),isSort:!1,sortProperty:"comments"}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(z_e,{program:n,patientData:t,headCellsItems:O,patientGlucoseReport:l,activeGlucoseCourse:r,states:p,countries:d,selfDisease:m,familyDisease:g,alertPercent:x,socialHistory:b,personalDiseaseHead:T,notesList:w,prescribedHead:E,consultNotesList:C,consultationHead:P,patientMissedReading:A,filterDate:o})})};const V_e=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T;let{patientData:E,program:P,headCellsItems:D,patientBpReport:R,activeCourse:N,countries:L,states:I,selfDisease:F,familyDisease:$,alertPercent:B,patientMissedReading:z,filterDate:H}=e;const W=Nt(),{t:V}=vg(),U=so(),{years:q}=hs(null===E||void 0===E?void 0:E.birth_date),G=We.useRef(),Y=(0,s_e.useReactToPrint)({content:()=>G.current,documentTitle:"".concat(null===P||void 0===P?void 0:P.code,"_").concat(null===E||void 0===E?void 0:E.first_name,"_report_").concat(null!==N&&void 0!==N&&null!==(t=N.schedule)&&void 0!==t&&t.vital_name?null===N||void 0===N||null===(n=N.schedule)||void 0===n?void 0:n.vital_name:"NA")}),Z=(null===P||void 0===P?void 0:P.image)instanceof File?URL.createObjectURL(null===P||void 0===P?void 0:P.image):null===P||void 0===P?void 0:P.image,K=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):void 0},X=(e,t)=>{var n;const r=null===e||void 0===e||null===(n=e.alerts)||void 0===n?void 0:n.find(e=>e.data_name===t);return{reading:(0,Gt.jsx)(Gt.Fragment,{children:as(r)?(0,Gt.jsx)(Eu,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values[t]})}):(0,Gt.jsx)(Eu,{className:null===r||void 0===r?void 0:r.text,display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values[t]})})}),stage:as(r)?"Normal":V("rpm_".concat(null===r||void 0===r?void 0:r.text))}},Q=[{value:"CheckLowBP",color:null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.orange[300],darkColor:null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[700]},{value:"ElevatedBloodPressure",color:null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[600],darkColor:null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.orange[900]},{value:"Hypertension_Stage1",color:null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.red[300],darkColor:null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.red[500]},{value:"Hypertensive_Stage2",color:null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.red[500],darkColor:null===Lde||void 0===Lde||null===(d=Lde.palette)||void 0===d?void 0:d.red[700]},{value:"Hypertensive_Crisis",color:null===Lde||void 0===Lde||null===(u=Lde.palette)||void 0===u?void 0:u.red[700],darkColor:null===Lde||void 0===Lde||null===(p=Lde.palette)||void 0===p?void 0:p.red[900]},{value:"normal",color:null===Lde||void 0===Lde||null===(h=Lde.palette)||void 0===h?void 0:h.green[300],darkColor:null===Lde||void 0===Lde||null===(m=Lde.palette)||void 0===m?void 0:m.green[700]}],J=e=>{let{legend:t}=e;return t.length>0&&(0,Gt.jsx)(Eu,{textAlign:"center",children:(0,Gt.jsx)(Eu,{component:"ul",p:0,m:0,children:null===Q||void 0===Q?void 0:Q.map((e,t)=>(0,Gt.jsxs)(Eu,{component:"li",fontSize:12,display:"inline-flex",alignItems:"center",sx:{listStyle:"none",mr:1,lineHeight:1},children:[(0,Gt.jsx)(gye.A,{sx:{width:8,height:8,color:e.color}}),(0,Gt.jsx)(Eu,{component:"span",ml:1,color:e.darkColor,children:V("rpm_".concat(e.value))})]},t))})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(L_e,{}),(0,Gt.jsxs)(Eu,{sx:{maxWidth:700,mx:"auto"},children:[(0,Gt.jsx)(Eu,{px:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,justifyContent:"center",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",disableRipple:!0,onClick:()=>U(-1),children:V("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:Y,children:V("rpm_Print")})}),(0,Gt.jsx)(df,{item:!0,children:"course"==(null===H||void 0===H?void 0:H.report)?(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{var e;return Cd(W,null===E||void 0===E?void 0:E.id,null===N||void 0===N?void 0:N.id,"bp",null===H||void 0===H?void 0:H.start_date,null===H||void 0===H?void 0:H.end_date,null===P||void 0===P?void 0:P.code,null===N||void 0===N||null===(e=N.schedule)||void 0===e?void 0:e.id)},children:V("rpm_Download")}):(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>Cd(W,null===E||void 0===E?void 0:E.id,null===N||void 0===N?void 0:N.id,"bp",null===H||void 0===H?void 0:H.start_date,null===H||void 0===H?void 0:H.end_date,"",""),children:V("rpm_Download")})})]})}),(0,Gt.jsx)(PC,{ref:G,sx:{p:2,overflowX:"inherit"},children:(0,Gt.jsx)(kC,{size:"small",sx:{bgcolor:"white",border:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsxs)(nS,{sx:{"& tr td":{borderBottom:0,whiteSpace:"normal",py:.275}},children:[(0,Gt.jsxs)(K_,{children:[(0,Gt.jsx)(rC,{sx:{borderRight:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[as(Z)?(0,Gt.jsx)(R_e.A,{sx:{color:"primary.theme.500",fontSize:60}}):(0,Gt.jsx)(Eu,{sx:{p:.5,display:"flex",borderRadius:1,border:"2px solid #ebebeb",flexGrow:.1,justifyContent:"center"},children:(0,Gt.jsx)("img",{src:Z,width:80,height:80})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:.6,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontWeight:500,children:as(P)?(0,Gt.jsx)(ZC,{}):null!==P&&void 0!==P&&P.display_name?null===P||void 0===P?void 0:P.display_name:"NA"}),(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",sx:{mt:.5},children:[as(P)?(0,Gt.jsx)(ZC,{width:50,sx:{display:"inline-block"}}):null!==P&&void 0!==P&&P.city?(null===P||void 0===P?void 0:P.city)+", ":"NA",as(I)?(0,Gt.jsx)(ZC,{width:50,sx:{display:"inline-block",ml:1}}):null!==I&&void 0!==I&&I.name?null===I||void 0===I?void 0:I.name:"NA"]}),(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{mt:.5},children:as(L)?(0,Gt.jsx)(ZC,{width:50}):null!==L&&void 0!==L&&L.name?null===L||void 0===L?void 0:L.name:"NA"})]})]})}),(0,Gt.jsxs)(rC,{width:"40%",p:.5,children:[(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_PatientName")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:(null===E||void 0===E?void 0:E.first_name)+" "+(null===E||void 0===E?void 0:E.last_name)})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_AgeGender")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==E&&void 0!==E&&E.birth_date?"".concat(q,"yrs"):"NA",null!==E&&void 0!==E&&null!==(f=E.profile)&&void 0!==f&&f.gender?", ".concat(null===E||void 0===E||null===(g=E.profile)||void 0===g?void 0:g.gender):""]})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_Mobile")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&E.mobile?null===E||void 0===E?void 0:E.mobile:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_VitalStats")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==E&&void 0!==E&&null!==(v=E.patient_health_profile)&&void 0!==v&&null!==(x=v.height)&&void 0!==x&&x.split(".")[0]?(null===E||void 0===E||null===(y=E.patient_health_profile)||void 0===y||null===(b=y.height)||void 0===b?void 0:b.split(".")[0])+"''"+(null===E||void 0===E||null===(j=E.patient_health_profile)||void 0===j||null===(w=j.height)||void 0===w?void 0:w.split(".")[1])+" ft.":"NA"," "," / ",null!==E&&void 0!==E&&null!==(_=E.patient_health_profile)&&void 0!==_&&_.weight?(null===E||void 0===E||null===(C=E.patient_health_profile)||void 0===C?void 0:C.weight)+"kg":"NA"]})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_BMI")}),(0,Gt.jsx)(Eu,{children:as(E)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==E&&void 0!==E&&null!==(S=E.patient_health_profile)&&void 0!==S&&S.weight?Os(null===E||void 0===E||null===(A=E.patient_health_profile)||void 0===A?void 0:A.height,null===E||void 0===E||null===(k=E.patient_health_profile)||void 0===k?void 0:k.weight):"NA"})})]})]})]}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",children:(0,Gt.jsx)(nS,{children:(0,Gt.jsxs)(K_,{children:[(0,Gt.jsxs)(rC,{width:"45%",sx:{borderRight:"1px solid",borderColor:"grey.500",verticalAlign:"top"},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:V("rpm_MedicalHistory")}),(0,Gt.jsxs)(Eu,{minHeight:92,children:[(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.5,sx:{background:"#f9f9ff",color:"7986cb"},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_Condition")}),(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_Duration")})]}),null===F||void 0===F||null===(M=F.slice(0,3))||void 0===M?void 0:M.map(e=>(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.5,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:null===e||void 0===e?void 0:e.disease_name}),(0,Gt.jsx)(Eu,{sx:{flex:1},children:(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):K(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)})})]},e.id))]})]}),(0,Gt.jsxs)(rC,{sx:{verticalAlign:"top"},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:V("rpm_FamilyMedicalHistory")}),(0,Gt.jsxs)(Eu,{minHeight:92,children:[(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.5,sx:{background:"#f9f9ff",color:"7986cb"},children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_Relation")}),(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_Condition")}),(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:V("rpm_Duration")})]}),null===$||void 0===$||null===(O=$.slice(0,3))||void 0===O?void 0:O.map(e=>(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.5,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:e.relationship}),(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},children:e.disease_name?e.disease_name:"NA"}),(0,Gt.jsx)(Eu,{sx:{flex:1},children:(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):K(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)})})]},e.id))]})]})]})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.5,children:"course"===(null===H||void 0===H?void 0:H.report)?"".concat(V("rpm_COURSE")," : ").concat(as(N)?"...":null===N||void 0===N||null===(T=N.schedule)||void 0===T?void 0:T.name,"                   \n                        (").concat(sa()(null===H||void 0===H?void 0:H.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===H||void 0===H?void 0:H.end_date).format("DD MMM YYYY"),")"):"".concat(V("rpm_Duration")," :              \n                      (").concat(sa()(null===H||void 0===H?void 0:H.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===H||void 0===H?void 0:H.end_date).format("DD MMM YYYY"),")")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",sx:{maxWidth:"100%"},children:(0,Gt.jsxs)(nS,{children:[(0,Gt.jsxs)(K_,{children:[(0,Gt.jsxs)(rC,{sx:{width:"60%",fontSize:12},children:[as(R)?(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,Gt.jsx)(Eu,{height:180,children:(0,Gt.jsx)(Lye,{patientBpReport:R,getAlertClassName:Ss})}),as(R)?(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,Gt.jsx)(Eu,{sx:{height:"180px"},children:(0,Gt.jsx)($ye,{patientBpReport:R})})]}),(0,Gt.jsxs)(rC,{sx:{width:"40%"},children:[as(R)?(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,Gt.jsx)(Eu,{sx:{height:"200px"},children:(0,Gt.jsx)(zye,{stageAlertData:R,height:200,width:200})}),(0,Gt.jsxs)(Eu,{display:"inline-block",children:["course"===(null===H||void 0===H?void 0:H.report)&&(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"orange.50",borderRadius:1},children:(0,Gt.jsx)(N_e.A,{sx:{color:"orange.500"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:V("rpm_Status")}),"NON_COMPLIANT"==(null===z||void 0===z?void 0:z.status)?(0,Gt.jsx)(Eu,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.5),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}):(0,Gt.jsx)(Eu,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"})]})]}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"red.50",borderRadius:1},children:(0,Gt.jsx)(vye.A,{sx:{color:"red.500"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:V("rpm_ReadingAlerts")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:B?"".concat(B,"%"):"NA"})]})]})]})]})]}),(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:"2",children:(0,Gt.jsx)(Eu,{maxWidth:550,m:"auto",children:(0,Gt.jsx)(J,{legend:Q})})})})]})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",sx:{maxWidth:"100%"},children:(0,Gt.jsx)(nS,{children:(0,Gt.jsxs)(K_,{children:[(0,Gt.jsxs)(rC,{sx:{width:"50%"},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:V("rpm_RecentReadings")}),R?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:R,headCells:D,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,scrollHeight:500,className:"theme_scroll",children:null===R||void 0===R?void 0:R.slice(0,10).map(e=>{var t;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{children:e.ts}),(0,Gt.jsx)(rC,{children:e.values.systolic?X(e,"systolic").reading:"NA"}),(0,Gt.jsx)(rC,{children:e.values.diastolic?X(e,"diastolic").reading:"NA"}),(0,Gt.jsx)(rC,{children:e.values.pulse?null===(t=X(e,"pulse"))||void 0===t?void 0:t.reading:"NA"})]},e.id)})})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})]}),(0,Gt.jsxs)(rC,{sx:{width:"50%",verticalAlign:"top"},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,fontSize:14,sx:{position:"relative",mb:2,"&::after":{content:'""',position:"absolute",bottom:-5,left:0,height:"2px",width:"60px",bgcolor:"grey.700"}},children:V("rpm_DoctorNotes")}),[1,2,3,4,5,6].map(e=>(0,Gt.jsx)(Eu,{mb:.5,sx:{borderBottom:"1px solid #616161",height:30}},e)),(0,Gt.jsx)(Ym,{variant:"body2",textAlign:"right",mt:2,fontWeight:500,sx:{fontStyle:"italic"},children:V("rpm_Signature")})]})]})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:500,fontSize:10,sx:{fontStyle:"italic",color:"grey.600",textAlign:"justify"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:"DISCLAIMER:"})," ","THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)("img",{src:Kg,height:30})})]})})})]})})})]})]})};const U_e=function(e){let{patientData:t,program:n}=e;const r=$o.getPatientDefaultCourse("course"),i=$o.getFilterDate("filterDate"),o=Nt(),{t:a}=vg(),[s,l]=We.useState(null),[c,d]=We.useState({}),[u,p]=We.useState({}),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),[y,b]=We.useState(null),j=async()=>{const e={patient_id:null===t||void 0===t?void 0:t.id,desease:["bp"],duration:[null===i||void 0===i?void 0:i.start_date,null===i||void 0===i?void 0:i.end_date]};try{const{data:t}=await o(Zs(e));if(l(t),!as(t)){const e=null===t||void 0===t?void 0:t.filter(e=>{if(e.alerts){const t=e.alerts.find(e=>"pulse"!==e.data_name);if(!as(t))return!0}}),n=Math.round(100*e.length/t.length);x(n)}}catch(n){o(Zo({subTitle:n.message,severity:$c}))}},w=async e=>{await o(Zde({perPage:"10000",countryCode:e.country},"RPM",t=>{var n,r;let{countries:i,states:o}=t;const a=null===i||void 0===i||null===(n=i.content)||void 0===n?void 0:n.find(t=>t.isoCode===e.country),s=null===o||void 0===o||null===(r=o.content)||void 0===r?void 0:r.find(t=>t.isoCode===e.state);d(a),p(s)},()=>{}))},_=async()=>{const e={kind:"SELF"};try{const{data:r}=await o(al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};m(i)}catch(r){console.log(r)}},C=async()=>{const e={kind:"FAMILY"};try{const{data:r}=await o(al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};g(i)}catch(r){console.log(r)}},S=async()=>{try{var e;const{data:n}=await o(Ys(null===t||void 0===t?void 0:t.id,null===r||void 0===r||null===(e=r.schedule)||void 0===e?void 0:e.id,null===r||void 0===r?void 0:r.id));!as(n)&&b(n)}catch(n){console.log("fetchPatientMissedReading="+n)}};We.useEffect(()=>{if(!as(t)&&!as(n)){o(w_({activeMenuItem:"report"}))}},[t,n]),We.useEffect(()=>{as(t)||as(n)||as(r)||(j(),w(n),_(),C(),S()),as(t)||as(n)||as(i)||(j(),w(n),_(),C(),S())},[t,n]);const A=[{id:"time",label:a("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"systolic",label:a("rpm_Systolic"),isSort:!1,sortProperty:"systolic"},{id:"diastolic",label:a("rpm_Diastolic"),isSort:!1,sortProperty:"diastolic"},{id:"pulse",label:a("rpm_Pulse"),isSort:!1,sortProperty:"pulse"}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(V_e,{program:n,patientData:t,headCellsItems:A,patientBpReport:s,activeCourse:r,states:u,countries:c,selfDisease:h,familyDisease:f,alertPercent:v,patientMissedReading:y,filterDate:i})})};const q_e=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T,E,P,D,R;let{patientData:N,program:L,headCellsItems:I,patientBpReport:F,activeCourse:$,countries:B,states:z,selfDisease:H,familyDisease:W,alertPercent:V,socialHistory:U,personalDiseaseHead:q,familyDiseaseHead:G,notesList:Y,prescribedHead:Z,consultNotesList:K,consultationHead:X,patientMissedReading:Q,filterDate:J}=e;const ee=Nt(),{t:te}=vg(),ne=so(),{years:re}=hs(null===N||void 0===N?void 0:N.birth_date),ie=We.useRef(),oe=(0,s_e.useReactToPrint)({content:()=>ie.current,documentTitle:"".concat(null===L||void 0===L?void 0:L.code,"_").concat(null===N||void 0===N?void 0:N.first_name,"_report_").concat(null!==$&&void 0!==$&&null!==(t=$.schedule)&&void 0!==t&&t.vital_name?null===$||void 0===$||null===(n=$.schedule)||void 0===n?void 0:n.vital_name:"NA")}),ae=(null===L||void 0===L?void 0:L.image)instanceof File?URL.createObjectURL(null===L||void 0===L?void 0:L.image):null===L||void 0===L?void 0:L.image,se=(e,t,n)=>{const r=sa()(t).format("YYYY"),i=sa()(n).format("YYYY");return"CUSTOM"===e?"".concat(r," - ").concat(i):"PRESENT"===e?"".concat(r," - ").concat(e):"NA"},le=(e,t)=>{const n=Ss(e);return{reading:(0,Gt.jsx)(Gt.Fragment,{children:n?(0,Gt.jsx)(Eu,{className:Ss(e),display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values[t]})}):(0,Gt.jsx)(Eu,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values[t]})})}),stage:n?te("rpm_".concat(Ss(e))):"Normal"}},ce=(e,t)=>{const n=Ms(e);return{reading:(0,Gt.jsx)(Gt.Fragment,{children:n?(0,Gt.jsx)(Eu,{className:Ms(e),display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values[t]})}):(0,Gt.jsx)(Eu,{className:"normal",display:"inline-flex",width:30,justifyContent:"center",children:(0,Gt.jsx)(Eu,{component:"span",children:e.values[t]})})}),stage:n?te("rpm_".concat(Ms(e))):"Normal"}},de=[{value:"CheckLowBP",color:null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.orange[300],darkColor:null===Lde||void 0===Lde||null===(i=Lde.palette)||void 0===i?void 0:i.orange[700]},{value:"ElevatedBloodPressure",color:null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[600],darkColor:null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.orange[900]},{value:"Hypertension_Stage1",color:null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.red[300],darkColor:null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.red[500]},{value:"Hypertensive_Stage2",color:null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.red[500],darkColor:null===Lde||void 0===Lde||null===(d=Lde.palette)||void 0===d?void 0:d.red[700]},{value:"Hypertensive_Crisis",color:null===Lde||void 0===Lde||null===(u=Lde.palette)||void 0===u?void 0:u.red[700],darkColor:null===Lde||void 0===Lde||null===(p=Lde.palette)||void 0===p?void 0:p.red[900]},{value:"normal",color:null===Lde||void 0===Lde||null===(h=Lde.palette)||void 0===h?void 0:h.green[300],darkColor:null===Lde||void 0===Lde||null===(m=Lde.palette)||void 0===m?void 0:m.green[700]}],ue=e=>{let{legend:t}=e;return t.length>0&&(0,Gt.jsx)(Eu,{textAlign:"center",children:(0,Gt.jsx)(Eu,{component:"ul",p:0,m:0,children:null===de||void 0===de?void 0:de.map((e,t)=>(0,Gt.jsxs)(Eu,{component:"li",fontSize:14,display:"inline-flex",sx:{listStyle:"none",mr:1,mb:.5,lineHeight:1},children:[(0,Gt.jsx)(gye.A,{sx:{width:10,height:10,color:e.color}}),(0,Gt.jsx)(Eu,{component:"span",ml:1,color:e.darkColor,children:te("rpm_".concat(e.value))})]},t))})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)("style",{children:"@page {size: auto; margin: 4mm 2mm 4mm 2mm; }"}),(0,Gt.jsx)(L_e,{}),(0,Gt.jsxs)(Eu,{className:"detailed_report",sx:{maxWidth:700,mx:"auto"},children:[(0,Gt.jsx)(Eu,{px:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,justifyContent:"center",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",disableRipple:!0,onClick:()=>ne(-1),children:te("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:oe,children:te("rpm_Print")})}),(0,Gt.jsx)(df,{item:!0,children:"course"==(null===J||void 0===J?void 0:J.report)?(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>{var e;return Sd(ee,null===N||void 0===N?void 0:N.id,null===$||void 0===$?void 0:$.id,"bp",null===J||void 0===J?void 0:J.start_date,null===J||void 0===J?void 0:J.end_date,null===L||void 0===L?void 0:L.code,null===$||void 0===$||null===(e=$.schedule)||void 0===e?void 0:e.id)},children:te("rpm_Download")}):(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>Sd(ee,null===N||void 0===N?void 0:N.id,null===$||void 0===$?void 0:$.id,"bp",null===J||void 0===J?void 0:J.start_date,null===J||void 0===J?void 0:J.end_date,"",""),children:te("rpm_Download")})})]})}),(0,Gt.jsx)(PC,{ref:ie,sx:{p:2},children:(0,Gt.jsx)(kC,{size:"small",sx:{bgcolor:"white",border:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsxs)(nS,{sx:{"& tr td":{borderBottom:0,whiteSpace:"normal",py:.375}},children:[(0,Gt.jsxs)(K_,{children:[(0,Gt.jsx)(rC,{sx:{borderRight:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start"},children:[as(ae)?(0,Gt.jsx)(R_e.A,{sx:{color:"primary.theme.500",fontSize:60}}):(0,Gt.jsx)(Eu,{sx:{p:1,display:"flex",borderRadius:1,bgcolor:"primary.theme.50",flexGrow:.4,justifyContent:"center"},children:(0,Gt.jsx)("img",{src:ae,width:100,height:100})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:.6,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",fontWeight:500,children:as(L)?(0,Gt.jsx)(ZC,{}):null!==L&&void 0!==L&&L.display_name?null===L||void 0===L?void 0:L.display_name:"NA"}),(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",sx:{mt:.5},children:[as(L)?(0,Gt.jsx)(ZC,{width:50,sx:{display:"inline-block"}}):null!==L&&void 0!==L&&L.city?(null===L||void 0===L?void 0:L.city)+", ":"NA",as(z)?(0,Gt.jsx)(ZC,{width:50,sx:{display:"inline-block",ml:1}}):null!==z&&void 0!==z&&z.name?null===z||void 0===z?void 0:z.name:"NA"]}),(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{mt:.5},children:as(B)?(0,Gt.jsx)(ZC,{width:50}):null!==B&&void 0!==B&&B.name?null===B||void 0===B?void 0:B.name:"NA"})]})]})}),(0,Gt.jsxs)(rC,{width:"40%",children:[(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_PatientName")}),(0,Gt.jsx)(Eu,{children:as(N)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:(null===N||void 0===N?void 0:N.first_name)+" "+(null===N||void 0===N?void 0:N.last_name)})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_AgeGender")}),(0,Gt.jsx)(Eu,{children:as(N)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==N&&void 0!==N&&N.birth_date?"".concat(re,"yrs"):"NA",null!==N&&void 0!==N&&null!==(f=N.profile)&&void 0!==f&&f.gender?", ".concat(null===N||void 0===N||null===(g=N.profile)||void 0===g?void 0:g.gender):""]})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_Mobile")}),(0,Gt.jsx)(Eu,{children:as(N)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==N&&void 0!==N&&N.mobile?null===N||void 0===N?void 0:N.mobile:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_VitalStats")}),(0,Gt.jsx)(Eu,{children:as(N)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:[null!==N&&void 0!==N&&null!==(v=N.patient_health_profile)&&void 0!==v&&null!==(x=v.height)&&void 0!==x&&x.split(".")[0]?(null===N||void 0===N||null===(y=N.patient_health_profile)||void 0===y||null===(b=y.height)||void 0===b?void 0:b.split(".")[0])+"''"+(null===N||void 0===N||null===(j=N.patient_health_profile)||void 0===j||null===(w=j.height)||void 0===w?void 0:w.split(".")[1])+" ft.":"NA"," "," / ",null!==N&&void 0!==N&&null!==(_=N.patient_health_profile)&&void 0!==_&&_.weight?(null===N||void 0===N||null===(C=N.patient_health_profile)||void 0===C?void 0:C.weight)+"kg":"NA"]})})]}),(0,Gt.jsxs)(JM,{flexDirection:"row",mb:.25,children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:"h6.fontWeight",sx:{flex:1},color:"primary",children:te("rpm_BMI")}),(0,Gt.jsx)(Eu,{children:as(N)?(0,Gt.jsx)(ZC,{width:50}):(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",component:"p",children:null!==N&&void 0!==N&&null!==(S=N.patient_health_profile)&&void 0!==S&&S.weight?Os(null===N||void 0===N||null===(A=N.patient_health_profile)||void 0===A?void 0:A.height,null===N||void 0===N||null===(k=N.patient_health_profile)||void 0===k?void 0:k.weight):"NA"})})]})]})]}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:"course"===(null===J||void 0===J?void 0:J.report)?"".concat(te("rpm_COURSE")," : ").concat(as($)?"...":null===$||void 0===$||null===(M=$.schedule)||void 0===M?void 0:M.name,"                   \n                        (").concat(sa()(null===J||void 0===J?void 0:J.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===J||void 0===J?void 0:J.end_date).format("DD MMM YYYY"),")"):"".concat(te("rpm_Duration")," :                 \n                      (").concat(sa()(null===J||void 0===J?void 0:J.start_date).format("DD MMM YYYY")," to ").concat(sa()(null===J||void 0===J?void 0:J.end_date).format("DD MMM YYYY"),")")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",sx:{maxWidth:"100%"},children:(0,Gt.jsxs)(nS,{children:[(0,Gt.jsxs)(K_,{children:[(0,Gt.jsxs)(rC,{sx:{width:"60%"},children:[as(F)?(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,Gt.jsx)(Eu,{height:200,children:(0,Gt.jsx)(Lye,{patientBpReport:F,getAlertClassName:Ss})}),as(F)?(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,Gt.jsx)(Eu,{sx:{height:"200px"},children:(0,Gt.jsx)($ye,{patientBpReport:F})})]}),(0,Gt.jsxs)(rC,{sx:{width:"40%"},children:[as(F)?(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})}):(0,Gt.jsx)(Eu,{sx:{height:"200px"},children:(0,Gt.jsx)(zye,{stageAlertData:F,height:200,width:200})}),(0,Gt.jsxs)(Eu,{display:"inline-block",children:["course"===(null===J||void 0===J?void 0:J.report)&&(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"orange.50",borderRadius:1},children:(0,Gt.jsx)(N_e.A,{sx:{color:"orange.500"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:te("rpm_Status")}),"NON_COMPLIANT"==(null===Q||void 0===Q?void 0:Q.status)?(0,Gt.jsx)(Eu,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.red[900],backgroundColor:e.palette.red[100],display:"inline-flex",fontSize:e.spacing(1.5),borderRadius:.5,fontWeight:600}),children:"NON-COMPLIANT"}):(0,Gt.jsx)(Eu,{component:"span",sx:e=>({py:.25,px:1,color:e.palette.green[900],backgroundColor:e.palette.green[100],display:"inline-flex",fontSize:e.spacing(1.25),borderRadius:.5,fontWeight:600}),children:"COMPLIANT"})]})]}),(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"flex-start",mt:2},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex",p:1,bgcolor:"red.50",borderRadius:1},children:(0,Gt.jsx)(vye.A,{sx:{color:"red.500"}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:500,children:te("rpm_ReadingAlerts")}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",lineHeight:"1",sx:{mt:.5},children:V?"".concat(V,"%"):"NA"})]})]})]})]})]}),(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:"2",children:(0,Gt.jsx)(Eu,{maxWidth:550,m:"auto",children:(0,Gt.jsx)(ue,{legend:de})})})})]})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_InstrumentReadings")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",sx:{maxWidth:"100%"},children:(0,Gt.jsx)(nS,{children:(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{children:F?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:F,headCells:I,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,className:"theme_scroll",children:null===F||void 0===F?void 0:F.map(e=>{var t,n,r,i,o;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{children:e.ts}),(0,Gt.jsx)(rC,{children:e.values.systolic?null===(t=le(e,"systolic"))||void 0===t?void 0:t.reading:"NA"}),(0,Gt.jsx)(rC,{children:e.values.diastolic?null===(n=le(e,"diastolic"))||void 0===n?void 0:n.reading:"NA"}),(0,Gt.jsx)(rC,{children:null===(r=le(e,"systolic"))||void 0===r?void 0:r.stage}),(0,Gt.jsx)(rC,{children:e.values.pulse?null===(i=ce(e,"pulse"))||void 0===i?void 0:i.reading:"NA"}),(0,Gt.jsx)(rC,{children:null===(o=ce(e,"pulse"))||void 0===o?void 0:o.stage})]},e.id)})})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_MedicalHistory")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",children:(0,Gt.jsxs)(nS,{children:[(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsx)(Eu,{children:H?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:H,headCells:q,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,children:null===H||void 0===H?void 0:H.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{width:"25%",children:e.disease_name}),(0,Gt.jsx)(rC,{width:"25%",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):se(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)}),(0,Gt.jsx)(rC,{children:e.remark?e.remark:"NA"})]},e.id))})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_FamilyMedicalHistory")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(Eu,{children:W?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:W,headCells:G,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,children:null===W||void 0===W?void 0:W.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{width:"25%",children:e.relationship}),(0,Gt.jsx)(rC,{width:"25%",children:e.disease_name}),(0,Gt.jsx)(rC,{width:"25%",children:e.custom_duration?e.custom_duration+" "+(null===e||void 0===e?void 0:e.duration_unit):se(e.duration_unit,null===e||void 0===e?void 0:e.start_date,e.end_date)}),(0,Gt.jsx)(rC,{children:e.remark?e.remark:"NA"})]},e.id))})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_OtherHealthIssues")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,children:(0,Gt.jsx)(Eu,{children:U?(0,Gt.jsxs)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:[" ",null===U||void 0===U||null===(O=U.other_histories)||void 0===O?void 0:O.map((e,t)=>(0,Gt.jsxs)(df,{container:!0,spacing:.75,alignItems:"center",mt:.05,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Eu,{sx:{display:"flex",alignItems:"start"},children:(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",sx:{pl:.5},children:t+1+". "+(null===e||void 0===e?void 0:e.question)})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Ym,{variant:"body2",fontWeight:"h6.fontWeight",children:null===e||void 0===e?void 0:e.answer})})]},t))]}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})]})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_PrescribedMedications")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(kC,{size:"small",children:(0,Gt.jsxs)(nS,{children:[(0,Gt.jsx)(K_,{children:(0,Gt.jsxs)(rC,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,mb:2,children:[!as(null===Y||void 0===Y?void 0:Y.symptomsList)&&(0,Gt.jsxs)(df,{item:!0,md:6,children:[(0,Gt.jsx)(Ym,{component:"h6",fontSize:14,fontWeight:800,children:"Symptoms"}),(0,Gt.jsx)(Eu,{component:"span"}),as(null===Y||void 0===Y?void 0:Y.symptomsList)?"N/A":null===Y||void 0===Y||null===(T=Y.symptomsList)||void 0===T?void 0:T.map(e=>e).join(", ")]}),!as(null===Y||void 0===Y?void 0:Y.diagnosisList)&&(0,Gt.jsxs)(df,{item:!0,md:6,children:[(0,Gt.jsx)(Ym,{component:"h6",fontSize:14,fontWeight:800,children:"Diagnosis"}),(0,Gt.jsx)(Eu,{component:"span"}),as(null===Y||void 0===Y?void 0:Y.diagnosisList)?"N/A":null===Y||void 0===Y||null===(E=Y.diagnosisList)||void 0===E?void 0:E.map(e=>e).join(", ")]}),!as(null===Y||void 0===Y?void 0:Y.advicesList)&&(0,Gt.jsxs)(df,{item:!0,md:6,children:[(0,Gt.jsx)(Ym,{component:"h6",fontSize:14,fontWeight:800,children:"Advices"}),(0,Gt.jsx)(Eu,{component:"span"}),as(null===Y||void 0===Y?void 0:Y.advicesList)?"N/A":null===Y||void 0===Y||null===(P=Y.advicesList)||void 0===P?void 0:P.map(e=>e).join(", ")]}),!as(null===Y||void 0===Y?void 0:Y.testsList)&&(0,Gt.jsxs)(df,{item:!0,md:6,children:[(0,Gt.jsx)(Ym,{component:"h6",fontSize:14,fontWeight:800,children:"Tests"}),(0,Gt.jsx)(Eu,{component:"span"}),as(null===Y||void 0===Y?void 0:Y.testsList)?"N/A":null===Y||void 0===Y||null===(D=Y.testsList)||void 0===D?void 0:D.map(e=>e).join(", ")]})]}),(0,Gt.jsx)(Eu,{children:null!==Y&&void 0!==Y&&Y.presList?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:null===Y||void 0===Y?void 0:Y.presList,headCells:Z,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,children:null===Y||void 0===Y||null===(R=Y.presList)||void 0===R?void 0:R.map((e,t)=>{var n;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsxs)(rC,{children:[e.medicine?e.medicine:"NA"," ",(null===e||void 0===e?void 0:e.dose)&&e.dose+e.unit]}),(0,Gt.jsx)(rC,{children:null===ud||void 0===ud||null===(n=ud.find(t=>e.frequency===t.key))||void 0===n?void 0:n.text}),(0,Gt.jsx)(rC,{children:"".concat(sa()(e.start_date).format("DD MMM YYYY")," - ").concat(sa()(e.end_date).format("DD MMM YYYY"))}),(0,Gt.jsx)(rC,{children:e.comments?e.comments:"NA"})]},e.id+t)})})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})]})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{bgcolor:"primary.theme.300"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"h6",fontWeight:500,textAlign:"center",color:"white",py:.75,children:te("rpm_DoctorNotes")})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,sx:{p:0},children:(0,Gt.jsx)(Eu,{children:K?(0,Gt.jsx)(Eu,{sx:{"& .MuiTableContainer-root":{border:"none"},"& .MuiTableCell-root":{p:.25,fontSize:12,"& div":{py:.375,px:.75,lineHeight:1}},"& img":{maxHeight:200}},children:(0,Gt.jsx)(EM,{data:K,headCells:X,noDataImage:D_,skeletonVrows:6,stickyHeader:!0,children:null===K||void 0===K?void 0:K.map(e=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{width:"22%",children:e.created_at?sa()(e.created_at).format("DD MMM YYYY hh:mm A"):"NA"}),(0,Gt.jsx)(rC,{width:"20%",children:e.created_by}),(0,Gt.jsx)(rC,{sx:{wordBreak:"break-all","& p>p":{fontSize:12,m:0}},children:(0,Gt.jsx)(Ym,{variant:"body2",dangerouslySetInnerHTML:{__html:e.note},color:"inherit"})})]},e.id))})}):(0,Gt.jsx)(Eu,{height:"100%",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",maxWidth:"100%",maxHeight:180}})})})})})]})})})}),(0,Gt.jsx)(K_,{sx:{borderTop:"1px solid",borderColor:"grey.500"},children:(0,Gt.jsx)(rC,{colSpan:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsxs)(Ym,{variant:"body2",fontWeight:500,fontSize:10,sx:{fontStyle:"italic",color:"grey.600",textAlign:"justify"},children:[(0,Gt.jsx)(Eu,{component:"span",fontWeight:600,children:"DISCLAIMER:"})," ","THIS WEBSITE DOES NOT PROVIDE MEDICAL ADVICE. The information, including but not limited to, text, graphics, images, and other material contained on this website is for informational purposes only. No material on this site is intended to be a substitute for a qualified medical professional. All analysis are subject to clinical interpretation by a qualified medical professional."]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAAAwCAMAAAAsGsYIAAAAhFBMVEUAAAAsPIcrO4gsPYktPoktPoosPYgsPoctPYcsPogwQIAtPYkrOogqPYcsPoksPokgQIAtPYgwQI8uPossPokqQIUtPoguPoctPon////l5/CwttNHVpiWnsQ6SpDLz+JhbqeJkr3y8/ijqst8hrVHVpe9w9uwt9PY2+lUYp97h7Vveq5rQ2OOAAAAGHRSTlMAQCC/3++fgGCQEHAwYM+vEFAQf4AwsIDyeEDWAAAFcklEQVRo3uWa2YKjIBBFFQRF7SydWcAkGrNOT////437hbQSs8yDM/clRGU5VFGFJE4t4t6S8w9osWLyphgnzsRFPDlKLHImLXDeVOBMWeM5JZuy9wbyDglnuprrIOlu92E1qTNdMWCcMpUdjseNhfS7M1lpnInKq8Lm9HHM1+fL7ivohNMpII4VJ/SZHP5N0HVS8243x7Qq7VRuAyWBzym5TlZiGb9uJxMvA1/wQsIf2eyi3uOFVtCs/thu1uuaNPk1BPouZvUF7pjiZchyXxg/IDYfkcd9WYnYQPNfMk03NehmU6LuB0Ed0e/MpLw0/2sp3lvdqsJHgKaq4NRBj2o9CPreDoJ+7Ye8FpT5nAKVjAK1uq7M8s51K/BE7YbXqItLV7uPby/etHlVy+3EsngMqGMF3ZwrDy5AP8vCQSXDURfO64XmyLxX704ZVh/6ewpU5hVgAVp9KPVpAYXzwoIr7IdfuUbNmbV7DLWBQpe0A/2t1FraQOG8LRopo2Tk/B1QfGXPgF6yLNtJuTmWHiyPFWdyXBc6Z+f81AcKZ6JwG0TcxdLn3A+u7EsI6R5wS8WLskjislzeciMuAmKShVf9EWTySHARuXeA5kqprISsEmjF2UaiXaLU5QTQ61Y7KwZaUHTnbQ6cBWZWZFcOwfEG5Ttu06IIAQow1xiEKzxknXAsaLpvyMB5SNq080upJO3Nmkx7T1143av5QkhNlOg9ecOgYq5lkR5QooEGNRGeH7tGt41JwflLddG4+HrRQKFIc17Rva+SWUXP554+ivfGwr2gmJUGlvaAxrJ1ZbddrpyjjzGgpkk/ivL2rBQSbHEv7QFFJFw6pIv8C6/zvoBhFAQEg6Be3H2JAPrdPCPw2tVKXW3l0hGgMCk4D0oDXXeTAFAzx7DQ66aea3vguCal40AZQSpkAHVNtwzqutQ1JzsYBwqTnpKCUyZjQEEiPcQkuBuc2x0FGuBGVYUaoJG2yBmLMNlMa5hat4Awac15kCZoEY326LN3mcKIM6xExFo6BtQzqkQGKGYjrnolXYYRM4bHbmzqYdKTvJS4JuhnUd4OgTocgQ8R48d1sg1HgPrGMdbPDnRZPt2U2Ztx8k4lJEaCykMZa3Olko0OWtt4LftBEU3lW2dhjBk8yztAufR4EMIPvwXCQ7TqRDiTumYa6Hcb6KY0XFKuxgZ0U2m7V/vcdpSCXQPMAVCnm4bRoCRE9DHE/FBbMw0mjUJtYfqD45TQWiWX1nhJSV0r36XyFiiGSa9BvfYCu5VHUakX1NMxF7S56CLuugB9s4J+qLy0YwcqTdld1wTluD+re8bb5QOgbMYjOC1albxij0CHLGwBldm2NOidoMQ8xeewG0ZbVZybe90Y1SygA6MWxhvbEk2haAM9HZTaPQrK9SGwEK7brh/Ru3P1b4O+DfVJza8cxR92UHlWe/kUKKKs2QHFHfcr6PImqP2sD9x4R7KDrlV2N6gLUFjwOrgG7Q4GBwQr0Ln3glLQGC9GqEPsoIeHQYEWmQuLY8lS/blYfgF9exAUm0MYO7KD7tT5WVDsvcFTbdZN3429h0ERi1a143avsVon1A4qs+R5UNIw8NghK9adUMIQAf418Rgo+vQDX0u2Rqi2g36o9FlQkGLb1neDjQb1+zfYEGvaMsYTWEFlnqP8GCgWCnL6V1Lmx8+AOsLYGBrHhRzHv7bfN44ojvshOAYoRMSs7k7EZi7yvXY39w4XI8wCOnCC6nJWUdIobCEYwSR4ZOCnfSh97Kd9ct1ySFyCWYXC4nJvDTyNJohjEXFj0pTMukRQ0ud548WdCYv+J3+/uecPVf/JX8fYmzNxvfsjUJmYtN+2it0bikNn2voD08d65R09KnQAAAAASUVORK5CYII=",height:30})})]})})})]})})})]})]})},G_e=["vital","medications_list","intervals"];const Y_e=function(e){let{patientData:t,program:n}=e;const r=$o.getPatientDefaultCourse("course"),o=$o.getFilterDate("filterDate"),a=Nt(),{t:s}=vg(),[l,c]=We.useState(null),[d,u]=We.useState({}),[p,h]=We.useState({}),[m,f]=We.useState(null),[g,v]=We.useState(null),[x,y]=We.useState(null),[b,j]=We.useState(null),[w,_]=We.useState(null),[C,S]=We.useState(null),[A,k]=We.useState(null),M=async()=>{const e={patient_id:null===t||void 0===t?void 0:t.id,desease:["bp"],duration:[null===o||void 0===o?void 0:o.start_date,null===o||void 0===o?void 0:o.end_date]};try{const{data:t}=await a(Zs(e));if(c(t),!as(t)){const e=null===t||void 0===t?void 0:t.filter(e=>{if(e.alerts){const t=e.alerts.find(e=>"pulse"!==e.data_name);if(!as(t))return!0}}),n=Math.round(100*e.length/t.length);y(n)}}catch(n){a(Zo({subTitle:n.message,severity:$c}))}},O=async e=>{await a(Zde({perPage:"10000",countryCode:e.country},"RPM",t=>{var n,r;let{countries:i,states:o}=t;const a=null===i||void 0===i||null===(n=i.content)||void 0===n?void 0:n.find(t=>t.isoCode===e.country),s=null===o||void 0===o||null===(r=o.content)||void 0===r?void 0:r.find(t=>t.isoCode===e.state);u(a),h(s)},()=>{}))},T=async()=>{const e={kind:"SELF"};try{const{data:r}=await a(al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};f(i)}catch(r){console.log(r)}},E=async()=>{const e={kind:"FAMILY"};try{const{data:r}=await a(al(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,e)),{content:i}=r||{};v(i)}catch(r){console.log(r)}},P=async()=>{try{const{data:e}=await a(ul(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id));j(e)}catch(e){console.log(e)}},D=async()=>{try{const e={sort_by:"created_at",sort_order:"desc"},{data:r}=await a(Sl(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,(0,i.A)({},e),{start_date:null===o||void 0===o?void 0:o.start_date,end_date:null===o||void 0===o?void 0:o.end_date})),s=R(r),l=[],c=[],d=[],u=[],p=[];s&&Array.isArray(s)&&s.forEach(e=>{const t=null===e||void 0===e?void 0:e.medicationList,n=null===e||void 0===e?void 0:e.complaints,r=null===e||void 0===e?void 0:e.advices,i=null===e||void 0===e?void 0:e.diagnosis,o=null===e||void 0===e?void 0:e.tests;t&&Array.isArray(t)&&l.push(...t),n&&Array.isArray(n)&&c.push(...n),r&&Array.isArray(r)&&d.push(...r),i&&Array.isArray(i)&&p.push(...i),o&&Array.isArray(o)&&u.push(...o)}),_({presList:l,symptomsList:ks(c,"name"),advicesList:[...new Set(d)],testsList:[...new Set(u)],diagnosisList:ks(p,"name")})}catch(e){console.log(e)}},R=e=>null===e||void 0===e?void 0:e.map(e=>{const{vital:t,medications_list:n,intervals:r}=e,o=Ko(e,G_e),a=null===n||void 0===n?void 0:n.map(e=>{const t=r.filter(t=>{var n;return null===t||void 0===t||null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).map(e=>{let{id:t,repetition_kind:n,start_time:r}=e;return{id:t,repetition_kind:n,start_time:r?Ts(r,zc):"N/A",interval:null}}).map(e=>{let{start_time:t,interval:n}=e;return{start_time:t,interval:n}});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type||"",dose:e.dose,unit:e.unit,color:e.color,image:e.image||"",start_date:e.start_date,end_date:e.end_date,days:e.days,repetition_kind:Uc,timing:t,frequency:e.frequency,comments:e.comments}});return(0,i.A)({vital:t,note:"",medicationList:a},o)}),N=async()=>{try{const e={sort_by:"created_at",sort_order:"desc"},{data:r}=await a(vl(null===n||void 0===n?void 0:n.id,null===t||void 0===t?void 0:t.id,{type:"DOCTOR"},(0,i.A)({per_page:999},e),{start_date:null===o||void 0===o?void 0:o.start_date,end_date:null===o||void 0===o?void 0:o.end_date})),{content:s}=r||{},l=s.filter(e=>"bp"===e.vital);S(l)}catch(e){console.log(e)}},L=async()=>{try{var e;const{data:n}=await a(Ys(null===t||void 0===t?void 0:t.id,null===r||void 0===r||null===(e=r.schedule)||void 0===e?void 0:e.id,null===r||void 0===r?void 0:r.id));!as(n)&&k(n)}catch(n){console.log("fetchPatientMissedReading="+n)}};We.useEffect(()=>{if(!as(t)&&!as(n)){a(w_({activeMenuItem:"report"}))}},[t,n]),We.useEffect(()=>{as(t)||as(n)||as(r)||(M(),O(n),T(),E(),P(),D(),N(),L()),as(t)||as(n)||as(o)||(M(),O(n),T(),E(),P(),D(),N(),L())},[t,n]);const I=[{id:"time",label:s("rpm_Time"),isSort:!1,sortProperty:"time"},{id:"systolic",label:s("rpm_Systolic"),isSort:!1,sortProperty:"systolic"},{id:"diastolic",label:s("rpm_Diastolic"),isSort:!1,sortProperty:"diastolic"},{id:"condition",label:s("rpm_Condition"),isSort:!1,sortProperty:"condition"},{id:"pulse",label:s("rpm_Pulse"),isSort:!1,sortProperty:"pulse"},{id:"condition",label:s("rpm_Condition"),isSort:!1,sortProperty:"condition"}],F=[{id:"disease",label:s("rpm_DiseaseName"),isSort:!1,sortProperty:"disease"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:s("rpm_Remarks"),isSort:!1,sortProperty:"remarks"}],$=[{id:"medicine",label:s("rpm_Medicine"),isSort:!1,sortProperty:"medicine"},{id:"frequency",label:s("rpm_Frequency"),isSort:!1,sortProperty:"frequency"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"comments",label:s("rpm_Comments"),isSort:!1,sortProperty:"comments"}],B=[{id:"date",label:s("rpm_Date"),isSort:!1,sortProperty:"date"},{id:"advised_by",label:s("rpm_AdvisedBy"),isSort:!1,sortProperty:"advised_by"},{id:"comments",label:s("rpm_Comments"),isSort:!1,sortProperty:"comments"}],z=[{id:"relation",label:s("rpm_Relation"),isSort:!1,sortProperty:"relation"},{id:"disease",label:s("rpm_DiseaseName"),isSort:!1,sortProperty:"disease"},{id:"duration",label:s("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"remarks",label:s("rpm_Remarks"),isSort:!1,sortProperty:"remarks"}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(q_e,{program:n,patientData:t,headCellsItems:I,patientBpReport:l,activeCourse:r,states:p,countries:d,selfDisease:m,familyDisease:g,alertPercent:x,socialHistory:b,personalDiseaseHead:F,familyDiseaseHead:z,notesList:w,prescribedHead:$,consultNotesList:C,consultationHead:B,patientMissedReading:A,filterDate:o})})};function Z_e(e){return(0,sr.Ay)("MuiSwitch",e)}const K_e=(0,ar.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),X_e=["className","color","edge","size","sx"],Q_e=(0,Un.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t["edge".concat((0,Fu.A)(n.edge))],t["size".concat((0,Fu.A)(n.size))]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,["& .".concat(K_e.thumb)]:{width:16,height:16},["& .".concat(K_e.switchBase)]:{padding:4,["&.".concat(K_e.checked)]:{transform:"translateX(16px)"}}}}]}),J_e=(0,Un.Ay)(cC,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{["& .".concat(K_e.input)]:t.input},"default"!==n.color&&t["color".concat((0,Fu.A)(n.color))]]}})(e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:"".concat("light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]),transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),["&.".concat(K_e.checked)]:{transform:"translateX(20px)"},["&.".concat(K_e.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(K_e.checked," + .").concat(K_e.track)]:{opacity:.5},["&.".concat(K_e.disabled," + .").concat(K_e.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(K_e.input)]:{left:"-100%",width:"300%"}}},e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[n]=e;return{props:{color:n},style:{["&.".concat(K_e.checked)]:{color:(t.vars||t).palette[n].main,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,$u.X4)(t.palette[n].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(K_e.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(n,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,$u.a)(t.palette[n].main,.62):(0,$u.e$)(t.palette[n].main,.55))}},["&.".concat(K_e.checked," + .").concat(K_e.track)]:{backgroundColor:(t.vars||t).palette[n].main}}}})]}}),eCe=(0,Un.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}}),tCe=(0,Un.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}}),nCe=We.forwardRef(function(e,t){const n=(0,$t.b)({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:o=!1,size:a="medium",sx:s}=n,l=(0,nn.A)(n,X_e),c=(0,Ft.A)({},n,{color:i,edge:o,size:a}),d=(e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:a}=e,s={root:["root",n&&"edge".concat((0,Fu.A)(n)),"size".concat((0,Fu.A)(r))],switchBase:["switchBase","color".concat((0,Fu.A)(i)),o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,ir.A)(s,Z_e,t);return(0,Ft.A)({},t,l)})(c),u=(0,Gt.jsx)(tCe,{className:d.thumb,ownerState:c});return(0,Gt.jsxs)(Q_e,{className:(0,nr.A)(d.root,r),sx:s,ownerState:c,children:[(0,Gt.jsx)(J_e,(0,Ft.A)({type:"checkbox",icon:u,checkedIcon:u,ref:t,ownerState:c},l,{classes:(0,Ft.A)({},d,{root:d.switchBase})})),(0,Gt.jsx)(eCe,{className:d.track,ownerState:c})]})}),rCe=nCe;function iCe(e){var t,n;let{ruleList:r,ruleProgList:i,order:o,orderBy:a,setOrder:s,setOrderBy:l,dataParameter:c,rulesHeadCell:d,checkState:u,onCheck:p,isSelection:h,nodata:m,fetchRuleList:f,pageDetails:g,viewButton:v,deleteButton:x,patientData:y,program:b,setHeadcells:j,settingModal:w,initialHeadcells:_,handleSettingModalToggle:C,handleStatus:S,handleDefaultRule:A,isRuleActive:k,isGlucoseRuleActive:M,handleDefaultModalToggle:O}=e;const{t:T}=vg(),E=Nt(),P=so(),D=[{name:T("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===b||void 0===b?void 0:b.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===b||void 0===b?void 0:b.code,"/patients")},{name:"".concat((null===y||void 0===y?void 0:y.first_name)||""," ").concat((null===y||void 0===y?void 0:y.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===b||void 0===b?void 0:b.code,"/patients/").concat(null===y||void 0===y?void 0:y.id,"/dashboard")},{name:T("rpm_patientRules"),url:""}];return We.useEffect(()=>{const e={breadcrumb:D};as(b)||as(y)||E(w_(e))},[b,y]),(0,Gt.jsx)(Eu,{sx:{width:"100%"},position:"relative",children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsxs)(df,{item:!0,xs:12,sm:!0,children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block",md:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:T("rpm_Rules")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none",md:"none"}},position:"absolute",top:"-29px",left:"40px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:T("rpm_Rules")})}),k&&M?"":(0,Gt.jsxs)(Eu,{display:"flex",gap:.5,pt:.5,children:[(0,Gt.jsx)(Ym,{component:"span",sx:{color:"grey.400"},children:(0,Gt.jsx)(aue,{sx:{fontSize:"14px"}})}),(0,Gt.jsx)(Ym,{sx:{color:"grey.600",fontSize:"14px"},children:"Program-level rules will auto-apply to this patient as the patient does not have any personalized rule"}),(0,Gt.jsx)(Ym,{sx:{fontSize:"14px"},children:(0,Gt.jsx)(Lo,{to:"/rpm/program/".concat(null===b||void 0===b?void 0:b.code,"/rules"),children:"View program level rules"})})]})]}),(null===b||void 0===b||null===(t=b.permissions)||void 0===t?void 0:t.showAddPatientRuleBtn)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>P("add"),className:(null===b||void 0===b||null===(n=b.permissions)||void 0===n?void 0:n.showAddPatientRuleBtn)&&"patientrules-tour-step0",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:T("rpm_AddRule")})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:T("rpm_TableCellSetting"),className:"",children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:C,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})]})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(EM,{order:o,orderBy:a,setOrder:s,setOrderBy:l,data:r,headCells:null===d||void 0===d?void 0:d.filter(e=>_.includes(e.id)),dataParameter:c,selected:u,setSelected:p,isSelection:h,noDataImage:m,fetchList:f,pageDetails:g,skeletonVrows:6,className:"theme_scroll",children:null===r||void 0===r?void 0:r.filter(e=>"bp.pulse"!==e.data_type).map(e=>{var t,n;const r=e.short_description.split("/");return(0,Gt.jsxs)(K_,{hover:!0,selected:u.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},className:"patientrules-tour-step1",children:[h&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:p,checked:u.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),_.includes("vital_type")&&(0,Gt.jsxs)(rC,{children:["bp"===e.data_type&&(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",T("rpm_".concat(e.data_type))]})}),"glucose"===e.data_type&&(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",T("rpm_".concat(e.data_type))]})}),"bp.pulse"===e.data_type&&(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Ym,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",T("rpm_".concat(e.data_type))]})})]}),_.includes("processing_mode")&&(0,Gt.jsx)(rC,{children:e.processing_mode}),_.includes("batch_size")&&(0,Gt.jsx)(rC,{children:e.data_batch_size?e.data_batch_size:"NA"}),_.includes("short_description")&&(0,Gt.jsx)(rC,{children:r[0]}),_.includes("status")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(rCe,{checked:!cs(null===e||void 0===e?void 0:e.status)&&(null===e||void 0===e?void 0:e.status),onChange:t=>S(t,e),disabled:!1===(null===e||void 0===e?void 0:e.default_rule)&&!0,inputProps:{"aria-label":"controlled"}})}),_.includes("defaultRule")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Xj,{margin:"dense",children:(0,Gt.jsxs)(Dw,{variant:"outlined",size:"small",value:null!==(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.default_rule),onChange:t=>{t.target.value&&k&&"bp"===e.data_type||t.target.value&&M&&"glucose"===e.data_type?O(t,e):A({e:t,row:e})},children:[(0,Gt.jsx)($m,{value:!0,children:"Yes"}),(0,Gt.jsx)($m,{value:!1,children:"No"})]})})}),_.includes("updated_at")&&(0,Gt.jsx)(rC,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),_.includes("action")&&(0,Gt.jsxs)(rC,{children:[(null===b||void 0===b||null===(t=b.permissions)||void 0===t?void 0:t.showViewPatientRuleBtn)&&v(e),(null===b||void 0===b||null===(n=b.permissions)||void 0===n?void 0:n.showDeletePatientRuleBtn)&&x(e)]})]},e.id)})}),(0,Gt.jsx)(IO,{pageDetails:g,fetchListFunction:f})]}),!1]}),(0,Gt.jsx)(fO,{open:w,allHeadCells:d,initialHeadcells:_,setHeadcells:j,onClose:C})]})})}iCe.defaultProps={rulesHeadCell:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",ruleProgList:[],ruleList:[],fetchRuleList:()=>{},viewButton:()=>{},deleteButton:()=>{},patientData:{},program:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},handleDefaultModalToggle:()=>{},handleStatus:()=>{},handleDefaultRule:()=>{},isRuleActive:!1,isGlucoseRuleActive:!1};const oCe=iCe,aCe=["content"],sCe=["content"];const lCe=function(e){var t;let{program:n,patientData:r}=e;const o=Nt(),a=so(),s=Ct(qd),l=!("true"===ls(s,"user_principal.attributes.skip_tour[0]","")),c=Ct(Nd),d=P_(BA().breakpoints.down("sm")),{t:u}=vg(),{enqueueSnackbar:p}=hi(),{patientId:h}=lo(),[m,f]=(0,We.useState)("desc"),[g,v]=(0,We.useState)("updated_at"),[x,y]=We.useState(null),[b,j]=We.useState(null),[w,_]=(0,We.useState)([]),[C,S]=We.useState(""),[A,k]=We.useState(""),[M,O]=(0,We.useState)((0,i.A)({},Fc)),T=null===x||void 0===x?void 0:x.some(e=>"bp"===e.data_type&&(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.status)),E=null===x||void 0===x?void 0:x.some(e=>"glucose"===e.data_type&&e.data_type&&(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.status)),[P,D]=We.useState({open:!1,data:{}}),[R,N]=We.useState({open:!1,data:{}}),L=d?["vital_type","action"]:["vital_type","processing_mode","batch_size","short_description","updated_at","status","defaultRule","action"],[I,F]=We.useState(!1),[$,B]=We.useState(as($o.getPatientRulesHeadcells())?L:$o.getPatientRulesHeadcells()),z=async e=>{let{e:t,row:r}=e;const a=x.map(e=>{if(e.id===r.id){const s={programId:null===n||void 0===n?void 0:n.code,patientId:h,ruleId:r.id,status:t.target.value,defaultRule:t.target.value};if(("glucose"===r.data_type||"bp"===r.data_type)&&(o(el(s)).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)}),"bp"===r.data_type)){var a;const e=null===(a=x.find(e=>"bp.pulse"===e.data_type&&e.short_description===r.short_description))||void 0===a?void 0:a.id;e&&o(el((0,i.A)((0,i.A)({},s),{},{ruleId:e}))).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)})}return(0,i.A)((0,i.A)({},e),{},{default_rule:t.target.value,status:t.target.value})}return e});y(a)},H=function(e){B(e),$o.setPatientRulesHeadcells(e)},W=e=>{D((0,i.A)((0,i.A)({},P),{},{open:!P.open,data:e}))},V=(e,t)=>{N((0,i.A)((0,i.A)({},R),{},{open:!R.open,data:{e:e,row:t}}))},U=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;try{const{data:t}=await o(Ks(null===n||void 0===n?void 0:n.code,h,(0,i.A)((0,i.A)({sort_by:g,sort_order:m},M),{},{q:e}))),r=t||{},{content:a}=r,s=Ko(r,aCe);y(a),O(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){p(t.message,{variant:"error"})}};We.useEffect(()=>{H(L)},[d]),We.useEffect(()=>{c&&h&&!as(n)&&U()},[c,h,n]),We.useEffect(()=>{c&&!as(n)&&async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;try{const{data:t}=await o(Cg(null===n||void 0===n?void 0:n.code,(0,i.A)((0,i.A)({sort_by:g,sort_order:m},M),{},{q:e}))),r=t||{},{content:a}=r,s=Ko(r,sCe);j(a),O(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){p(t.message,{variant:"error"})}}()},[c,n]),We.useEffect(()=>{o(w_({activeMenuItem:"rules"}))},[]);const q=[{id:"vital_type",label:u("rpm_Vitals"),isSort:!0,sortProperty:"vital_type"},{id:"processing_mode",label:u("rpm_ProcessingMode"),isSort:!1,sortProperty:"processing_mode"},{id:"batch_size",label:u("rpm_BatchSize"),isSort:!1,sortProperty:"batch_size"},{id:"short_description",label:u("rpm_ShortDescription"),isSort:!1,sortProperty:"short_description"},{id:"status",label:u("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"defaultRule",label:u("rpm_DefaultRule"),isSort:!1,sortProperty:"defaultRule"},{id:"updated_at",label:u("rpm_DateModified"),isSort:!1,sortProperty:"updated_at"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}];return as(n)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showPatientRuleList?(0,Gt.jsx)(oCe,{order:m,orderBy:g,setOrder:f,setOrderBy:v,searchText:C,setSearchText:S,dataParameter:"id",checkState:w,onCheck:e=>{if(Array.isArray(e))return _(e.map(e=>e.toString()));const t=e.target.name;w.includes(t)?_(w.filter(e=>e!==t)):_(e=>[...e,t])},isSelection:!1,nodata:D_,rulesHeadCell:q,ruleList:x,ruleProgList:b,fetchRuleList:U,pageDetails:M,editButton:e=>(0,Gt.jsx)(Yx,{title:u("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),viewButton:e=>(0,Gt.jsx)(Yx,{title:u("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>a(e.id),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),deleteButton:e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>W(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),patientData:r,program:n,setHeadcells:H,settingModal:I,initialHeadcells:$,handleSettingModalToggle:()=>{F(!I)},handleStatus:async(e,t)=>{const r=null===x||void 0===x?void 0:x.map(r=>{if(r.id===t.id){const s={programId:null===n||void 0===n?void 0:n.code,patientId:h,ruleId:t.id,status:e.target.checked,defaultRule:null===t||void 0===t?void 0:t.default_rule};if(("glucose"===t.data_type||"bp"===t.data_type)&&(o(el(s)).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)}),"bp"===t.data_type)){var a;const e=null===(a=x.find(e=>"bp.pulse"===e.data_type&&e.short_description===t.short_description))||void 0===a?void 0:a.id;e&&o(el((0,i.A)((0,i.A)({},s),{},{ruleId:e}))).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)})}return(0,i.A)((0,i.A)({},r),{},{status:e.target.checked})}return r});y(r)},handleDefaultRule:z,isRuleActive:T,isGlucoseRuleActive:E,handleDefaultModalToggle:V}):(0,Gt.jsx)(__,{}),(0,Gt.jsx)(PU,{openModal:P.open,onCloseModal:W,actionFunction:()=>(async(e,t,n)=>{const r={programId:e,patientId:t,ruleId:null===n||void 0===n?void 0:n.id,data_type:null===n||void 0===n?void 0:n.data_type};try{if(("glucose"===n.data_type||"bp"===n.data_type)&&(await o(tl(r)),"bp"===n.data_type)){const e=null===x||void 0===x?void 0:x.find(e=>"bp.pulse"===(null===e||void 0===e?void 0:e.data_type)&&e.short_description===n.short_description);e&&await o(tl((0,i.A)((0,i.A)({},r),{},{ruleId:null===e||void 0===e?void 0:e.id,data_type:null===e||void 0===e?void 0:e.data_type})))}U(),D((0,i.A)((0,i.A)({},P),{},{open:!P.open})),p(u("message:rpm_DeleteRuleSuccess"),{variant:"success"})}catch(a){p(a.message,{variant:"error"})}})(null===n||void 0===n?void 0:n.code,h,P.data),dataName:"",options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteBodyText"),btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(PU,{openModal:R.open,onCloseModal:V,actionFunction:()=>z(null===R||void 0===R?void 0:R.data),dataName:"",options:{primaryText:u("message:rpm_DefaultRuleTitle"),secondaryText:u("message:rpm_DefautRuleBodyText"),btn:{primaryText:u("rpm_Yes"),secondaryText:u("rpm_No"),primaryColor:"success",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(AZ,{isTour:l,path:"patientRulesTour",setRenderer:k}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:A})]})};var cCe=n(87884);function dCe(e){let{exRuleArr:t,ruleData:n,addNewRule:r,patientData:o,program:a,pulseExRuleArr:s}=e;const{t:l}=vg(),c=Nt(),d=null===n||void 0===n?void 0:n.short_description.split("/"),u={data_type:null!==n&&void 0!==n&&n.data_type?null===n||void 0===n?void 0:n.data_type:"",processing_mode:null!==n&&void 0!==n&&n.processing_mode?null===n||void 0===n?void 0:n.processing_mode:"",data_batch_size:null!==n&&void 0!==n&&n.data_batch_size?null===n||void 0===n?void 0:n.data_batch_size:"",short_description:null!==n&&void 0!==n&&n.short_description?d[0]:"",rule:null!==n&&void 0!==n&&n.rule?null===n||void 0===n?void 0:n.rule:""},p=((()=>{let e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{name:t.name,desc:t.desc,when:{cond:t.data,between:t.data.map(e=>e.between)[0]||""}}))})})(),[{name:l("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===a||void 0===a?void 0:a.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===a||void 0===a?void 0:a.code,"/patients")},{name:"".concat((null===o||void 0===o?void 0:o.first_name)||""," ").concat((null===o||void 0===o?void 0:o.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===a||void 0===a?void 0:a.code,"/patients/").concat(null===o||void 0===o?void 0:o.id,"/dashboard")},{name:l("rpm_patientRules"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===a||void 0===a?void 0:a.code,"/patients/").concat(null===o||void 0===o?void 0:o.id,"/rules")},{name:ta()(n)?l("rpm_AddRule"):l("rpm_".concat(n.data_type)),url:""}]),h=[{id:"stage",align:"left"},{id:"from1",label:"From",align:"left"},{id:"to1",label:"To",align:"left"},{id:"from2",label:"From",align:"left",format:e=>e.toLocaleString("en-US")},{id:"to2",label:"To",align:"left",format:e=>e.toLocaleString("en-US")}];return We.useEffect(()=>{const e={breadcrumb:p};ta()(a)||ta()(o)||ta()(n)||c(w_(e))},[a,o,n]),(0,Gt.jsxs)(Eu,{sx:{width:"100%"},position:"relative",children:[(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsx)(Iz,{initialValues:ta()(n)?{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:'rule HighSystolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.systolic) >= 180\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertensive Crisis)");\n          Retract("HighSystolic_Stage3");\n\n  }\n\n  rule HighDiastolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.diastoruleData\n            ruleDatalic) >= 120\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertensive Crisis)");\n          Retract("HighDiastolic_Stage3");\n  }\n\n  rule HighSystolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.systolic) >= 140 && Util.ToInt(Data.systolic) <= 179\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 2)");\n          Retract("HighSystolic_Stage2");\n  }\n\n  rule HighDiastolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.diastolic) >= 90 && Util.ToInt(Data.diastolic) <= 119\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 2)");\n          Retract("HighDiastolic_Stage2");\n  }\n\n  rule HighSystolic {\n      when\n          Util.ToInt(Data.systolic) >= 130 &&\n  Util.ToInt(Data.systolic) <= 139\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 1)");\n         Retract("HighSystolic");\n  }\n\n  rule HighDiastolic {\n      when\n          Util.ToInt(Data.diastolic) >= 80 &&\n  Util.ToInt(Data.diastolic) <= 89\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 1)");\n          Retract("HighDiastolic");\n  }\n\n  rule ElevatedBloodPressure {\n      when\n          Util.ToInt(Data.systolic) >= 120 &&\n  Util.ToInt(Data.systolic) <= 129 &&\n  Util.ToInt(Data.diastolic) < 80\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Elevated blood\n  pressure");\n          Complete();\n  }\n\n  rule CheckLowBP salience 1 {\n      when\n          Util.ToInt(Data.systolic) < 90 &&\n  Util.ToInt(Data.diastolic) < 60\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Low blood\n  pressure");\n          Alerts.Add("bp", "diastolic", Data.diastolic, "Low blood\n  pressure");\n          Complete();\n  }'}:u,validationSchema:vV.addRule,onSubmit:r,enableReinitialize:!0,children:e=>{var r,i,o,a,c,d,u,p,m,f,g,v,x,y,b,j,w,_,C,S;let{values:A}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsxs)(df,{item:!0,xs:!0,children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"40px",top:"-33px",children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:ta()(n)?l("rpm_AddNewRule"):l("rpm_ViewRule")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:ta()(n)?l("rpm_AddNewRule"):l("rpm_ViewRule")})})]}),ta()(n)&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:l("rpm_Save")})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:l("rpm_VitalType")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,Gt.jsx)(Rj,{}),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:l("message:rpm_VitalTypeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[null===cd||void 0===cd?void 0:cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:l("rpm_".concat(e.name))},e.name)),(0,Gt.jsx)($m,{value:"bp.pulse",children:l("rpm_bp")})]}),(0,Gt.jsx)(Xz,{name:"data_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_VitalType")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:l("rpm_ProcessingMode")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,Gt.jsx)(Rj,{}),renderValue:e=>e||"Select",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:l("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"BATCH",children:"BATCH"}),(0,Gt.jsx)($m,{value:"REALTIME",children:"REALTIME"})]}),(0,Gt.jsx)(Xz,{name:"processing_mode",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_ProcessingMode")})})})]})}),"BATCH"===A.processing_mode&&(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"data_batch_size",sx:{mb:.75},children:l("rpm_BatchDataSize")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"data_batch_size",name:"data_batch_size",size:"small",disabled:!ta()(n)}),(0,Gt.jsx)(Xz,{name:"data_batch_size",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_BatchDataSize")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:l("rpm_ShortDescription")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"short_description",name:"short_description",size:"small",disabled:!ta()(n),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"short_description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_ShortDescription")})})})]})}),"bp"===A.data_type&&(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(Eu,{sx:{fontWeight:700},children:l("rpm_BloodPressureRule")}),(0,Gt.jsx)(PC,{sx:{borderRadius:2,mt:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsxs)(cS,{children:[(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:l("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:l("rpm_Systolic")}),(0,Gt.jsx)(rC,{align:"center",colSpan:3,children:l("rpm_Diastolic")}),(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:l("rpm_BpRange(Sys/Dia)")})]}),(0,Gt.jsx)(K_,{className:"inner_head",sx:{"& .MuiTableCell-head:first-of-type":{display:"none"},"& .MuiTableCell-head":{border:1,borderColor:"#ddd"},bgcolor:"primary.theme.50"},children:h.map(e=>(0,Gt.jsx)(rC,{align:"center",style:{top:57,minWidth:e.minWidth},colSpan:"1",children:e.label},e.id))})]}),(0,Gt.jsxs)(nS,{children:[null===t||void 0===t?void 0:t.map((e,n)=>{var r,i,o,a,s,c,d,u,p,h,m,f,g,v;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:l("rpm_".concat(e.name))}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===n&&t[n].data[0].value,!(0===n||n===t.length-1)&&e.data[0].value,n===t.length-1&&"-"]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===n?"-":!(n===t.length-1)&&(null===(r=t[n-1])||void 0===r||null===(i=r.data[0])||void 0===i?void 0:i.value)-1,n===t.length-1&&(null===e||void 0===e||null===(o=e.data[0])||void 0===o?void 0:o.value)]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===n&&t[n].data[1].value,!(0===n||n===t.length-1||3===n)&&e.data[1].value,(n===t.length-1||3===n)&&"-"]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[0===n?"-":!(n===t.length-1)&&(null===(a=t[n-1])||void 0===a||null===(s=a.data[1])||void 0===s?void 0:s.value)-1,n===t.length-1&&(null===e||void 0===e||null===(c=e.data[1])||void 0===c?void 0:c.value)]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[0===n&&"".concat(t[n].data[0].value," & Above"),!(0===n||n===t.length-1)&&"".concat(null===(d=t[n])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value,"\n                        -\n                        ").concat((null===(p=t[n-1])||void 0===p||null===(h=p.data[0])||void 0===h?void 0:h.value)-1),n===t.length-1&&"Below or ".concat(e.data[0].value)," / ",0===n&&"".concat(t[n].data[1].value," & Above"),!(0===n||n===t.length-1||3===n)&&"".concat(null===(m=t[n])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value,"\n                        -\n                        ").concat((null===(g=t[n-1])||void 0===g||null===(v=g.data[1])||void 0===v?void 0:v.value)-1),(n===t.length-1||3===n)&&"Below or ".concat(e.data[1].value)]})]},e.salience)}),!ta()(t)&&(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normal",children:l("rpm_NormalPressure")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(r=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===r||null===(i=r.data[0])||void 0===i?void 0:i.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(o=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===o||null===(a=o.data[0])||void 0===a?void 0:a.value)-1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(c=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===c||null===(d=c.data[1])||void 0===d?void 0:d.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(u=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===u||null===(p=u.data[1])||void 0===p?void 0:p.value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===(m=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===m||null===(f=m.data[0])||void 0===f?void 0:f.value)+1," "," - ",(null===(g=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===g||null===(v=g.data[0])||void 0===v?void 0:v.value)-1," "," / ",(null===(x=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===x||null===(y=x.data[1])||void 0===y?void 0:y.value)+1," "," - ",(null===(b=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===b||null===(j=b.data[1])||void 0===j?void 0:j.value)-1]})]})]})]})})]})}),"bp"===A.data_type&&(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{fontWeight:700},children:l("rpm_PulseRule")}),(0,Gt.jsx)(PC,{sx:{borderRadius:2,mt:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsx)(cS,{children:(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:"6px"}},children:[(0,Gt.jsx)(rC,{align:"center",children:l("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",children:l("rpm_From")}),(0,Gt.jsx)(rC,{align:"center",children:l("rpm_To")}),(0,Gt.jsx)(rC,{align:"center",children:l("rpm_Range")})]})}),(0,Gt.jsxs)(nS,{children:[null===s||void 0===s?void 0:s.map((e,t)=>{var n,r,i,o;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",className:"tableColor ".concat(e.name),children:l("rpm_".concat(e.name))}),(0,Gt.jsx)(rC,{align:"center",children:t==s.length-1?"-":e.data[0].value}),(0,Gt.jsx)(rC,{align:"center",children:0===t?"-":t!==s.length-1?(null===(n=s[t-1])||void 0===n||null===(r=n.data)||void 0===r?void 0:r[0].value)-1:s[1].data[0].value}),(0,Gt.jsxs)(rC,{align:"center",children:[t==s.length-1?"Below or ":e.data[0].value,!(0===t||1===t)&&"-",0===t?" & Above":t!==s.length-1?(null===(i=s[t-1])||void 0===i||null===(o=i.data)||void 0===o?void 0:o[0].value)-1:s[1].data[0].value]})]},e.salience)}),!ta()(s)&&(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",className:"tableColor normal",children:l("rpm_NormalPulse")}),(0,Gt.jsx)(rC,{align:"center",children:(null===(w=s[1])||void 0===w?void 0:w.data[0].value)+1}),(0,Gt.jsx)(rC,{align:"center",children:(null===(_=s[0])||void 0===_?void 0:_.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",children:[(null===(C=s[1])||void 0===C?void 0:C.data[0].value)+1," -"," ",(null===(S=s[0])||void 0===S?void 0:S.data[0].value)-1]})]})]})]})})]})})]})})]})})})}},"editor_formik")})}),!1]})}dCe.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],patientData:{},program:{},glucoseRuleData:{},pulseExRuleArr:[],glucoseExRuleArr:[]};const uCe=dCe;function pCe(e){let{glucoseRuleData:t,addNewRule:n,patientData:r,program:o,glucoseExRuleArr:a}=e;const{t:s}=vg(),l=Nt(),c={data_type:null!==t&&void 0!==t&&t.data_type?null===t||void 0===t?void 0:t.data_type:"",processing_mode:null!==t&&void 0!==t&&t.processing_mode?null===t||void 0===t?void 0:t.processing_mode:"",data_batch_size:null!==t&&void 0!==t&&t.data_batch_size?null===t||void 0===t?void 0:t.data_batch_size:"",short_description:null!==t&&void 0!==t&&t.short_description?null===t||void 0===t?void 0:t.short_description:"",rule:null!==t&&void 0!==t&&t.rule?null===t||void 0===t?void 0:t.rule:""},d=((()=>{let e=[];null===a||void 0===a||a.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{name:t.name,desc:t.desc,when:{cond:t.data,between:t.data.map(e=>e.between)[0]||""}}))})})(),[{name:s("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===o||void 0===o?void 0:o.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients")},{name:"".concat((null===r||void 0===r?void 0:r.first_name)||""," ").concat((null===r||void 0===r?void 0:r.last_name)||""),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients/").concat(null===r||void 0===r?void 0:r.id,"/dashboard")},{name:s("rpm_patientRules"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients/").concat(null===r||void 0===r?void 0:r.id,"/rules")},{name:ta()(t)?s("rpm_AddRule"):s("rpm_".concat(t.data_type)),url:""}]);return We.useEffect(()=>{const e={breadcrumb:d};ta()(o)||ta()(r)||ta()(t)||l(w_(e))},[o,r,t]),(0,Gt.jsxs)(Eu,{sx:{width:"100%"},position:"relative",children:[(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsx)(Iz,{initialValues:ta()(t)?{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:'rule HighSystolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.systolic) >= 180\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertensive Crisis)");\n          Retract("HighSystolic_Stage3");\n\n  }\n\n  rule HighDiastolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.diastoruleData\n            ruleDatalic) >= 120\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertensive Crisis)");\n          Retract("HighDiastolic_Stage3");\n  }\n\n  rule HighSystolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.systolic) >= 140 && Util.ToInt(Data.systolic) <= 179\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 2)");\n          Retract("HighSystolic_Stage2");\n  }\n\n  rule HighDiastolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.diastolic) >= 90 && Util.ToInt(Data.diastolic) <= 119\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 2)");\n          Retract("HighDiastolic_Stage2");\n  }\n\n  rule HighSystolic {\n      when\n          Util.ToInt(Data.systolic) >= 130 &&\n  Util.ToInt(Data.systolic) <= 139\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 1)");\n         Retract("HighSystolic");\n  }\n\n  rule HighDiastolic {\n      when\n          Util.ToInt(Data.diastolic) >= 80 &&\n  Util.ToInt(Data.diastolic) <= 89\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 1)");\n          Retract("HighDiastolic");\n  }\n\n  rule ElevatedBloodPressure {\n      when\n          Util.ToInt(Data.systolic) >= 120 &&\n  Util.ToInt(Data.systolic) <= 129 &&\n  Util.ToInt(Data.diastolic) < 80\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Elevated blood\n  pressure");\n          Complete();\n  }\n\n  rule CheckLowBP salience 1 {\n      when\n          Util.ToInt(Data.systolic) < 90 &&\n  Util.ToInt(Data.diastolic) < 60\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Low blood\n  pressure");\n          Alerts.Add("bp", "diastolic", Data.diastolic, "Low blood\n  pressure");\n          Complete();\n  }'}:c,validationSchema:vV.addRule,onSubmit:n,enableReinitialize:!0,children:e=>{var n,r,i,o,l,c,d,u,p;let{values:h}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsxs)(df,{item:!0,xs:!0,children:[(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},position:"absolute",left:"40px",top:"-33px",children:(0,Gt.jsx)(Ym,{variant:"h6",gutterBottom:!0,component:"h6",sx:{marginBottom:"0"},children:ta()(t)?s("rpm_AddNewRule"):s("rpm_ViewRule")})}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:ta()(t)?s("rpm_AddNewRule"):s("rpm_ViewRule")})})]}),ta()(t)&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:s("rpm_Save")})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:s("rpm_VitalType")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,disabled:!ta()(t),input:(0,Gt.jsx)(Rj,{}),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:s("message:rpm_VitalTypeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[null===cd||void 0===cd?void 0:cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:s("rpm_".concat(e.name))},e.name)),(0,Gt.jsx)($m,{value:"bp.pulse",children:s("rpm_bp")})]}),(0,Gt.jsx)(Xz,{name:"data_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:s(e,{field:s("rpm_VitalType")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:s("rpm_ShortDescription")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"short_description",name:"short_description",size:"small",disabled:!ta()(t),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:s("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"short_description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:s(e,{field:s("rpm_ShortDescription")})})})]})}),"glucose"==h.data_type&&(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsx)(Eu,{mb:2,children:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(PC,{sx:{borderRadius:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsx)(cS,{children:(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:s("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:s("rpm_Activity")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:s("rpm_From")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:s("rpm_To")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:s("rpm_Range")})]})}),(0,Gt.jsxs)(nS,{children:["glucose"===h.data_type&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:s("rpm_normal")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor fasting",children:(0,Gt.jsx)(XO,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,Gt.jsx)("strong",{children:s("rpm_fasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(n=a[2])||void 0===n?void 0:n.data[0].value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(r=a[1])||void 0===r?void 0:r.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===(i=a[2])||void 0===i?void 0:i.data[0].value)+1," - ",(null===(o=a[1])||void 0===o?void 0:o.data[0].value)-1]})]}),(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",borderBottom:2,borderBottomColor:"#bbb",p:.5}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:s("rpm_normal")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor nonfasting",children:(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,Gt.jsx)("strong",{children:s("rpm_nonfasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(l=a[5])||void 0===l?void 0:l.data[0].value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(c=a[4])||void 0===c?void 0:c.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===(d=a[5])||void 0===d?void 0:d.data[0].value)+1," - ",(null===(u=a[4])||void 0===u?void 0:u.data[0].value)-1]})]})]}),null===a||void 0===a||null===(p=a.slice(0,6))||void 0===p?void 0:p.map((e,t)=>{var n,r,i,o,l,c,d,u,p,h,m,f;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:s("rpm_".concat(e.name.toLowerCase()))}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat("eq"==e.data[(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.length)-1].op?"fasting":"nonfasting"),children:"eq"==e.data[(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1].op?(0,Gt.jsx)(XO,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,Gt.jsx)("strong",{children:s("rpm_fasting")})}):(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,Gt.jsx)("strong",{children:s("rpm_nonfasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"-":e.data[0].value}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:"DiabetesFasting"==e.name||"DiabetesPP"===e.name?"-":2===t?(null===(i=a[a.length-2])||void 0===i?void 0:i.data[0].value)-1:5===t?(null===(o=a[a.length-1])||void 0===o?void 0:o.data[0].value)-1:6===t?(null===(l=a[t-5])||void 0===l?void 0:l.data[0].value)-1:7===t?(null===(c=a[t-3])||void 0===c?void 0:c.data[0].value)-1:(null===(d=a[t-1])||void 0===d?void 0:d.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:["HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"Below or ":e.data[0].value,"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name||"DiabetesFasting"==e.name||"DiabetesPP"==e.name?"  ":" - ","DiabetesFasting"==e.name||"DiabetesPP"===e.name?" & Above":2===t?(null===(u=a[a.length-2])||void 0===u?void 0:u.data[0].value)-1:5===t?(null===(p=a[a.length-1])||void 0===p?void 0:p.data[0].value)-1:6===t?(null===(h=a[t-5])||void 0===h?void 0:h.data[0].value)-1:7===t?(null===(m=a[t-3])||void 0===m?void 0:m.data[0].value)-1:(null===(f=a[t-1])||void 0===f?void 0:f.data[0].value)-1]})]},e.salience)})]})]})})})})})]})})]})})})}},"editor_formik")})}),!1]})}pCe.defaultProps={addNewRule:()=>{},glucoseRuleData:{},rulesHeadCell:[],patientData:{},program:{},glucoseExRuleArr:[]};const hCe=pCe;function mCe(e){let{ruleData:t,rulesHeadCell:n,patientData:r,program:o,pulseRuleData:a,glucoseRuleData:s}=e;const l=Nt(),[c,d]=We.useState(null),[u,p]=We.useState(null),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),[y,b]=We.useState(null),j=e=>{const t=gd.find(t=>t.text===e);return null===t||void 0===t?void 0:t.sign},w=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t},_=e=>{var t;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{container:!0,spacing:1.5,sx:{"& .sign":{"& span:last-child":{display:"none"}}},children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((t,n)=>{var r;return(0,Gt.jsxs)(df,{item:!0,className:(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1===n?"sign":"",children:[(0,Gt.jsx)(Eu,{component:"span",children:null===t||void 0===t?void 0:t.name})," ",(0,Gt.jsx)(Eu,{component:"span",children:j(null===t||void 0===t?void 0:t.op)})," ",(0,Gt.jsx)(Eu,{component:"span",children:null===t||void 0===t?void 0:t.value})," ",(0,Gt.jsx)(Eu,{component:"span",children:j(null===t||void 0===t?void 0:t.between)})]},n)})})})};return We.useEffect(()=>{if(!ta()(t))if("BATCH"===(null===t||void 0===t?void 0:t.processing_mode)){var e;let n=[];null===(e=JSON.parse(null===t||void 0===t?void 0:t.rule))||void 0===e||e.forEach(e=>{n.push((0,i.A)((0,i.A)({},e),{},{when:e.when.and[0]}))}),d(n)}else d(JSON.parse(null===t||void 0===t?void 0:t.rule))},[t]),We.useEffect(()=>{ta()(a)||p(JSON.parse(null===a||void 0===a?void 0:a.rule))},[a]),We.useEffect(()=>{ta()(s)||m(JSON.parse(null===s||void 0===s?void 0:s.rule))},[s]),We.useEffect(()=>{(async()=>{const e=[];await(null===c||void 0===c?void 0:c.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:w(t)}))})),g(e)})()},[c]),We.useEffect(()=>{(async()=>{const e=[];await(null===h||void 0===h?void 0:h.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:w(t)}))})),x(e)})()},[h]),We.useEffect(()=>{(async()=>{const e=[];await(null===u||void 0===u?void 0:u.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:w(t)}))})),b(e)})()},[u]),We.useEffect(()=>{j()},[f]),We.useEffect(()=>{l(w_({activeMenuItem:"rules"}))},[]),(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[!ta()(f)&&(0,Gt.jsx)(uCe,{exRuleArr:f,glucoseExRuleArr:v,ruleData:t,glucoseRuleData:s,rulesHeadCell:n,getVitalsValue:_,patientData:r,program:o,pulseRuleData:a,pulseExRuleArr:y}),!ta()(v)&&(0,Gt.jsx)(hCe,{glucoseExRuleArr:v,glucoseRuleData:s,rulesHeadCell:n,getVitalsValue:_,patientData:r,program:o})]})}mCe.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],patientData:{},program:{},pulseRuleData:{},glucoseRuleData:{}};const fCe=mCe;const gCe=function(e){let{patientData:t,program:n}=e;const r=Nt(),i=Ct(Nd),{t:o}=vg(),{patientId:a,ruleId:s}=lo(),[l,c]=We.useState(null),[d,u]=We.useState(null),[p,h]=We.useState(null),[m,f]=We.useState(null),g=async e=>{try{const{data:t}=await r(Ks(null===n||void 0===n?void 0:n.code,a,{per_page:999})),{content:i}=t||{},o=null===i||void 0===i?void 0:i.find(t=>"bp.pulse"===t.data_type&&t.processing_mode===e);h(o)}catch(t){r(Zo({subTitle:t.message,severity:$c}))}},v=[{id:"level",label:o("rpm_Level"),isSort:!1,sortProperty:"level"},{id:"condition",label:o("rpm_Condition"),isSort:!1,sortProperty:"condition"},{id:"description",label:o("rpm_Description"),isSort:!1,sortProperty:"description"}];return We.useEffect(()=>{as(p)||as(n)||(async()=>{const{data:e}=await r(nl(null===n||void 0===n?void 0:n.code,a,p.id));f(e)})()},[p]),We.useEffect(()=>{i&&s&&!as(n)&&(async()=>{try{const{data:e}=await r(nl(null===n||void 0===n?void 0:n.code,a,s));"bp"==e.data_type&&(c(e),g(null===e||void 0===e?void 0:e.processing_mode)),"glucose"==e.data_type&&u(e)}catch(e){r(Zo({subTitle:e.message,severity:$c}))}})()},[i,s,n]),(0,Gt.jsx)(fCe,{ruleData:l,glucoseRuleData:d,rulesHeadCell:v,patientData:t,program:n,pulseRuleData:m})};const vCe=function(){var e,t,n,r;const o=Nt(),a=Ct(Nd),s=Ct(Wd),l=Ct($d),c=Ct(Ld),{userData:d}=(0,We.useContext)(Zg),u=lo(),p=location.search,[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),y=Ct(Gd),[b,j]=We.useState(null),[w,_]=We.useState(null),C=async()=>{const{data:e}=await o(qs(null===h||void 0===h?void 0:h.code,null===u||void 0===u?void 0:u.patientId));g(e)},S=(e,t)=>t.active-e.active;return We.useEffect(()=>{!a||as(y)||as(u)||((async()=>{const e=y.find(e=>e.code===u.programId);if(e.image){const t=await _s(e.image,"".concat(e.display_name,".jpg")),n=URL.createObjectURL(t);m((0,i.A)((0,i.A)({},e),{},{image:n}))}else m(e)})(),(async()=>{try{const{data:e}=await o(ol({per_page:999},{patientId:null===u||void 0===u?void 0:u.patientId,programId:null===u||void 0===u?void 0:u.programId}));x(null===e||void 0===e?void 0:e.sort(S))}catch(e){console.log(e.message)}})())},[a,y]),We.useEffect(()=>{a&&!as(h)&&C()},[a,h]),We.useEffect(()=>{const e={sideBar:_d(null===c||void 0===c?void 0:c.activeMenuItem),headerBar:_d(null===c||void 0===c?void 0:c.activeMenuItem),isBreadcrumb:_d(null===c||void 0===c?void 0:c.activeMenuItem),listItems:S_(d).concat([...k_(null===h||void 0===h?void 0:h.permissions,h),...A_(null===h||void 0===h?void 0:h.permissions,f,u,p,h)]),heading:{name:null===h||void 0===h?void 0:h.display_name,city:null===h||void 0===h?void 0:h.city}};o(w_(e))},[h,f,null===c||void 0===c?void 0:c.activeMenuItem]),We.useEffect(()=>{const e={vitals:{bp:{course:null===v||void 0===v?void 0:v.filter(e=>"bp"===e.schedule.vital_name)},glucose:{course:null===v||void 0===v?void 0:v.filter(e=>"glucose"===e.schedule.vital_name)}}};o(Rs(e))},[v]),We.useEffect(()=>{as(s)||(()=>{var e,t,n,r;0===(null===s||void 0===s?void 0:s.activeVitalTab)&&j(null===s||void 0===s||null===(e=s.vitals)||void 0===e||null===(t=e.bp)||void 0===t?void 0:t.course),1===(null===s||void 0===s?void 0:s.activeVitalTab)&&_(null===s||void 0===s||null===(n=s.vitals)||void 0===n||null===(r=n.glucose)||void 0===r?void 0:r.course)})()},[s]),(0,Gt.jsxs)(Gt.Fragment,{children:[(null===c||void 0===c?void 0:c.isBreadcrumb)&&(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:l})}),"dashboard"===(null===c||void 0===c?void 0:c.activeMenuItem)&&(0,Gt.jsx)(pxe,{patientData:f,scheduleList:b,scheduleGlucoseList:w}),(0,Gt.jsxs)(ko,{children:[(0,Gt.jsx)(So,{path:"/dashboard",element:as(h)||null!==h&&void 0!==h&&null!==(e=h.permissions)&&void 0!==e&&e.showViewPatientBtn?(0,Gt.jsx)(obe,{patientData:f,program:h}):(0,Gt.jsx)(__,{})}),(0,Gt.jsx)(So,{path:"/details",element:as(h)||null!==h&&void 0!==h&&null!==(t=h.permissions)&&void 0!==t&&t.showViewPatientBtn?(0,Gt.jsx)(D_e,{userData:null===h||void 0===h?void 0:h.permissions,patientData:f,fetchOnePatientDetail:C,program:h}):(0,Gt.jsx)(__,{})}),(0,Gt.jsx)(So,{path:"/history",element:(0,Gt.jsx)(vje,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/history/family",element:(0,Gt.jsx)($be,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/adherence-report",element:(0,Gt.jsx)(Hxe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/notes",element:as(h)||null!==(n=h.permissions)&&void 0!==n&&n.showUpdatePatientConfig?(0,Gt.jsx)(_je,{patientData:f,program:h}):(0,Gt.jsx)(__,{})}),(0,Gt.jsx)(So,{path:"/notes/add",element:(0,Gt.jsx)(vxe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/rules",element:(0,Gt.jsx)(lCe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/rules/:ruleId",element:(0,Gt.jsx)(gCe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/rules/add",element:(0,Gt.jsx)(Lxe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/devices",element:as(h)||null!==(r=h.permissions)&&void 0!==r&&r.showUpdatePatientConfig?(0,Gt.jsx)(cbe,{patientData:f,program:h}):(0,Gt.jsx)(__,{})}),(0,Gt.jsx)(So,{path:"/courses",element:(0,Gt.jsx)(tye,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/courses/:courseId",element:(0,Gt.jsx)(Yxe,{patientData:f,activeProgram:h})}),(0,Gt.jsx)(So,{path:"/consultations",element:(0,Gt.jsx)(g_e,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/mprescription",element:(0,Gt.jsx)(Jwe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/consultations/add-consultation",element:(0,Gt.jsx)(gwe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/consultations/edit-consultation/:presId",element:(0,Gt.jsx)(gwe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/notes/resolve-alerts",element:(0,Gt.jsx)(j_e,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/notes/admin-note",element:(0,Gt.jsx)(Dwe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/notes/summary-note",element:(0,Gt.jsx)(k_e,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/notes/doctor-note",element:(0,Gt.jsx)(Gwe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/notes/other-note",element:(0,Gt.jsx)(o_e,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/consultations/print-prescription",element:(0,Gt.jsx)(fxe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/consultations/:consultId",element:(0,Gt.jsx)(zwe,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/bp/report",element:(0,Gt.jsx)(U_e,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/glucose/report",element:(0,Gt.jsx)(F_e,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/bp/report/detailed",element:(0,Gt.jsx)(Y_e,{patientData:f,program:h})}),(0,Gt.jsx)(So,{path:"/glucose/report/detailed",element:(0,Gt.jsx)(W_e,{patientData:f,program:h})})]})]})};const xCe=function(e){let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,setShowFilterColor:a}=e;const{t:s}=vg();return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Iz,{initialValues:{vital:"",duration:"",templateName:""},enableReinitialize:!0,children:()=>(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{className:"WhiteBG template-tour-step0",sx:{borderRadius:"8px",padding:"0 5px"},children:(0,Gt.jsxs)(df,{container:!0,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:6,sm:6,md:3,lg:3,children:(0,Gt.jsx)(Eu,{marginLeft:1,py:.6,pr:1,display:"flex",alignItems:"center",width:"100%",children:(0,Gt.jsx)(Eu,{className:"smallWebFont",width:"100%",pr:1,children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",variant:"outlined",name:"templateName",value:n.templateName,placeholder:s("message:rpm_SearchTital"),onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{templateName:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:s("message:rpm_SearchTemplateFilterBar"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),sx:{bgcolor:"white"}})})})}),(0,Gt.jsx)(df,{item:!0,xs:6,sm:6,md:3,lg:3,className:"break-450-scrn smallWebFont",width:"100%",children:(0,Gt.jsxs)(Xj,{sx:{display:"flex",alignItems:"center"},fullWidth:!0,children:[(0,Gt.jsx)(qj,{id:"vital",sx:{top:"-6px",fontSize:"15px"},children:s("rpm_VitalType")}),(0,Gt.jsx)(Hz,{as:Dw,sx:{borderRadius:2,bgcolor:"white"},fullWidth:!0,name:"vital",labelId:"vital",label:"vital type",variant:"outlined",size:"small",value:n.vital,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{vital:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:s("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:s("rpm_".concat(e.name))},e.value))})]})}),(0,Gt.jsx)(df,{item:!0,md:6,lg:6,sm:12,children:(0,Gt.jsxs)(df,{container:!0,alignItems:"center",spacing:1,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Ym,{color:"primary",fontWeight:600,sx:{fontSize:14},ml:1,children:s("rpm_Duration")})}),(0,Gt.jsx)(df,{item:!0,md:!0,children:(0,Gt.jsx)(Hz,{as:Rj,type:"number",fullWidth:!0,size:"small",variant:"outlined",name:"duration",value:n.duration,placeholder:s("message:rpm_InDays"),sx:{bgcolor:"white"},onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{duration:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:s("message:rpm_TemplateDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{py:.5,children:[(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,sx:{ml:2},onClick:()=>{o.current_page=1,t(n),""===n.vital&&null===n.duration&&null===n.templateName||a(!0)},children:s("rpm_ApplyFilters")}),(0,Gt.jsx)(Vp,{variant:"text",disableElevation:!0,onClick:()=>{o.current_page=1,r({vital:"",duration:"",templateName:""}),t({vital:"",duration:"",templateName:""}),a(!1)},type:"reset",children:(0,Gt.jsx)(Bw.A,{})})]})})]})})]})})})})})};function yCe(e){var t;let{order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,checkState:s,onCheck:l,isSelection:c,nodata:d,templateHeads:u,showFilterColor:p,setShowFilterColor:h,pageDetails:m,downloadFile:f,filterState:g,setFilterState:v,activeProgram:x,initialHeadcells:y,setHeadCells:b,settingModal:j,handleSettingModalToggle:w,allTemplates:_,deleteTemplate:C,templateDelete:S,setTemplateDelete:A,getAllTemplates:k}=e;const{t:M}=vg(),O=Nt(),[T,E]=We.useState(0),[P,D]=We.useState(1),[R,N]=We.useState(20),L=so(),I=[{name:M("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===x||void 0===x?void 0:x.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===x||void 0===x?void 0:x.code,"/patients")},{name:M("rpm_RxTemplates"),url:""}];We.useEffect(()=>{const e={breadcrumb:I};as(x)||O(w_(e))},[x]);We.useEffect(()=>{const e={breadcrumb:I};as(x)||O(w_(e))},[x]);const F=e=>(0,Gt.jsx)(Yx,{title:M("rpm_Edit"),children:(0,Gt.jsx)(Kp,{color:"primary","data-id":e.id,onClick:()=>{L("edit-template/".concat(null===e||void 0===e?void 0:e.id))},children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),$=e=>(0,Gt.jsx)(Yx,{title:M("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{L("".concat(null===e||void 0===e?void 0:e.id))},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),B=e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>{A({open:!0,data:null===e||void 0===e?void 0:e.id})},children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})});return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:I})}),(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:6,md:6,children:(0,Gt.jsx)(Eu,{sx:{mb:1},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:M("rpm_RxTemplates")})})}),(0,Gt.jsx)(df,{item:!0,xs:6,md:6,children:(0,Gt.jsx)(Eu,{mb:3,textAlign:"right",children:(0,Gt.jsxs)(Vp,{onClick:()=>L("add-template"),variant:"contained",disableElevation:!0,style:{marginRight:"10px"},className:"template-tour-step1",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:M("rpm_Addtemplate")})]})})})]})]}),(0,Gt.jsx)(Eu,{bgcolor:"white",p:1,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,sx:{alignItems:{xs:"flex-start",md:"center"}},children:[(0,Gt.jsx)(df,{item:!0,sm:10,xs:10,children:(0,Gt.jsx)(xCe,{fetchListFunction:k,filterState:g,setFilterState:v,pageDetails:m,showFilterColor:p,setShowFilterColor:h})}),(0,Gt.jsx)(df,{item:!0,ml:"auto",sm:2,xs:2,children:(0,Gt.jsx)(Eu,{pt:.5,textAlign:"end",children:(0,Gt.jsx)(Yx,{title:M("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:w,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:as(_)?[]:_,headCells:u.filter(e=>y.includes(e.id)),dataParameter:a,selected:s,setSelected:l,isSelection:c,noDataImage:d,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===_||void 0===_||null===(t=_.slice(T*R,T*R+Number(R)))||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[y.includes("template")&&(0,Gt.jsx)(rC,{width:300,children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"".concat(null===e||void 0===e?void 0:e.id),children:null===e||void 0===e?void 0:e.name})}),y.includes("vitaltype")&&(0,Gt.jsxs)(rC,{children:[" ","bp"===e.vital&&(0,Gt.jsxs)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",M("rpm_".concat(e.vital))]}),"glucose"===e.vital&&(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",M("rpm_".concat(e.vital))]}),"others"===e.vital&&(0,Gt.jsxs)(Ym,{color:"grey",fontWeight:600,component:"span",fontSize:14,children:[" ",M("rpm_Others")]})]}),y.includes("duration")&&(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.days)||"NA"}),y.includes("updatedOn")&&(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&e.updated_at?sa()(null===e||void 0===e?void 0:e.updated_at).format(Vc):"NA"}),y.includes("templateId")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.id}),y.includes("createdBy")&&(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.created_by)||"-"}),y.includes("action")&&(0,Gt.jsxs)(rC,{children:[$(e),F(e),B(e)]})]},(null===e||void 0===e?void 0:e.id)+t))}),(0,Gt.jsx)(PU,{openModal:S.open,onCloseModal:()=>A({open:!1,data:""}),actionFunction:()=>{C(null===S||void 0===S?void 0:S.data)},options:{primaryText:M("message:rpm_DeleteTitle"),secondaryText:M("message:rpm_DeleteBodyText"),btn:{primaryText:M("rpm_Delete"),secondaryText:M("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,Gt.jsx)("div",{style:{display:"none"},children:(0,Gt.jsx)(fO,{open:j,allHeadCells:u,initialHeadcells:y,setHeadcells:b,onClose:w})})]}),(0,Gt.jsx)(Eu,{py:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,Gt.jsx)(df,{item:!0,sm:!0,children:(0,Gt.jsx)(LO,{count:Math.ceil((null===_||void 0===_?void 0:_.length)/R),page:P,shape:"rounded",color:"primary",onChange:function(e,t){D(t),E(t-1)}})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Ym,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,Gt.jsx)(Xj,{margin:"dense",children:(0,Gt.jsx)(Dw,{variant:"outlined",size:"small",value:R,onChange:e=>{N(parseInt(e.target.value,10)),E(0)},children:[10,20,30,50,100].map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))})})]})})]})})]})}yCe.defaultProps={templateHeads:[],prescriptionNotesModal:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",othernotesList:[],familynotesList:[],getAllTemplates:()=>{},editButton:()=>{},viewButton:()=>{},PrintButton:()=>{},VisibilityIcon:()=>{},deleteButton:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},saveButton:()=>{},closeButton:()=>{},filterState:{},setFilterState:()=>{},activeProgram:{},program:{},patientData:{},addNewNote:()=>{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadCells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},allTemplates:[],deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{}};const bCe=yCe;function jCe(e){var t;let{order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,checkState:s,onCheck:l,isSelection:c,nodata:d,templateHeads:u,showFilterColor:p,setShowFilterColor:h,pageDetails:m,downloadFile:f,filterState:g,setFilterState:v,activeProgram:x,initialHeadcells:y,setHeadCells:b,settingModal:j,handleSettingModalToggle:w,allTemplates:_,deleteTemplate:C,templateDelete:S,setTemplateDelete:A,getAllTemplates:k}=e;const{t:M}=vg(),O=Nt(),[T,E]=We.useState(0),[P,D]=We.useState(1),[R,N]=We.useState(20),L=so(),I=[{name:M("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===x||void 0===x?void 0:x.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===x||void 0===x?void 0:x.code,"/patients")},{name:M("rpm_RxTemplates"),url:""}];We.useEffect(()=>{const e={breadcrumb:I};as(x)||O(w_(e))},[x]);We.useEffect(()=>{const e={breadcrumb:I};as(x)||O(w_(e))},[x]);const F=e=>(0,Gt.jsx)(Yx,{title:M("rpm_Edit"),children:(0,Gt.jsx)(Kp,{color:"primary","data-id":e.id,onClick:()=>{L("edit-template/".concat(null===e||void 0===e?void 0:e.id))},children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),$=e=>(0,Gt.jsx)(Yx,{title:M("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{L("".concat(null===e||void 0===e?void 0:e.id))},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),B=e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>{A({open:!0,data:null===e||void 0===e?void 0:e.id})},children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})});return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",alignItems:"center",children:[(0,Gt.jsx)(kH,{labels:I}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:M("rpm_RxTemplates")})]}),(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{mb:3,textAlign:"right",children:(0,Gt.jsxs)(Vp,{onClick:()=>L("add-template"),variant:"contained",disableElevation:!0,style:{marginRight:"10px"},className:"template-tour-step1",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:M("rpm_Addtemplate")})]})})})})]}),(0,Gt.jsx)(Eu,{bgcolor:"white",p:1,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,sx:{alignItems:{xs:"flex-start",md:"center"}},children:[(0,Gt.jsx)(df,{item:!0,lg:11,xl:8,md:12,sm:10,xs:10,children:(0,Gt.jsx)(xCe,{fetchListFunction:k,filterState:g,setFilterState:v,pageDetails:m,showFilterColor:p,setShowFilterColor:h})}),(0,Gt.jsx)(df,{item:!0,ml:"auto",sm:2,xs:2,children:(0,Gt.jsx)(Eu,{pt:.5,textAlign:"end",children:(0,Gt.jsx)(Yx,{title:M("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:w,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:as(_)?[]:_,headCells:u.filter(e=>y.includes(e.id)),dataParameter:a,selected:s,setSelected:l,isSelection:c,noDataImage:d,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===_||void 0===_||null===(t=_.slice(T*R,T*R+Number(R)))||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[y.includes("template")&&(0,Gt.jsx)(rC,{width:300,children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"".concat(null===e||void 0===e?void 0:e.id),children:null===e||void 0===e?void 0:e.name})}),y.includes("vitaltype")&&(0,Gt.jsxs)(rC,{children:[" ","bp"===e.vital&&(0,Gt.jsxs)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",M("rpm_".concat(e.vital))]}),"glucose"===e.vital&&(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",M("rpm_".concat(e.vital))]}),"others"===e.vital&&(0,Gt.jsxs)(Ym,{color:"grey",fontWeight:600,component:"span",fontSize:14,children:[" ",M("rpm_Others")]})]}),y.includes("duration")&&(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.days)||"NA"}),y.includes("updatedOn")&&(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&e.updated_at?sa()(null===e||void 0===e?void 0:e.updated_at).format(Vc):"NA"}),y.includes("templateId")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.id}),y.includes("createdBy")&&(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.created_by)||"-"}),y.includes("action")&&(0,Gt.jsxs)(rC,{children:[$(e),F(e),B(e)]})]},(null===e||void 0===e?void 0:e.id)+t))}),(0,Gt.jsx)(PU,{openModal:S.open,onCloseModal:()=>A({open:!1,data:""}),actionFunction:()=>{C(null===S||void 0===S?void 0:S.data)},options:{primaryText:M("message:rpm_DeleteTitle"),secondaryText:M("message:rpm_DeleteBodyText"),btn:{primaryText:M("rpm_Delete"),secondaryText:M("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,Gt.jsx)("div",{style:{display:"none"},children:(0,Gt.jsx)(fO,{open:j,allHeadCells:u,initialHeadcells:y,setHeadcells:b,onClose:w})})]}),(0,Gt.jsx)(Eu,{py:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",justifyContent:"center",children:[(0,Gt.jsx)(df,{item:!0,sm:!0,children:(0,Gt.jsx)(LO,{count:Math.ceil((null===_||void 0===_?void 0:_.length)/R),page:P,shape:"rounded",color:"primary",onChange:function(e,t){D(t),E(t-1)}})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Ym,{component:"p",variant:"body1",sx:{mr:2},children:"Rows Per Page"}),(0,Gt.jsx)(Xj,{margin:"dense",children:(0,Gt.jsx)(Dw,{variant:"outlined",size:"small",value:R,onChange:e=>{N(parseInt(e.target.value,10)),E(0)},children:[10,20,30,50,100].map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))})})]})})]})})]})}jCe.defaultProps={templateHeads:[],prescriptionNotesModal:[],pageDetails:{},order:"",orderBy:"",dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",othernotesList:[],familynotesList:[],getAllTemplates:()=>{},editButton:()=>{},viewButton:()=>{},PrintButton:()=>{},VisibilityIcon:()=>{},deleteButton:()=>{},fileModal:{},fileUploadButton:()=>{},fileUploadIconButton:()=>{},downloadFile:()=>{},saveButton:()=>{},closeButton:()=>{},filterState:{},setFilterState:()=>{},activeProgram:{},program:{},patientData:{},addNewNote:()=>{},noteTypesDropdown:{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadCells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},allTemplates:[],deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{}};const wCe=jCe,_Ce=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=Ct(Nd),{programId:o}=lo(),a=Nt(),s=P_(BA().breakpoints.down("sm")),l=Ct(qd),c=!("true"===ls(l,"user_principal.attributes.skip_tour[0]","")),[d,u]=We.useState(""),[p,h]=(0,We.useState)([]),[m,f]=(0,We.useState)({open:!1,data:""}),[g,v]=We.useState({vital:"",duration:"",templateName:""}),[x,y]=We.useState(!1);We.useEffect(()=>{a(w_({activeMenuItem:"prescription_template"}))},[]);const b=s?["template","action"]:["template","vitaltype","duration","updatedOn","templateId","createdBy","action"],[j,w]=We.useState(!1),[_,C]=We.useState(as($o.getHeadCellsTemplates())?b:$o.getHeadCellsTemplates()),S=function(e){C(e),$o.setHeadCellsTemplates(e)},A=()=>{w(!j)},k=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;try{const{data:t}=await a(((e,t)=>async n=>{try{const n="".concat(ua.template,"/").concat(e,"/program?vital=").concat(null===t||void 0===t?void 0:t.vital,"&days=").concat(null===t||void 0===t?void 0:t.duration,"&name=").concat(null===t||void 0===t?void 0:t.templateName);return await cu(n,{})}finally{n(na(!1))}})(o,e));h(t)}catch(t){console.log(t)}},M=async e=>{try{await a(((e,t)=>async n=>{try{const n="".concat(ua.template,"/").concat(e,"/").concat(t);return await pu(n,{})}finally{n(na(!1))}})(o,e)),k(),f((0,i.A)((0,i.A)({},m),{},{open:!1})),a(Zo({subTitle:"message:rpm_TemplateDeleteSuccessfully",severity:Bc}))}catch(t){const e=ls(t,"response.data.code","");as(e)?a(Zo({subTitle:"error:rpm_TemplateDeleteFailed",severity:$c})):a(Zo({subTitle:bd(e,"error:rpm_TemplateDeleteFailed"),severity:$c}))}};(0,We.useEffect)(()=>{S(b)},[s]),(0,We.useEffect)(()=>{r&&k()},[r]);const O=[{id:"template",label:we("rpm_TemplateName"),isSort:!1,sortProperty:"template"},{id:"vitaltype",label:we("rpm_Vital"),isSort:!1,sortProperty:"vitaltype"},{id:"duration",label:we("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"updatedOn",label:we("rpm_UpdatedOn"),isSort:!1,sortProperty:"updatedOn"},{id:"templateId",label:we("rpm_TemplateId"),isSort:!1,sortProperty:"templateId"},{id:"createdBy",label:we("rpm_Created_By"),isSort:!1,sortProperty:"createdBy"},{id:"action",label:we("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,Gt.jsxs)("div",{children:[n>=575?(0,Gt.jsx)(bCe,{templateHeads:O,initialHeadcells:_,activeProgram:t,setHeadCells:S,settingModal:j,handleSettingModalToggle:A,allTemplates:p,deleteTemplate:M,templateDelete:m,setTemplateDelete:f,getAllTemplates:k,showFilterColor:x,setShowFilterColor:y,filterState:g,setFilterState:v}):(0,Gt.jsx)(wCe,{templateHeads:O,initialHeadcells:_,activeProgram:t,setHeadCells:S,settingModal:j,handleSettingModalToggle:A,allTemplates:p,deleteTemplate:M,templateDelete:m,setTemplateDelete:f,getAllTemplates:k,showFilterColor:x,setShowFilterColor:y,filterState:g,setFilterState:v}),(0,Gt.jsx)(AZ,{isTour:c,path:"prescriptionTemplateTour",setRenderer:u}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:d})]})},CCe=e=>{let{open:t,children:n,onClose:r,title:i,actionFunction:o,disableButton:a}=e;return(0,Gt.jsxs)(Kw,{open:t,onClose:r,fullWidth:!0,maxWidth:"sm",children:[(0,Gt.jsxs)(n_,{sx:{m:0,p:2},children:[i,r?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:14,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(s_,{children:n}),(0,Gt.jsx)(iO,{children:(0,Gt.jsxs)(Eu,{display:"flex",alignContent:"center",justifyContent:"start",width:"100%",pl:2.5,children:[(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"outlined",onClick:r,style:{marginBottom:"10px",marginRight:"10px"},children:"Cancel"}),(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",onClick:o,style:{marginBottom:"10px"},disabled:a,children:"Save"})]})})]})},SCe=e=>{let{notesHead:t,nodata:n,addNewPrescription:r,templateData:o,editPrescription:a,templateModal:s,setTemplateModal:l,saveTemplate:c,editTemplate:d,isEdit:u,template:p,prescriptionId:h,activeProgram:m,medicineSuggestions:f,getMedicineData:g}=e;const v=Nt(),[x,y]=(0,We.useState)(!1),[b,j]=(0,We.useState)(null),[w,_]=(0,We.useState)({open:!1,data:""}),[C,S]=(0,We.useState)({open:!1,data:""}),A=()=>{S((0,i.A)((0,i.A)({},C),{},{open:!C.open,data:""}))},k=ss((e,t,n)=>{e({q:t,index:n})},500),M=(0,We.useCallback)((e,t,n)=>{k(g,t,n)},[g]),[O,T]=(0,We.useState)({vital:"",templateName:"",buttonType:"",medicationList:[{id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",dose:null,salt_composition:null,unit:null,color:"",image:"",start_date:sa()(new Date).valueOf(),end_date:null,days:null,repetition_kind:Uc,timing:[],frequency:"",comments:""}]}),E=[{name:we("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===m||void 0===m?void 0:m.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===m||void 0===m?void 0:m.code,"/patients")},{name:we("rpm_RxTemplates"),url:""}];We.useEffect(()=>{const e={breadcrumb:E};as(m)||v(w_(e))},[m]),We.useEffect(()=>{as(o)||T(o)},[o]);const P=()=>{_({open:!1,data:""})},D=e=>{let t=[],n=e>4?1:e;for(var r=0;r<n;r++)t.push({start_time:null,interval:null});return t};return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:E})}),(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{mb:1},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:we("rpm_RxTemplates")})})})})})})]}),(0,Gt.jsx)(Iz,{initialValues:O,validationSchema:vV.addPrescriptionNote,onSubmit:async(e,t)=>{let{setErrors:n}=t;if("template"===(null===e||void 0===e?void 0:e.buttonType))try{await vV.addPrescriptionNote.validate(e,{abortEarly:!1}),l(!0)}catch(i){const e={};i.inner.forEach(t=>{e[t.path]=t.message}),n(e)}else try{as(h)?await r(e):await(as(p)?a(e):r(e))}catch(i){console.log(i)}},enableReinitialize:!0,children:e=>{let{values:r,setFieldValue:o,setFieldTouched:a}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsxs)(df,{container:!0,justifyContent:"space-between",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsxs)(Xj,{sx:{flexDirection:"row",alignItems:"center"},className:"vitalTypeWebTop",children:[(0,Gt.jsxs)(zj,{id:"demo-row-radio-buttons-group-label",sx:{flex:"0 0 80px",fontWeight:"600",fontSize:"14px"},children:[we("rpm_VitalType"),":"]}),(0,Gt.jsx)(Hz,{name:"vital",className:"usualFonts",children:e=>{let{field:t}=e;return(0,Gt.jsx)(Vbe,(0,i.A)((0,i.A)({row:!0,"aria-labelledby":"demo-row-radio-buttons-group-label"},t),{},{children:null===dd||void 0===dd?void 0:dd.map(e=>(0,Gt.jsx)(uO,{sx:{"& .MuiFormControlLabel-label":{fontSize:"14px"}},value:e.value,control:(0,Gt.jsx)(oje,{}),label:we("rpm_".concat(e.name))},e.key))}))}})]}),(0,Gt.jsx)(Eu,{width:"100%",children:(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_VitalType")})})})})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{mb:2,display:"flex",gap:1,flexWrap:"wrap",children:(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:!(null!==r&&void 0!==r&&r.medicationList.length),onClick:()=>o("buttonType","template"),children:we("rpm_SaveAsTemplate")})})})]}),(0,Gt.jsx)(Eu,{className:"pres_inputTab",children:(0,Gt.jsxs)(EM,{data:as(null===r||void 0===r?void 0:r.notesList)?[{}]:null===r||void 0===r?void 0:r.notesList,headCells:t,noDataImage:n,skeletonVrows:6,className:"theme_scroll",children:[(0,Gt.jsx)(Zz,{name:"medicationList",validateOnChange:!1,children:e=>{var t,s,l;return(0,Gt.jsx)(Gt.Fragment,{children:as(null===r||void 0===r?void 0:r.medicationList)?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,Gt.jsx)("img",{src:n,style:{display:"block",margin:"auto",maxWidth:"200px"}})})}),(0,Gt.jsx)(K_,{children:(0,Gt.jsxs)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,Gt.jsx)(Ym,{}),(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===r||void 0===r||null===(s=r.medicationList)||void 0===s||null===(l=s.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===l?void 0:l.isEdit,onClick:()=>e.push({id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:Uc,timing:[],frequency:"",comments:""}),children:we("rpm_AddNewTemplate")})]})})]}):null===r||void 0===r||null===(t=r.medicationList)||void 0===t?void 0:t.map((t,n)=>{var s,l,c;return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Gb,{freeSolo:!0,options:as(f)?[]:f,id:"medicationList.".concat(n,".medicine"),name:"medicationList.".concat(n,".medicine"),value:(null===r||void 0===r||null===(s=r.medicationList[n])||void 0===s?void 0:s.medicine)||null,getOptionLabel:e=>(null===e||void 0===e?void 0:e.medicine)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,onInputChange:(e,t)=>M(e,t,n),onChange:async(e,t,r)=>{await o("medicationList.".concat(n,".medicine"),t),a("medicationList.".concat(n,".medicine"),!0),o("medicationList.".concat(n,".salt_composition"),null===t||void 0===t?void 0:t.salt_composition),o("medicationList.".concat(n,".medicine_form"),null===t||void 0===t?void 0:t.product_form),"clear"===r&&(o("medicationList.".concat(n,".salt_composition"),""),o("medicationList.".concat(n,".medicine_form"),""))},renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.medicine})})),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",variant:"outlined",placeholder:"Medicine",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,Gt.jsxs)(H_,{position:"end",children:[(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})}),e.InputProps.endAdornment]})})}))}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".medicine"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_MedicineName")})})})]})}),(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},minWidth:130,children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".medicine_form"),name:"medicationList.".concat(n,".medicine_form"),placeholder:"Form",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_FormHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})}),(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(n,".salt_composition"),name:"medicationList.".concat(n,".salt_composition"),placeholder:"Salt Composition",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_CompositionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})}),(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{minWidth:170,children:[(0,Gt.jsx)(Eu,{display:"flex",gap:1,children:(0,Gt.jsxs)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".icon_type"),name:"medicationList.".concat(n,".icon_type"),variant:"outlined",className:"shapeDropDown",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineShapeIconHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"",sx:{display:"none",opacity:"0.6",color:"red"},children:(0,Gt.jsx)("span",{style:{color:"#c6c6c6"},children:"Shape"})}),null===hd||void 0===hd?void 0:hd.map(e=>(0,Gt.jsx)($m,{value:e.key,children:e.text},e.key))]})}),(0,Gt.jsxs)(Eu,{children:[cs(null===t||void 0===t?void 0:t.image)?(0,Gt.jsxs)(Eu,{className:"upload-input-text",children:[(0,Gt.jsx)("input",{id:"medicationList.".concat(n,".image"),name:"medicationList.".concat(n,".image"),type:"file",onChange:e=>{o("medicationList.".concat(n,".image"),e.currentTarget.files[0])}}),(0,Gt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:we("uploadImage")}),(0,Gt.jsx)(Eu,{clone:!0,mr:1,color:"primary",children:(0,Gt.jsx)(sue,{width:22,height:22})})]})]}):(0,Gt.jsxs)(Eu,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",onClick:()=>{const e=URL.createObjectURL(t.image);_({open:!0,data:e})},children:null===t||void 0===t||null===(l=t.image)||void 0===l?void 0:l.name}),(0,Gt.jsx)(Eu,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,Gt.jsx)(Kp,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{o("medicationList.".concat(n,".image"),"")},children:(0,Gt.jsx)(Ql,{width:22,height:22})})})]}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".image"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_image")})})})]})]})}),(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{minWidth:150,sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"medicationList.".concat(n,".frequency"),name:"medicationList.".concat(n,".frequency"),onChange:e=>{o("medicationList",r.medicationList.map((t,r)=>n===r?(0,i.A)((0,i.A)({},t),{},{frequency:e.target.value,repetition_kind:e.target.value>4?qc:Uc,timing:[...D(e.target.value)]}):t))},variant:"outlined",defaultValue:"",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_FrequencyHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ud||void 0===ud?void 0:ud.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".frequency"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Frequency")})})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Vp,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,disabled:!r.medicationList[n].frequency||"0"===r.medicationList[n].frequency,onClick:()=>{j(n),y(!x)},children:[(0,Gt.jsx)(Cje.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),we("setReminder")]})}),(0,Gt.jsx)(Eu,{display:"flex",flexWrap:"wrap",children:(null===t||void 0===t?void 0:t.timing)&&(null===t||void 0===t?void 0:t.timing.map((e,t)=>(0,Gt.jsx)(Eu,{pr:.5,pb:.5,children:(0,Gt.jsx)(Ym,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"},children:null!==e&&void 0!==e&&e.start_time?sa()(e.start_time).format("hh:mm a"):""})},t)))})]})}),(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{minWidth:80,sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",type:"number",id:"medicationList.".concat(n,".days"),name:"medicationList.".concat(n,".days"),variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>ld.includes(e.key)&&e.preventDefault(),onChange:async e=>{const t=parseInt(e.target.value);await o("medicationList.".concat(n,".days"),t),await a("medicationList.".concat(n,".days"),!0),o("medicationList.".concat(n,".end_date"),ns(r.medicationList[n].start_date,t))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".days"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Days")})})})]})}),(0,Gt.jsx)(rC,{sx:{verticalAlign:"top"},children:(0,Gt.jsxs)(Eu,{minWidth:250,sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(n,".comments"),placeholder:"Enter Comments",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_CommentsHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(n,".comments"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Comment")})})})]})}),(0,Gt.jsxs)(rC,{sx:{verticalAlign:"top"},children:[(0,Gt.jsx)(Kp,{color:"error",onClick:()=>{r.medicationList[n].medicine?S((0,i.A)((0,i.A)({},C),{},{open:!C.open,data:()=>e.remove(n)})):e.remove(n)},children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),(null===r||void 0===r||null===(c=r.medicationList)||void 0===c?void 0:c.length)-1===n&&(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>{g(""),e.push({id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:Uc,timing:[],frequency:"",comments:""})},children:(0,Gt.jsx)(Due,{fontSize:"small",sx:{width:18,height:18}})})]})]})},n)})})}}),(0,Gt.jsx)(rwe,{open:x,setOpen:y,medicationList:null===r||void 0===r?void 0:r.medicationList[b],modalIndex:b,setFieldValue:o,setFieldTouched:a}),(0,Gt.jsx)(c_,{open:w.open,imageUrl:w.data,onClose:P,imageWidthHeight:{width:"400",height:"400"}}),(0,Gt.jsx)(PU,{openModal:C.open,onCloseModal:A,actionFunction:()=>{C.data(),A()},options:{primaryText:we("message:rpm_DeleteTitle"),secondaryText:we("message:rpm_DeleteBodyText"),btn:{primaryText:we("rpm_Delete"),secondaryText:we("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})}),(0,Gt.jsx)(CCe,{open:s,onClose:()=>l(!1),actionFunction:()=>{u?d(r):c(r)},title:we("rpm_SaveTemplate"),disableButton:null===r||void 0===r||!r.templateName,children:(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",gutterBottom:!0,children:we("rpm_TemplateName")}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"templateName",name:"templateName",variant:"outlined",defaultValue:(null===r||void 0===r?void 0:r.template_name)||"",onChange:e=>o("templateName",e.target.value),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})]})})]})})}})]})};SCe.defaultProps={order:"",orderBy:"",notesHead:[],checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},fetchNoteList:()=>{},addNewPrescription:()=>{},editPrescription:()=>{},initialData:{},templateData:{},templateModal:!1,setTemplateModal:()=>{},saveTemplate:()=>{},activeProgram:{},editTemplate:()=>{},allTemplates:[],template:"",setTemplate:()=>{},getTemplateById:()=>{},deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{},prescriptionId:"",isEdit:!1,medicineSuggestions:[],getMedicineData:()=>{}};const ACe=SCe,kCe=e=>{let{open:t,children:n,onClose:r,title:i,actionFunction:o,disableButton:a}=e;return(0,Gt.jsxs)(Kw,{open:t,onClose:r,fullWidth:!0,maxWidth:"sm",children:[(0,Gt.jsxs)(n_,{sx:{m:0,p:2},children:[i,r?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(s_,{children:n}),(0,Gt.jsxs)(iO,{children:[(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"outlined",onClick:r,style:{marginBottom:"10px"},children:"Cancel"}),(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",onClick:o,style:{marginBottom:"10px"},disabled:a,children:"Save"})]})]})},MCe=e=>{let{nodata:t,addNewPrescription:n,templateData:r,editPrescription:o,templateModal:a,setTemplateModal:s,saveTemplate:l,editTemplate:c,isEdit:d,template:u,prescriptionId:p,activeProgram:h,medicineSuggestions:m,getMedicineData:f}=e;const g=so(),v=Nt(),[x,y]=(0,We.useState)(!1),[b,j]=(0,We.useState)(null),[w,_]=(0,We.useState)({open:!1,data:""}),[C,S]=(0,We.useState)({open:!1,data:""}),A=(0,We.useRef)(),k=()=>{S((0,i.A)((0,i.A)({},C),{},{open:!C.open,data:""}))},M=ss((e,t,n)=>{e({q:t,index:n})},500),O=(0,We.useCallback)((e,t,n)=>{M(f,t,n)},[f]),[T,E]=(0,We.useState)({vital:"",templateName:"",buttonType:"",medicationList:[{id:(0,Sje.v4)(),medicine:null,medicine_form:"",icon_type:"",dose:null,salt_composition:null,unit:null,color:"",image:"",start_date:sa()(new Date).valueOf(),end_date:null,days:null,repetition_kind:Uc,timing:[],frequency:"",comments:""}]}),P=[{name:we("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===h||void 0===h?void 0:h.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===h||void 0===h?void 0:h.code,"/patients")},{name:we("rpm_PrescriptionTemplate"),url:""}];We.useEffect(()=>{const e={breadcrumb:P};as(h)||v(w_(e))},[h]),We.useEffect(()=>{as(r)||E(r)},[r]);const D=()=>{_({open:!1,data:""})},R=e=>{let t=[],n=e>4?1:e;for(var r=0;r<n;r++)t.push({start_time:null,interval:null});return t};return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",children:[(0,Gt.jsx)(kH,{labels:P}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:we("rpm_PrescriptionTemplate")})]})}),(0,Gt.jsx)(Iz,{initialValues:T,validationSchema:vV.addPrescriptionNote,onSubmit:async(e,t)=>{let{setErrors:r}=t;if("template"===(null===e||void 0===e?void 0:e.buttonType))try{await vV.addPrescriptionNote.validate(e,{abortEarly:!1}),s(!0)}catch(i){const e={};i.inner.forEach(t=>{e[t.path]=t.message}),r(e)}else try{as(p)?await n(e):await(as(u)?o(e):n(e))}catch(i){console.log(i)}},enableReinitialize:!0,children:e=>{let{values:n,setFieldValue:r,setFieldTouched:o}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsxs)(df,{container:!0,justifyContent:"space-between",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{mb:4,children:(0,Gt.jsxs)(Xj,{children:[(0,Gt.jsxs)(Hz,{as:Dw,sx:{borderRadius:2,bgcolor:"white",minWidth:"180px"},fullWidth:!0,name:"vital",variant:"outlined",size:"small",displayEmpty:!0,endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0,pl:2},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"",disabled:!0,sx:{display:"none"},children:we("rpm_VitalType")}),null===dd||void 0===dd?void 0:dd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:we("rpm_".concat(e.name))},e.value))]}),(0,Gt.jsx)(Xz,{name:"vital",children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_VitalType")})})})]})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{mb:3,display:"flex",gap:1,flexWrap:"wrap",children:[(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:!(null!==n&&void 0!==n&&n.medicationList.length),onClick:()=>r("buttonType","template"),children:we("rpm_SaveAsTemplate")}),(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:()=>g(-1),children:we("rpm_Back")})]})})]}),(0,Gt.jsxs)(Eu,{className:"pres_inputTab",children:[(0,Gt.jsx)(Zz,{name:"medicationList",validateOnChange:!1,children:e=>{var a,s,l;return(0,Gt.jsx)(Gt.Fragment,{children:as(null===n||void 0===n?void 0:n.medicationList)?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(K_,{children:(0,Gt.jsx)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"0"},children:(0,Gt.jsx)("img",{src:t,style:{display:"block",margin:"auto",maxWidth:"200px"}})})}),(0,Gt.jsx)(K_,{children:(0,Gt.jsxs)(rC,{colSpan:7,sx:{border:"none",paddingBottom:"30px"},align:"center",children:[(0,Gt.jsx)(Ym,{}),(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,disabled:null===n||void 0===n||null===(s=n.medicationList)||void 0===s||null===(l=s.find(e=>null===e||void 0===e?void 0:e.isEdit))||void 0===l?void 0:l.isEdit,onClick:()=>e.push({id:(0,Sje.v4)(),medicine:"",medicine_form:"",icon_type:"",dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:Uc,timing:[],frequency:"",comments:""}),children:we("rpm_AddNewTemplate")})]})})]}):null===n||void 0===n||null===(a=n.medicationList)||void 0===a?void 0:a.map((t,a)=>{var s,l,c;return(0,Gt.jsx)(aH,{ref:A,style:{marginBottom:"20px"},children:(0,Gt.jsx)(uH,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Medication")}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Gb,{freeSolo:!0,options:as(m)?[]:m,id:"medicationList.".concat(a,".medicine"),name:"medicationList.".concat(a,".medicine"),value:(null===n||void 0===n||null===(s=n.medicationList[a])||void 0===s?void 0:s.medicine)||null,getOptionLabel:e=>(null===e||void 0===e?void 0:e.medicine)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,onInputChange:(e,t)=>O(e,t,a),onChange:async(e,t,n)=>{await r("medicationList.".concat(a,".medicine"),t),o("medicationList.".concat(a,".medicine"),!0),r("medicationList.".concat(a,".salt_composition"),null===t||void 0===t?void 0:t.salt_composition),r("medicationList.".concat(a,".medicine_form"),null===t||void 0===t?void 0:t.medicine_form),"clear"===n&&(r("medicationList.".concat(a,".salt_composition"),""),r("medicationList.".concat(a,".medicine_form"),""))},renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:null===t||void 0===t?void 0:t.medicine})})),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{fullWidth:!0,size:"small",variant:"outlined",placeholder:"Medicine",InputProps:(0,i.A)((0,i.A)({},e.InputProps),{},{endAdornment:(0,Gt.jsxs)(H_,{position:"end",children:[(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})}),e.InputProps.endAdornment]})})}))}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(a,".medicine"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_MedicineName")})})})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Form")}),(0,Gt.jsx)(Eu,{sx:{whiteSpace:"normal"},children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(a,".medicine_form"),name:"medicationList.".concat(a,".medicine_form"),placeholder:"Form",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[" ",we("rpm_Composition"),(0,Gt.jsx)(Eu,{display:"flex",className:"customHeight",children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,disabled:!0,size:"small",id:"medicationList.".concat(a,".salt_composition"),name:"medicationList.".concat(a,".salt_composition"),placeholder:"Salt Composition",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Shape")}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{display:"flex",gap:1,children:(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"medicationList.".concat(a,".icon_type"),name:"medicationList.".concat(a,".icon_type"),variant:"outlined",className:"shapeDropDown",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineIconHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:hd.map(e=>(0,Gt.jsx)($m,{value:e.key,children:e.text},e.key))})}),(0,Gt.jsxs)(Eu,{children:[cs(null===t||void 0===t?void 0:t.image)?(0,Gt.jsxs)(Eu,{className:"upload-input-text",children:[(0,Gt.jsx)("input",{id:"medicationList.".concat(a,".image"),name:"medicationList.".concat(a,".image"),type:"file",onChange:e=>{r("medicationList.".concat(a,".image"),e.currentTarget.files[0])}}),(0,Gt.jsxs)("label",{htmlFor:"contained-button-file",style:{display:"flex",paddingTop:"5px"},children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",children:we("uploadImage")}),(0,Gt.jsx)(Eu,{clone:!0,mr:1,color:"primary",children:(0,Gt.jsx)(sue,{width:22,height:22})})]})]}):(0,Gt.jsxs)(Eu,{style:{display:"flex",paddingTop:"5px"},width:170,children:[(0,Gt.jsx)(Eu,{textOverflow:"ellipsis",whiteSpace:"nowrap",style:{cursor:"pointer"},overflow:"hidden",onClick:()=>{const e=URL.createObjectURL(t.image);_({open:!0,data:e})},children:null===t||void 0===t||null===(l=t.image)||void 0===l?void 0:l.name}),(0,Gt.jsx)(Eu,{mr:1,color:"primary",position:"relative",zIndex:2,children:(0,Gt.jsx)(Kp,{size:"small",color:"error","aria-label":"remove file",onClick:()=>{r("medicationList.".concat(a,".image"),"")},children:(0,Gt.jsx)(Ql,{width:22,height:22})})})]}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(a,".image"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_image")})})})]})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[we("rpm_Frequency"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Dw,size:"small",fullWidth:!0,id:"medicationList.".concat(a,".frequency"),name:"medicationList.".concat(a,".frequency"),onChange:e=>{r("medicationList",n.medicationList.map((t,n)=>a===n?(0,i.A)((0,i.A)({},t),{},{frequency:e.target.value,repetition_kind:e.target.value>4?qc:Uc,timing:[...R(e.target.value)]}):t))},variant:"outlined",defaultValue:"",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"25px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_FrequencyHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===ud||void 0===ud?void 0:ud.map(e=>(0,Gt.jsx)($m,{value:e.key,children:"".concat(e.text)},e.key))}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(a,".frequency"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Frequency")})})}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Vp,{variant:"text",component:"label",disableFocusRipple:!0,disableRipple:!0,disabled:!n.medicationList[a].frequency||"0"===n.medicationList[a].frequency,onClick:()=>{j(a),y(!x)},children:[(0,Gt.jsx)(Cje.A,{fontSize:"small",sx:{width:16,height:16,mr:.5}}),we("setReminder")]})}),(0,Gt.jsx)(Eu,{display:"flex",flexWrap:"wrap",children:(null===t||void 0===t?void 0:t.timing)&&(null===t||void 0===t?void 0:t.timing.map((e,t)=>(0,Gt.jsx)(Eu,{pr:.5,pb:.5,children:(0,Gt.jsx)(Ym,{style:(null===e||void 0===e?void 0:e.start_time)&&{backgroundColor:"#EDEDED",borderRadius:"20px",padding:"3px 8px",fontSize:"13px",color:"#6B7280"},children:null!==e&&void 0!==e&&e.start_time?sa()(e.start_time).format("hh:mm a"):""})},t)))})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:[we("rpm_Days"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",type:"number",id:"medicationList.".concat(a,".days"),name:"medicationList.".concat(a,".days"),variant:"outlined",onWheel:e=>e.target.blur(),onKeyDown:e=>ld.includes(e.key)&&e.preventDefault(),onChange:async e=>{const t=parseInt(e.target.value);await r("medicationList.".concat(a,".days"),t),o("medicationList.".concat(a,".days"),!0),r("medicationList.".concat(a,".end_date"),ns(n.medicationList[a].start_date,t))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineDaysHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(a,".days"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Days")})})})]})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:we("rpm_Comments")}),(0,Gt.jsxs)(Eu,{sx:{whiteSpace:"normal"},children:[(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,multiline:!0,rows:3,size:"small",variant:"outlined",name:"medicationList.".concat(a,".comments"),placeholder:"Enter Comments",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:we("message:rpm_CommentsHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"medicationList.".concat(a,".comments"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:we(e,{field:we("rpm_Comment")})})})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{display:"flex",justifyContent:"space-between",children:[(0,Gt.jsx)(Kp,{color:"error",className:"lightDanger",onClick:()=>{n.medicationList[a].medicine?S((0,i.A)((0,i.A)({},C),{},{open:!C.open,data:()=>e.remove(a)})):e.remove(a)},children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),(null===n||void 0===n||null===(c=n.medicationList)||void 0===c?void 0:c.length)-1===a&&(0,Gt.jsx)(Kp,{color:"primary",onClick:()=>{f(""),e.push({id:(0,Sje.v4)(),medicine:"",medicine_form:"",icon_type:"",salt_composition:null,dose:null,unit:null,color:"",image:"",start_date:sa()(new Date),end_date:null,days:"",repetition_kind:Uc,timing:[],frequency:"",comments:""}),setTimeout(()=>{A.current.lastChild.scrollIntoView({behavior:"smooth",block:"nearest"})},0)},children:(0,Gt.jsx)(Due,{fontSize:"small",sx:{width:18,height:18}})})]})})]})})},a)})})}}),(0,Gt.jsx)(rwe,{open:x,setOpen:y,medicationList:null===n||void 0===n?void 0:n.medicationList[b],modalIndex:b,setFieldValue:r,setFieldTouched:o}),(0,Gt.jsx)(c_,{open:w.open,imageUrl:w.data,onClose:D,imageWidthHeight:{width:"400",height:"400"}}),(0,Gt.jsx)(PU,{openModal:C.open,onCloseModal:k,actionFunction:()=>{C.data(),k()},options:{primaryText:we("message:rpm_DeleteTitle"),secondaryText:we("message:rpm_DeleteBodyText"),btn:{primaryText:we("rpm_Delete"),secondaryText:we("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]}),(0,Gt.jsx)(kCe,{open:a,onClose:()=>s(!1),actionFunction:()=>{d?c(n):l(n)},title:we("rpm_SaveTemplate"),disableButton:null===n||void 0===n||!n.templateName,children:(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",gutterBottom:!0,children:we("rpm_TemplateName")}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"templateName",name:"templateName",variant:"outlined",defaultValue:(null===n||void 0===n?void 0:n.template_name)||"",onChange:e=>r("templateName",e.target.value),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:we("message:rpm_MedicineNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})]})})]})})}})]})};MCe.defaultProps={order:"",orderBy:"",notesHead:[],checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",pageDetails:{},fetchNoteList:()=>{},addNewPrescription:()=>{},editPrescription:()=>{},initialData:{},templateData:{},templateModal:!1,setTemplateModal:()=>{},saveTemplate:()=>{},activeProgram:{},editTemplate:()=>{},allTemplates:[],template:"",setTemplate:()=>{},getTemplateById:()=>{},deleteTemplate:()=>{},templateDelete:{},setTemplateDelete:()=>{},prescriptionId:"",isEdit:!1,medicineSuggestions:[],getMedicineData:()=>{}};const OCe=MCe,TCe=e=>{let{activeProgram:t}=e;const n=Nt(),r=window.innerWidth,{programId:o,templateId:a}=lo(),s=Ct(Nd),[l,c]=(0,We.useState)({}),d=so(),[u,p]=(0,We.useState)(!1),[h,m]=(0,We.useState)(null),[f,g]=We.useState(null),[v,x]=We.useState(""),y=!!a,b=[{id:"medication",label:we("rpm_Medication")+"*",isSort:!1,sortProperty:"medication"},{id:"form",label:we("rpm_Form"),isSort:!1,sortProperty:"form"},{id:"saltComposition",label:we("rpm_Composition"),isSort:!1,sortProperty:"saltComposition"},{id:"shape",label:we("rpm_Shape"),isSort:!1,sortProperty:"shape"},{id:"dosage",label:we("rpm_Frequency")+"*",isSort:!1,sortProperty:"dosage"},{id:"days",label:we("rpm_Days")+"*",isSort:!1,sortProperty:"days"},{id:"comments",label:we("rpm_Comments"),isSort:!1,sortProperty:"comments"},{id:"action",label:we("rpm_Actions"),isSort:!1,sortProperty:"action"}];function j(e){const{vital:t,medications_list:n,intervals:r,start_date:i,end_date:o,id:a,created_by:s,name:l,days:c}=e,d=null===n||void 0===n?void 0:n.map(e=>{const t=function(e,t){if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null}(e.image,"".concat(e.medicine,".jpg")),n=[],o=r.some(t=>{var n;return(null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id))&&null===t.start_time});if(e.frequency>=1&&e.frequency<=4&&o)for(let r=0;r<e.frequency;r++)n.push({start_time:null,interval:null});else r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).forEach(e=>{let{id:t,start_time:r,stop_after:i}=e;n.push({id:t,start_time:r?Ts(r,Hc):null,interval:i})});return{id:e.id,medicine:{medicine:e.medicine,medicine_form:e.medicine_form||e.product_form,salt_composition:e.salt_composition,color:null,dose:null,icon_type:null,image:null,unit:null,id:e.id},medicine_form:e.medicine_form||e.product_form,salt_composition:e.salt_composition,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:t,start_date:sa()(new Date).valueOf(),days:e.days,end_date:l?ns(i,c):null,repetition_kind:e.frequency>4?qc:Uc,timing:n,frequency:e.frequency,comments:e.comments}});return{vital:t,presId:a,templateName:l,das:c,pres_start_date:i,pres_end_date:o,created_by:s,medicationList:d}}const w=async e=>{try{await n(Ol(o,{values:e,flag:!0})),p(!1),n(Zo({subTitle:"message:rpm_TemplateCreatedSuccessfully",severity:Bc})),d("".concat(Lc.DOCTOR.PROGRAM,"/").concat(o,"/templates"))}catch(t){const e=ls(t,"response.data.code","");as(e)?n(Zo({subTitle:"error:rpm_TemplateCreatedFailed",severity:$c})):n(Zo({subTitle:bd(e,"error:rpm_err_template_name_already_exist"),severity:$c}))}},_=async e=>{try{await n(((e,t,n)=>async r=>{r(na(!0));const o=await Dl(null===n||void 0===n?void 0:n.values),a=(0,i.A)((0,i.A)({},o),{},{auto_generate_flag:null===n||void 0===n?void 0:n.flag});try{const n="".concat(ua.template,"/").concat(e,"/").concat(t);return await uu(n,a)}finally{r(na(!1))}})(o,a,{values:e,flag:!0})),p(!1),n(Zo({subTitle:"message:rpm_TemplateUpdatedSuccessfully",severity:Bc})),d("".concat(Lc.DOCTOR.PROGRAM,"/").concat(o,"/templates"))}catch(t){const e=ls(t,"response.data.code","");as(e)?n(Zo({subTitle:"error:rpm_TemplateCreatedFailed",severity:$c})):n(Zo({subTitle:bd(e,"error:rpm_err_template_name_already_exist"),severity:$c}))}},C=async e=>{try{const{data:t}=await n(Tl(o,e)),r=await j(t);c(r)}catch(t){console.log(t)}},S=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{q:v,index:0};try{const{data:t}=await n(Ml({q:e.q}));(null===t||void 0===t?void 0:t.length)>0?g(t):g([{id:Math.random(),medicine:e.q,salt_composition:null,medicine_form:null,icon_type:null,image:null,color:null,dose:null,unit:null}])}catch(t){console.log(t)}};return We.useEffect(()=>{s&&!as(a)&&C(a)},[s,a]),We.useEffect(()=>{n(w_({activeMenuItem:"prescription_template"}))},[]),(0,Gt.jsx)("div",{children:r>=575?(0,Gt.jsx)(ACe,{notesHead:b,nodata:fwe,templateData:l,templateModal:u,setTemplateModal:p,saveTemplate:w,editTemplate:_,template:h,setTemplate:m,getTemplateById:C,isEdit:y,activeProgram:t,medicineSuggestions:f,getMedicineData:S,setMedicineSuggestions:g,setSearchText:x}):(0,Gt.jsx)(OCe,{notesHead:b,nodata:fwe,templateData:l,templateModal:u,setTemplateModal:p,saveTemplate:w,editTemplate:_,template:h,setTemplate:m,getTemplateById:C,isEdit:y,activeProgram:t,medicineSuggestions:f,getMedicineData:S,setMedicineSuggestions:g,setSearchText:x})})};const ECe=function(e){let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,scheduleOptions:a,fetchScheduleListOptions:s}=e;const{t:l}=vg(),[c,d]=We.useState(null),[u,p]=We.useState(""),[h,m]=We.useState(!1);return We.useEffect(()=>{s()},[c]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Iz,{initialValues:{courseName:"",vital:"",duration:""},children:e=>{let{setFieldValue:f,resetForm:g}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{sx:{borderRadius:"8px"},py:.2,pl:1,className:"course_filter WhiteBG",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,md:!0,sm:6,xs:6,children:(0,Gt.jsx)(Eu,{py:.2,display:"flex",alignItems:"center",children:(0,Gt.jsx)(Gb,{size:"small",id:"courseName",fullWidth:!0,options:a||[],getOptionLabel:e=>(null===e||void 0===e?void 0:e.name)||"",isOptionEqualToValue:(e,t)=>e.id===t.id,value:c,inputValue:u,open:h&&u.length>0,onInputChange:(e,t)=>{p(t),m(!0),t&&s((0,i.A)((0,i.A)({},n),{},{courseName:t}))},onChange:(e,t)=>{d(t),f("courseName",t?t.name:""),r((0,i.A)((0,i.A)({},n),{},{courseName:t?t.name:""})),m(!1),s((0,i.A)((0,i.A)({},n),{},{courseName:t?t.name:""}))},renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.name})})),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:l("rpm_SearchSchedule")+"...",variant:"outlined",fullWidth:!0,className:"iconRemove smallWebFont"}))})})}),(0,Gt.jsx)(df,{item:!0,md:!0,sm:5,xs:5,children:(0,Gt.jsx)(Eu,{className:"smallWebFont",children:(0,Gt.jsxs)(Hz,{as:Dw,displayEmpty:!0,sx:{borderRadius:2,bgcolor:"white",color:n.vital?"grey.900":"grey.400"},fullWidth:!0,name:"vital",value:n.vital,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{vital:e.target.value}))},variant:"outlined",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:l("message:rpm_VitalTypeNoteHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"",sx:{display:"none"},children:l("rpm_VitalType")}),cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:l("rpm_".concat(e.name))},e.value))]})})}),(0,Gt.jsx)(Af,{orientation:"vertical",flexItem:!0,sx:{ml:2,mt:2}}),(0,Gt.jsx)(df,{item:!0,md:6,children:(0,Gt.jsxs)(df,{container:!0,alignItems:"center",spacing:2,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Ym,{color:"primary",fontWeight:600,sx:{fontSize:14},children:l("rpm_Duration")})}),(0,Gt.jsx)(df,{item:!0,xs:!0,className:"hide_num_arrow",children:(0,Gt.jsx)(Hz,{as:Rj,type:"number",fullWidth:!0,size:"small",variant:"outlined",name:"duration",value:n.duration,placeholder:l("message:rpm_InDays"),sx:{bgcolor:"white"},onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{duration:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:l("message:rpm_NumericDurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})}),(0,Gt.jsxs)(df,{item:!0,children:[(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,onClick:()=>{o.current_page=1,t(n)},children:l("rpm_ApplyFilters")}),(0,Gt.jsx)(Vp,{variant:"text",disableElevation:!0,type:"reset",onClick:()=>{g(),o.current_page=1,d(null),p(""),m(!1),t({courseName:"",vital:"",duration:""}),r({courseName:"",vital:"",duration:""})},children:(0,Gt.jsx)(Bw.A,{})})]})]})})]})})})}})})};function PCe(e){var t,n;let{schedule:r,order:i,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,scheduleHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchScheduleList:m,pageDetails:f,viewButton:g,editButton:v,deleteButton:x,activeProgram:y,filterState:b,setFilterState:j,showFilterColor:w,setShowFilterColor:_,setHeadcells:C,settingModal:S,initialHeadcells:A,handleSettingModalToggle:k,scheduleOptions:M,setScheduleOptions:O,fetchScheduleListOptions:T}=e;const{t:E}=vg(),P=so(),D=[{name:E("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===y||void 0===y?void 0:y.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===y||void 0===y?void 0:y.code,"/patients")},{name:E("rpm_Schedules"),url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:D})}),(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:E("rpm_Schedules")})}),(null===y||void 0===y||null===(t=y.permissions)||void 0===t?void 0:t.showAddCourseBtn)&&(null===y||void 0===y?void 0:y.is_hospital)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>P("add"),className:(null===y||void 0===y||null===(n=y.permissions)||void 0===n?void 0:n.showAddCourseBtn)&&"schedule-tour-step2",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:E("rpm_AddNewSchedule")})]})})]})}),null!==y&&void 0!==y&&y.is_hospital?(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{p:1,bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,md:12,lg:10,xl:9,className:"schedule-tour-step0",children:(0,Gt.jsx)(ECe,{fetchListFunction:m,filterState:b,setFilterState:j,pageDetails:f,showFilterColor:w,setShowFilterColor:_,scheduleOptions:M,setScheduleOptions:O,fetchScheduleListOptions:T})}),(0,Gt.jsx)(df,{item:!0,ml:"auto",children:(0,Gt.jsx)(Eu,{pt:.5,children:(0,Gt.jsx)(Yx,{title:E("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:k,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:i,orderBy:o,setOrder:a,setOrderBy:s,data:r,headCells:null===c||void 0===c?void 0:c.filter(e=>A.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:null===r||void 0===r?void 0:r.map(e=>{var t,n,r,i,o,a,s;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:u,checked:d.includes(e.code),name:e.code,color:"primary"})}),A.includes("title")&&(0,Gt.jsx)(rC,{width:300,children:(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",children:[(0,Gt.jsx)(Lo,{className:"linkClr",to:"".concat(null===e||void 0===e?void 0:e.id,"/patients"),children:e.name}),(null===e||void 0===e?void 0:e.def)&&(0,Gt.jsx)(Eu,{ml:1.5,mt:1,children:(0,Gt.jsx)("img",{src:mue,height:20,width:20})})]})})}),A.includes("vital_name")&&(0,Gt.jsxs)(rC,{width:300,children:["bp"===e.vital_name&&(0,Gt.jsxs)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",E("rpm_".concat(e.vital_name))]}),"glucose"===e.vital_name&&(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",E("rpm_".concat(e.vital_name))]})]}),A.includes("duration")&&(0,Gt.jsx)(rC,{width:300,children:e.duration}),A.includes("patients_enrolled")&&(0,Gt.jsx)(rC,{width:300,children:e.total_patient_attached}),A.includes("mandates")&&(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&null!==(t=e.mandate)&&void 0!==t&&null!==(n=t.timing)&&void 0!==n&&n.length?null===e||void 0===e||null===(r=e.mandate)||void 0===r||null===(i=r.timing)||void 0===i?void 0:i.length:0}),A.includes("action")&&(0,Gt.jsxs)(rC,{children:[(null===y||void 0===y||null===(o=y.permissions)||void 0===o?void 0:o.showEditCourseBtn)&&v(e),(null===y||void 0===y||null===(a=y.permissions)||void 0===a?void 0:a.showViewCourseBtn)&&g(e),(null===y||void 0===y||null===(s=y.permissions)||void 0===s?void 0:s.showDeleteCourseBtn)&&x(e)]})]},e.id)})})}),(0,Gt.jsx)(IO,{pageDetails:f,fetchListFunction:m}),(0,Gt.jsx)(fO,{open:S,allHeadCells:c,initialHeadcells:A,setHeadcells:C,onClose:k})]})})]}):(0,Gt.jsxs)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,Gt.jsx)("img",{src:D_,alt:"No Data Found",style:{display:"block",margin:"auto"}}),(0,Gt.jsx)(Eu,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:E("rpm_To_Explore_This")})]})]})}PCe.defaultProps={scheduleHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",schedule:[],fetchScheduleList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},addNewProgram:()=>{},editProgram:()=>{},activeProgram:{},filterState:{},setFilterState:()=>{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},scheduleOptions:[],setScheduleOptions:()=>{},fetchScheduleListOptions:()=>{}};const DCe=PCe;function RCe(e){var t,n;let{schedule:r,order:i,orderBy:o,setOrder:a,setOrderBy:s,dataParameter:l,scheduleHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchScheduleList:m,pageDetails:f,viewButton:g,editButton:v,deleteButton:x,activeProgram:y,filterState:b,setFilterState:j,showFilterColor:w,setShowFilterColor:_,setHeadcells:C,settingModal:S,initialHeadcells:A,handleSettingModalToggle:k,scheduleOptions:M,setScheduleOptions:O,fetchScheduleListOptions:T}=e;const{t:E}=vg(),P=so(),D=[{name:E("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===y||void 0===y?void 0:y.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===y||void 0===y?void 0:y.code,"/patients")},{name:E("rpm_Schedules"),url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",alignItems:"center",children:[(0,Gt.jsx)(kH,{labels:D}),(0,Gt.jsx)(Ym,{variant:"h6",gutterBottom:!0,component:"h6",sx:{marginBottom:"0"},children:E("rpm_Schedules")})]}),(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(null===y||void 0===y||null===(t=y.permissions)||void 0===t?void 0:t.showAddCourseBtn)&&(null===y||void 0===y?void 0:y.is_hospital)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>P("add"),className:(null===y||void 0===y||null===(n=y.permissions)||void 0===n?void 0:n.showAddCourseBtn)&&"schedule-tour-step2",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:E("rpm_AddNewSchedule")})]})})})}),null!==y&&void 0!==y&&y.is_hospital?(0,Gt.jsxs)(Gt.Fragment,{children:[" ",(0,Gt.jsx)(Eu,{p:1,bgcolor:"#fff",sx:{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:!0,md:12,lg:10,xl:9,className:"schedule-tour-step0",children:(0,Gt.jsx)(ECe,{fetchListFunction:m,filterState:b,setFilterState:j,pageDetails:f,showFilterColor:w,setShowFilterColor:_,scheduleOptions:M,setScheduleOptions:O,fetchScheduleListOptions:T})}),(0,Gt.jsx)(df,{item:!0,ml:"auto",children:(0,Gt.jsx)(Eu,{pt:.5,children:(0,Gt.jsx)(Yx,{title:E("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:k,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:i,orderBy:o,setOrder:a,setOrderBy:s,data:r,headCells:null===c||void 0===c?void 0:c.filter(e=>A.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:null===r||void 0===r?void 0:r.map(e=>{var t,n,r,i,o,a,s;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:u,checked:d.includes(e.code),name:e.code,color:"primary"})}),A.includes("title")&&(0,Gt.jsx)(rC,{width:300,children:(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:e.name})}),A.includes("vital_name")&&(0,Gt.jsxs)(rC,{width:300,children:["bp"===e.vital_name&&(0,Gt.jsxs)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",E("rpm_".concat(e.vital_name))]}),"glucose"===e.vital_name&&(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,children:[" ",E("rpm_".concat(e.vital_name))]})]}),A.includes("duration")&&(0,Gt.jsx)(rC,{width:300,children:e.duration}),A.includes("patients_enrolled")&&(0,Gt.jsx)(rC,{width:300,children:e.total_patient_attached}),A.includes("mandates")&&(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&null!==(t=e.mandate)&&void 0!==t&&null!==(n=t.timing)&&void 0!==n&&n.length?null===e||void 0===e||null===(r=e.mandate)||void 0===r||null===(i=r.timing)||void 0===i?void 0:i.length:0}),A.includes("action")&&(0,Gt.jsxs)(rC,{children:[(null===y||void 0===y||null===(o=y.permissions)||void 0===o?void 0:o.showEditCourseBtn)&&v(e),(null===y||void 0===y||null===(a=y.permissions)||void 0===a?void 0:a.showViewCourseBtn)&&g(e),(null===y||void 0===y||null===(s=y.permissions)||void 0===s?void 0:s.showDeleteCourseBtn)&&x(e)]})]},e.id)})})}),(0,Gt.jsx)(IO,{pageDetails:f,fetchListFunction:m}),(0,Gt.jsx)(fO,{open:S,allHeadCells:c,initialHeadcells:A,setHeadcells:C,onClose:k})]})})," "]}):(0,Gt.jsxs)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",children:[(0,Gt.jsx)("img",{src:D_,alt:"No Data Found",style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"}}),(0,Gt.jsx)(Eu,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",children:E("rpm_To_Explore_This")})]})]})}RCe.defaultProps={scheduleHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",schedule:[],fetchScheduleList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},addNewProgram:()=>{},editProgram:()=>{},activeProgram:{},filterState:{},setFilterState:()=>{},showFilterColor:{},setShowFilterColor:()=>{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},scheduleOptions:[],setScheduleOptions:()=>{},fetchScheduleListOptions:()=>{}};const NCe=RCe,LCe=["content"];const ICe=function(e){var t;let{activeProgram:n}=e;const r=window.innerWidth,o=Ct(Nd),{programId:a}=lo(),s=P_(BA().breakpoints.down("sm")),l=Nt(),c=so(),{t:d}=vg(),u="code",p=Ct(qd),h=!("true"===ls(p,"user_principal.attributes.skip_tour[0]","")),[m,f]=We.useState(""),[g,v]=(0,We.useState)("desc"),[x,y]=(0,We.useState)("created_at"),[b,j]=(0,We.useState)([]),[w,_]=(0,We.useState)(null),[C,S]=(0,We.useState)(null),[A,k]=We.useState((0,i.A)({},Fc)),[M,O]=We.useState({courseName:"",vital:"",duration:""}),[T,E]=We.useState(!1),[P,D]=We.useState({open:!1,data:{}}),R=e=>{D((0,i.A)((0,i.A)({},P),{},{open:!P.open,data:e}))},N=s?["title","vital_name","action"]:["title","vital_name","duration","patients_enrolled","mandates","action"],[L,I]=We.useState(!1),[F,$]=We.useState(as($o.getProgramScheduleHeadcells())?N:$o.getProgramScheduleHeadcells()),B=function(e){$(e),$o.setProgramScheduleHeadcells(e)},z=()=>{I(!L)},H=e=>{if(Array.isArray(e))return j(e.map(e=>e));const t=e.target.name;b.includes(t)?j(b.filter(e=>e!==t)):j(e=>[...e,t])},W=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M;const t=(0,i.A)({sort_by:x,sort_order:g},A);try{const{data:n}=await l(Vxe(a,t,e)),r=n||{},{content:o}=r,s=Ko(r,LCe);_(o),k(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(n){console.log(n)}},V=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M;const t=(0,i.A)((0,i.A)({sort_by:x,sort_order:g},A),{},{current_page:1,per_page:999});try{const{data:n}=await l(Vxe(a,t,e)),{content:r}=n||{};S(r)}catch(n){console.log(n)}},U=async e=>{const t=(0,i.A)({},e);try{await l(Wxe(t)),l(Zo({subTitle:"message:rpm_ProgramUpdatedSuccessfully",severity:Bc})),W()}catch(n){l(Zo({subTitle:n.message,severity:$c}))}},q=async(e,t)=>{try{await l(((e,t)=>async n=>{n(na(!0));try{const n="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||"");return await pu(n,{})}finally{n(na(!1))}})(e,t)),W(),D({open:!1,data:{}}),l(Zo({subTitle:"message:rpm_DeleteScheduleSuccess",severity:Bc}))}catch(n){l(Zo({subTitle:n.message,severity:$c}))}},G=e=>(0,Gt.jsx)(Yx,{title:0!==(null===e||void 0===e?void 0:e.total_patient_attached)?d("rpm_alreadyAttachedCourseEdit"):d("rpm_Edit"),children:(0,Gt.jsx)("span",{children:(0,Gt.jsx)(Kp,{"data-id":e.id,disabled:0!==(null===e||void 0===e?void 0:e.total_patient_attached)&&!0,color:"primary",onClick:()=>c("".concat(e.id,"/edit")),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})})}),Y=e=>(0,Gt.jsx)(Yx,{title:d("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>c("".concat(e.id)),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),Z=e=>(0,Gt.jsx)(Yx,{title:0!==(null===e||void 0===e?void 0:e.total_patient_attached)?d("rpm_alreadyAttachedCourseDelete"):d("rpm_Delete"),children:(0,Gt.jsx)("span",{children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",disabled:0!==(null===e||void 0===e?void 0:e.total_patient_attached)&&!0,onClick:()=>R(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})});We.useEffect(()=>{B(N)},[s]),We.useEffect(()=>{o&&a&&null!==n&&void 0!==n&&n.is_hospital&&W()},[o,a,null===n||void 0===n?void 0:n.is_hospital]),We.useEffect(()=>{l(w_({activeMenuItem:"schedule_program"}))},[n]);const K=[{id:"title",label:d("rpm_Title"),isSort:!1,sortProperty:"title"},{id:"vital_name",label:d("rpm_Vitals"),isSort:!1,sortProperty:"vital_name"},{id:"duration",label:d("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"patients_enrolled",label:d("rpm_PatientsEnrolled"),isSort:!1,sortProperty:"patients_enrolled"},{id:"mandates",label:d("rpm_Mandates"),isSort:!1,sortProperty:"mandates"},{id:"action",label:d("rpm_Actions"),isSort:!1,sortProperty:"action"}];return as(n)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showCourseList?r>=575?(0,Gt.jsx)(DCe,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:u,checkState:b,onCheck:H,isSelection:!1,nodata:D_,scheduleHead:K,schedule:w,fetchScheduleList:W,pageDetails:A,editButton:G,viewButton:Y,deleteButton:Z,editSchedule:U,activeProgram:n,filterState:M,setFilterState:O,showFilterColor:T,setShowFilterColor:E,setHeadcells:B,settingModal:L,initialHeadcells:F,handleSettingModalToggle:z,scheduleOptions:C,setScheduleOptions:S,fetchScheduleListOptions:V}):(0,Gt.jsx)(NCe,{order:g,orderBy:x,setOrder:v,setOrderBy:y,dataParameter:u,checkState:b,onCheck:H,isSelection:!1,nodata:D_,scheduleHead:K,schedule:w,fetchScheduleList:W,pageDetails:A,editButton:G,viewButton:Y,deleteButton:Z,editSchedule:U,activeProgram:n,filterState:M,setFilterState:O,showFilterColor:T,setShowFilterColor:E,setHeadcells:B,settingModal:L,initialHeadcells:F,handleSettingModalToggle:z,scheduleOptions:C,setScheduleOptions:S,fetchScheduleListOptions:V}):(0,Gt.jsx)(__,{}),(0,Gt.jsx)(PU,{openModal:P.open,onCloseModal:R,actionFunction:()=>{var e;return q(a,null===P||void 0===P||null===(e=P.data)||void 0===e?void 0:e.id)},dataName:"",options:{primaryText:d("message:rpm_DeleteCourse"),secondaryText:d("message:rpm_DeleteCourseBodyText"),btn:{primaryText:d("rpm_Delete"),secondaryText:d("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(AZ,{isTour:h,path:"programCoursesTour",setRenderer:f}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:m})]})},FCe=["initialWidth","width"],$Ce=["xs","sm","md","lg","xl"],BCe=function(e,t){return!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?$Ce.indexOf(e)<=$Ce.indexOf(t):$Ce.indexOf(e)<$Ce.indexOf(t)},zCe=function(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?$Ce.indexOf(t)<=$Ce.indexOf(e):$Ce.indexOf(t)<$Ce.indexOf(e)},HCe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{const{withTheme:n=!1,noSSR:r=!1,initialWidth:i}=e;return function(e){const o=In(),a=e.theme||o,s=M_({theme:a,name:"MuiWithWidth",props:e}),{initialWidth:l,width:c}=s,d=(0,nn.A)(s,FCe),[u,p]=We.useState(!1);(0,gh.A)(()=>{p(!0)},[]);const h=a.breakpoints.keys.slice().reverse().reduce((e,t)=>{const n=P_(a.breakpoints.up(t));return!e&&n?t:e},null),m=(0,Ft.A)({width:c||(u||r?h:void 0)||l||i},n?{theme:a}:{},d);return void 0===m.width?null:(0,Gt.jsx)(t,(0,Ft.A)({},m))}}};const WCe=HCe()(function(e){const{children:t,only:n,width:r}=e,i=In();let o=!0;if(n)if(Array.isArray(n))for(let a=0;a<n.length;a+=1){if(r===n[a]){o=!1;break}}else n&&r===n&&(o=!1);if(o)for(let a=0;a<i.breakpoints.keys.length;a+=1){const t=i.breakpoints.keys[a],n=e["".concat(t,"Up")],s=e["".concat(t,"Down")];if(n&&BCe(t,r)||s&&zCe(t,r)){o=!1;break}}return o?(0,Gt.jsx)(We.Fragment,{children:t}):null});function VCe(e){return(0,sr.Ay)("PrivateHiddenCss",e)}(0,ar.A)("PrivateHiddenCss",["root","xlDown","xlUp","onlyXl","lgDown","lgUp","onlyLg","mdDown","mdUp","onlyMd","smDown","smUp","onlySm","xsDown","xsUp","onlyXs"]);const UCe=["children","className","only"],qCe=(0,Un.Ay)("div",{name:"PrivateHiddenCss",slot:"Root"})(e=>{let{theme:t,ownerState:n}=e;const r={display:"none"};return(0,Ft.A)({},n.breakpoints.map(e=>{let{breakpoint:n,dir:i}=e;return"only"===i?{[t.breakpoints.only(n)]:r}:"up"===i?{[t.breakpoints.up(n)]:r}:{[t.breakpoints.down(n)]:r}}).reduce((e,t)=>(Object.keys(t).forEach(n=>{e[n]=t[n]}),e),{}))});const GCe=function(e){const{children:t,className:n,only:r}=e,i=(0,nn.A)(e,UCe),o=In(),a=[];for(let c=0;c<o.breakpoints.keys.length;c+=1){const e=o.breakpoints.keys[c],t=i["".concat(e,"Up")],n=i["".concat(e,"Down")];t&&a.push({breakpoint:e,dir:"up"}),n&&a.push({breakpoint:e,dir:"down"})}if(r){(Array.isArray(r)?r:[r]).forEach(e=>{a.push({breakpoint:e,dir:"only"})})}const s=(0,Ft.A)({},e,{breakpoints:a}),l=(e=>{const{classes:t,breakpoints:n}=e,r={root:["root",...n.map(e=>{let{breakpoint:t,dir:n}=e;return"only"===n?"".concat(n).concat((0,Fu.A)(t)):"".concat(t).concat((0,Fu.A)(n))})]};return(0,ir.A)(r,VCe,t)})(s);return(0,Gt.jsx)(qCe,{className:(0,nr.A)(l.root,n),ownerState:s,children:t})},YCe=["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"];const ZCe=function(e){const{implementation:t="js",lgDown:n=!1,lgUp:r=!1,mdDown:i=!1,mdUp:o=!1,smDown:a=!1,smUp:s=!1,xlDown:l=!1,xlUp:c=!1,xsDown:d=!1,xsUp:u=!1}=e,p=(0,nn.A)(e,YCe);return"js"===t?(0,Gt.jsx)(WCe,(0,Ft.A)({lgDown:n,lgUp:r,mdDown:i,mdUp:o,smDown:a,smUp:s,xlDown:l,xlUp:c,xsDown:d,xsUp:u},p)):(0,Gt.jsx)(GCe,(0,Ft.A)({lgDown:n,lgUp:r,mdDown:i,mdUp:o,smDown:a,smUp:s,xlDown:l,xlUp:c,xsDown:d,xsUp:u},p))};const KCe=function(e){var t,n,r,i,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T,E,P,D,R,N,L,I,F,$,B,z,H,W,V;let{schedule:U,activeProgram:q,notifications:G}=e;const{t:Y}=vg(),Z=so(),{scheduleId:K,programId:X}=lo(),Q=e=>{var t,n;const r=null===(t=e.repetition)||void 0===t||null===(n=t.split(" ")[5])||void 0===n?void 0:n.split(",");return"Weekly"==e.repeat_type?(0,Gt.jsx)(Gt.Fragment,{children:as(U)?(0,Gt.jsx)(ZC,{width:100}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:e?null===r||void 0===r?void 0:r.map(e=>(0,Gt.jsx)(Eu,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:e.slice(0,2)},e)):"NA"})}):"Daily"==e.repeat_type?(0,Gt.jsx)(Gt.Fragment,{children:as(U)?(0,Gt.jsx)(ZC,{width:100}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:(0,Gt.jsx)(Eu,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:"Daily"})})}):(0,Gt.jsx)(Gt.Fragment,{children:as(U)?(0,Gt.jsx)(ZC,{width:100}):(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:"h6.fontWeight",component:"p",children:(0,Gt.jsx)(Eu,{component:"span",sx:e=>({mr:1,py:.5,px:1.5,color:e.palette.primary.theme[50],backgroundColor:e.palette.primary.theme[500],display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,borderRadius:.5}),children:"None"})})})},J=[{name:Y("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===q||void 0===q?void 0:q.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===q||void 0===q?void 0:q.code,"/patients")},{name:Y("rpm_Schedules"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===q||void 0===q?void 0:q.code,"/course")},{name:null===U||void 0===U?void 0:U.name,url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",children:[(0,Gt.jsx)(kH,{labels:J}),(0,Gt.jsx)(ZCe,{smUp:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:Y("rpm_ScheduleDetails")})})]}),(0,Gt.jsx)(ZCe,{smDown:!0,children:(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:Y("rpm_ScheduleDetails")})})})}),(0,Gt.jsx)(Eu,{sx:{mb:1.5},children:(0,Gt.jsx)(df,{container:!0,spacing:2,mt:.05,children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",children:Y("rpm_ScheduleName")}),(null===U||void 0===U?void 0:U.def)&&(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,ml:1,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Default"})]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(U)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==U&&void 0!==U&&U.name?null===U||void 0===U?void 0:U.name:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_Program")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(U)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==U&&void 0!==U&&U.program?null===U||void 0===U?void 0:U.program:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_VitalName")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(U)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==U&&void 0!==U&&U.vital_name?Y("rpm_".concat(U.vital_name)):"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_Duration")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(U)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==U&&void 0!==U&&U.duration?(null===U||void 0===U?void 0:U.duration)+" (days)":"NA"})})]})})]}),!as(U)&&null!==U&&void 0!==U&&U.non_compliance?(0,Gt.jsxs)(df,{container:!0,spacing:2.5,mt:.05,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_NonComplianceNotification")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(ZC,{}):null!==U&&void 0!==U&&null!==(t=U.non_compliance)&&void 0!==t&&t.notification_enabled?(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Active"}):(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:"Inactive"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_Title")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(n=U.non_compliance)&&void 0!==n&&n.notification_title?null===U||void 0===U||null===(r=U.non_compliance)||void 0===r?void 0:r.notification_title:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_Description")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(i=U.non_compliance)&&void 0!==i&&i.notification_text?null===U||void 0===U||null===(o=U.non_compliance)||void 0===o?void 0:o.notification_text:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:Y("rpm_MaxStrikes")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==U&&void 0!==U&&null!==(a=U.non_compliance)&&void 0!==a&&a.max_strikes?null===U||void 0===U||null===(s=U.non_compliance)||void 0===s?void 0:s.max_strikes:"NA"})})]})})]}):null===(null===U||void 0===U?void 0:U.non_compliance)?(0,Gt.jsx)(df,{container:!0,spacing:2.5,mt:.05,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:4,display:"flex",height:"100%"},children:(0,Gt.jsxs)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:[(0,Gt.jsx)(Ym,{variant:"h6",children:"Non Compliance Notification not set"}),(0,Gt.jsx)(Eu,{sx:{mt:3,textAlign:"center"},children:(0,Gt.jsx)(Vp,{color:"primary",variant:"contained",disableElevation:!0,onClick:()=>Z("".concat(Lc.DOCTOR.PROGRAM,"/").concat(X,"/course/").concat(K,"/edit")),children:Y("rpm_SetNow")})})]})})})}):(0,Gt.jsxs)(df,{container:!0,spacing:2.5,mt:.05,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsx)(ZC,{})})]})]})})})})}),(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsx)(df,{container:!0,spacing:2.5,mt:.05,children:as(null===U||void 0===U||null===(l=U.mandate)||void 0===l?void 0:l.timing)?(0,Gt.jsx)(df,{item:!0,xs:12,children:0===(null===U||void 0===U||null===(V=U.mandate)||void 0===V?void 0:V.timing.length)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,textAlign:"center"},children:(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto"}})})}):(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{sx:{height:"350px"},children:(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"100%"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})})})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,p:2.5,pr:0,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:Y("rpm_MandateDetails")})}),null===U||void 0===U||null===(c=U.mandate)||void 0===c||null===(d=c.timing)||void 0===d?void 0:d.map((e,t)=>((e,t)=>{var n,r,i;return(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(aH,{variant:"outlined",sx:{height:"100%",mb:2.5},children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",children:["Mandate ",t+1]}),subheader:(0,Gt.jsx)(Gt.Fragment,{})}),(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_StartTime")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:fs(null===e||void 0===e?void 0:e.start_time,null===U||void 0===U||null===(n=U.mandate)||void 0===n||null===(r=n.reminder_notification)||void 0===r||null===(i=r.interval)||void 0===i?void 0:i.pre_reminder)})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_EndTime")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:fs(null===e||void 0===e?void 0:e.end_time)})})]}),(null===e||void 0===e?void 0:e.activity_type)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_ActivityType")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:Y("rpm_".concat(null===e||void 0===e?void 0:e.activity_type))})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_ActivityName")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:null===e||void 0===e?void 0:e.activity_name})})]})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:[Y("rpm_Repetition")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Eu,{children:Q(e)})})]})]})]})},null===e||void 0===e?void 0:e.id)})(e,t))]}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:Y("rpm_NotificationsDetails")}),(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsxs)(aH,{variant:"outlined",mb:2,children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:Y("rpm_ReminderNotificationText")})}),(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_SendInEvery")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(u=U.mandate)&&void 0!==u&&null!==(p=u.reminder_notification)&&void 0!==p&&null!==(h=p.interval)&&void 0!==h&&h.every?(null===U||void 0===U||null===(m=U.mandate)||void 0===m||null===(f=m.reminder_notification)||void 0===f||null===(g=f.interval)||void 0===g?void 0:g.every)/60+" min":"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Repetition")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(v=U.mandate)&&void 0!==v&&null!==(x=v.reminder_notification)&&void 0!==x&&null!==(y=x.interval)&&void 0!==y&&y.stop_after?(e=>{var t,n,r,i,o,a,s,l,c;return null!==e&&void 0!==e&&null!==(t=e.mandate)&&void 0!==t&&null!==(n=t.reminder_notification)&&void 0!==n&&null!==(r=n.interval)&&void 0!==r&&r.pre_reminder?(null===e||void 0===e||null===(i=e.mandate)||void 0===i||null===(o=i.reminder_notification)||void 0===o||null===(a=o.interval)||void 0===a?void 0:a.stop_after)-parseInt(1):null===e||void 0===e||null===(s=e.mandate)||void 0===s||null===(l=s.reminder_notification)||void 0===l||null===(c=l.interval)||void 0===c?void 0:c.stop_after})(U):"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Title")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(b=U.mandate)&&void 0!==b&&null!==(j=b.reminder_notification)&&void 0!==j&&j.fallback_title?null===U||void 0===U||null===(w=U.mandate)||void 0===w||null===(_=w.reminder_notification)||void 0===_?void 0:_.fallback_title:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Description")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(C=U.mandate)&&void 0!==C&&null!==(S=C.reminder_notification)&&void 0!==S&&S.fallback_text?null===U||void 0===U||null===(A=U.mandate)||void 0===A||null===(k=A.reminder_notification)||void 0===k?void 0:k.fallback_text:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_PreReminder")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(M=U.mandate)&&void 0!==M&&null!==(O=M.reminder_notification)&&void 0!==O&&null!==(T=O.interval)&&void 0!==T&&T.pre_reminder?(null===U||void 0===U||null===(E=U.mandate)||void 0===E||null===(P=E.reminder_notification)||void 0===P||null===(D=P.interval)||void 0===D?void 0:D.pre_reminder)/60+" min":"NA"})})]}),!(null!==G&&void 0!==G&&null!==(R=G.push_notification)&&void 0!==R&&R.reading_reminder)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",Y("message:rpm_notificationSettingMessage"),")"]})})]})]})}),(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"},title:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:Y("rpm_MissedReadingNotification")})}),(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Title")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==(N=U.mandate)&&void 0!==N&&null!==(L=N.missed_reading_notification)&&void 0!==L&&L.notification_title?null===U||void 0===U||null===(I=U.mandate)||void 0===I||null===(F=I.missed_reading_notification)||void 0===F?void 0:F.notification_title:"NA"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.3},children:[Y("rpm_Description")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.7},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",sx:{wordBreak:"break-all"},children:null!==U&&void 0!==U&&null!==($=U.mandate)&&void 0!==$&&null!==(B=$.missed_reading_notification)&&void 0!==B&&B.notification_text?null===U||void 0===U||null===(z=U.mandate)||void 0===z||null===(H=z.missed_reading_notification)||void 0===H?void 0:H.notification_text:"NA"})})]}),!(null!==G&&void 0!==G&&null!==(W=G.push_notification)&&void 0!==W&&W.missed_mandate)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",Y("message:rpm_notificationSettingMessage"),")"]})})]})]})})]})]})})})]})};const XCe=qxe(function(e){var t;let{activeProgram:n,notifications:r}=e;const o=Ct(Nd),{programId:a,scheduleId:s}=lo(),l=Nt(),{t:c}=vg(),[d,u]=We.useState(null),[p,h]=We.useState({open:!1,data:{}}),m=e=>{h((0,i.A)((0,i.A)({},p),{},{open:!p.open,data:e}))},f=async()=>{try{const e=await l(Uxe(a,s));u(e)}catch(e){console.log(e)}},g=async(e,t,n)=>{try{await l(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||"","/").concat(n||"");return await pu(r,{})}finally{r(na(!1))}})(e,t,n)),f(),h({}),l(Zo({subTitle:"message:rpm_DeleteMandateSuccess",severity:Bc}))}catch(r){l(Zo({subTitle:r.message,severity:$c}))}};return We.useEffect(()=>{o&&a&&s&&f()},[o,a,s]),We.useEffect(()=>{l(w_({activeMenuItem:"schedule_program"}))},[n]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(KCe,{schedule:d,deleteButton:e=>(0,Gt.jsx)(Yx,{title:c("rpm_Delete"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>m(e),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})}),activeProgram:n,notifications:r}),(0,Gt.jsx)(PU,{openModal:null===p||void 0===p?void 0:p.open,onCloseModal:m,actionFunction:()=>{var e;return g(a,s,null===p||void 0===p||null===(e=p.data)||void 0===e?void 0:e.id)},dataName:null===p||void 0===p||null===(t=p.data)||void 0===t?void 0:t.name,options:{primaryText:c("message:rpm_DeleteTitle"),secondaryText:c("message:rpm_DeleteBodyText"),descText:c("message:rpm_DeleteSubText"),btn:{primaryText:c("rpm_Delete"),secondaryText:c("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})});function QCe(){return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(ZC,{width:250})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:(0,Gt.jsx)(ZC,{width:100})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(ZC,{variant:"rounded",width:64,height:30,sx:{borderRadius:1}})})]})})}),(0,Gt.jsx)(uH,{sx:{py:4,":last-child":{pb:4}},children:(0,Gt.jsxs)(Eu,{sx:{maxWidth:"768px"},children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsxs)(Eu,{mb:2.5,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,Gt.jsx)(ZC,{width:100})}),(0,Gt.jsx)(ZC,{height:48})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:2.5,sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,Gt.jsx)(ZC,{width:100})}),(0,Gt.jsx)(ZC,{height:48})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:2.5,sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,Gt.jsx)(ZC,{width:100})}),(0,Gt.jsx)(ZC,{height:48})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsx)(ZC,{width:"40%"})})]}),(0,Gt.jsx)(Eu,{p:2,pt:3,mt:2.5,mb:3,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,Gt.jsx)(ZC,{width:100})}),(0,Gt.jsx)(ZC,{height:48})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,Gt.jsx)(ZC,{width:100})}),(0,Gt.jsx)(ZC,{height:48})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:(0,Gt.jsx)(ZC,{width:100})}),(0,Gt.jsx)(ZC,{height:148})]})})]})}),(0,Gt.jsxs)(df,{container:!0,spacing:2,mt:.05,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(ZC,{variant:"rounded",width:64,height:30,sx:{borderRadius:1}})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(ZC,{variant:"rounded",width:64,height:30,sx:{borderRadius:1}})})]})]})})]})})})]})}const JCe=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v,x,y,b,j,w,_,C,S,A,k,M,O,T,E,P,D,R,N,L,I,F,$,B,z,H,W,V;let{edit:U,scheduleData:q,addNewSchedule:G,editSchedule:Y,activeProgram:Z,convertCronToArr:K,notifications:X,setSelectedVital:Q}=e;const{t:J}=vg(),ee=Ct(Id),te=so(),{scheduleId:ne}=lo(),[re,ie]=We.useState(null),oe={name:(null===q||void 0===q?void 0:q.name)||"",duration:(null===q||void 0===q?void 0:q.duration)||"",vital_name:(null===q||void 0===q?void 0:q.vital_name)||"",enable:(null===q||void 0===q||null===(t=q.non_compliance)||void 0===t?void 0:t.enabled)||!1,max_strikes:(null===q||void 0===q||null===(n=q.non_compliance)||void 0===n?void 0:n.max_strikes)||"",notification_text:(null===q||void 0===q||null===(r=q.non_compliance)||void 0===r?void 0:r.notification_text)||"",notification_title:(null===q||void 0===q||null===(o=q.non_compliance)||void 0===o?void 0:o.notification_title)||"",notification_enabled:(null===q||void 0===q||null===(a=q.non_compliance)||void 0===a?void 0:a.notification_enabled)||!1,mandate:((e,t)=>{let n=null===e||void 0===e?void 0:e.map(e=>({start_time:gs(null===e||void 0===e?void 0:e.start_time).add(t,"seconds"),end_time:gs(null===e||void 0===e?void 0:e.end_time),repetition:K(null===e||void 0===e?void 0:e.repetition),repeat:e.repeat_type,activity_name:e.activity_name,activity_type:e.activity_type}));return n})(null===q||void 0===q||null===(s=q.mandate)||void 0===s?void 0:s.timing,null===q||void 0===q||null===(l=q.mandate)||void 0===l||null===(c=l.reminder_notification)||void 0===c||null===(d=c.interval)||void 0===d?void 0:d.pre_reminder),reading_reminder_title:null===q||void 0===q||null===(u=q.mandate)||void 0===u||null===(p=u.reminder_notification)||void 0===p?void 0:p.fallback_title,reading_reminder_time:null!==q&&void 0!==q&&null!==(h=q.mandate)&&void 0!==h&&null!==(m=h.reminder_notification)&&void 0!==m&&null!==(f=m.interval)&&void 0!==f&&f.every?(null===q||void 0===q||null===(g=q.mandate)||void 0===g||null===(v=g.reminder_notification)||void 0===v||null===(x=v.interval)||void 0===x?void 0:x.every)/60:"",reading_reminder_repetition:null!==q&&void 0!==q&&null!==(y=q.mandate)&&void 0!==y&&null!==(b=y.reminder_notification)&&void 0!==b&&null!==(j=b.interval)&&void 0!==j&&j.pre_reminder?(null===q||void 0===q||null===(w=q.mandate)||void 0===w||null===(_=w.reminder_notification)||void 0===_||null===(C=_.interval)||void 0===C?void 0:C.stop_after)-parseInt(1):null===q||void 0===q||null===(S=q.mandate)||void 0===S||null===(A=S.reminder_notification)||void 0===A||null===(k=A.interval)||void 0===k?void 0:k.stop_after,reading_reminder_msg:null===q||void 0===q||null===(M=q.mandate)||void 0===M||null===(O=M.reminder_notification)||void 0===O?void 0:O.fallback_text,reading_reminder_enabled:!as(null===q||void 0===q||null===(T=q.mandate)||void 0===T?void 0:T.reminder_notification),missed_reminder_title:null===q||void 0===q||null===(E=q.mandate)||void 0===E||null===(P=E.missed_reading_notification)||void 0===P?void 0:P.notification_title,missed_reminder_msg:null===q||void 0===q||null===(D=q.mandate)||void 0===D||null===(R=D.missed_reading_notification)||void 0===R?void 0:R.notification_text,missed_reminder_enabled:!as(null===q||void 0===q||null===(N=q.mandate)||void 0===N?void 0:N.missed_reading_notification),missed_reminder_notification_enabled:!1,repeat:"*"!==(null===q||void 0===q||null===(L=q.mandate)||void 0===L||null===(I=L.repetition)||void 0===I||null===(F=I.split(" ")[5])||void 0===F?void 0:F.split(",")[0])?"weekly":"daily",pre_reminder_enabled:!(null===q||void 0===q||null===($=q.mandate)||void 0===$||null===(B=$.reminder_notification)||void 0===B||null===(z=B.interval)||void 0===z||!z.pre_reminder),pre_reminder:(null===q||void 0===q||null===(H=q.mandate)||void 0===H||null===(W=H.reminder_notification)||void 0===W||null===(V=W.interval)||void 0===V?void 0:V.every)/60,def:(null===q||void 0===q?void 0:q.def)||!1},ae=()=>(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{position:"absolute",top:"-14px",background:"#ffffff",padding:"0 6px",zIndex:"1",display:"none"},children:(0,Gt.jsxs)(Ym,{variant:"body1",children:["Non Compliance",(0,Gt.jsx)(Eu,{component:"span",children:"*"})]})}),(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_MaxStrike"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"max_strikes",name:"max_strikes",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:J("message:rpm_MaxStrikeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:1,children:"1"}),(0,Gt.jsx)($m,{value:2,children:"2"}),(0,Gt.jsx)($m,{value:3,children:"3"}),(0,Gt.jsx)($m,{value:4,children:"4"})]}),(0,Gt.jsx)(Xz,{name:"max_strikes",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_NoOfMandate")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Title"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"notification_title",name:"notification_title",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:J("message:rpm_NotificationTitleHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"notification_title",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_Title")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Description"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"notification_text",name:"notification_text",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:J("message:rpm_NotificationDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"notification_text",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_Description")})})})]})})]})]}),se=()=>(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{position:"absolute",top:"-14px",background:"#ffffff",padding:"0 6px",zIndex:"1",display:"none"},children:(0,Gt.jsxs)(Ym,{variant:"body1",children:[J("rpm_ReadingReminder"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]})}),(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Title"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"reading_reminder_title",name:"reading_reminder_title",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:J("message:rpm_ReadingReminderTitle"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"reading_reminder_title",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_Title")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_SendInEveryMin"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"reading_reminder_time",name:"reading_reminder_time",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:J("message:rpm_ReadingReminderEveryMinHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[[1,2,3,4,5,6].map(e=>(0,Gt.jsxs)($m,{value:5*e,children:[5*e," min"]},e)),(0,Gt.jsx)($m,{value:45,children:"45 min"}),(0,Gt.jsx)($m,{value:60,children:"60 min"})]}),(0,Gt.jsx)(Xz,{name:"reading_reminder_time",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_ReadingReminderTime")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Repetition"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"reading_reminder_repetition",name:"reading_reminder_repetition",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:J("message:rpm_ReadingReminderRepetitionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[1,2,3,4,5,6,7,8,9,10].map(e=>(0,Gt.jsx)($m,{value:e,children:e},e))}),(0,Gt.jsx)(Xz,{name:"reading_reminder_repetition",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_ReadingReminderTime")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Description"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"reading_reminder_msg",name:"reading_reminder_msg",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:J("message:rpm_ReadingReminderMsgHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"reading_reminder_msg",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_ReadingReminderMsg")})})})]})})]})]}),le=()=>{var e;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{position:"absolute",top:"-14px",background:"#ffffff",padding:"0 6px",zIndex:"1",display:"none"},children:(0,Gt.jsxs)(Ym,{variant:"body1",children:[J("rpm_MissedReading"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]})}),(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Title"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"missed_reminder_title",name:"missed_reminder_title",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:J("message:rpm_MissedReadingTitleHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"missed_reminder_title",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_Title")})})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:12,children:[(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Description"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"missed_reminder_msg",name:"missed_reminder_msg",variant:"outlined",multiline:!0,rows:3,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:J("message:rpm_MissedReadingMsgHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"missed_reminder_msg",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_Description")})})})]}),!(null!==X&&void 0!==X&&null!==(e=X.push_notification)&&void 0!==e&&e.missed_mandate)&&(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",J("message:rpm_notificationSettingMessage"),")"]})})]})]})]})},ce=[{name:J("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===Z||void 0===Z?void 0:Z.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===Z||void 0===Z?void 0:Z.code,"/patients")},{name:J("rpm_Schedules"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===Z||void 0===Z?void 0:Z.code,"/course")},{name:as(q)?J("rpm_AddNew"):J("rpm_Edit"),url:""}];return U&&as(q)?(0,Gt.jsx)(QCe,{}):(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",children:[(0,Gt.jsx)(kH,{labels:ce}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"block",md:"none"}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:as(q)?J("rpm_CreateNewSchedule"):J("rpm_EditSchedule")})})]}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Iz,{initialValues:as(q)?{name:"",duration:"",vital_name:"",enable:!0,max_strikes:"",notification_text:"",notification_title:"",notification_enabled:!1,mandate:[{start_time:null,end_time:null,activity_name:null,activity_type:null,repeat:"Daily",repetition:[]}],reading_reminder_title:"",reading_reminder_time:"",reading_reminder_repetition:"",reading_reminder_msg:"",missed_reminder_title:"",missed_reminder_time:"",missed_reminder_msg:"",reading_reminder_enabled:!1,missed_reminder_enabled:!1,missed_reminder_notification_enabled:!1,repeat:"daily",repetition:"0 0 0 ? * * *",pre_reminder_enabled:!1,pre_reminder:0,def:!1}:oe,validationSchema:vV.addNewSchedule,onSubmit:ne?Y:G,enableReinitialize:!0,children:e=>{var t,n;let{values:r,setFieldValue:o}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"none",md:"block"}},children:(0,Gt.jsxs)(Ym,{variant:"h6",component:"h6",children:[as(q)?J("rpm_CreateNewSchedule"):J("rpm_EditSchedule")," "]})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:()=>te(-1),children:J("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(CT,{loading:ee,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:J("rpm_Save")})})]})})}),(0,Gt.jsx)(uH,{sx:{py:4,":last-child":{pb:4}},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,lg:12,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{mb:2.5,children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_ScheduleTitle"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"name",name:"name",size:"small",color:"primary",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:J("message:rpm_ScheduleTitleHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_ScheduleTitle")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{mb:2.5,className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_VitalName"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Dw,id:"vital_name",name:"vital_name",size:"small",color:"primary",disabled:!as(q),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:J("message:rpm_VitalNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),onChange:e=>{const{value:t}=e.target;o("vital_name",t),Q(t)},children:null===cd||void 0===cd?void 0:cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:J("rpm_".concat(e.name))},e.name))}),(0,Gt.jsx)(Xz,{name:"vital_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_VitalName")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{mb:2.5,className:"hide_num_arrow",sx:{"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_DurationOfCourse"),(0,Gt.jsx)(Eu,{component:"span",children:"*"})]}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"duration",name:"duration",size:"small",color:"primary",type:"number",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:J("message:rpm_DurationHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"duration",children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_Duration")})})})]})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,lg:7,xl:6,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:J("rpm_MandateSetting")}),(0,Gt.jsx)(Eu,{p:2,pt:3,mt:2.5,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",sx:{"& .MuiGrid-container:last-child":{border:"none"}},children:(0,Gt.jsx)(Zz,{name:"mandate",children:e=>{var t;let{push:n,remove:a}=e;return(0,Gt.jsx)(Gt.Fragment,{children:null===r||void 0===r||null===(t=r.mandate)||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsxs)(df,{container:!0,spacing:1.5,mt:0===t?null:.05,pb:2,sx:{borderBottom:"1px solid #c5c5c5"},children:["glucose"==r.vital_name&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,xl:3,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_Activity"),(0,Gt.jsx)(Eu,{component:"span",children:"*"}),(0,Gt.jsx)(Yx,{title:J("message:rpm_ActivityNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",id:"mandate.".concat(t,".activity_name"),name:"mandate.".concat(t,".activity_name")}),(0,Gt.jsx)(Xz,{name:"mandate.".concat(t,".activity_name"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("error:rpm_ActivityName")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,xl:3,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:["".concat(J("rpm_ActivityType")),(0,Gt.jsx)(Eu,{component:"span",children:"*"}),(0,Gt.jsx)(Yx,{title:J("message:rpm_ActivityTypeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"mandate.".concat(t,".activity_type"),name:"mandate.".concat(t,".activity_type"),variant:"outlined",sx:{"&.MuiOutlinedInput-root":{bgcolor:"white"}},children:[(0,Gt.jsx)($m,{value:"fasting",children:J("rpm_fasting")}),(0,Gt.jsx)($m,{value:"nonfasting",children:J("rpm_nonFasting")})]}),(0,Gt.jsx)(Xz,{name:"mandate.".concat(t,".activity_type"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("error:rpm_ActivityType")})})})]})})]}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,xl:"glucose"!==r.vital_name?6:3,children:(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_StartTime"),(0,Gt.jsx)(Eu,{component:"span",children:"*"}),(0,Gt.jsx)(Yx,{title:J("message:rpm_MandateStartTimeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nwe,ampm:!1,size:"small",id:"mandate.".concat(t,".start_time"),name:"mandate.".concat(t,".start_time"),value:null===e||void 0===e?void 0:e.start_time,onChange:e=>o("mandate.".concat(t,".start_time"),e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({fullWidth:!0},e),{},{id:"startMandate-".concat(t)})),maxTime:e.end_time?new Date(e.end_time):void 0,onError:e=>{if(e)ie((0,i.A)((0,i.A)({},re),{},{["mandate_".concat(t,"_start_time")]:e}));else{let e=re||{};e["mandate_".concat(t,"_start_time")]&&(delete e["mandate_".concat(t,"_start_time")],ie(e))}}})}),re&&"invalidDate"===re["mandate_".concat(t,"_start_time")]&&(0,Gt.jsx)(iw,{error:!0,children:J("error:rpm_invalidDateErr")}),(0,Gt.jsx)(Xz,{name:"mandate.".concat(t,".start_time"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_StartTime")})})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,sm:6,xl:"glucose"!==r.vital_name?6:3,display:"flex",justifyContent:"space-between",children:[(0,Gt.jsxs)(Eu,{sx:{"& .MuiOutlinedInput-root":{background:"#ffffff"},"& .MuiOutlinedInput-input":{py:1.0625}},width:"100%",children:[(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:[J("rpm_EndTime"),(0,Gt.jsx)(Eu,{component:"span",children:"*"}),(0,Gt.jsx)(Yx,{title:J("message:rpm_MandateEndTimeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nwe,ampm:!1,size:"small",id:"mandate.".concat(t,".end_time"),name:"mandate.".concat(t,".end_time"),value:null===e||void 0===e?void 0:e.end_time,onChange:e=>o("mandate.".concat(t,".end_time"),e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({fullWidth:!0},e),{},{id:"endMandate-".concat(t)})),minTime:e.start_time?new Date(e.start_time):void 0,onError:e=>{if(e)ie((0,i.A)((0,i.A)({},re),{},{["mandate_".concat(t,"_end_time")]:e}));else{let e=re||{};e["mandate_".concat(t,"_end_time")]&&(delete e["mandate_".concat(t,"_end_time")],ie(e))}}})}),re&&"invalidDate"===re["mandate_".concat(t,"_end_time")]&&(0,Gt.jsx)(iw,{error:!0,children:J("error:rpm_invalidDateErr")}),re&&"minTime"===re["mandate_".concat(t,"_end_time")]&&(0,Gt.jsx)(iw,{error:!0,children:J("error:rpm_minMaxTimeErr")}),(0,Gt.jsx)(Xz,{name:"mandate.".concat(t,".end_time"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:J(e,{field:J("rpm_EndTime")})})})]}),(null===r||void 0===r?void 0:r.mandate.length)>1&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Kp,{size:"small",sx:{mt:{xs:0,sm:4}},color:"error",onClick:()=>((e,t)=>{let n=(0,i.A)({},re)||{};n["mandate_".concat(e,"_start_time")]&&(delete n["mandate_".concat(e,"_start_time")],ie(n)),n["mandate_".concat(e,"_end_time")]&&(delete n["mandate_".concat(e,"_end_time")],ie(n)),t(e)})(t,a),id:"courseMandateDeleteIcon",children:(0,Gt.jsx)(cCe.A,{fontSize:"small",sx:{width:16,height:16}})})})]}),r.mandate.length-1===t&&!1,(0,Gt.jsxs)(df,{item:!0,xs:12,md:12,sm:!0,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(df,{container:!0,spacing:.5,children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Eu,{minWidth:"150px",children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",gutterBottom:!0,children:J("rpm_Repeat")}),(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"mandate.".concat(t,".repeat"),name:"mandate.".concat(t,".repeat"),variant:"outlined",sx:{"&.MuiOutlinedInput-root":{bgcolor:"white"}},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:J("message:rpm_RepeatCourseHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"Daily",children:"Daily"}),(0,Gt.jsx)($m,{value:"Weekly",children:"Weekly"}),(0,Gt.jsx)($m,{value:"None",children:"Does not repeat"})]})]})}),ad.map((e,n)=>{var i;return(0,Gt.jsx)(Gt.Fragment,{children:"Weekly"===r.mandate[t].repeat&&(0,Gt.jsx)(df,{item:!0,mt:4,sx:{"& .MuiCheckbox-root":{p:0}},children:(0,Gt.jsx)(Hz,{as:jC,"data-id":e,checked:null===(i=r.mandate[t].repetition)||void 0===i?void 0:i.includes("".concat(n+1)),"data-day":t,name:"mandate.".concat(t,".repetition"),value:n+1,icon:(0,Gt.jsx)(Vp,{color:"primary",size:"small",variant:"outlined",children:e.name}),checkedIcon:(0,Gt.jsx)(Vp,{color:"primary",size:"small",variant:"contained",children:e.name}),sx:{"& .MuiButton-root":{minWidth:"auto"}}})},e.value)})})]})}),r.mandate.length-1===t&&(0,Gt.jsx)(Eu,{textAlign:"right",sx:{mt:.5},children:(0,Gt.jsx)(Vp,{size:"small",color:"primary",onClick:()=>n({start_time:null,end_time:null,activity_name:null,activity_type:null,repeat:"Daily",repetition:[]}),id:"addNewButton",children:J("rpm_AddNew")})})]})]},t))})}})})]}),(0,Gt.jsxs)(df,{item:!0,xs:12,lg:5,xl:6,children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,children:J("rpm_NotificationsSetting")}),(0,Gt.jsx)(mr,{in:r.enable,children:(0,Gt.jsxs)(Eu,{p:2,pt:3,mt:2.5,mb:3,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",children:[(0,Gt.jsx)(ae,{}),(0,Gt.jsx)(uO,{disabled:!0,sx:{mt:2},label:"Enable Non-Compliance Notification",control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"notification_enabled",name:"notification_enabled"})}),!(null!==X&&void 0!==X&&null!==(t=X.push_notification)&&void 0!==t&&t.non_compliant_user)&&(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",J("message:rpm_notificationSettingMessage"),")"]})})]})}),(0,Gt.jsxs)(Eue,{children:[(0,Gt.jsx)(uO,{label:J("rpm_ReminderNotificationText"),control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"reading_reminder_enabled",name:"reading_reminder_enabled"})}),(0,Gt.jsx)(mr,{in:r.reading_reminder_enabled,children:(0,Gt.jsxs)(Eu,{p:2,pt:3,mt:2.5,mb:3,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",children:[(0,Gt.jsx)(se,{}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(uO,{label:J("rpm_SendPreReminder"),control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"pre_reminder_enabled",name:"pre_reminder_enabled"})}),(null===r||void 0===r?void 0:r.pre_reminder_enabled)&&(0,Gt.jsx)(iw,{children:J("preReminder_helpText")})]}),!(null!==X&&void 0!==X&&null!==(n=X.push_notification)&&void 0!==n&&n.reading_reminder)&&(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(Ym,{variant:"body1",component:"p",color:"red.700",gutterBottom:!0,fontSize:"14px",children:["(",J("message:rpm_notificationSettingMessage"),")"]})})]})}),(0,Gt.jsx)(uO,{label:J("rpm_MissedReading"),control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"missed_reminder_enabled",name:"missed_reminder_enabled"})}),(0,Gt.jsx)(mr,{in:r.missed_reminder_enabled,children:(0,Gt.jsx)(Eu,{p:2,pt:3,mt:2.5,mb:3,bgcolor:"primary.theme.50",borderRadius:1,position:"relative",children:(0,Gt.jsx)(le,{})})}),(0,Gt.jsx)(uO,{label:J("rpm_defaultProgram"),control:(0,Gt.jsx)(Hz,{as:jC,checked:r.def,type:"checkbox",id:"default_mbile_program",name:"default_mbile_program",onChange:()=>o("def",!r.def)})})]})]})]})})]})})})}},"addSchedule_formik")})})]})};var eSe=n(67395);const tSe=function(e){let{handleResetStep:t}=e;const{t:n}=vg(),r=so();return(0,Gt.jsx)(Eu,{sx:{py:10,px:2,mt:4,textAlign:"center",background:"#ffffff"},children:(0,Gt.jsx)(df,{container:!0,justifyContent:"center",children:(0,Gt.jsxs)(df,{item:!0,xs:12,md:7,lg:6,children:[(0,Gt.jsx)(Eu,{mb:2,children:(0,Gt.jsx)(wy,{sx:{bgcolor:"lightGreen.100",width:160,height:160,mx:"auto"},children:(0,Gt.jsx)(eSe.A,{sx:{fontSize:72},color:"success"})})}),(0,Gt.jsx)(Ym,{component:"h3",variant:"h6",color:"success.main",children:"Course with mandate created successfully."}),(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",sx:{mt:2.5,mr:2.5},onClick:()=>r(-1),children:n("rpm_Back")}),(0,Gt.jsx)(Vp,{color:"primary",variant:"contained",disableElevation:!0,sx:{mt:2.5},onClick:t,children:n("rpm_CreateAnotherSchedule")})]})})})};const nSe=function(e){let{activeStep:t,handleNextStep:n,handleBackStep:r,handleResetStep:o,addNewSchedule:a,addNewMandate:s,editSchedule:l,edit:c,scheduleData:d,activeProgram:u,checkState:p,cronExp:h,handleCheckDay:m,convertCronToArr:f,notifications:g,showConfirmModal:v,toggleConfirmModal:x,onContinue:y,defaultCourseName:b}=e;const{t:j}=vg(),[w,_]=(0,We.useState)("");return(0,Gt.jsx)("div",{children:1===t?(0,Gt.jsx)(tSe,{handleResetStep:o}):(0,Gt.jsxs)(We.Fragment,{children:[(C=t,S={activeStep:t,handleNextStep:n,handleBackStep:r,handleResetStep:o,addNewSchedule:a,addNewMandate:s,editSchedule:l,edit:c,scheduleData:d,activeProgram:u,checkState:p,cronExp:h,handleCheckDay:m,convertCronToArr:f,notifications:g},0===C?(0,Gt.jsx)(JCe,(0,i.A)({setSelectedVital:_},S)):0),(0,Gt.jsx)(PU,{openModal:v,onCloseModal:x,actionFunction:()=>y(),options:{primaryText:j("message:rpm_confirmation"),secondaryText:j("message:rpm_defaultProgramConfirm",{program:null===b||void 0===b?void 0:b[(null===d||void 0===d?void 0:d.vital_name)||w]}),btn:{primaryText:j("rpm_continue"),secondaryText:j("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})});var C,S};const rSe=qxe(function(e){let{activeProgram:t,notifications:n}=e;const r=Nt(),o=so(),a=Ct(Nd),{edit:s,type:l,scheduleId:c,programId:d}=lo(),[u,p]=We.useState(0),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState([]),[y,b]=We.useState(""),[j,w]=We.useState(!1),[_,C]=We.useState(null),S=()=>{p(e=>e+1)},A=async(e,t)=>{let n=await(null===e||void 0===e?void 0:e.map(e=>({start_time:sa()(null===e||void 0===e?void 0:e.start_time).subtract(t,"seconds").utc().format("HH:mm"),end_time:sa()(null===e||void 0===e?void 0:e.end_time).utc().format("HH:mm"),repetition:k(e),activity_name:e.activity_name,activity_type:e.activity_type,repeat_type:e.repeat})));return n},k=e=>{let t=[];const n=e.repetition.sort((e,t)=>e-t);if(null===n||void 0===n||n.forEach(e=>{"1"===e&&t.push("SUN"),"2"===e&&t.push("MON"),"3"===e&&t.push("TUE"),"4"===e&&t.push("WED"),"5"===e&&t.push("THU"),"6"===e&&t.push("FRI"),"7"===e&&t.push("SAT")}),"Weekly"!=e.repeat||as(t))return"Daily"==e.repeat?"0 0 0 ? * * *":null;{const e=null===t||void 0===t?void 0:t.join(",");return"0 0 0 ? * ".concat(e," *")}},M=async e=>{var t;let n=null===e||void 0===e||null===(t=e.mandate)||void 0===t?void 0:t.map(e=>({start_time:sa()(null===e||void 0===e?void 0:e.start_time),end_time:sa()(null===e||void 0===e?void 0:e.end_time)})),a=[];a=null===n||void 0===n?void 0:n.map(e=>{const t=sa().duration(e.end_time.diff(e.start_time));return parseInt(t.asSeconds())});const s=e=>e>=600&&e<=10800,l={name:null===e||void 0===e?void 0:e.name,duration:null===e||void 0===e?void 0:e.duration,def:e.def,vital_name:null===e||void 0===e?void 0:e.vital_name,non_compliance:{enabled:null===e||void 0===e?void 0:e.enable,max_strikes:null===e||void 0===e?void 0:e.max_strikes,notification_enabled:null===e||void 0===e?void 0:e.notification_enabled,notification_title:null===e||void 0===e?void 0:e.notification_title,notification_text:null===e||void 0===e?void 0:e.notification_text},mandate_parameters:{timing:await A(null===e||void 0===e?void 0:e.mandate,e.pre_reminder_enabled?60*(null===e||void 0===e?void 0:e.reading_reminder_time):0),reminder_notification:e.reading_reminder_enabled?{notification_enabled:e.reading_reminder_notification_enabled,fallback_text:e.reading_reminder_msg,fallback_title:e.reading_reminder_title,interval:{pre_reminder:e.pre_reminder_enabled?60*(null===e||void 0===e?void 0:e.reading_reminder_time):0,every:60*e.reading_reminder_time,stop_after:e.pre_reminder_enabled?e.reading_reminder_repetition+parseInt(1):e.reading_reminder_repetition}}:null,missed_reading_notification:e.missed_reminder_enabled?{notification_title:e.missed_reminder_title,notification_text:e.missed_reminder_msg}:null}};try{if(a.every(s)){const{data:e}=await r(((e,t)=>async n=>{n(na(!0));const r=(0,i.A)({},t);try{const t="".concat(la.schedules,"/-/").concat(e||"");return await du(t,r)}finally{n(na(!1))}})(d,l));m(e),o(-1),r(Zo({subTitle:"message:rpm_ScheduleCreatedSuccessfully",severity:Bc}))}else r(Zo({subTitle:"error:rpm_SameTimeErr",severity:$c}))}catch(c){const e=ls(c,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_ScheduleCreatedFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_ScheduleCreatedFailed"),severity:$c}))}},O=async e=>{var t;let n=null===e||void 0===e||null===(t=e.mandate)||void 0===t?void 0:t.map(e=>({start_time:sa()(null===e||void 0===e?void 0:e.start_time),end_time:sa()(null===e||void 0===e?void 0:e.end_time)})),i=[];i=null===n||void 0===n?void 0:n.map(e=>{const t=sa().duration(e.end_time.diff(e.start_time));return parseInt(t.asSeconds())});const a=e=>e>=600&&e<=10800,s={name:null===e||void 0===e?void 0:e.name,duration:null===e||void 0===e?void 0:e.duration,def:e.def,vital_name:null===e||void 0===e?void 0:e.vital_name,non_compliance:{enabled:null===e||void 0===e?void 0:e.enable,max_strikes:null===e||void 0===e?void 0:e.max_strikes,notification_enabled:null===e||void 0===e?void 0:e.notification_enabled,notification_title:null===e||void 0===e?void 0:e.notification_title,notification_text:null===e||void 0===e?void 0:e.notification_text},mandate_parameters:{timing:await A(null===e||void 0===e?void 0:e.mandate,e.pre_reminder_enabled?60*e.reading_reminder_time:0),reminder_notification:e.reading_reminder_enabled?{fallback_title:e.reading_reminder_title,fallback_text:e.reading_reminder_msg,interval:{pre_reminder:e.pre_reminder_enabled?60*(null===e||void 0===e?void 0:e.reading_reminder_time):0,every:60*e.reading_reminder_time,stop_after:e.pre_reminder_enabled?e.reading_reminder_repetition+parseInt(1):e.reading_reminder_repetition}}:null,missed_reading_notification:e.missed_reminder_enabled?{notification_title:e.missed_reminder_title,notification_text:e.missed_reminder_msg}:null}};try{if(i.every(a)){const{data:e}=await r(Wxe(d,c,s));m(e),o(-1),r(Zo({subTitle:"message:rpm_ScheduleUpdatedSuccessfully",severity:Bc}))}else r(Zo({subTitle:"error:rpm_SameTimeErr",severity:$c}))}catch(l){const e=ls(l,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_ScheduleUpdateFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_ScheduleUpdateFailed"),severity:$c}))}},T=async(e,t,n)=>{const i=await r((e=>async t=>{t(na(!0));try{const t="".concat(la.schedules,"/-/").concat(e,"/default-courses");return await cu(t,{})}finally{t(na(!1))}})(d));Object.keys(i.data).length>0&&(null===f||void 0===f||!f.def)&&i.data[(null===f||void 0===f?void 0:f.vital_name)||(null===e||void 0===e?void 0:e.vital_name)]&&(null===f||void 0===f?void 0:f.name)!==i.data[(null===f||void 0===f?void 0:f.vital_name)||(null===e||void 0===e?void 0:e.vital_name)]&&e.def?(b(i.data),C({setErrors:t,values:e}),w(!0)):"addType"===n?M(e):O(e)};return We.useEffect(()=>{c&&l&&p(1)},[l,c]),We.useEffect(()=>{a&&d&&c&&s&&(async()=>{try{const e=await r(Uxe(d,c));g(e)}catch(e){console.log(e)}})()},[a,d,c,s]),We.useEffect(()=>{r(w_({activeMenuItem:"schedule_program"}))},[t]),(0,Gt.jsx)(nSe,{activeStep:u,handleNextStep:S,handleBackStep:()=>{p(e=>e-1)},handleResetStep:()=>{p(0)},addNewSchedule:(e,t)=>T(e,t,"addType"),addNewMandate:async(e,t)=>{let{setErrors:n}=t;const a=sa()(e.start_time),s=sa()(e.end_time),l=sa().duration(s.diff(a)),u=Math.ceil(l.asSeconds()),p={start_time:sa()(e.start_time).utc().format("HH:mm"),end_time:sa()(e.end_time).utc().format("HH:mm"),reminder_notification:e.reading_reminder_enabled?{notification_enabled:e.reading_reminder_notification_enabled,fallback_text:e.reading_reminder_msg,fallback_title:e.reading_reminder_title,interval:{every:60*e.reading_reminder_time,stop_after:e.reading_reminder_repetition}}:null,missed_reading_notification:e.missed_reminder_enabled?{notification_title:e.missed_reminder_title,notification_text:e.missed_reminder_msg}:null},m=c||(null===h||void 0===h?void 0:h.id);try{u>3599?(await r(((e,t,n)=>async r=>{r(na(!0));const o=(0,i.A)({},n);try{const n="".concat(la.schedules,"/-/").concat(e||"","/").concat(t||"");return await du(n,o)}finally{r(na(!1))}})(d,m,p)),c?o(-1):S(),r(Zo({subTitle:"message:rpm_MandateCreatedSuccessfully",severity:Bc}))):r(Zo({subTitle:"error:rpm_SameTimeErr",severity:$c}))}catch(f){const e=ls(f,"response.data.field_errors",{}),t=ls(f,"response.data.code","");as(e)?as(t)?r(Zo({subTitle:"error:rpm_TimeOverlappingConflict",severity:$c})):r(Zo({subTitle:bd(t,"error:rpm_TimeOverlappingConflict"),severity:$c})):n(yd(e))}},editSchedule:e=>T(e,{},"editType"),scheduleRes:h,edit:s,scheduleData:f,activeProgram:t,checkState:v,handleCheckDay:e=>{if(Array.isArray(e))return x(e.map(e=>e.toString()));let t=e;v.includes(t)?x(v.filter(e=>e!==t).sort((e,t)=>e-t)):x(e=>e.includes(t)?[...e]:[...e,t].sort((e,t)=>e-t))},convertCronToArr:e=>{var t;const n=[],r=null===e||void 0===e||null===(t=e.split(" ")[5])||void 0===t?void 0:t.split(",");return null===r||void 0===r||r.forEach(e=>{"SUN"===e&&n.push("1"),"MON"===e&&n.push("2"),"TUE"===e&&n.push("3"),"WED"===e&&n.push("4"),"THU"===e&&n.push("5"),"FRI"===e&&n.push("6"),"SAT"===e&&n.push("7")}),n},notifications:n,showConfirmModal:j,toggleConfirmModal:()=>{w(!1)},onContinue:()=>O(_.values,(_.setErrors,_.resetForm)),defaultCourseName:y})});function iSe(){return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Uu,{elevation:0,sx:{p:2.5},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{display:"flex"},children:(0,Gt.jsx)(ZC,{width:51,height:51,variant:"rectangular",sx:{borderRadius:1}})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:{xs:1.5,lg:2.5}},children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:(0,Gt.jsx)(ZC,{width:100})}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:(0,Gt.jsx)(ZC,{})})]})]})})})}const oSe=e=>{const{cx:t,cy:n,fill:r,innerRadius:i,outerRadius:o,startAngle:a,endAngle:s,pieData:l,label:c}=e,d=null===l||void 0===l?void 0:l.reduce((e,t)=>e+t.value,0);return(0,Gt.jsxs)("g",{children:[(0,Gt.jsxs)("text",{x:t,y:n,dy:8,textAnchor:"middle",style:{fontWeight:600},children:[(0,Gt.jsx)("tspan",{x:t,y:n-15,children:d||"NA"}),(0,Gt.jsx)("tspan",{x:t,y:n+15,children:c})]}),(0,Gt.jsx)(Vre,{cx:t,cy:n,innerRadius:i,outerRadius:o,startAngle:a,endAngle:s,fill:r})]})};function aSe(e){let{pieData:t}=e;const n=["#363D9A","#B25C00"],[r,i]=We.useState(0),o=Math.PI/180;return(0,Gt.jsx)(l2,{width:"100%",height:"100%",children:(0,Gt.jsxs)(fde,{width:200,height:200,children:[(0,Gt.jsx)(mde,{data:t,cx:"50%",cy:"50%",innerRadius:60,labelLine:!1,label:e=>{let{cx:t,cy:n,midAngle:r,innerRadius:i,outerRadius:a,percent:s}=e;const l=i+.4*(a-i),c=t+l*Math.cos(-r*o),d=n+l*Math.sin(-r*o);return(0,Gt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>t?"start":"middle",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},fill:"#8884d8",dataKey:"value",stroke:"none",isAnimationActive:!1,activeIndex:r,activeShape:(0,Gt.jsx)(oSe,{pieData:t,label:"Active Courses"}),onClick:e=>(e=>{i(e)})(e.index),children:null===t||void 0===t?void 0:t.map((e,t)=>(0,Gt.jsx)(sre,{fill:n[t%n.length],index:t},"cell-".concat(t)))}),(0,Gt.jsx)(l5,{}),(0,Gt.jsx)(L3,{})]})})}function sSe(e){let{bpAlertCount:t}=e;const n=[{name:"Resolved",value:null===t||void 0===t?void 0:t.bpResolvedCounts},{name:"Active",value:null===t||void 0===t?void 0:t.bpActiveCounts}],r=["#0FAB0F","#D32F2F"],i=Math.PI/180;return(0,Gt.jsx)(l2,{width:"100%",height:"100%",children:(0,Gt.jsxs)(fde,{width:200,height:200,children:[(0,Gt.jsx)(mde,{data:n,cx:"50%",cy:"50%",labelLine:!1,label:e=>{let{cx:t,cy:n,midAngle:r,innerRadius:o,outerRadius:a,percent:s}=e;const l=o+.17*(a-o),c=t+l*Math.cos(-r*i),d=n+l*Math.sin(-r*i);return(0,Gt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>t?"start":"end",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},innerRadius:60,fill:"#8884d8",dataKey:"value",stroke:"none",isAnimationActive:!1,activeIndex:0,activeShape:(0,Gt.jsx)(oSe,{pieData:n,label:"Alerts"}),children:n.map((e,t)=>(0,Gt.jsx)(sre,{fill:r[t%r.length]},"cell-".concat(t)))}),(0,Gt.jsx)(l5,{}),(0,Gt.jsx)(L3,{})]})})}function lSe(e){let{glucoseAlertCount:t}=e;const n=[{name:"Resolved",value:null===t||void 0===t?void 0:t.glucoseResolvedCounts},{name:"Active",value:null===t||void 0===t?void 0:t.glucoseActiveCounts}],r=["#0FAB0F","#D32F2F"],i=Math.PI/180;return(0,Gt.jsx)(l2,{width:"100%",height:"100%",children:(0,Gt.jsxs)(fde,{width:200,height:200,children:[(0,Gt.jsx)(mde,{data:n,cx:"50%",cy:"50%",labelLine:!1,label:e=>{let{cx:t,cy:n,midAngle:r,innerRadius:o,outerRadius:a,percent:s}=e;const l=o+.17*(a-o),c=t+l*Math.cos(-r*i),d=n+l*Math.sin(-r*i);return(0,Gt.jsx)("text",{x:c,y:d,fill:"white",textAnchor:c>t?"start":"end",dominantBaseline:"central",children:"".concat((100*s).toFixed(0),"%")})},innerRadius:60,fill:"#8884d8",dataKey:"value",stroke:"none",isAnimationActive:!1,activeIndex:0,activeShape:(0,Gt.jsx)(oSe,{pieData:n,label:"Alerts"}),children:n.map((e,t)=>(0,Gt.jsx)(sre,{fill:r[t%r.length]},"cell-".concat(t)))}),(0,Gt.jsx)(l5,{}),(0,Gt.jsx)(L3,{})]})})}function cSe(e){let{activeProgram:t,order:n,orderBy:r,setOrder:o,setOrderBy:a,dataParameter:s,headCellsItemCourse:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchPopulationList:h,pageDetails:m,headCellsItems:f,patientList:g,fetchPatientList:v,patientCount:x,patientVitals:y,schedule:b,fetchScheduleList:j,filterState:w,setFilterState:_,highlightedDays:C,handleConfirmModalToggle:S,bpAlertCount:A,glucoseAlertCount:k,searchText:M,setSearchText:O,patientCourseCell:T,fetchPatientCourseLastDate:E,countCompliant:P,countNonCompliant:D}=e;const{t:R}=vg(),[N,L]=We.useState(new Date);return(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:12,xl:12,style:{display:"flex",justifyContent:"flex-end"}}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:12,xl:7,children:[null!==t&&void 0!==t&&t.is_hospital?(0,Gt.jsxs)(Eu,{className:"dashboard-tour-step0",children:[(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,children:null!==x&&void 0!==x&&x.allCount||0===(null===x||void 0===x?void 0:x.allCount)?(0,Gt.jsx)(Uu,{component:Lo,elevation:0,to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients?query=all"),sx:{p:2.5,bgcolor:"primary.theme.50",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",textDecoration:"none"},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{p:1,display:"flex",bgcolor:"primary.theme.100",color:"primary.theme.500",borderRadius:1,"& svg":{width:35,height:35}},children:(0,Gt.jsx)(Ul,{})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:{xs:1.5,lg:2}},children:[(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",fontWeight:600,children:null===x||void 0===x?void 0:x.allCount}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:500,children:R("rpm_ALLPatients")})]})]})}):(0,Gt.jsx)(iSe,{})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,children:P>=0?(0,Gt.jsx)(Uu,{component:Lo,elevation:0,to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patientstatus?query=compliant"),sx:{p:2.5,bgcolor:"green.50",height:"100%",display:"flex",alignItems:"center",textDecoration:"none"},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{p:1,display:"flex",bgcolor:"green.100",color:"green.700",borderRadius:1,"& svg":{width:35,height:35}},children:(0,Gt.jsx)(ql,{})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:{xs:1.5,lg:2}},children:[(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",fontWeight:600,children:P}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:500,children:R("rpm_Compliant")})]})]})}):(0,Gt.jsx)(iSe,{})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,children:D>=0?(0,Gt.jsx)(Uu,{component:Lo,elevation:0,to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patientstatus?query=noncompliant"),sx:{p:2.5,bgcolor:"red.50",height:"100%",display:"flex",alignItems:"center",textDecoration:"none"},children:(0,Gt.jsxs)(Eu,{sx:{display:"flex",alignItems:"center"},children:[(0,Gt.jsx)(Eu,{sx:{p:1,display:"flex",bgcolor:"red.100",color:"red.700",borderRadius:1,"& svg":{width:35,height:35}},children:(0,Gt.jsx)(Gl,{})}),(0,Gt.jsxs)(Eu,{sx:{flexGrow:1,ml:{xs:1.5,lg:2}},children:[(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",fontWeight:600,children:D}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:500,children:R("rpm_NonCompliant")})]})]})}):(0,Gt.jsx)(iSe,{})})]}),(0,Gt.jsxs)(df,{container:!0,spacing:2.5,sx:{mt:.01},children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,children:(0,Gt.jsxs)(Uu,{variant:"outlined",children:[(0,Gt.jsx)(Eu,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:12,sm:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:R("rpm_Vitals")})})})}),(0,Gt.jsx)(Eu,{sx:{p:0,fontSize:"14px"},children:(0,Gt.jsx)(Eu,{sx:{height:"315px",paddingBottom:"8px"},children:null!==y&&void 0!==y&&y.vitalChartData?(0,Jo.isEmpty)(null===y||void 0===y?void 0:y.vitalChartData)?(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",height:"100%",children:(0,Gt.jsx)("img",{src:p,style:{display:"block",margin:"auto",maxHeight:220}})}):(0,Gt.jsx)(aSe,{pieData:y.vitalChartData}):(0,Gt.jsx)(Eu,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,Gt.jsx)(vT,{color:"primary",sx:{m:"auto"}})})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,children:(0,Gt.jsxs)(Uu,{variant:"outlined",children:[(0,Gt.jsx)(Eu,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsxs)(df,{item:!0,xs:12,sm:!0,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:R("rpm_Alerts")})," ",(0,Gt.jsxs)(Ym,{variant:"body2",component:"span",children:["(",R("rpm_bp"),")"]})]})})}),(0,Gt.jsx)(Eu,{sx:{p:0,fontSize:"14px"},children:(0,Gt.jsx)(Eu,{sx:{height:"315px",paddingBottom:"8px"},children:A?(0,Jo.isEmpty)(A)?(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",height:"100%",children:(0,Gt.jsx)("img",{src:p,style:{display:"block",margin:"auto",maxHeight:220}})}):(0,Gt.jsx)(sSe,{bpAlertCount:A}):(0,Gt.jsx)(Eu,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,Gt.jsx)(vT,{color:"primary",sx:{m:"auto"}})})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:4,children:(0,Gt.jsxs)(Uu,{variant:"outlined",children:[(0,Gt.jsx)(Eu,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsxs)(df,{item:!0,xs:12,sm:!0,children:[(0,Gt.jsx)(Ym,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:R("rpm_Alerts")})," ",(0,Gt.jsxs)(Ym,{variant:"body2",component:"span",children:["(",R("rpm_glucose"),")"]})]})})}),(0,Gt.jsx)(Eu,{sx:{p:0,fontSize:"14px"},children:(0,Gt.jsx)(Eu,{sx:{height:"315px",paddingBottom:"8px"},children:k?(0,Jo.isEmpty)(k)?(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",height:"100%",children:(0,Gt.jsx)("img",{src:p,style:{display:"block",margin:"auto",maxHeight:220}})}):(0,Gt.jsx)(lSe,{glucoseAlertCount:k}):(0,Gt.jsx)(Eu,{width:"100%",height:"100%",alignSelf:"center",sx:{display:"flex"},children:(0,Gt.jsx)(vT,{color:"primary",sx:{m:"auto"}})})})})]})})]})]}):(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",height:"486px",children:[(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"},alt:"No Data Found"}),(0,Gt.jsx)(Eu,{px:2,color:"#3f51b5",mt:2,display:"flex",justifyContent:"center",textAlign:"center",children:R("rpm_To_Explore_This")})]})}),(0,Gt.jsxs)(df,{container:!0,spacing:2.5,sx:{mt:.01},children:[!1,(null===t||void 0===t?void 0:t.is_hospital)&&(0,Gt.jsx)(df,{item:!0,xs:!0,md:12,lg:12,children:(0,Gt.jsxs)(Uu,{sx:{height:"486px"},variant:"outlined",className:"dashboard-tour-step2",children:[(0,Gt.jsx)(Eu,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:R("rpm_ALLCourses")})}),(0,Gt.jsx)(df,{item:!0,sm:!0,children:(0,Gt.jsx)(Iz,{initialValues:{courseName:""},children:()=>(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{sx:{borderRadius:"8px",display:"flex",justifyContent:"end"},className:"course_filter",children:(0,Gt.jsx)(Eu,{py:.2,maxWidth:"300px",children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,variant:"outlined",name:"courseName",value:w.courseName,placeholder:R("message:rpm_SearchTital"),onChange:e=>{_(t=>(0,i.A)((0,i.A)({},t),{},{courseName:e.target.value}))},endAdornment:(0,Gt.jsxs)(H_,{position:"end",children:[w.courseName&&(0,Gt.jsx)(Yx,{title:R("rpm_Reset"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",onClick:()=>{m.current_page=1,_({courseName:""}),j({courseName:""})},children:(0,Gt.jsx)(Bw.A,{})})}),(0,Gt.jsx)(Yx,{title:R("rpm_Search"),placement:"top",children:(0,Gt.jsx)(Kp,{type:"submit",size:"small",onClick:()=>{m.current_page=1,j(w)},children:(0,Gt.jsx)(R_.A,{})})})]}),sx:{bgcolor:"white"}})})})})})})]})}),(0,Gt.jsxs)(Eu,{sx:{p:2.5},height:"100%",className:"tabelHeight",children:[(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:o,setOrderBy:a,data:b,headCells:l,dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,className:"theme_scroll",children:null===b||void 0===b?void 0:b.slice(0,4).map(e=>{var n,r;return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/course/").concat(e.id),children:null===e||void 0===e?void 0:e.name})}),(0,Gt.jsx)(rC,{children:null===e||void 0===e||null===(n=e.mandate)||void 0===n||null===(r=n.timing)||void 0===r?void 0:r.length}),(0,Gt.jsx)(rC,{children:R("rpm_".concat(null===e||void 0===e?void 0:e.vital_name))}),(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.duration}),(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.total_patient_attached})]},e.id)})}),(0,Gt.jsx)(Eu,{display:"flex",justifyContent:"end",mt:.4,children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/course"),children:"See All"})})]})]})})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,xl:5,children:(0,Gt.jsxs)(Uu,{sx:{height:"486px"},variant:"outlined",className:"dashboard-tour-step1",children:[(0,Gt.jsx)(Eu,{sx:{px:2.5,py:1.5,bgcolor:"transparent",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"span",fontWeight:600,fontSize:18,children:R("rpm_ALLPatients")})}),(0,Gt.jsx)(df,{item:!0,sm:!0,className:"course_filter",sx:{"& .MuiOutlinedInput-root":{bgcolor:"white"},display:"flex",justifyContent:"end"},children:(0,Gt.jsx)(Eu,{maxWidth:"300px",children:(0,Gt.jsx)(MZ,{fetchListFunction:v,searchText:M,setSearchText:O,pageDetails:m,placeHolder:R("rpm_SearchByName"),searchInField:!0})})})]})}),(0,Gt.jsxs)(Eu,{sx:{p:2.5},height:"100%",className:"tabelHeight",children:[(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:o,setOrderBy:a,data:g,headCells:f,dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:v,pageDetails:m,skeletonVrows:6,stickyHeader:!0,scrollHeight:500,className:"theme_scroll",children:(g||[]).map(e=>(0,Gt.jsxs)(K_,{hover:!0,selected:c.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}},children:[(0,Gt.jsx)(rC,{children:null!==t&&void 0!==t&&t.is_hospital?(0,Gt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients/").concat(e.id,"/dashboard"),children:e.first_name+" "+e.last_name}):(0,Gt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients/").concat(e.id,"/history"),children:e.first_name+" "+e.last_name})}),T(e)]},e.id))}),(0,Gt.jsx)(Eu,{display:"flex",justifyContent:"end",mt:.4,children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients"),children:"See All"})})]})]})})]})})}aSe.defaultProps={pieData:[]},sSe.defaultProps={data:[],bpAlertCount:{}},lSe.defaultProps={data:[],glucoseAlertCount:{}},cSe.defaultProps={headCellsItemsPopCond:[],headCellsItemsOxy:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",headCellsItems:[],patientList:{},fetchPopulationList:()=>{},fetchPatientList:()=>{},patientCount:{},patientVitals:{},schedule:[],fetchScheduleList:()=>{},filterState:{},setFilterState:()=>{},activeProgram:{},highlightedDays:[],handleConfirmModalToggle:()=>{},bpAlertCount:{},glucoseAlertCount:{},searchText:()=>{},setSearchText:()=>{},patientCourseCell:()=>{},fetchPatientCourseLastDate:()=>{},getCsv:()=>{},countCompliant:0,countNonCompliant:0};const dSe=cSe,uSe=["children","onClose"],pSe=e=>{const{children:t,onClose:n}=e,r=Ko(e,uSe);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};const hSe=function(e){let{options:t,date:n,openModal:r,onCloseModal:i,PatientListCompo:o}=e;return(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"md",open:r,onClose:i,scroll:"paper",children:[(0,Gt.jsxs)(pSe,{sx:{px:4},onClose:i,children:[t.primaryText,(null===n||void 0===n?void 0:n.data)&&(0,Gt.jsx)(Ym,{component:"p",variant:"subtitle2",children:sa()(null===n||void 0===n?void 0:n.data).format("DD MMM YYYY")})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsx)(s_,{children:(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Eu,{mb:3,children:(0,Gt.jsx)(o,{})})})})})]})},mSe=["content"],fSe=["content"];function gSe(e){let{activeProgram:t}=e;const n=Nt(),r=Ct(Nd),o=Ct(qd),{enqueueSnackbar:a}=hi(),s=!("true"===ls(o,"user_principal.attributes.skip_tour[0]","")),{t:l}=vg(),[c,d]=We.useState(""),[u,p]=(0,We.useState)("desc"),[h,m]=(0,We.useState)("updated_at"),[f,g]=We.useState(null),[v,x]=(0,We.useState)({}),[y,b]=(0,We.useState)({}),[j,w]=(0,We.useState)([]),[_,C]=(0,We.useState)(null),[S,A]=(0,We.useState)([]),[k,M]=(0,We.useState)([]),[O,T]=(0,We.useState)((0,i.A)({},Fc)),[E,P]=We.useState({courseName:"",vital:"",duration:""}),[D,R]=We.useState({open:!1,data:{}}),[N,L]=We.useState(null),[I,F]=We.useState(null),[$,B]=We.useState(""),[z,H]=We.useState(0),[W,V]=We.useState(0),U=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R((0,i.A)((0,i.A)({},D),{},{open:!D.open,data:e}))},q=e=>{if(Array.isArray(e))return w(e.map(e=>e.toString()));const t=e.target.name;j.includes(t)?w(j.filter(e=>e!==t)):w(e=>[...e,t])},G=e=>e?(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:l("rpm_".concat(e))})}):(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Compliant"})}),Y=[{id:"patient_name",label:l("rpm_PatientName"),isSort:!1,sortProperty:"first_name"},{id:"course",label:l("rpm_Courses"),isSort:!1,sortProperty:"course"},{id:"vital",label:l("rpm_Vital"),isSort:!1,sortProperty:"vital"},{id:"status",label:l("rpm_Status"),isSort:!1,sortProperty:"status"}],Z=[...Y,{id:"dob",label:l("rpm_DOB"),isSort:!0,sortProperty:"dob"},{id:"mobile",label:l("rpm_Mobile"),isSort:!0,sortProperty:"mobile"}],K=[{id:"course",label:l("rpm_Schedule"),isSort:!1,sortProperty:"course"},{id:"mandates",label:l("rpm_Mandates"),isSort:!1,sortProperty:"course"},{id:"vital",label:l("rpm_Vital"),isSort:!1,sortProperty:"vital"},{id:"duration",label:l("rpm_Duration"),isSort:!1,sortProperty:"duration"},{id:"patient",label:l("rpm_PatientsEnrolled"),isSort:!1,sortProperty:"patient"}],X=e=>{var t,n,r;return(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsx)(rC,{children:as(null===e||void 0===e?void 0:e.course_name)?"NA":null===e||void 0===e||null===(t=e.course_name)||void 0===t?void 0:t.map((t,n)=>(0,Gt.jsx)(Ym,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:t},n))}),(0,Gt.jsx)(rC,{children:as(null===e||void 0===e?void 0:e.course_vital)?"NA":null===e||void 0===e||null===(n=e.course_vital)||void 0===n?void 0:n.map((t,n)=>(0,Gt.jsx)(Ym,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:l("rpm_".concat(t))},n))}),(0,Gt.jsx)(rC,{children:as(null===e||void 0===e?void 0:e.course_status)?"NA":null===e||void 0===e||null===(r=e.course_status)||void 0===r?void 0:r.map((t,n)=>(0,Gt.jsx)(Eu,{mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:G(t)},n))})]})},Q=async e=>{try{const{data:r}=await n(Bs((0,i.A)((0,i.A)({sort_by:h,sort_order:u},O),{},{filterState:{patientName:e},program_code:null===t||void 0===t?void 0:t.code}))),o=r||{},{content:a}=o,s=Ko(o,mSe),l=e=>{const t=null===a||void 0===a?void 0:a.map(t=>(0,i.A)((0,i.A)({},t),{},{course_info:as(e[t.id])?[]:e[t.id]})),n=null===t||void 0===t?void 0:t.map(e=>(0,i.A)((0,i.A)({},e),{},{course_name:e.course_info.map(e=>e.course_name),course_vital:e.course_info.map(e=>e.vital_name),course_status:e.course_info.map(e=>e.status)}));g(n)};await ee(a,l),T(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(r){console.log(r)}},J=async e=>{try{const{data:r}=await n(((e,t)=>async n=>{n(na(!0));try{const n="".concat(la.program,"/").concat(e,"/alerts?vital=").concat(t);return await cu(n,{})}catch(r){return r}finally{n(na(!1))}})(null===t||void 0===t?void 0:t.code,e));if("bp"===e){const e=r.all_alerts_count||r.all_resolved_alerts_count?{bpAlertCounts:r.all_alerts_count,bpResolvedCounts:r.all_resolved_alerts_count,bpActiveCounts:r.all_active_alerts_count}:{};L(e)}if("glucose"===e){const e=r.all_alerts_count||r.all_resolved_alerts_count?{glucoseAlertCounts:r.all_alerts_count,glucoseResolvedCounts:r.all_resolved_alerts_count,glucoseActiveCounts:r.all_active_alerts_count}:{};F(e)}}catch(r){console.log(r)}},ee=async(e,r)=>{const i=null===e||void 0===e?void 0:e.map(e=>e.id);try{const{data:e}=await n(Us({patientIds:i,programCode:null===t||void 0===t?void 0:t.code})),o=Object.keys(e).map(t=>{if(!as(e[t]))return{id:t,vital:e[t].map(e=>e.vital_name),course:e[t].map(e=>e.course_name),status:e[t].map(e=>e.status)}}),a=o.filter(e=>{var t;return null===(t=e.vital)||void 0===t?void 0:t.includes("bp")}).length,s=o.filter(e=>{var t;return null===(t=e.vital)||void 0===t?void 0:t.includes("glucose")}).length,c={vitalChartData:a||s?[{name:l("rpm_BloodPressure"),value:a},{name:l("rpm_BloodGlucose"),value:s}]:[]};b(c),r(e)}catch(o){console.log(o)}},te=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E;const r=(0,i.A)({sort_by:h,sort_order:u},O);try{const{data:o}=await n(Vxe(null===t||void 0===t?void 0:t.code,r,e)),a=o||{},{content:s}=a,l=Ko(a,fSe);C(s),T(e=>(0,i.A)((0,i.A)({},e),{},{last_page:l.last_page,current_page:l.current_page,from:l.from,per_page:l.per_page,to:l.to,total:l.total}))}catch(o){console.log(o)}},ne=async e=>{const r={status:e,programId:null===t||void 0===t?void 0:t.code};try{const{data:t}=await n(Vs(r));if("compliant"===e){var i;const e=null===(i=Object.keys(t))||void 0===i?void 0:i.length;V(e)}else{var o;const e=null===(o=Object.keys(t))||void 0===o?void 0:o.length;H(e)}}catch(a){console.log(a)}},re=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=as(e)?sa()().startOf("month").valueOf():e.start_date,i=as(e)?sa()().endOf("month").valueOf():e.end_date;try{var o;const{data:e}=await n(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(la.schedules,"/-/").concat(e,"/expiring-patient-course?startDate=").concat(t,"&endDate=").concat(n);return await cu(r)}finally{r(na(!1))}})(null===t||void 0===t?void 0:t.code,r,i)),a=null===(o=e||[])||void 0===o?void 0:o.map(e=>{if(null!==e.end_date)return sa()(e.end_date).format("DD/MM/YYYY")}).filter(e=>void 0!==e),s=[...new Set(a)];A(s)}catch(a){console.log(a)}};We.useEffect(()=>{n(w_({activeMenuItem:"prog_dashboard"}))},[t]),We.useEffect(()=>{r&&!as(t)&&(Q(),(async()=>{try{const{data:e}=await n(Bs({per_page:99999,program_code:null===t||void 0===t?void 0:t.code})),{content:r}=e||{},i=null===r||void 0===r?void 0:r.filter(e=>{var t;return null===e||void 0===e||null===(t=e.flags)||void 0===t?void 0:t.includes("ACTIVE_ALERTS")}),o=null===r||void 0===r?void 0:r.filter(e=>{var t;return!(null!==e&&void 0!==e&&null!==(t=e.flags)&&void 0!==t&&t.includes("NON_COMPLIANT"))}),a=null===r||void 0===r?void 0:r.filter(e=>{var t;return null===e||void 0===e||null===(t=e.flags)||void 0===t?void 0:t.includes("NON_COMPLIANT")});x({allCount:null===r||void 0===r?void 0:r.length,activeCount:null===o||void 0===o?void 0:o.length,alertCount:null===i||void 0===i?void 0:i.length,nonActiveCount:null===a||void 0===a?void 0:a.length})}catch(e){console.log(e)}})(),te(),J("bp"),J("glucose"),re())},[r,t]),We.useEffect(()=>{r&&!as(t)&&(ne("compliant"),ne("non-compliant"))},[r,t]),We.useEffect(()=>{D.open&&(async()=>{const e=await([{id:1,name:"a"},{id:2,name:"b"}]);M(e)})()},[D]);return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(dSe,{activeProgram:t,order:u,orderBy:h,setOrder:p,setOrderBy:m,dataParameter:"id",checkState:j,onCheck:q,isSelection:!1,nodata:D_,pageDetails:O,patientList:f,headCellsItems:Y,headCellsItemCourse:K,fetchPatientList:Q,getNonComplaints:G,patientCount:v,patientVitals:y,schedule:_,filterState:E,setFilterState:P,fetchScheduleList:te,highlightedDays:S,handleConfirmModalToggle:U,bpAlertCount:N,glucoseAlertCount:I,searchText:$,setSearchText:B,patientCourseCell:X,fetchPatientCourseLastDate:re,countCompliant:W,countNonCompliant:z,getCsv:async()=>{await n(async e=>{try{const e="".concat(ua.medical,"/medicine-info/download-csv"),{data:t}=await cu(e);return void window.open(t)}finally{e(na(!1))}}),a(l("message:rpm_downloadStart"),{variant:"success"})}}),(0,Gt.jsx)(hSe,{date:D,openModal:null===D||void 0===D?void 0:D.open,onCloseModal:U,PatientListCompo:()=>null===f?(0,Gt.jsx)(pS,{}):(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:u,orderBy:h,setOrder:p,setOrderBy:m,data:f,headCells:Z,dataParameter:"id",selected:j,setSelected:q,isSelection:!1,noDataImage:D_,fetchList:Q,pageDetails:O,skeletonVrows:6,stickyHeader:!0,scrollHeight:710,className:"theme_scroll",children:(f||[]).map(e=>(0,Gt.jsxs)(K_,{hover:!0,selected:j.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===t||void 0===t?void 0:t.code,"/patients/").concat(e.id,"/dashboard"),children:e.first_name+" "+e.last_name})}),X(e),(0,Gt.jsx)(rC,{children:e.birth_date}),(0,Gt.jsx)(rC,{children:e.mobile})]},e.id))})}),options:{primaryText:"Showing Data of Date"}}),!as(o)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:s,path:"programDashboardTour",setRenderer:d}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:c})]})]})}gSe.defaultProps={activeProgram:{}};const vSe=gSe,xSe=e=>{let{userData:t,activeProgram:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,headCellsItems:s,initialHeadcells:l,dataParameter:c,checkState:d,onCheck:u,isSelection:p,nodata:h,viewButton:m,patientList:f,patientCourseCell:g,getPatientList:v}=e;const{t:x}=vg(),y=so(),b=[{name:x("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===n||void 0===n?void 0:n.display_name,url:""}];return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:b})}),(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:x("rpm_Patients")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,color:"primary",onClick:()=>y("/rpm/program/".concat(n.code,"/patients")),children:x("rpm_AllPatients")})})]})})]}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:f,headCells:null===s||void 0===s?void 0:s.filter(e=>l.includes(e.id)),dataParameter:c,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:v,skeletonVrows:6,className:"theme_scroll",children:Array.isArray(f)&&(null===f||void 0===f?void 0:f.map(e=>{const{years:r}=hs(null===e||void 0===e?void 0:e.birth_date);return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[(null===l||void 0===l?void 0:l.includes("patient_name"))&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(n.code,"/patients/").concat(e.patient_id,"/dashboard"),children:e.first_name+" "+e.last_name})}),l.includes("email")&&(0,Gt.jsxs)(rC,{width:300,children:[" ",(0,Gt.jsx)(Lo,{to:"mailto:".concat(e.email),children:e.email})]}),l.includes("age")&&(0,Gt.jsxs)(rC,{width:300,children:[" ",r||"NA"]}),l.includes("mobile_no")&&(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.mobile)||"NA"}),g(e),(0,Gt.jsx)(rC,{children:(null===t||void 0===t?void 0:t.showViewPatientBtn)&&m(e)})]},null===e||void 0===e?void 0:e.patient_id)}))})})})})]})},ySe=e=>{let{activeProgram:t}=e;const{t:n}=vg(),r=Nt(),i=so(),o=Ct(Nd),[a,s]=We.useState(null),{query:l}=vs(),[c,d]=(0,We.useState)("desc"),[u,p]=(0,We.useState)("created_at"),[h,m]=(0,We.useState)([]),f=[{id:"patient_name",label:n("rpm_PatientName"),isSort:!0,sortProperty:"first_name"},{id:"email",label:n("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"age",label:n("rpm_Age"),isSort:!0,sortProperty:"dob"},{id:"mobile_no",label:n("rpm_MobileNumber"),isSort:!0,sortProperty:"mobile_no"},{id:"courses",label:n("rpm_Schedules"),isSort:!0,sortProperty:"courses"},{id:"vital",label:n("rpm_Vitals"),isSort:!0,sortProperty:"vital"},{id:"compliance",label:n("rpm_Status"),isSort:!0,sortProperty:"compliance"},{id:"actions",label:n("rpm_Actions"),isSort:!1,sortProperty:"actions"}],[g,v]=We.useState(as($o.getHeadCellsPatient())?["patient_name","email","age","mobile_no","courses","vital","compliance","actions"]:$o.getHeadCellsPatient()),x=async e=>{const n={status:e,programId:null===t||void 0===t?void 0:t.code};try{const{data:e}=await r(Vs(n)),t=[];Object.keys(e).forEach(n=>{const r=e[n];t.push(r)});const i=(e=>{const t=new Map,n=e=>{if(e&&e.patient_id){const{patient_id:n,schedules:r,non_compliance_info:i}=e;t.has(n)||t.set(n,{patient_id:n,first_name:e.first_name,last_name:e.last_name,mobile:e.mobile,birth_date:e.birth_date,email:e.email,schedule_name:[],schedule_vital:[],schedule_status:[]});const o=(null===r||void 0===r?void 0:r.name)||"NA",a=(null===r||void 0===r?void 0:r.vital)||"NA",s=(null===i||void 0===i?void 0:i.status)||"NA",l=t.get(n);l.schedule_name.push(o),l.schedule_vital.push(a),l.schedule_status.push(s)}};return e.forEach(e=>{Array.isArray(e)?e.forEach(e=>{n(e)}):n(e)}),Array.from(t.values())})(t);s(i)}catch(i){console.log(i)}},y=e=>"NON_COMPLIANT"===e?(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:n("rpm_".concat(e))})}):(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:n("rpm_Compliant")})});return We.useEffect(()=>{r(w_({activeMenuItem:"all_patients"}))},[t]),We.useEffect(()=>{o&&!as(t)&&x(l)},[o,t]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(xSe,{userData:null===t||void 0===t?void 0:t.permissions,headCellsItems:f,setHeadcells:function(e){v(e),$o.setHeadCellsPatient(e)},initialHeadcells:g,activeProgram:t,order:c,orderBy:u,setOrder:d,setOrderBy:p,dataParameter:"id",checkState:h,onCheck:e=>{if(Array.isArray(e))return m(e.map(e=>e));const t=e.target.name;h.includes(t)?m(h.filter(e=>e!==t)):m(e=>[...e,t])},isSelection:!1,nodata:D_,viewButton:e=>(0,Gt.jsx)(Yx,{title:n("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.patient_id,color:"primary",onClick:()=>i("/rpm/program/".concat(t.code,"/patients/").concat(e.patient_id,"/dashboard")),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),patientList:a,patientCourseCell:e=>{var t,r,i;return(0,Gt.jsxs)(We.Fragment,{children:[g.includes("courses")&&(0,Gt.jsx)(rC,{children:as(null===e||void 0===e?void 0:e.schedule_name)?"NA":null===e||void 0===e||null===(t=e.schedule_name)||void 0===t?void 0:t.map((t,n)=>(0,Gt.jsx)(Ym,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.schedule_name.length)-1&&.5,children:t},n))}),g.includes("vital")&&(0,Gt.jsx)(rC,{children:as(null===e||void 0===e?void 0:e.schedule_vital)?"NA":null===e||void 0===e||null===(r=e.schedule_vital)||void 0===r?void 0:r.map((t,r)=>(0,Gt.jsx)(Ym,{variant:"body2",mt:r===(null===e||void 0===e?void 0:e.schedule_vital.length)-1&&.5,children:n("rpm_".concat(t))},r))}),g.includes("compliance")&&(0,Gt.jsx)(rC,{children:as(null===e||void 0===e?void 0:e.schedule_status)?"NA":null===e||void 0===e||null===(i=e.schedule_status)||void 0===i?void 0:i.map((t,n)=>(0,Gt.jsx)(Eu,{mt:n===(null===e||void 0===e?void 0:e.schedule_status.length)-1&&.5,children:y(t)},n))})]})},getPatientList:x})})};function bSe(e){var t,n,r,i,o,a,s,l,c;let{activeProgram:d,addNotifications:u,notifications:p}=e;const{t:h}=vg(),m=[{name:h("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===d||void 0===d?void 0:d.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===d||void 0===d?void 0:d.code,"/patients")},{name:h("rpm_Notifications"),url:""}],f={otp_notifications:!0,email_reading_reminder:!1,email_missed_mandate:!1,email_non_compliant_user:!1,push_reading_reminder:null===p||void 0===p||null===(t=p.push_notification)||void 0===t?void 0:t.reading_reminder,push_missed_mandate:null===p||void 0===p||null===(n=p.push_notification)||void 0===n?void 0:n.missed_mandate,push_non_compliant_user:!1,course:null===p||void 0===p||null===(r=p.push_notification)||void 0===r?void 0:r.course,prescriptions:!(null===d||void 0===d||!d.is_hospital)&&(null===p||void 0===p||null===(i=p.push_notification)||void 0===i?void 0:i.prescriptions),medical_history:null===p||void 0===p||null===(o=p.push_notification)||void 0===o?void 0:o.medical_history,rule:!(null===d||void 0===d||!d.is_hospital)&&(null===p||void 0===p||null===(a=p.push_notification)||void 0===a?void 0:a.rule),profile:null===p||void 0===p||null===(s=p.push_notification)||void 0===s?void 0:s.profile,notes:!(null===d||void 0===d||!d.is_hospital)&&(null===p||void 0===p||null===(l=p.push_notification)||void 0===l?void 0:l.notes),welcome_message:null===p||void 0===p||null===(c=p.whatsapp_notification)||void 0===c?void 0:c.welcome_message};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(_xe,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:m})}),(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsx)(Iz,{initialValues:f,onSubmit:u,enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(_xe,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",gutterBottom:!0,fontWeight:500,m:0,children:h("rpm_Notifications")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:h("rpm_Save")})})]})})})}),(0,Gt.jsxs)(uH,{sx:{py:0},children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,py:2,children:[(0,Gt.jsx)(df,{item:!0,xs:4,children:(0,Gt.jsx)(Ym,{fontWeight:600,children:h("rpm_SMSNotifications")})}),(0,Gt.jsxs)(df,{item:!0,xs:8,children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",disabled:t.otp_notifications,id:"otp_notifications",name:"otp_notifications"}),label:h("rpm_OTPLogin"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_OTPLoginDescription")})]})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(df,{container:!0,spacing:2,py:2,children:[(0,Gt.jsx)(df,{item:!0,xs:4,children:(0,Gt.jsx)(Ym,{fontWeight:600,children:h("rpm_EmailNotifications")})}),(0,Gt.jsxs)(df,{item:!0,xs:8,children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,disabled:!0,type:"checkbox",id:"email_reading_reminder",name:"email_reading_reminder"}),label:h("rpm_ReadingReminder"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_EmailReadingReminderDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,disabled:!0,type:"checkbox",id:"email_missed_mandate",name:"email_missed_mandate"}),label:h("rpm_MissedMandate"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_EmailMissedMandateDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,disabled:!0,type:"checkbox",id:"email_non_compliant_user",name:"email_non_compliant_user"}),label:h("rpm_NonCompliantUser"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_EmailNonCompliantUserDescription")})]})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(df,{container:!0,spacing:2,py:2,children:[(0,Gt.jsx)(df,{item:!0,xs:4,children:(0,Gt.jsx)(Ym,{fontWeight:600,children:h("rpm_PushNotifications")})}),(0,Gt.jsxs)(df,{item:!0,xs:8,children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"push_reading_reminder",name:"push_reading_reminder"}),label:h("rpm_ReadingReminder"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_PushReadingReminderDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"push_missed_mandate",name:"push_missed_mandate"}),label:h("rpm_MissedMandate"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_PushMissedMandateDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,disabled:!0,type:"checkbox",id:"push_non_compliant_user",name:"push_non_compliant_user"}),label:h("rpm_NonCompliantUser"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_PushNonCompliantUserDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"course",name:"course"}),label:h("rpm_Schedule"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_ScheduleDescription")}),(null===d||void 0===d?void 0:d.is_hospital)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"prescriptions",name:"prescriptions"}),label:h("rpm_prescription"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_PrescriptionDescription")})]}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"medical_history",name:"medical_history"}),label:h("rpm_MedicalHistory"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_MedicalHistoryDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"profile",name:"profile"}),label:h("rpm_Profile"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_ProfileDescription")}),(null===d||void 0===d?void 0:d.is_hospital)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"rule",name:"rule"}),label:h("rpm_Rule"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_RuleDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"notes",name:"notes"}),label:h("rpm_Notes"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_NotesDescription")})]})]})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(df,{container:!0,spacing:2,py:2,children:[(0,Gt.jsx)(df,{item:!0,xs:4,children:(0,Gt.jsx)(Ym,{fontWeight:600,children:h("rpm_WhatsappNotifications")})}),(0,Gt.jsxs)(df,{item:!0,xs:8,children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"welcome_message",name:"welcome_message"}),label:h("rpm_WhatsappNotifications"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_WhatsappDescription")})]})]})]})]})})}},"email_notifications")})]})}function jSe(e){var t,n,r,i,o,a,s,l,c;let{activeProgram:d,addNotifications:u,notifications:p}=e;const{t:h}=vg(),m=[{name:h("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===d||void 0===d?void 0:d.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===d||void 0===d?void 0:d.code,"/patients")},{name:h("rpm_Notifications"),url:""}],f={otp_notifications:!0,email_reading_reminder:!1,email_missed_mandate:!1,email_non_compliant_user:!1,push_reading_reminder:null===p||void 0===p||null===(t=p.push_notification)||void 0===t?void 0:t.reading_reminder,push_missed_mandate:null===p||void 0===p||null===(n=p.push_notification)||void 0===n?void 0:n.missed_mandate,push_non_compliant_user:!1,course:null===p||void 0===p||null===(r=p.push_notification)||void 0===r?void 0:r.course,prescriptions:null===p||void 0===p||null===(i=p.push_notification)||void 0===i?void 0:i.prescriptions,medical_history:null===p||void 0===p||null===(o=p.push_notification)||void 0===o?void 0:o.medical_history,rule:null===p||void 0===p||null===(a=p.push_notification)||void 0===a?void 0:a.rule,profile:null===p||void 0===p||null===(s=p.push_notification)||void 0===s?void 0:s.profile,notes:null===p||void 0===p||null===(l=p.push_notification)||void 0===l?void 0:l.notes,welcome_message:null===p||void 0===p||null===(c=p.whatsapp_notification)||void 0===c?void 0:c.welcome_message};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(_xe,{mb:2.5,display:"flex",alignItems:"center",children:[(0,Gt.jsx)(kH,{labels:m}),(0,Gt.jsx)(Ym,{variant:"h6",gutterBottom:!0,fontWeight:500,m:0,children:h("rpm_Notifications")})]}),(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsx)(Iz,{initialValues:f,onSubmit:u,enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50",textAlign:"end"},title:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:h("rpm_Save")})})}),(0,Gt.jsxs)(uH,{sx:{py:0},children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,py:2,children:[(0,Gt.jsx)(df,{item:!0,xs:4,children:(0,Gt.jsx)(Ym,{fontWeight:600,children:h("rpm_SMSNotifications")})}),(0,Gt.jsxs)(df,{item:!0,xs:8,children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",disabled:t.otp_notifications,id:"otp_notifications",name:"otp_notifications"}),label:h("rpm_OTPLogin"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_OTPLoginDescription")})]})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(df,{container:!0,spacing:2,py:2,children:[(0,Gt.jsx)(df,{item:!0,xs:4,children:(0,Gt.jsx)(Ym,{fontWeight:600,children:h("rpm_EmailNotifications")})}),(0,Gt.jsxs)(df,{item:!0,xs:8,children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,disabled:!0,type:"checkbox",id:"email_reading_reminder",name:"email_reading_reminder"}),label:h("rpm_ReadingReminder"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_EmailReadingReminderDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,disabled:!0,type:"checkbox",id:"email_missed_mandate",name:"email_missed_mandate"}),label:h("rpm_MissedMandate"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_EmailMissedMandateDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,disabled:!0,type:"checkbox",id:"email_non_compliant_user",name:"email_non_compliant_user"}),label:h("rpm_NonCompliantUser"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_EmailNonCompliantUserDescription")})]})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(df,{container:!0,spacing:2,py:2,children:[(0,Gt.jsx)(df,{item:!0,xs:4,children:(0,Gt.jsx)(Ym,{fontWeight:600,children:h("rpm_PushNotifications")})}),(0,Gt.jsxs)(df,{item:!0,xs:8,children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"push_reading_reminder",name:"push_reading_reminder"}),label:h("rpm_ReadingReminder"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_PushReadingReminderDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"push_missed_mandate",name:"push_missed_mandate"}),label:h("rpm_MissedMandate"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_PushMissedMandateDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,disabled:!0,type:"checkbox",id:"push_non_compliant_user",name:"push_non_compliant_user"}),label:h("rpm_NonCompliantUser"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_PushNonCompliantUserDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"course",name:"course"}),label:h("rpm_Schedule"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_ScheduleDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"prescriptions",name:"prescriptions"}),label:h("rpm_prescription"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_PrescriptionDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"medical_history",name:"medical_history"}),label:h("rpm_MedicalHistory"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_MedicalHistoryDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"profile",name:"profile"}),label:h("rpm_Profile"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_ProfileDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"rule",name:"rule"}),label:h("rpm_Rule"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_RuleDescription")}),(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"notes",name:"notes"}),label:h("rpm_Notes"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_NotesDescription")})]})]}),(0,Gt.jsx)(Af,{}),(0,Gt.jsxs)(df,{container:!0,spacing:2,py:2,children:[(0,Gt.jsx)(df,{item:!0,xs:4,children:(0,Gt.jsx)(Ym,{fontWeight:600,children:h("rpm_WhatsappNotifications")})}),(0,Gt.jsxs)(df,{item:!0,xs:8,children:[(0,Gt.jsx)(uO,{required:!0,control:(0,Gt.jsx)(Hz,{as:jC,type:"checkbox",id:"welcome_message",name:"welcome_message"}),label:h("rpm_WhatsappNotifications"),sx:{"& .MuiFormControlLabel-label":{fontWeight:"600"}}}),(0,Gt.jsx)(Ym,{pl:3.5,pb:1,children:h("rpm_WhatsappDescription")})]})]})]})]})})}},"email_notifications")})]})}bSe.defaultProps={activeProgram:{},notifications:{},addNotifications:()=>{}},jSe.defaultProps={activeProgram:{},notifications:{},addNotifications:()=>{}};const wSe=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=Nt(),[i,o]=We.useState({}),a=Ct(Nd),s=async()=>{try{const{data:e}=await r(Tg(null===t||void 0===t?void 0:t.code));o(e)}catch(e){console.log(e)}},l=async e=>{const n={email_notification:{reading_reminder:e.email_reading_reminder,missed_mandate:e.email_missed_mandate,non_compliant_user:e.email_non_compliant_user},push_notification:{reading_reminder:e.push_reading_reminder,missed_mandate:e.push_missed_mandate,non_compliant_user:e.push_non_compliant_user,course:e.course,prescriptions:e.prescriptions,medical_history:e.medical_history,rule:e.rule,profile:e.profile,notes:e.notes},whatsapp_notification:{welcome_message:e.welcome_message}};try{await r(Og(null===t||void 0===t?void 0:t.code,n)),s(),r(Zo({subTitle:"message:rpm_SettingsSavedSuccessfully",severity:Bc}))}catch(i){console.log(i)}};return We.useEffect(()=>{a&&t&&s()},[a,t]),We.useEffect(()=>{r(w_({activeMenuItem:"notifications"}))},[]),(0,Gt.jsx)("div",{children:n>=575?(0,Gt.jsx)(bSe,{activeProgram:t,addNotifications:l,notifications:i}):(0,Gt.jsx)(jSe,{activeProgram:t,addNotifications:l,notifications:i})})},_Se=e=>{let{fetchListFunction:t,filterState:n,setFilterState:r,pageDetails:o,setShowFilterColor:a}=e;const{t:s}=vg();return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Iz,{initialValues:{start_date:null,end_date:null,patientName:""},enableReinitialize:!0,children:()=>(0,Gt.jsx)(Wz,{children:(0,Gt.jsx)(Eu,{className:"WhiteBG prescription-tour-step0",sx:{borderRadius:"8px"},children:(0,Gt.jsxs)(df,{container:!0,alignItems:"center",spacing:1,className:"patients-tour-step2",children:[(0,Gt.jsx)(df,{item:!0,md:3,lg:3,className:"smallWebFont",children:(0,Gt.jsx)(Hz,{as:Rj,fullWidth:!0,size:"small",variant:"outlined",name:"patientName",value:n.patientName,placeholder:s("message:rpm_SearchName"),onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{patientName:e.target.value}))},endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"8px"},children:(0,Gt.jsx)(Yx,{title:s("message:rpm_SearchProgramFilterBar"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0}})})}),sx:{bgcolor:"white",paddingRight:"0"}})}),(0,Gt.jsx)(df,{item:!0,md:6,lg:6,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",className:"followUpfilter",children:[(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800],fontSize:12,transform:"translate(14px, 11px)"},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),mx:1,children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"From",name:"start_date",value:n.start_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{start_date:e}))}})})}),(0,Gt.jsx)(Eu,{className:"DatepickerForm",sx:e=>({"& .MuiFormControl-root":{display:"flex"},"& .MuiFormLabel-root":{color:e.palette.grey[800],fontSize:12,transform:"translate(14px, 11px)"},"& .MuiFormLabel-root.MuiInputLabel-shrink":{transform:"translate(15px, -8px)",fontSize:12}}),ml:1,children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nR,size:"small",label:"To",name:"end_date",value:n.end_date,renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({},e)),minDate:null!==n&&void 0!==n&&n.start_date?null===n||void 0===n?void 0:n.start_date:new Date,onChange:e=>{r(t=>(0,i.A)((0,i.A)({},t),{},{end_date:e}))}})})})]})}),(0,Gt.jsx)(df,{item:!0,md:3,lg:3,children:(0,Gt.jsxs)(Eu,{py:.5,sx:{whiteSpace:"nowrap"},children:[(0,Gt.jsx)(Vp,{variant:"contained",disableElevation:!0,sx:{ml:2},onClick:()=>{o.current_page=1,t(n),null===n.start_date&&null===n.start_date&&""===n.patientName||a(!0)},children:s("rpm_ApplyFilters")}),(0,Gt.jsx)(Vp,{variant:"text",disableElevation:!0,onClick:()=>{o.current_page=1,r({event_id:"",start_date:null,end_date:null,patientName:"",username:"",service_code:"",program:null,description:""}),t({event_id:"",start_date:null,end_date:null,patientName:"",username:"",service_code:"",program:null,description:""}),a(!1)},type:"reset",children:(0,Gt.jsx)(Bw.A,{})})]})})]})})})})})},CSe=e=>{let{activeProgram:t,getFollowUps:n,pageDetails:r,order:i,orderBy:o,checkState:a,isSelection:s,nodata:l,followups:c,dataParameter:d,initialHeadcells:u,onCheck:p,followUpHead:h,setHeadcells:m,setOrder:f,settingModal:g,handleSettingModalToggle:v,setOrderBy:x,filterState:y,setFilterState:b,showFilterColor:j,setShowFilterColor:w,viewButton:_}=e;const{t:C}=vg(),S=Nt(),A=lo(),[k,M]=We.useState(!1),O=[{name:C("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===t||void 0===t?void 0:t.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===t||void 0===t?void 0:t.code,"/patients")},{name:C("rpm_FollowUp"),url:""}];return We.useEffect(()=>{const e={breadcrumb:O};as(t)||S(w_(e))},[t]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:O})}),(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,Gt.jsx)(df,{item:!0,sx:{paddingTop:"0"},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:C("rpm_FollowUp")})})})]}),(0,Gt.jsx)(Eu,{bgcolor:"white",p:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,sx:{alignItems:{lg:"center",sm:"flex-start"}},children:[(0,Gt.jsx)(df,{item:!0,lg:11,xl:8,md:12,sm:10,xs:10,className:"followUp-tour-step0",children:(0,Gt.jsx)(_Se,{onApply:()=>{M(!k)},fetchListFunction:n,filterState:y,setFilterState:b,pageDetails:r,showFilterColor:j,setShowFilterColor:w})}),(0,Gt.jsx)(df,{item:!0,ml:"auto",sm:2,xs:2,children:(0,Gt.jsx)(Eu,{pt:.5,textAlign:"end",children:(0,Gt.jsx)(Yx,{title:C("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:v,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,Gt.jsx)(EM,{order:i,orderBy:o,setOrder:f,setOrderBy:x,data:as(c)?[]:c,headCells:null===h||void 0===h?void 0:h.filter(e=>null===u||void 0===u?void 0:u.includes(e.id)),dataParameter:d,selected:a,setSelected:p,isSelection:s,noDataImage:l,fetchList:n,pageDetails:r,skeletonVrows:6,className:"theme_scroll",children:null===c||void 0===c?void 0:c.map(e=>{var t,n,r,i,o,l,c,d;const h=null===e||void 0===e||null===(t=e.patient)||void 0===t||null===(n=t.program)||void 0===n?void 0:n.find(e=>A.programId===e);return(0,Gt.jsxs)(K_,{className:"followUp-tour-step1",children:[s&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:p,checked:a.includes(e.consultation_id),name:e.consultation_id,color:"primary"})}),u.includes("patient")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{to:"/rpm/program/".concat(h,"/patients/").concat(null===e||void 0===e||null===(r=e.patient)||void 0===r?void 0:r.id,"/dashboard"),children:(null===e||void 0===e||null===(i=e.patient)||void 0===i?void 0:i.first_name)+" "+(null===e||void 0===e||null===(o=e.patient)||void 0===o?void 0:o.last_name)})}),u.includes("mobile")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e||null===(l=e.patient)||void 0===l?void 0:l.mobile}),u.includes("date")&&(0,Gt.jsx)(rC,{children:cs(null===e||void 0===e||null===(c=e.follow_up)||void 0===c?void 0:c.date)?"NA":sa()(null===e||void 0===e||null===(d=e.follow_up)||void 0===d?void 0:d.date).format("DD-MM-YYYY")}),u.includes("consultation_start_date")&&(0,Gt.jsx)(rC,{children:cs(null===e||void 0===e?void 0:e.consultation_start_date)?"NA":sa()(null===e||void 0===e?void 0:e.consultation_start_date).format("DD-MM-YYYY")}),u.includes("consultation_end_date")&&(0,Gt.jsx)(rC,{children:cs(null===e||void 0===e?void 0:e.consultation_end_date)?"NA":sa()(null===e||void 0===e?void 0:e.consultation_end_date).format("DD-MM-YYYY")}),u.includes("status")&&(0,Gt.jsx)(rC,{children:e.status?(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Active"})}):(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Inactive"})})}),u.includes("action")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Eu,{className:"program-tour-step1",width:"fit-content",children:_(e)})})]},e.consultation_id)})})]}),(0,Gt.jsx)(IO,{pageDetails:r,fetchListFunction:n}),(0,Gt.jsx)(fO,{open:g,allHeadCells:h,initialHeadcells:u,setHeadcells:m,onClose:v})]})},SSe=e=>{let{activeProgram:t,getFollowUps:n,pageDetails:r,order:i,orderBy:o,checkState:a,isSelection:s,nodata:l,followups:c,dataParameter:d,initialHeadcells:u,onCheck:p,followUpHead:h,setHeadcells:m,setOrder:f,settingModal:g,handleSettingModalToggle:v,setOrderBy:x,filterState:y,setFilterState:b,showFilterColor:j,setShowFilterColor:w,viewButton:_}=e;const{t:C}=vg(),S=Nt(),[A,k]=We.useState(!1),M=[{name:C("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===t||void 0===t?void 0:t.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===t||void 0===t?void 0:t.code,"/patients")},{name:C("rpm_FollowUp"),url:""}];return We.useEffect(()=>{const e={breadcrumb:M};as(t)||S(w_(e))},[t]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",children:[(0,Gt.jsx)(kH,{labels:M}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"block",md:"none"}},children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:C("rpm_FollowUp")})})]}),(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,Gt.jsx)(df,{item:!0,sx:{paddingTop:"0",display:{xs:"none",sm:"none",md:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:C("rpm_FollowUp")})})})]}),(0,Gt.jsx)(Eu,{bgcolor:"white",p:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,sx:{alignItems:{lg:"center",sm:"flex-start"}},children:[(0,Gt.jsx)(df,{item:!0,lg:11,xl:8,md:12,sm:10,xs:10,children:(0,Gt.jsx)(_Se,{onApply:()=>{k(!A)},fetchListFunction:n,filterState:y,setFilterState:b,pageDetails:r,showFilterColor:j,setShowFilterColor:w})}),(0,Gt.jsx)(df,{item:!0,ml:"auto",sm:2,xs:2,children:(0,Gt.jsx)(Eu,{pt:.5,textAlign:"end",children:(0,Gt.jsx)(Yx,{title:C("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:v,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,Gt.jsx)(EM,{order:i,orderBy:o,setOrder:f,setOrderBy:x,data:as(c)?[]:c,headCells:null===h||void 0===h?void 0:h.filter(e=>null===u||void 0===u?void 0:u.includes(e.id)),dataParameter:d,selected:a,setSelected:p,isSelection:s,noDataImage:l,fetchList:n,pageDetails:r,skeletonVrows:6,className:"theme_scroll",children:null===c||void 0===c?void 0:c.map(e=>{var t,n,r,i,o,l,c;return(0,Gt.jsxs)(K_,{className:"program-tour-step0",children:[s&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:p,checked:a.includes(e.consultation_id),name:e.consultation_id,color:"primary"})}),u.includes("patient")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{to:"/rpm/program/".concat(null===(t=e.patient)||void 0===t?void 0:t.program,"/patients/").concat(null===e||void 0===e||null===(n=e.patient)||void 0===n?void 0:n.id,"/dashboard"),children:(null===e||void 0===e||null===(r=e.patient)||void 0===r?void 0:r.first_name)+" "+(null===e||void 0===e||null===(i=e.patient)||void 0===i?void 0:i.last_name)})}),u.includes("mobile")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e||null===(o=e.patient)||void 0===o?void 0:o.mobile}),u.includes("date")&&(0,Gt.jsx)(rC,{children:cs(null===e||void 0===e||null===(l=e.follow_up)||void 0===l?void 0:l.date)?"NA":sa()(null===e||void 0===e||null===(c=e.follow_up)||void 0===c?void 0:c.date).format("DD-MM-YYYY")}),u.includes("consultation_start_date")&&(0,Gt.jsx)(rC,{children:cs(null===e||void 0===e?void 0:e.consultation_start_date)?"NA":sa()(null===e||void 0===e?void 0:e.consultation_start_date).format("DD-MM-YYYY")}),u.includes("consultation_end_date")&&(0,Gt.jsx)(rC,{children:cs(null===e||void 0===e?void 0:e.consultation_end_date)?"NA":sa()(null===e||void 0===e?void 0:e.consultation_end_date).format("DD-MM-YYYY")}),u.includes("status")&&(0,Gt.jsx)(rC,{children:e.status?(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Active"})}):(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Inactive"})})}),u.includes("action")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Eu,{className:"program-tour-step1",width:"fit-content",children:_(e)})})]},e.consultation_id)})})]}),(0,Gt.jsx)(IO,{pageDetails:r,fetchListFunction:n}),(0,Gt.jsx)(fO,{open:g,allHeadCells:h,initialHeadcells:u,setHeadcells:m,onClose:v})]})},ASe=["content"],kSe=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=Nt(),o=Ct(qd),a=P_(BA().breakpoints.down("sm")),{t:s}=vg(),l=Ct(Nd),c=Ct(Gd),d=so(),[u,p]=We.useState(""),h=!("true"===ls(o,"user_principal.attributes.skip_tour[0]","")),[m,f]=We.useState(!1),[g,v]=We.useState([]),[x,y]=We.useState(!1),[b,j]=We.useState([]),[w,_]=We.useState("desc"),[C,S]=We.useState("event_time"),[A,k]=We.useState({start_date:null,end_date:null,patientName:""}),[M,O]=We.useState((0,i.A)({},Fc)),{programId:T}=lo(),[E,P]=We.useState(!1),D=a?["patient","action"]:["patient","mobile","date","consultation_start_date","consultation_end_date","status","action"],[R,N]=We.useState(as($o.getFollowupCell())?D:$o.getFollowupCell()),L=function(e){N(e),$o.setFollowupCell(e)},I=[{id:"patient",label:s("rpm_Patient"),isSort:!1,sortProperty:"patient"},{id:"mobile",label:s("rpm_Mobile"),isSort:!1,sortProperty:"mobile"},{id:"date",label:s("rpm_FollowUpDate"),isSort:!1,sortProperty:"date"},{id:"consultation_start_date",label:s("rpm_StartDate"),isSort:!1,sortProperty:"consultation_start_date"},{id:"consultation_end_date",label:s("rpm_EndDate"),isSort:!1,sortProperty:"consultation_end_date"},{id:"status",label:s("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"action",label:s("rpm_Actions"),isSort:!1,sortProperty:"action"}],F=e=>{var t,n;const r=null===e||void 0===e||null===(t=e.patient)||void 0===t||null===(n=t.program)||void 0===n?void 0:n.find(e=>T===e);return(0,Gt.jsx)(Yx,{title:s("rpm_ViewConsultation"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>{var t;return d("/rpm/program/".concat(r,"/patients/").concat(null===e||void 0===e||null===(t=e.patient)||void 0===t?void 0:t.id,"/consultations/").concat(null===e||void 0===e?void 0:e.consultation_id))},children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})})},$=()=>{y(!x)},B=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A;const t=(0,i.A)({sort_by:C,sort_order:w},M);try{const n=await r(((e,t,n)=>async r=>{r(na(!0));try{const r="".concat(ua.medical,"/").concat(n||"","/followUp-report?&start=").concat(null!==t&&void 0!==t&&t.start_date?sa()(t.start_date).startOf("day").valueOf():"","&end=").concat(null!==t&&void 0!==t&&t.end_date?sa()(t.end_date).endOf("day").valueOf():"","&patient=").concat((null===t||void 0===t?void 0:t.patientName)||"","&page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"");return await cu(r,{})}catch(i){return i}finally{r(na(!1))}})(t,e,T)),{data:o}=n||{},a=o||{},{content:s}=a,l=Ko(a,ASe);j(s),O(e=>(0,i.A)((0,i.A)({},e),{},{last_page:null===l||void 0===l?void 0:l.last_page,current_page:null===l||void 0===l?void 0:l.current_page,from:null===l||void 0===l?void 0:l.from,per_page:null===l||void 0===l?void 0:l.per_page,to:null===l||void 0===l?void 0:l.to,total:null===l||void 0===l?void 0:l.total}))}catch(n){console.log(n)}},z=e=>{if(Array.isArray(e))return v(e.map(e=>e.toString()));const t=e.target.name;g.includes(t)?v(g.filter(e=>e!==t)):v(e=>[...e,t])};return We.useEffect(()=>{L(D)},[a]),We.useEffect(()=>{r(w_({activeMenuItem:"followup"}))},[]),We.useEffect(()=>{l&&B()},[l]),(0,Gt.jsxs)("div",{children:[n>=575?(0,Gt.jsx)(CSe,{activeProgram:t,getFollowUps:B,order:w,orderBy:C,allPrograms:c,followups:b,initialHeadcells:R,followUpHead:I,setHeadcells:L,setOrder:_,setOrderBy:S,filterState:A,setFilterState:k,showFilterColor:E,setShowFilterColor:P,pageDetails:M,isSelection:!1,handleSettingModalToggle:$,dataParameter:"id",checkState:g,onCheck:z,nodata:fwe,detailsTab:m,setDetailsTab:f,settingModal:x,viewButton:F}):(0,Gt.jsx)(SSe,{activeProgram:t,getFollowUps:B,order:w,orderBy:C,allPrograms:c,followups:b,initialHeadcells:R,followUpHead:I,setHeadcells:L,setOrder:_,setOrderBy:S,filterState:A,setFilterState:k,showFilterColor:E,setShowFilterColor:P,pageDetails:M,isSelection:!1,handleSettingModalToggle:$,dataParameter:"id",checkState:g,onCheck:z,nodata:fwe,detailsTab:m,setDetailsTab:f,settingModal:x,viewButton:F}),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:h,path:"followUpTour",setRenderer:p}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:u})]})]})},MSe=["children","onClose"],OSe=e=>{const{children:t,onClose:n}=e,r=Ko(e,MSe);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};function TSe(e){let{openModal:t,onCloseModal:n,addNewPatient:r,states:o,countries:a,fetchStates:s}=e;const{t:l}=vg(),c=Ct(Id),[d,u]=We.useState(null);return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(Kw,{fullWidth:!0,maxWidth:"sm",open:t,onClose:n,children:(0,Gt.jsx)(Iz,{initialValues:{first_name:"",last_name:"",email:"",birth_date:null,age:"",mobile:"",device:"",observer:"",gender:"",country:"",country_code:"+91",state:"",city:"",address:""},validationSchema:vV.addNewPatient,onSubmit:d?()=>{}:r,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:r,setFieldTouched:d}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsx)(OSe,{sx:{px:4},onClose:n,children:l("rpm_AddNewPatient")}),(0,Gt.jsx)(s_,{sx:{p:4},dividers:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"first_name",required:!0,sx:{mb:.75},children:l("rpm_FirstName")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"first_name",name:"first_name",size:"small",color:"primary",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_FirstNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"first_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_FirstName")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"last_name",required:!0,sx:{mb:.75},children:l("rpm_LastName")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"last_name",name:"last_name",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_LastNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"last_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_LastName")})})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[(0,Gt.jsx)(qj,{htmlFor:"mobile",required:!0,sx:{mb:.75},children:l("rpm_CountryCode")}),(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",optionId:"phoneCode",name:"country_code",options:a,browserAutocomplete:!1,valueKey:"phoneCode",nameKey:"phoneCode",variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:l("message:rpm_CountryCodeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"country_code",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_CountryCode")})})})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,sx:{flexDirection:"row"},children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"mobile",required:!0,sx:{mb:.75},children:l("rpm_Mobile")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"mobile",name:"mobile",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_MobileHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"mobile",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_Mobile")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"age",required:!0,sx:{mb:.75},children:l("rpm_Age")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"age",name:"age",color:"primary",size:"small",onChange:async e=>{const n=parseInt(e.target.value,10);if(isNaN(n)||""===e.target.value.trim())return await r("age",e.target.value),void await r("birth_date",new Date);if(await r("age",n),n>0){let e=sa()(t.birth_date);e.isValid()||(e=sa()().month(0).date(1)),await r("birth_date",sa()().month(e.month()).date(e.date()).subtract(n,"years").valueOf()),await d("birth_date",!0)}},endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_AgeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"age",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_Age")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsxs)(qj,{sx:{display:"flex",alignItems:"center"},htmlFor:"birth_date",children:[l("rpm_DOB"),(0,Gt.jsx)(Eu,{marginLeft:"2px",display:"flex",marginTop:"-0.8px",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_DOBHelp"),placement:"top",children:(0,Gt.jsx)(JO.A,{sx:{width:"18px",height:"18px"}})})})]}),(0,Gt.jsx)(Eu,{mt:.5,sx:{"& .MuiFormControl-root":{width:"100%"}},children:(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{fullWidth:!0,as:nR,size:"small",id:"birth_date",name:"birth_date",maxDate:new Date,value:t.birth_date,onChange:e=>{var t;r("age",null===(t=Es(e))||void 0===t?void 0:t.toString()),r("birth_date",e),d("age",!0)},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{size:"small"})),inputFormat:"dd/MM/yyyy",defaultCalendarMonth:ps(18,11,31),onError:e=>u(e)})})}),(0,Gt.jsx)(Xz,{name:"birth_date",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_DOB")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"email",sx:{mb:.75},children:l("rpm_Email")}),(0,Gt.jsx)(Hz,{type:"email",fullWidth:!0,as:Rj,id:"email",name:"email",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_EmailHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"email",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_Email")})})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,md:6,children:[(0,Gt.jsx)(qj,{htmlFor:"gender",sx:{mb:.75},children:l("rpm_Gender")}),(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"gender",name:"gender",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:l("message:rpm_GenderHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:Object.values(Kc).map(e=>(0,Gt.jsx)($m,{value:e,children:l("rpm_".concat(e))},e))})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"address",sx:{mb:.75},children:l("rpm_Address")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"address",name:"address",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_AddressHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"country",required:!0,sx:{mb:.75},children:l("rpm_ProgramCountry")}),(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"country",optionId:"isoCode",name:"country",options:a,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{r("state",""),s(t||"IN")},variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:l("message:rpm_PatientCountryHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"country",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_ProgramCountry")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"state",required:!0,sx:{mb:.75},children:l("rpm_ProgramState")}),(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"state",optionId:"isoCode",name:"state",options:o,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:l("message:rpm_PatientStateHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"state",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_ProgramState")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"city",required:!0,sx:{mb:.75},children:l("rpm_ProgramCity")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"city",name:"city",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_ProgramCityHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"city",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_ProgramCity")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{mb:.5,children:[(0,Gt.jsx)(qj,{htmlFor:"observer",sx:{mb:.75},children:l("rpm_Observer")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"observer",name:"observer",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:l("message:rpm_ObserverHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"observer",children:e=>(0,Gt.jsx)(iw,{error:!0,children:l(e,{field:l("rpm_Observer")})})})]})})]})}),(0,Gt.jsx)(iO,{sx:{py:3,px:4},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:n,children:l("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(CT,{loading:c,color:"primary",disableElevation:!0,variant:"contained",type:"submit",children:l("rpm_Submit")})})]})})]})})}},"patient_formik")})})}function ESe(){return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(aH,{variant:"outlined",sx:{height:"100%"},children:[(0,Gt.jsx)(WH,{avatar:(0,Gt.jsx)(wy,{"aria-label":"Avatar",children:(0,Gt.jsx)(ZC,{width:40,height:40,variant:"circular"})}),action:(0,Gt.jsx)(ZC,{}),title:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{width:"60px"},children:(0,Gt.jsx)(ZC,{})}),subheader:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",gutterBottom:!0,sx:{width:"100px"},children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(Ym,{variant:"body2",component:"p",gutterBottom:!0,children:(0,Gt.jsx)(ZC,{})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsxs)(uH,{children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:(0,Gt.jsx)(ZC,{})})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(ZC,{})})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:(0,Gt.jsx)(ZC,{})})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:(0,Gt.jsx)(ZC,{})})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:(0,Gt.jsx)(ZC,{})})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},children:[(0,Gt.jsx)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.4},children:(0,Gt.jsx)(ZC,{})}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:(0,Gt.jsx)(ZC,{})})})]})]})]})]})})}const PSe=function(e){let{nodata:t,patientList:n,fetchPatientList:r,pageDetails:i,moreOptions:o,getFlags:a,getNonCompliants:s,getReadingColor:l,patientVitals:c}=e;const{t:d}=vg();return null===n?[1,2,3,4].map(e=>(0,Gt.jsx)(df,{item:!0,md:4,lg:3,children:(0,Gt.jsx)(ESe,{})},e)):(0,Gt.jsx)(Gt.Fragment,{children:(null===n||void 0===n?void 0:n.length)>0?(0,Gt.jsxs)(Gt.Fragment,{children:[null===n||void 0===n?void 0:n.map(e=>{var t;return(0,Gt.jsx)(df,{item:!0,md:4,lg:4,className:"customGrid",children:(0,Gt.jsxs)(aH,{variant:"outlined",sx:{height:"100%"},children:[(0,Gt.jsx)(WH,{avatar:(0,Gt.jsx)(wy,{sx:{bgcolor:"secondary.main"},"aria-label":"recipe",children:e.first_name.charAt(0).toLocaleUpperCase()}),action:o(e),title:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:e.first_name+" "+e.last_name}),subheader:(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",gutterBottom:!0,children:[d("rpm_Mobile"),": ",e.mobile]}),s(e)]}),sx:{py:1.5,bgcolor:"primary.theme.50",alignItems:"flex-start"}}),(0,Gt.jsxs)(uH,{children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_DateOfBirth")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.5},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:e.birth_date})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Flags")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.5},children:a(e)})]}),e.last_vital_frames.length?null===(t=e.last_vital_frames)||void 0===t?void 0:t.map(t=>{var n,r,i,o,a,s,u;return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Systolic")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.5},children:(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:l(t,"systolic")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==t&&void 0!==t&&null!==(n=t.values)&&void 0!==n&&n.systolic?null===t||void 0===t||null===(r=t.values)||void 0===r?void 0:r.systolic:"-"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Diastolic")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.5},children:(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:l(t,"diastolic")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==t&&void 0!==t&&null!==(i=t.values)&&void 0!==i&&i.diastolic?null===t||void 0===t||null===(o=t.values)||void 0===o?void 0:o.diastolic:"-"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Pulse")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.5},children:(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:l(t,"pulse")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==t&&void 0!==t&&null!==(a=t.values)&&void 0!==a&&a.pulse?null===t||void 0===t||null===(s=t.values)||void 0===s?void 0:s.pulse:"-"})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},sx:{mb:2},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_Vitals")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.5},children:(0,Gt.jsx)(Eu,{sx:{flex:.5},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:c(e)})})})]}),(0,Gt.jsxs)(JM,{flexDirection:{xs:"column",lg:"row"},gap:{xs:1,lg:2},alignItems:{xs:"left",lg:"center"},children:[(0,Gt.jsxs)(Ym,{variant:"body2",component:"p",fontWeight:600,sx:{flex:.5},children:[d("rpm_RecordedOn")," :"]}),(0,Gt.jsx)(Eu,{sx:{flex:.5},children:(0,Gt.jsx)(Ym,{variant:"body2",component:"p",children:ta()(null===e||void 0===e?void 0:e.last_vital_frames)?"NA":null===e||void 0===e||null===(u=e.last_vital_frames[0])||void 0===u?void 0:u.ts})})]})]},e.id)}):(0,Gt.jsx)(Eu,{sx:{height:"100px",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:600,children:"No Last Records"})})]})]})},e.id)}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(IO,{pageDetails:i,fetchListFunction:r})})]}):(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6},children:(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",children:(0,Gt.jsx)("img",{src:t,style:{display:"block",margin:"auto"}})})})})})};const DSe=function(e){let{userData:t,patientList:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,initialHeadcells:l,headCellsItems:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchPatientList:m,pageDetails:f,viewButton:g,deleteButton:v,moreOptions:x,activeProgram:y,patientCourseCell:b}=e;return(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:n,headCells:c.filter(e=>l.includes(e.id)),dataParameter:s,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:(n||[]).map(e=>{const{years:n}=hs(null===e||void 0===e?void 0:e.birth_date);return(0,Gt.jsxs)(K_,{hover:!0,selected:d.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:u,checked:d.includes(e.id.toString()),name:e.id,color:"primary"})}),l.includes("patient_name")&&(0,Gt.jsx)(rC,{children:null!==y&&void 0!==y&&y.is_hospital?(0,Gt.jsx)(Lo,{className:"linkClr",to:"".concat(e.id,"/dashboard"),children:e.first_name+" "+e.last_name}):(0,Gt.jsx)(Lo,{className:"linkClr",to:"".concat(e.id,"/history"),children:e.first_name+" "+e.last_name})}),l.includes("email")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{to:"mailto:".concat(e.email),children:e.email})}),l.includes("age")&&(0,Gt.jsx)(rC,{children:n}),l.includes("mobile_no")&&(0,Gt.jsx)(rC,{children:e.mobile}),l.includes("providers")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Lo,{className:"linkClr",to:"/rpm/program/".concat(null===y||void 0===y?void 0:y.code,"/providers/").concat(null===e||void 0===e?void 0:e.id),children:"Click Here"})}),b(e),l.includes("actions")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Eu,{className:"patients-tour-step3",width:"fit-content",children:[(null===t||void 0===t?void 0:t.showViewPatientBtn)&&g(e),!1,x(e)]})})]},e.id)})})}),(0,Gt.jsx)(IO,{pageDetails:f,fetchListFunction:m})]})},RSe=["children","onClose"],NSe=e=>{const{children:t,onClose:n}=e,r=Ko(e,RSe);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{paddingY:"13px",fontWeight:600}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:16,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))},LSe=e=>{var t;let{openModal:n,onCloseModal:r,order:o,orderBy:a,setOrder:s,setOrderBy:l,initialHeadcells:c,checkState:d,onCheck:u,nodata:p,fetchAllPatients:h,allPatients:m,isSelection:f,dataParameter:g,newHeadCellsItems:v,newFilterState:x,setNewFilterState:y,newPageDetails:b,addButton:j,setAllPatients:w}=e;const{t:_}=vg(),C=()=>{b.current_page=1,as(x.patientName)||h({patientName:x.patientName})},S=()=>{b.current_page=1,y({patientName:"",userMoBile:""}),w([])};return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"md",open:n,onClose:()=>{S(),r()},children:[(0,Gt.jsx)(NSe,{onClose:()=>{S(),r()},children:_("rpm_AllUsersList")}),(0,Gt.jsx)(s_,{sx:{padding:"24px"},dividers:!0,children:(0,Gt.jsxs)(df,{container:!0,alignItems:"center",width:"100%",children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{display:{xs:"block",sm:"flex"},justifyContent:"space-between",alignItems:"center",width:"100%",textAlign:{xs:"center",sm:"unset"},children:[(0,Gt.jsx)(Eu,{mb:{xs:1,sm:0},children:(0,Gt.jsx)(Eu,{fontSize:"16px",color:"#111827",fontWeight:500,children:_("rpm_PleaseProvideMoblieNumber")})}),(0,Gt.jsxs)(Eu,{py:.2,display:"flex",alignItems:"center",gap:1,children:[(0,Gt.jsx)(Rj,{sx:{flex:1,padding:"2px 14px 2px 0px",width:"310px"},fullWidth:!0,size:"small",placeholder:_("rpm_Enter_Mobile_Number_to_Search"),value:null===x||void 0===x?void 0:x.patientName,onChange:e=>{const t=e.target.value.replace(/[^0-9+]/g,"");y((0,i.A)((0,i.A)({},x),{},{patientName:t}))},onKeyPress:e=>{var t;"Enter"===e.key&&(null===x||void 0===x||null===(t=x.patientName)||void 0===t?void 0:t.replace(/\D/g,"").length)>=6&&C()},inputProps:{maxLength:20},endAdornment:(0,Gt.jsxs)(H_,{position:"end",children:[!as(null===x||void 0===x?void 0:x.patientName)&&(0,Gt.jsx)(Bw.A,{sx:{cursor:"pointer"},type:"reset",fontSize:"small",onClick:S}),(0,Gt.jsx)(Yx,{title:_("message:rpm_SearchUserNumber"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]})}),(0,Gt.jsx)(Vp,{variant:"contained",onClick:C,disabled:!(null!==x&&void 0!==x&&x.patientName)||(null===x||void 0===x||null===(t=x.patientName)||void 0===t?void 0:t.replace(/\D/g,"").length)<6,sx:{borderRadius:"22px",minWidth:"0px",padding:"12px 12px"},children:(0,Gt.jsx)(Dc,{})})]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{mt:3,children:(0,Gt.jsx)(EM,{order:o,orderBy:a,setOrder:s,setOrderBy:l,data:m,headCells:v.filter(e=>c.includes(e.id)),dataParameter:g,selected:d,setSelected:u,isSelection:f,noDataImage:p,fetchList:h,newPageDetails:b,skeletonVrows:6,className:"theme_scroll all-user-list",stickyHeader:!0,scrollHeight:"400px",children:null===m||void 0===m?void 0:m.map(e=>(0,Gt.jsxs)(K_,{hover:!0,selected:d.includes(null===e||void 0===e?void 0:e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[c.includes("patient_name")&&(0,Gt.jsx)(rC,{children:Ds(null===e||void 0===e?void 0:e.first_name)+" "+Ds(null===e||void 0===e?void 0:e.last_name)}),c.includes("email")&&(0,Gt.jsx)(rC,{children:Ps(null===e||void 0===e?void 0:e.email)}),c.includes("mobile_no")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.mobile}),c.includes("actions")&&(0,Gt.jsx)(rC,{children:j(e)})]},null===e||void 0===e?void 0:e.id))})})})]})})]})})};function ISe(e){var t,n,r,i;let{userData:o,activeProgram:a,devicesList:s,patientList:l,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,headCellsItems:f,setHeadcells:g,checkState:v,onCheck:x,isSelection:y,nodata:b,fetchPatientList:j,pageDetails:w,viewButton:_,deleteButton:C,multiDeletePatient:S,moreOptions:A,moreMenu:k,openFilter:M,patientModalOpen:O,viewMode:T,settingModal:E,handlePatientModalToggle:P,handleSettingModalToggle:D,getStatus:R,getNonCompliants:N,getFlags:L,getReadings:I,getReadingColor:F,addNewPatient:$,setSearchDevice:B,getPatientVitals:z,filterState:H,setFilterState:W,patientCourseCell:V,states:U,countries:q,fetchStates:G,patientSuggestions:Y,fetchPatientListSuggestions:Z,fetchAllPatients:K,handleViewPatientModalToggle:X,patientViewModalOpen:Q,allPatients:J,setAllPatients:ee,newHeadCellsItems:te,fetchAllPatientsListSuggestions:ne,allpatientSuggestions:re,addButton:ie,newFilterState:oe,setNewFilterState:ae,newPageDetails:se}=e;const{t:le}=vg(),ce=[{name:le("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===a||void 0===a?void 0:a.display_name,url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:ce})}),(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:le("rpm_Patients")})}),(null===a||void 0===a||null===(t=a.permissions)||void 0===t?void 0:t.showAllPatientListText)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Lo,{onClick:X,className:(null===a||void 0===a||null===(n=a.permissions)||void 0===n?void 0:n.showAllPatientListText)&&"patients-tour-step2",children:(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:500,component:"span",fontSize:14,children:le("rpm_ViewAllPatient")})})}),(null===a||void 0===a||null===(r=a.permissions)||void 0===r?void 0:r.showAddPatientBtn)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:P,className:(null===a||void 0===a||null===(i=a.permissions)||void 0===i?void 0:i.showAddPatientBtn)&&"patients-tour-step1",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:le("rpm_AddPatient")})]})})]})}),(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(mr,{in:M,children:(0,Gt.jsx)(Uu,{elevation:0,sx:{p:1},children:(0,Gt.jsxs)(df,{container:!0,alignItems:"center",spacing:2,children:[(0,Gt.jsx)(df,{item:!0,lg:7,md:9,xs:10,sm:10,children:(0,Gt.jsx)(bue,{pageDetails:w,fetchListFunction:j,filterState:H,setFilterState:W,patientSuggestions:Y,fetchPatientListSuggestions:Z,placeholder:"Search by name or phone number"})}),(0,Gt.jsxs)(df,{container:!0,item:!0,lg:5,md:3,sm:2,xs:2,justifyContent:"flex-end",children:["list"===T&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:le("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:D,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),v.length>0&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:le("rpm_Delete"),children:(0,Gt.jsx)(Kp,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>S(v,{}),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})})})}),"grid"===T?(0,Gt.jsx)(PSe,{userData:o,nodata:b,patientList:l,fetchPatientList:j,pageDetails:w,moreOptions:A,getStatus:R,getFlags:L,getReadingColor:F,getNonCompliants:N,getPatientVitals:z}):m.length>0&&(0,Gt.jsx)(DSe,{userData:o,patientList:l,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,headCellsItems:f,checkState:v,onCheck:x,isSelection:y,nodata:b,fetchPatientList:j,pageDetails:w,viewButton:_,deleteButton:C,moreOptions:A,getStatus:R,getNonCompliants:N,getFlags:L,getReadings:I,getPatientVitals:z,patientCourseCell:V,activeProgram:a})]}),k,(0,Gt.jsx)(LSe,{activeProgram:a,openModal:Q,onCloseModal:X,fetchAllPatients:K,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,onCheck:x,nodata:b,allPatients:J,headCellsItems:f,checkState:v,newHeadCellsItems:te,newFilterState:oe,setNewFilterState:ae,fetchAllPatientsListSuggestions:ne,allpatientSuggestions:re,addButton:ie,newPageDetails:se,setAllPatients:ee}),(0,Gt.jsx)(TSe,{activeProgram:a,openModal:O,onCloseModal:P,addNewPatient:$,devicesList:s,setSearchDevice:B,states:U,countries:q,fetchStates:G}),(0,Gt.jsx)(fO,{open:E,allHeadCells:f,initialHeadcells:m,setHeadcells:g,onClose:D})]})}ISe.defaultProps={headCellsItems:[],initialHeadcells:[],setHeadcells:()=>{},pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientList:[],devicesList:[],fetchPatientList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},multiDeletePatient:()=>{},patientCount:{},flag:"",programList:[],setSearchDevice:()=>{},getNonCompliants:()=>{},getPatientVitals:()=>{},getPatientActiveCourse:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},fetchProgramScheduleList:()=>{},patientCourseCell:()=>{},programSchedule:[],states:[],countries:[],fetchStates:()=>{},patientSuggestions:[],fetchPatientListSuggestions:()=>{},fetchAllPatients:()=>{},handleViewPatientModalToggle:()=>{},allPatients:[],fetchAllPatientsListSuggestions:()=>{},allpatientSuggestions:[],addButton:()=>{},newFilterState:{},setNewFilterState:()=>{},setAllPatients:()=>{},newPageDetails:{}};const FSe=ISe;var $Se=n(71723);const BSe=["children","onClose"],zSe=e=>{const{children:t,onClose:n}=e,r=Ko(e,BSe);return(0,Gt.jsxs)(n_,(0,i.A)((0,i.A)({sx:{m:0,p:2}},r),{},{children:[t,n?(0,Gt.jsx)(Kp,{"aria-label":"close",onClick:n,sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,Gt.jsx)(Bw.A,{})}):null]}))};function HSe(e){let{disabledButton:t,openModal:n,onCloseModal:r,patientInfo:o,activeProgram:a,allPrograms:s,setTransferProgram:l,transferPatient:c,setSearchProgram:d}=e;const{t:u}=vg(),p=Ct(Id);return(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsxs)(Kw,{fullWidth:!0,maxWidth:"sm",open:n,onClose:r,children:[(0,Gt.jsx)(zSe,{sx:{px:4},onClose:r,children:u("rpm_TransferProgram")+" "+"(".concat(null===o||void 0===o?void 0:o.first_name,"  ").concat(null===o||void 0===o?void 0:o.last_name,")")}),(0,Gt.jsx)(s_,{sx:{p:4},dividers:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,sm:12,md:5,children:[(0,Gt.jsx)(qj,{htmlFor:"program",sx:{mb:.75},children:"Current Program"}),null===a||void 0===a?void 0:a.display_name]}),(0,Gt.jsx)(df,{item:!0,sm:12,md:1,children:(0,Gt.jsx)(Eu,{mt:4,children:(0,Gt.jsx)($Se.A,{})})}),(0,Gt.jsxs)(df,{item:!0,sm:12,md:6,children:[(0,Gt.jsx)(qj,{htmlFor:"first_name",sx:{mb:.75},children:"Transfer To"}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"course",name:"course",options:as(s)?[]:s.filter(e=>(null===e||void 0===e?void 0:e.code)!==(null===a||void 0===a?void 0:a.code)),isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>null===e||void 0===e?void 0:e.display_name,renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.code}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:t.display_name})})),onChange:(e,t)=>{l(null===t||void 0===t?void 0:t.code)},onInputChange:(e,t)=>{d(t?{programName:t}:{programName:""})},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:u("rpm_SearchProgram")+"..."}))})})]})]})}),(0,Gt.jsx)(iO,{sx:{py:3,px:4},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:!0}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{color:"primary",variant:"outlined",onClick:r,children:u("rpm_Cancel")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(CT,{loading:p,color:"primary",disableElevation:!0,variant:"contained",type:"submit",disabled:t,onClick:()=>c(o),children:u("rpm_Transfer")})})]})})]})})}function WSe(e){var t,n,r,i;let{userData:o,activeProgram:a,devicesList:s,patientList:l,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,headCellsItems:f,setHeadcells:g,checkState:v,onCheck:x,isSelection:y,nodata:b,fetchPatientList:j,pageDetails:w,viewButton:_,deleteButton:C,multiDeletePatient:S,moreOptions:A,moreMenu:k,openFilter:M,patientModalOpen:O,viewMode:T,settingModal:E,handlePatientModalToggle:P,handleSettingModalToggle:D,getStatus:R,getNonCompliants:N,getFlags:L,getReadings:I,getReadingColor:F,addNewPatient:$,setSearchDevice:B,getPatientVitals:z,filterState:H,setFilterState:W,patientCourseCell:V,states:U,countries:q,fetchStates:G,patientSuggestions:Y,fetchPatientListSuggestions:Z,fetchAllPatients:K,handleViewPatientModalToggle:X,patientViewModalOpen:Q,allPatients:J,newHeadCellsItems:ee,fetchAllPatientsListSuggestions:te,allpatientSuggestions:ne,addButton:re,newFilterState:ie,setNewFilterState:oe,newPageDetails:ae}=e;const{t:se}=vg(),le=[{name:se("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===a||void 0===a?void 0:a.display_name,url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",alignItems:"center",children:[(0,Gt.jsx)(kH,{labels:le}),(0,Gt.jsx)(Ym,{variant:"h6",gutterBottom:!0,component:"h6",sx:{marginBottom:"0"},children:se("rpm_Patients")})]}),(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(null===a||void 0===a||null===(t=a.permissions)||void 0===t?void 0:t.showAllPatientListText)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Lo,{onClick:X,className:(null===a||void 0===a||null===(n=a.permissions)||void 0===n?void 0:n.showAllPatientListText)&&"patients-tour-step1",children:(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:500,component:"span",fontSize:14,children:se("rpm_ViewAllPatient")})})}),(null===a||void 0===a||null===(r=a.permissions)||void 0===r?void 0:r.showAddPatientBtn)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:P,className:(null===a||void 0===a||null===(i=a.permissions)||void 0===i?void 0:i.showAddPatientBtn)&&"patients-tour-step1",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:se("rpm_AddPatient")})]})})]})}),(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(mr,{in:M,children:(0,Gt.jsx)(Uu,{elevation:0,sx:{p:1},children:(0,Gt.jsxs)(df,{container:!0,alignItems:"center",spacing:2,children:[(0,Gt.jsx)(df,{item:!0,lg:7,md:9,xs:10,sm:10,className:"patients-tour-step0",children:(0,Gt.jsx)(bue,{pageDetails:w,fetchListFunction:j,filterState:H,setFilterState:W,patientSuggestions:Y,fetchPatientListSuggestions:Z,placeholder:"Search by name or phone number"})}),(0,Gt.jsxs)(df,{container:!0,item:!0,lg:5,md:3,sm:2,xs:2,justifyContent:"flex-end",children:["list"===T&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:se("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:D,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),v.length>0&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:se("rpm_Delete"),children:(0,Gt.jsx)(Kp,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>S(v,{}),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})})})}),"grid"===T?(0,Gt.jsx)(PSe,{userData:o,nodata:b,patientList:l,fetchPatientList:j,pageDetails:w,moreOptions:A,getStatus:R,getFlags:L,getReadingColor:F,getNonCompliants:N,getPatientVitals:z}):m.length>0&&(0,Gt.jsx)(DSe,{userData:o,patientList:l,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,headCellsItems:f,checkState:v,onCheck:x,isSelection:y,nodata:b,fetchPatientList:j,pageDetails:w,viewButton:_,deleteButton:C,moreOptions:A,getStatus:R,getNonCompliants:N,getFlags:L,getReadings:I,getPatientVitals:z,patientCourseCell:V})]}),k,(0,Gt.jsx)(LSe,{activeProgram:a,openModal:Q,onCloseModal:X,fetchAllPatients:K,order:c,orderBy:d,setOrder:u,setOrderBy:p,dataParameter:h,initialHeadcells:m,onCheck:x,nodata:b,allPatients:J,headCellsItems:f,checkState:v,newHeadCellsItems:ee,newFilterState:ie,setNewFilterState:oe,fetchAllPatientsListSuggestions:te,allpatientSuggestions:ne,addButton:re,newPageDetails:ae}),(0,Gt.jsx)(TSe,{activeProgram:a,openModal:O,onCloseModal:P,addNewPatient:$,devicesList:s,setSearchDevice:B,states:U,countries:q,fetchStates:G}),(0,Gt.jsx)(fO,{open:E,allHeadCells:f,initialHeadcells:m,setHeadcells:g,onClose:D})]})}WSe.defaultProps={headCellsItems:[],initialHeadcells:[],setHeadcells:()=>{},pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientList:[],devicesList:[],fetchPatientList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},multiDeletePatient:()=>{},patientCount:{},flag:"",programList:[],setSearchDevice:()=>{},getNonCompliants:()=>{},getPatientVitals:()=>{},getPatientActiveCourse:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},fetchProgramScheduleList:()=>{},patientCourseCell:()=>{},programSchedule:[],states:[],countries:[],fetchStates:()=>{},patientSuggestions:[],fetchPatientListSuggestions:()=>{},fetchAllPatients:()=>{},handleViewPatientModalToggle:()=>{},allPatients:[],fetchAllPatientsListSuggestions:()=>{},allpatientSuggestions:[],addButton:()=>{},newFilterState:{},setNewFilterState:()=>{},newPageDetails:{}};const VSe=WSe,USe=["content"],qSe=["content"],GSe=["content"];const YSe=function(e){var t,n,r,o,a,s,l,c,d;let{activeProgram:u}=e;const p=window.innerWidth,h=Nt(),m=Ct(Nd),f=Ct(qd),g=!("true"===ls(f,"user_principal.attributes.skip_tour[0]","")),{t:v}=vg(),x=so(),{enqueueSnackbar:y}=hi(),{programList:b}=(0,We.useContext)(j_),{programId:j}=lo(),{query:w}=vs(),_=We.useRef([]),C=We.useRef(null),[S,A]=(0,We.useState)("desc"),[k,M]=(0,We.useState)("created_at"),[O,T]=We.useState(null),[E,P]=We.useState(null),[D,R]=We.useState(null),[N,L]=We.useState(null),[I,F]=(0,We.useState)([]),[$,B]=We.useState(""),[z,H]=We.useState(!1),W=Boolean(N),[V,U]=(0,We.useState)((0,i.A)({},Fc)),[q,G]=(0,We.useState)((0,i.A)({},Fc)),[Y,Z]=We.useState(null),[K,X]=(0,We.useState)({}),[Q,J]=We.useState({open:!1,data:{}}),ee=$o.getPatientTableView(),te=ee.patientTableView?ee.patientTableView:"list",[ne,re]=We.useState(!0),[ie,oe]=We.useState(!1),[ae,se]=We.useState(!1),[le,ce]=We.useState(te),[de,ue]=We.useState(!1),[pe,he]=We.useState([]),[me,fe]=We.useState("ALL"),[ge,ve]=We.useState(""),[xe,ye]=We.useState(!1),[be,je]=(0,We.useState)([]),[we,_e]=(0,We.useState)([]),[Ce,Se]=We.useState({patientName:""}),[Ae,ke]=We.useState({patientName:"",userMobile:""}),[Me,Oe]=We.useState([]),[Te,Ee]=We.useState([]),[Pe,De]=We.useState(null),[Re,Ne]=We.useState({programName:""}),Le=P_(BA().breakpoints.down("sm")),Ie=Le?["patient_name","email","actions"]:["patient_name","email","age","mobile_no","providers","courses","vital","compliance","actions"],Fe=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await h(Xde(e,t,"RPM",e=>{let{states:t}=e;je(t.content)},()=>{}))},$e=[{id:"patient_name",label:v("rpm_UserName"),isSort:!0,sortProperty:"first_name"},{id:"email",label:v("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"mobile_no",label:v("rpm_MobileNumber"),isSort:!0,sortProperty:"mobile_no"},{id:"actions",label:v("rpm_Actions"),isSort:!1,sortProperty:"actions"}],Be=[{id:"patient_name",label:v("rpm_PatientName"),isSort:!0,sortProperty:"first_name"},{id:"email",label:v("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"age",label:v("rpm_Age"),isSort:!0,sortProperty:"dob"},{id:"mobile_no",label:v("rpm_MobileNumber"),isSort:!0,sortProperty:"mobile_no"},{id:"providers",label:v("rpm_Providers"),isSort:!0,sortProperty:"providers"},{id:"courses",label:v("rpm_Schedules"),isSort:!0,sortProperty:"courses"},{id:"vital",label:v("rpm_Vitals"),isSort:!0,sortProperty:"vital"},{id:"compliance",label:v("rpm_Status"),isSort:!0,sortProperty:"compliance"},{id:"actions",label:v("rpm_Actions"),isSort:!1,sortProperty:"actions"}],ze=(e,t)=>{V.current_page=1,Je("",t),null!==t&&fe(t)},He=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Q.open)_.current=[],J((0,i.A)((0,i.A)({},Q),{},{open:!Q.open}));else{const n=Array.isArray(e)?[...e]:[t.id];_.current=n,C.current=null===t||void 0===t?void 0:t.tenantId,J((0,i.A)((0,i.A)({},Q),{},{open:!Q.open,data:t}))}},Ve=()=>{H(!z)},[Ue,qe]=We.useState(ta()($o.getHeadCellsPatient())?Ie:$o.getHeadCellsPatient()),Ge=function(e){qe(e),$o.setHeadCellsPatient(e)},Ye=e=>{if(Array.isArray(e))return F(e.map(e=>e.toString()));const t=e.target.name;I.includes(t)?F(I.filter(e=>e!==t)):F(e=>[...e,t])},Ze=e=>{const t=e.currentTarget.attributes["data-id"].value,n=e.currentTarget.attributes["data-name"].value,r=e.currentTarget.attributes["data-lname"].value,i=e.currentTarget.attributes["data-tenant"].value;L({id:t,first_name:n,last_name:r,tenantId:i,position:e.currentTarget})},Ke=()=>{L({})},Xe=e=>e?(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:v("rpm_".concat(e))})}):(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:v("rpm_Compliant")})}),Qe=e=>{var t,n,r;return(0,Gt.jsxs)(We.Fragment,{children:[Ue.includes("courses")&&(0,Gt.jsx)(rC,{children:ta()(null===e||void 0===e?void 0:e.course_name)?"NA":null===e||void 0===e||null===(t=e.course_name)||void 0===t?void 0:t.map((t,n)=>(0,Gt.jsx)(Ym,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:t},n))}),Ue.includes("vital")&&(0,Gt.jsx)(rC,{children:ta()(null===e||void 0===e?void 0:e.course_vital)?"NA":null===e||void 0===e||null===(n=e.course_vital)||void 0===n?void 0:n.map((t,n)=>(0,Gt.jsx)(Ym,{variant:"body2",mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:v("rpm_".concat(t))},n))}),Ue.includes("compliance")&&(0,Gt.jsx)(rC,{children:ta()(null===e||void 0===e?void 0:e.course_status)?"NA":null===e||void 0===e||null===(r=e.course_status)||void 0===r?void 0:r.map((t,n)=>(0,Gt.jsx)(Eu,{mt:n===(null===e||void 0===e?void 0:e.course_status.length)-1&&.5,children:Xe(t)},n))})]})},Je=async e=>{try{const{data:t}=await h(Bs((0,i.A)((0,i.A)({sort_by:k,sort_order:S},V),{},{filterState:e,program_code:null===u||void 0===u?void 0:u.code}))),n=t||{},{content:r}=n,o=Ko(n,USe),a=e=>{const t=null===r||void 0===r?void 0:r.map(t=>(0,i.A)((0,i.A)({},t),{},{course_info:ta()(e[t.id])?[]:e[t.id]})),n=null===t||void 0===t?void 0:t.map(e=>(0,i.A)((0,i.A)({},e),{},{course_name:e.course_info.map(e=>e.course_name),course_vital:e.course_info.map(e=>e.vital_name),course_status:e.course_info.map(e=>e.status)}));T(n)};await it(r,a),U(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(t){console.log(t)}},et=async e=>{if(null!==e&&void 0!==e&&e.patientName){if(null!==e&&void 0!==e&&e.patientName.trim())try{const{data:t}=await h(Bs((0,i.A)((0,i.A)({sort_by:k,sort_order:S,filterState:e,program_code:null===u||void 0===u?void 0:u.code},V),{},{current_page:1}))),{content:n}=t||{};P(n)}catch(t){console.log(t)}}else P([]),Je()},tt=async e=>{const t=(0,i.A)((0,i.A)({sort_by:k,sort_order:S},q),{},{newFilterState:e,program_code:null===u||void 0===u?void 0:u.code});try{const{data:e}=await h(zs(j,t)),n=e||{},{content:r}=n,o=Ko(n,qSe);Ee(r),G(e=>(0,i.A)((0,i.A)({},e),{},{last_page:o.last_page,current_page:o.current_page,from:o.from,per_page:o.per_page,to:o.to,total:o.total}))}catch(n){console.log(n)}},nt=async e=>{const t=(0,i.A)((0,i.A)({sort_by:k,sort_order:S,newFilterState:e,program_code:null===u||void 0===u?void 0:u.code},q),{},{current_page:1});if(e.patientName){if(null!==e&&void 0!==e&&e.patientName.trim())try{const{data:e}=await h(zs(j,t)),{content:n}=e||{};Z(n)}catch(n){console.log(n)}}else Z([]),tt()},rt=async e=>{try{await h(((e,t)=>async n=>{n(na(!0));try{const n="".concat(ca.patients,"/").concat(e,"/").concat(t,"/notify");return await du(n,{})}finally{n(na(!1))}})(j,e)),h(Zo({subTitle:"message:rpm_PatientRequestedSuccessfully",severity:Bc}))}catch(t){const e=ls(t,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_PatientAlreadyExisted",severity:$c})):h(Zo({subTitle:bd(e,"error:rpm_PatientAlreadyExisted"),severity:$c})),console.log(t)}},it=async(e,t)=>{const n=null===e||void 0===e?void 0:e.map(e=>e.id);try{const{data:e}=await h(Us({patientIds:n,programCode:null===u||void 0===u?void 0:u.code}));X(e),t(e)}catch(r){console.log(r)}},ot=()=>{ie?(_e([]),je([]),oe(!ie)):st()},at=()=>{se(!ae)},st=async()=>{await h(Zde(V,"RPM",e=>{let{countries:t,states:n}=e;_e(t.content),je(n.content),oe(!ie)},()=>{}))},lt=()=>{ue(!de)},ct=()=>{re(!ne)},dt=e=>{"list"===e?(ce("list"),$o.setPatientTableView((0,i.A)((0,i.A)({},ee),{},{patientTableView:"list"}))):(ce("grid"),$o.setPatientTableView((0,i.A)((0,i.A)({},ee),{},{patientTableView:"grid"})))},ut=e=>{const t=e.flags.includes("ACTIVE"),n=e.flags.includes("PASSIVE");return t?(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Active"})}):n?(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Inactive"})}):void 0},pt=e=>(0,Gt.jsx)(Gt.Fragment,{children:null===e.flags?"NA":(0,Gt.jsx)(JM,{direction:"row",spacing:1,children:(e=>{let t=[];return e.includes("ACTIVE_ALERTS")||e.includes("PASSIVE")||t.push("Normal"),e.includes("ACTIVE_ALERTS")&&t.push("Alert"),e.includes("PASSIVE")&&t.push(""),(0,Gt.jsx)(Gt.Fragment,{children:t.map(e=>{return e?(0,Gt.jsx)(XO,{severity:(t=e,"Alert"===t?"error":"Normal"===t?"info":void 0),icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:e})},e):"NA";var t})})})(e.flags)})}),ht=(e,t)=>{var n;return(null===(n=e.alerts)||void 0===n?void 0:n.findIndex(e=>e.data_name===t))>=0},mt=e=>{var t;return(0,Gt.jsx)(Gt.Fragment,{children:e.last_vital_frames.length?null===(t=e.last_vital_frames)||void 0===t?void 0:t.map(t=>{var n;return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:ht(t,"systolic")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:t.values.systolic?t.values.systolic:"-"}),"/",(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:ht(t,"diastolic")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:t.values.diastolic?t.values.diastolic:"-"}),"/",(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:ht(t,"pulse")?"error":"success",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:t.values.pulse?t.values.pulse:"-"})]}),(0,Gt.jsxs)(Ym,{component:"p",variant:"caption",children:["Time: ",ta()(null===e||void 0===e?void 0:e.last_vital_frames)?"NA":null===e||void 0===e||null===(n=e.last_vital_frames[0])||void 0===n?void 0:n.ts]})]},e.id)}):"NA"})},ft=async(e,t)=>{let{setErrors:n}=t;const r=(0,i.A)((0,i.A)({},e),{},{profile:{gender:null!==e&&void 0!==e&&e.gender?null===e||void 0===e?void 0:e.gender:"",adr_country_name:null!==e&&void 0!==e&&e.country?null===e||void 0===e?void 0:e.country:"",adr_state_name:null!==e&&void 0!==e&&e.state?null===e||void 0===e?void 0:e.state:"",adr_city:null!==e&&void 0!==e&&e.city?null===e||void 0===e?void 0:e.city:"",adr_address1:null!==e&&void 0!==e&&e.address?null===e||void 0===e?void 0:e.address:""},mobile:null!==e&&void 0!==e&&e.mobile?"".concat(null===e||void 0===e?void 0:e.country_code).concat(null===e||void 0===e?void 0:e.mobile):""});try{const{data:e}=await h($s(null===u||void 0===u?void 0:u.code,r));h(Zo({subTitle:"message:rpm_PatientCreatedSuccessfully",severity:Bc})),x("".concat(null===e||void 0===e?void 0:e.id,"/courses")),Je(),oe(!1)}catch(o){const e=ls(o,"response.data.field_errors",{}),t=ls(o,"response.data.code","");ta()(e)?ta()(t)?h(Zo({subTitle:"error:rpm_patient_not_created",severity:$c})):h(Zo({subTitle:bd(t,"error:rpm_err_mobile_number_already_exist"),severity:$c})):n(yd(e))}},gt=e=>(0,Gt.jsx)(Vp,{variant:"outlined","data-id":e.id,color:"primary",sx:{borderRadius:"20px"},onClick:()=>{rt(null===e||void 0===e?void 0:e.id)},children:v("rpm_AddToProgram")}),vt=e=>(0,Gt.jsx)(Yx,{title:v("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),xt=e=>(0,Gt.jsx)(Yx,{title:v("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>x("".concat(e.id,"/dashboard")),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),yt=e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",disabled:!0,children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),bt=e=>{var t;return(0,Gt.jsx)(Yx,{title:v("rpm_MoreOption"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,"data-name":e.first_name,"data-lname":e.last_name,"data-tenant":e.tenant_id,onClick:Ze,size:"small","aria-controls":W?"account-menu":void 0,"aria-haspopup":"true","aria-expanded":W?"true":void 0,color:"primary",disabled:!(null!==u&&void 0!==u&&null!==(t=u.permissions)&&void 0!==t&&t.showViewPatientBtn),children:(0,Gt.jsx)(Iu.A,{})})})},jt=(0,Gt.jsxs)(km,{id:"account-menu",anchorEl:ta()(N)?null:N.position,open:!ta()(N),onClose:Ke,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5,width:"200px","& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,bgcolor:"background.paper",transform:"translateY(-50%) rotate(45deg)",zIndex:0},"& .MuiMenuItem-root":{fontSize:"0.875rem",py:1.5}}},transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:[(null===u||void 0===u||null===(t=u.permissions)||void 0===t?void 0:t.showViewPatientBtn)&&(wt=N,(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(wt.id,"/dashboard")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)($l,{fontSize:"small",color:"primary"})}),v("rpm_medicalCharts")]})),(null===u||void 0===u||null===(n=u.permissions)||void 0===n?void 0:n.showMedicalHistoryList)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/history")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(Bl,{fontSize:"small",color:"primary"})}),v("rpm_medicalHistory")]}))(N),(null===u||void 0===u||null===(r=u.permissions)||void 0===r?void 0:r.showCourseList)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/courses")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(Il,{fontSize:"small",color:"primary"})}),v("rpm_patientCourses")]}))(N),(null===u||void 0===u||null===(o=u.permissions)||void 0===o?void 0:o.showPatientRuleList)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/rules")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(Wl,{fontSize:"small",color:"primary"})}),v("rpm_patientRules")]}))(N),(null===u||void 0===u||null===(a=u.permissions)||void 0===a?void 0:a.showPrescriptionNoteList_showNoteList)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/notes/doctor-note")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(Hl,{fontSize:"small",color:"primary"})}),v("rpm_Notes")]}))(N),(null===u||void 0===u||null===(s=u.permissions)||void 0===s?void 0:s.showViewPatientBtn)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/details")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(zl,{fontSize:"small",color:"primary"})}),v("rpm_personalDetails")]}))(N),(null===u||void 0===u||null===(l=u.permissions)||void 0===l?void 0:l.isAdmin)&&(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>H(!z),children:[(0,Gt.jsx)(rv,{sx:{pl:"5px"},children:(0,Gt.jsx)(vc,{fontSize:"small",color:"primary"})}),v("rpm_TransferProgram")]}),(null===u||void 0===u||null===(c=u.permissions)||void 0===c?void 0:c.showDeletePatientBtn)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500",color:"error.main"},onClick:t=>He(t,e),children:[(0,Gt.jsx)(rv,{sx:{pl:"5px",color:"error.main"},children:(0,Gt.jsx)(Ql,{fontSize:"small",color:"error.main"})}),v("rpm_Delete")]}))(N)]});var wt;const _t=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ce;const t=(0,i.A)({sort_by:k,sort_order:S},V);try{const{data:n}=await h(Vxe(null===u||void 0===u?void 0:u.code,t,e)),r=n||{},{content:o}=r,a=Ko(r,GSe);he(o),U(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(n){console.log(n)}};return We.useEffect(()=>{Ge(Ie)},[Le]),We.useEffect(()=>{!m||ta()(u)||w||Je()},[m,S,k,u]),We.useEffect(()=>{!m||ta()(u)||w||(async()=>{try{const{data:e}=await h(wg((0,i.A)((0,i.A)({},V),{},{current_page:1}),Re)),{content:t}=e;Oe(t)}catch(e){console.log(e)}})()},[m,S,k,u,Re]),We.useEffect(()=>{m&&!ta()(u)&&"all"===w&&ze(0,"ALL"),m&&!ta()(u)&&"compliant"===w&&ze(0,"COMPLIANT"),m&&!ta()(u)&&"noncompliant"===w&&ze(0,"NON_COMPLIANT")},[m,u]),We.useEffect(()=>{m&&(async()=>{const e={search:ge};try{const{data:t}=await h(rl(e,"UNASSOCIATED")),{content:n}=t||{};R(n)}catch(t){console.log(t)}})()},[m,ge]),We.useEffect(()=>{m&&!ta()(u)&&_t()},[m,u]),We.useEffect(()=>{h(w_({activeMenuItem:"all_patients"}))},[u]),ta()(u)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[ta()(u)||null!==u&&void 0!==u&&null!==(d=u.permissions)&&void 0!==d&&d.showPatientList?p>=575?(0,Gt.jsx)(FSe,{userData:null===u||void 0===u?void 0:u.permissions,programList:b,activeProgram:u,devicesList:D,patientList:O,order:S,orderBy:k,setOrder:A,setOrderBy:M,initialHeadcells:Ue,setHeadcells:Ge,headCellsItems:Be,dataParameter:"id",checkState:I,onCheck:Ye,isSelection:!1,nodata:D_,fetchPatientList:Je,pageDetails:V,editButton:vt,viewButton:xt,deleteButton:yt,multiDeletePatient:He,moreOptions:bt,moreMenu:jt,patientModalOpen:ie,settingModal:de,openFilter:ne,viewMode:le,handlePatientModalToggle:ot,handleViewPatientModalToggle:at,handleSettingModalToggle:lt,handleOpenFilter:ct,handleViewMode:dt,getStatus:ut,getFlags:pt,getReadingColor:ht,getReadings:mt,addNewPatient:ft,flag:me,handleAlignment:ze,setSearchDevice:ve,showFilterColor:xe,setShowFilterColor:ye,filterState:Ce,setFilterState:Se,programSchedule:pe,fetchProgramScheduleList:_t,patientCourseCell:Qe,patientAllVitals:K,states:be,countries:we,fetchStates:Fe,fetchPatientListSuggestions:et,patientSuggestions:E,fetchAllPatients:tt,patientViewModalOpen:ae,allPatients:Te,setAllPatients:Ee,newHeadCellsItems:$e,fetchAllPatientsListSuggestions:nt,allpatientSuggestions:Y,newFilterState:Ae,setNewFilterState:ke,newPageDetails:q,addButton:gt,sendAddPatientNotification:rt}):(0,Gt.jsx)(VSe,{userData:null===u||void 0===u?void 0:u.permissions,programList:b,activeProgram:u,devicesList:D,patientList:O,order:S,orderBy:k,setOrder:A,setOrderBy:M,initialHeadcells:Ue,setHeadcells:Ge,headCellsItems:Be,dataParameter:"id",checkState:I,onCheck:Ye,isSelection:!1,nodata:D_,fetchPatientList:Je,pageDetails:V,editButton:vt,viewButton:xt,deleteButton:yt,multiDeletePatient:He,moreOptions:bt,moreMenu:jt,patientModalOpen:ie,settingModal:de,openFilter:ne,viewMode:le,handlePatientModalToggle:ot,handleViewPatientModalToggle:at,handleSettingModalToggle:lt,handleOpenFilter:ct,handleViewMode:dt,getStatus:ut,getFlags:pt,getReadingColor:ht,getReadings:mt,addNewPatient:ft,flag:me,handleAlignment:ze,setSearchDevice:ve,showFilterColor:xe,setShowFilterColor:ye,filterState:Ce,setFilterState:Se,programSchedule:pe,fetchProgramScheduleList:_t,patientCourseCell:Qe,patientAllVitals:K,states:be,countries:we,fetchStates:Fe,fetchPatientListSuggestions:et,patientSuggestions:E,fetchAllPatients:tt,patientViewModalOpen:ae,allPatients:Te,newHeadCellsItems:$e,fetchAllPatientsListSuggestions:nt,allpatientSuggestions:Y,newFilterState:Ae,setNewFilterState:ke,newPageDetails:q,addButton:gt,sendAddPatientNotification:rt}):(0,Gt.jsx)(__,{}),(0,Gt.jsx)(PU,{openModal:Q.open,onCloseModal:He,actionFunction:async()=>{try{await h(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return async r=>{if(!ta()(t)){r(na(!0));try{await Promise.all(t.map(t=>pu("".concat(ca.patients,"/").concat(e,"/").concat(t,"/delete?tenantId=").concat(n))))}finally{r(na(!1))}}}}(null===u||void 0===u?void 0:u.code,_.current,C.current)),F([]),Je(),Ke(),J((0,i.A)((0,i.A)({},Q),{},{open:!Q.open})),y(v("message:rpm_DeletePatientSuccess"),{variant:"success"})}catch(e){y(e.message,{variant:"error"})}},dataName:"",options:{primaryText:v("message:rpm_DeleteTitle"),secondaryText:v("message:rpm_DeleteBodyText"),btn:{primaryText:v("rpm_Delete"),secondaryText:v("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(HSe,{openModal:z,onCloseModal:Ve,patientInfo:N,activeProgram:u,allPrograms:Me,setTransferProgram:De,transferPatient:async e=>{try{await h(El(u,Pe,e)),h(Zo({subTitle:"message:rpm_PatientTransferedSuccessfully",severity:Bc})),Ve(),Ke(),Je()}catch(t){const e=ls(t,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_PatientTransferFailed",severity:$c})):h(Zo({subTitle:bd(e,"error:rpm_PatientTransferFailed"),severity:$c}))}},disabledButton:!Pe,setSearchProgram:Ne}),(0,Gt.jsx)(AZ,{isTour:g,path:"allPatientsTour",setRenderer:B}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:$})]})};function ZSe(e){var t;let{order:n,orderBy:r,setOrder:i,setOrderBy:o,dataParameter:a,tempDetailsHeadCells:s,checkState:l,onCheck:c,isSelection:d,nodata:u,fetchRuleList:p,pageDetails:h,activeProgram:m,setHeadcells:f,settingModal:g,initialHeadcells:v,handleSettingModalToggle:x,templateDetails:y}=e;const{t:b}=vg(),j=[{name:b("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===m||void 0===m?void 0:m.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===m||void 0===m?void 0:m.code,"/patients")},{name:b("rpm_RxTemplates"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===m||void 0===m?void 0:m.code,"/templates")},{name:null===y||void 0===y?void 0:y.template_name,url:""}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:j})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsxs)(Eu,{sx:{mb:2.5},children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:b("rpm_TemplateDetails")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:b("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:x,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})]}),(0,Gt.jsx)(df,{container:!0,spacing:2,mt:.05,children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsx)(uH,{sx:{p:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:b("rpm_templateName")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(y)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==y&&void 0!==y&&y.template_name?null===y||void 0===y?void 0:y.template_name:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:b("rpm_templateId")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(y)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==y&&void 0!==y&&y.tempId?null===y||void 0===y?void 0:y.tempId:"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:b("rpm_VitalName")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(y)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(XO,{component:"span",icon:!1,severity:"info",sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),fontWeight:600,"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:null!==y&&void 0!==y&&y.vital?b("rpm_".concat(y.vital)):"NA"})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,lg:3,children:(0,Gt.jsxs)(JM,{flexDirection:"column",gap:{xs:1,lg:2},children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4},children:b("rpm_Duration")}),(0,Gt.jsx)(Eu,{sx:{flex:.6},children:as(y)?(0,Gt.jsx)(ZC,{}):(0,Gt.jsx)(Ym,{variant:"body2",component:"p",color:"primary",children:null!==y&&void 0!==y&&y.days?(null===y||void 0===y?void 0:y.days)+" days":"NA"})})]})})]})})})})})]}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:as(y.medicationList)?[{}]:null===y||void 0===y?void 0:y.medicationList,headCells:null===s||void 0===s?void 0:s.filter(e=>v.includes(e.id)),dataParameter:a,selected:l,setSelected:c,isSelection:d,noDataImage:u,fetchList:p,pageDetails:h,skeletonVrows:6,className:"theme_scroll",children:null===y||void 0===y||null===(t=y.medicationList)||void 0===t?void 0:t.map(e=>{var t,n;return(0,Gt.jsxs)(K_,{hover:!0,selected:l.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[d&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:c,checked:l.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),v.includes("medication")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.medicine}),v.includes("form")&&(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.medicine_form)||"NA"}),v.includes("shape")&&(0,Gt.jsx)(rC,{children:(null===(t=hd.find(t=>(null===e||void 0===e?void 0:e.icon_type)===(null===t||void 0===t?void 0:t.key)))||void 0===t?void 0:t.text)||"NA"}),v.includes("dosage")&&(0,Gt.jsx)(rC,{children:null===(n=ud.find(t=>(null===e||void 0===e?void 0:e.frequency)===(null===t||void 0===t?void 0:t.key)))||void 0===n?void 0:n.text}),v.includes("days")&&(0,Gt.jsx)(rC,{children:null===e||void 0===e?void 0:e.days}),v.includes("comments")&&(0,Gt.jsx)(rC,{children:(null===e||void 0===e?void 0:e.comments)||"NA"})]},e.id)})}),(0,Gt.jsx)(IO,{pageDetails:h,fetchListFunction:p}),(0,Gt.jsx)(fO,{open:g,allHeadCells:s,initialHeadcells:v,setHeadcells:f,onClose:x})]})]})})]})}ZSe.defaultProps={userData:{},tempDetailsHeadCells:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:[],onCheck:()=>{},isSelection:!1,nodata:"",templateDetails:{},fetchRuleList:()=>{},activeProgram:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{}};const KSe=ZSe,XSe=e=>{let{activeProgram:t}=e;const{programId:n,templateId:r}=lo(),i=Nt(),o=Ct(Nd),[a,s]=(0,We.useState)({}),[l,c]=We.useState(!1),[d,u]=We.useState(as($o.getTemplateDetailsHeadcells())?["medication","form","shape","dosage","days","comments"]:$o.getTemplateDetailsHeadcells()),p=async()=>{try{const{data:e}=await i(Tl(n,r)),t=await function(e){const{vital:t,medications_list:n,intervals:r,id:i,created_by:o,name:a,days:s}=e,l=null===n||void 0===n?void 0:n.map(e=>{const t=function(e,t){if(e&&t){const n=atob(e),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const i=new Uint8Array(r),o=new Blob([i],{type:"image/jpeg"});return new File([o],t,{type:"image/jpeg"})}return null}(e.image,"".concat(e.medicine,".jpg")),n=[],i=r.some(t=>{var n;return(null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id))&&null===t.start_time});if(e.frequency>=1&&e.frequency<=4&&i)for(let r=0;r<e.frequency;r++)n.push({start_time:null,interval:null});else r.filter(t=>{var n;return null===(n=t.medicines)||void 0===n?void 0:n.includes(e.id)}).forEach(e=>{let{id:t,start_time:r,stop_after:i}=e;n.push({id:t,start_time:r?Ts(r,Hc):null,interval:i})});return{id:e.id,medicine:e.medicine,medicine_form:e.medicine_form,icon_type:e.icon_type,dose:e.dose,unit:e.unit,color:e.color,image:t,start_date:sa()(new Date).startOf("day").valueOf(),end_date:null,days:e.days,repetition_kind:e.frequency>4?qc:Uc,timing:n,frequency:e.frequency,comments:e.comments}});return{vital:t,tempId:i,created_by:o,template_name:a,days:s,medicationList:l}}(e);s(t)}catch(e){console.log(e)}};const h=[{id:"medication",label:we("rpm_Medication"),isSort:!1,sortProperty:"medication"},{id:"form",label:we("rpm_Form"),isSort:!1,sortProperty:"form"},{id:"shape",label:we("rpm_Shape&Color"),isSort:!1,sortProperty:"shape"},{id:"dosage",label:we("rpm_Frequency"),isSort:!1,sortProperty:"dosage"},{id:"days",label:we("rpm_Days"),isSort:!1,sortProperty:"days"},{id:"comments",label:we("rpm_Comments"),isSort:!1,sortProperty:"comments"}];return We.useEffect(()=>{o&&p()},[o]),We.useEffect(()=>{i(w_({activeMenuItem:"prescription_template"}))},[]),(0,Gt.jsx)("div",{children:(0,Gt.jsx)(KSe,{templateDetails:a,isSelection:!1,nodata:D_,activeProgram:t,tempDetailsHeadCells:h,setHeadcells:function(e){u(e),$o.setTemplateDetailsHeadcells(e)},settingModal:l,initialHeadcells:d,handleSettingModalToggle:()=>{c(!l)}})})},QSe=e=>{let{chips:t,activeProgram:n,getChips:r}=e;const{t:i}=vg(),o=so(),a=Nt(),[s,l]=We.useState(null===t||void 0===t?void 0:t.complaints),[c,d]=We.useState(null===t||void 0===t?void 0:t.advices),[u,p]=We.useState(null===t||void 0===t?void 0:t.diagnosis),[h,m]=We.useState(null===t||void 0===t?void 0:t.tests),[f,g]=We.useState(!1),[v,x]=We.useState(!1),[y,b]=We.useState(!1),[j,w]=We.useState(!1),_=f?s:null===s||void 0===s?void 0:s.slice(0,10),C=j?h:null===h||void 0===h?void 0:h.slice(0,10),S=v?u:null===u||void 0===u?void 0:u.slice(0,10),A=y?c:null===c||void 0===c?void 0:c.slice(0,10),k=(e,t,n)=>{t(null===n||void 0===n?void 0:n.filter(t=>(null===t||void 0===t?void 0:t.name)!==(null===e||void 0===e?void 0:e.name)))},M=(e,t,n,r,i,o)=>{if("selectOption"===r){const t=null===n||void 0===n?void 0:n.filter(t=>{var n;return!(null!==i&&void 0!==i&&null!==(n=i[e])&&void 0!==n&&n.some(e=>e===t))}),r=[...i[e],...t];o(e,r)}else if("removeOption"==r){var a,s;const t=null===i||void 0===i||null===(a=i[e])||void 0===a||null===(s=a.find(e=>!n.includes(e)))||void 0===s?void 0:s.name;if(t){var l;const n=null===i||void 0===i||null===(l=i["".concat(e,"Details")])||void 0===l?void 0:l.filter(e=>e.name!==t);o("".concat(e,"Details"),n)}}else o(e,[]),o("".concat(e,"Details"),[])};return(0,Gt.jsx)(Iz,{onSubmit:async e=>{const t=(e,t)=>{const n=new Map;return null===e||void 0===e||e.concat(t).forEach(e=>{n.set(JSON.stringify(e),e)}),Array.from(n.values())},i={allComplaints:as(null===e||void 0===e?void 0:e.complaints)?s:t(s,e.complaints),allDiagnosis:as(null===e||void 0===e?void 0:e.diagnosis)?u:t(u,e.diagnosis),allAdvices:as(null===e||void 0===e?void 0:e.advices)?c:t(c,e.advices),allTests:as(null===e||void 0===e?void 0:e.tests)?h:t(h,e.tests)};await a(((e,t)=>async n=>{const r=$o.getAccessToken(),i={program:e,tenant_id:null===r||void 0===r?void 0:r.accountId,complaints:null===t||void 0===t?void 0:t.allComplaints,diagnosis:null===t||void 0===t?void 0:t.allDiagnosis,advice:null===t||void 0===t?void 0:t.allAdvices,tests:null===t||void 0===t?void 0:t.allTests};n(na(!0));try{const e="".concat(ua.medical,"/program/consultation-info");return await du(e,i)}finally{n(na(!1))}})(null===n||void 0===n?void 0:n.code,i)),a(Zo({subTitle:"message:rpm_SettingsSavedSuccessfully",severity:Bc})),r()},initialValues:{complaints:[],diagnosis:[],tests:[],advices:[]},children:e=>{let{values:t,setFieldValue:n}=e;return(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:i("rpm_Symptoms")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{sx:{py:2,":last-child":{pb:4},border:"1px solid #efefef",borderRadius:"0 0 6px 6px"},className:"symptomsTypeWeb",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,pt:0,children:(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Hz,{name:"complaints",component:Oje,placeholder:"Type for more",options:s||[],onValueChange:(e,r,i)=>{M("complaints",0,r,i,t,n)},variant:"outlined",margin:"normal",fullWidth:!0})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",children:[" ",(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"12px",flex:"0 0 60px"},children:"Related:"}),(0,Gt.jsxs)(Eu,{sx:{flex:"1"},children:[null===_||void 0===_?void 0:_.map((e,n)=>{var r;const i=null===t||void 0===t||null===(r=t.complaints)||void 0===r?void 0:r.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onDelete:()=>k(e,l,s)},n)}),(0,Gt.jsx)(Vp,{sx:{fontWeight:"600"},color:"primary",onClick:()=>g(e=>!e),children:i(f?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:i("rpm_Diagnosis")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{sx:{py:2,":last-child":{pb:4},border:"1px solid #efefef",borderRadius:"0 0 6px 6px"},className:"symptomsTypeWeb",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,pt:0,children:(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Hz,{name:"diagnosis",component:Oje,placeholder:"Type for more",options:u||[],onValueChange:(e,r,i)=>{M("diagnosis",0,r,i,t,n)},variant:"outlined",margin:"normal",fullWidth:!0})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",children:[" ",(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"12px",flex:"0 0 60px"},children:"Related:"}),(0,Gt.jsxs)(Eu,{sx:{flex:"1"},children:[null===S||void 0===S?void 0:S.map((e,n)=>{var r;const i=null===t||void 0===t||null===(r=t.diagnosis)||void 0===r?void 0:r.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onDelete:()=>k(e,p,u)},n)}),(0,Gt.jsx)(Vp,{sx:{fontWeight:"600"},color:"primary",onClick:()=>x(e=>!e),children:i(v?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,placeholder:"Advice...",fontSize:16,children:i("rpm_advice")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{sx:{py:2,":last-child":{pb:4},border:"1px solid #efefef",borderRadius:"0 0 6px 6px"},className:"symptomsTypeWeb",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,pt:0,children:(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Hz,{name:"advices",component:Oje,placeholder:"Type for more",options:c||[],onValueChange:(e,r,i)=>{M("advices",0,r,i,t,n)},variant:"outlined",margin:"normal",fullWidth:!0})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"12px",flex:"0 0 60px"},children:"Related:"}),(0,Gt.jsxs)(Eu,{sx:{flex:"1"},children:[null===A||void 0===A?void 0:A.map((e,n)=>{var r;const i=null===t||void 0===t||null===(r=t.advices)||void 0===r?void 0:r.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{label:e.name,style:{marginRight:"3px",marginBottom:"3px",backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"},onDelete:()=>k(e,d,c)},n)}),(0,Gt.jsx)(Vp,{sx:{fontWeight:"600"},color:"primary",onClick:()=>b(e=>!e),children:i(y?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",color:"customClr.bp",fontWeight:600,fontSize:16,children:i("rpm_testrequest")})})}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{sx:{py:2,":last-child":{pb:4},border:"1px solid #efefef",borderRadius:"0 0 6px 6px"},className:"symptomsTypeWeb",children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:6,lg:6,pt:0,children:(0,Gt.jsx)(Xj,{fullWidth:!0,children:(0,Gt.jsx)(Hz,{name:"tests",component:Oje,placeholder:"Type for more",options:h||[],onValueChange:(e,r,i)=>{M("tests",0,r,i,t,n)},variant:"outlined",margin:"normal",fullWidth:!0})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,pt:0,children:(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"baseline",children:[(0,Gt.jsx)(qj,{id:"checkbox-select-label",fontWeight:600,sx:{fontSize:"12px",flex:"0 0 60px"},children:"Related:"}),(0,Gt.jsxs)(Eu,{sx:{flex:"1"},children:[null===C||void 0===C?void 0:C.map((e,n)=>{var r;const i=null===t||void 0===t||null===(r=t.tests)||void 0===r?void 0:r.some(t=>t.name===e.name);return(0,Gt.jsx)(gb,{label:e.name,onDelete:()=>k(e,m,h),style:{marginRight:"3px",marginBottom:"3px",backgroundColor:i?"rgba(0, 0, 0, 0.12)":"rgba(0, 0, 0, 0.05)"}},n)}),(0,Gt.jsx)(Vp,{sx:{fontWeight:"600"},color:"primary",onClick:()=>w(e=>!e),children:i(j?"rpm_ViewLess":"rpm_ViewAll")})]})]})})]})})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:()=>o(-1),sx:{marginRight:"10px"},children:i("rpm_Cancel")}),(0,Gt.jsx)(Vp,{variant:"contained",type:"submit",sx:{marginLeft:"0px"},children:i("rpm_Save")})]})]})}})};const JSe=n.p+"static/media/generalInfoLogoImage.7af0e972d935186d8b55ae19ec8896f3.svg",eAe={display_name:"",city:"",country:"",state:"",address:"",image:"",def:"",facility_type:""},tAe=e=>{let{editProgram:t,fetchStates:n,countries:r,statesRelated:i,programData:o}=e;const{t:a}=vg(),s=so(),l=(0,We.useRef)(null),[c,d]=(0,We.useState)(""),{image:u=""}=os(o,eAe);return(0,We.useEffect)(()=>{if(u instanceof File){const e=URL.createObjectURL(u);return d(e),()=>URL.revokeObjectURL(e)}d(u||JSe)},[u]),(0,Gt.jsx)(Iz,{initialValues:os(o,eAe),validationSchema:vV.addNewProgram,onSubmit:t,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:o}=e;return(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px"},className:"fieldSizing",children:[(0,Gt.jsx)(Eu,{mt:2,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,md:2,xs:12,sm:12,children:[(0,Gt.jsx)(Eu,{sx:{bgcolor:"#EBEBFF",height:"200px",width:"100%",borderRadius:"6px",objectFit:"contain",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,Gt.jsx)(Eu,{className:"logoImageSettings",children:(0,Gt.jsx)("img",{src:c instanceof File?URL.createObjectURL(c):c||JSe,width:100,height:100})})}),(0,Gt.jsxs)(Eu,{display:"flex",alignItems:"center",justifyContent:"center",mt:2,children:[(0,Gt.jsxs)(Eu,{className:"upload-input-text",sx:{lineHeight:"0"},children:[(0,Gt.jsx)("input",{ref:l,id:"image",name:"image",type:"file",onChange:e=>{o("image",e.currentTarget.files[0]),d(e.currentTarget.files[0])}}),(0,Gt.jsx)(qj,{htmlFor:"image",sx:{cursor:"pointer",lineHeight:"0px"},children:(0,Gt.jsx)(_c,{})})]}),(0,Gt.jsx)(Vp,{disableElevation:!0,disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,disabled:!c||c===JSe,sx:{"&.MuiButtonBase-root:hover":{bgcolor:"transparent"},opacity:c&&c!==JSe?1:.5},onClick:()=>{o("image",""),d(JSe),l.current&&(l.current.value=null)},children:(0,Gt.jsx)(Cc,{})}),(0,Gt.jsx)(Xz,{name:"image",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_image")})})})]})]}),(0,Gt.jsx)(df,{item:!0,md:10,xs:12,sm:12,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,md:6,xs:12,sm:12,children:[(0,Gt.jsxs)(Eu,{mb:3,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_ProgramName")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"display_name",name:"display_name",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:a("message:rpm_DisplayNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"display_name",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_DisplayName")})})})]}),(0,Gt.jsxs)(Eu,{mb:3,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_Country")}),(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"country",optionId:"isoCode",name:"country",options:r,browserAutocomplete:!1,valueKey:"isoCode",nameKey:"name",onValueChange:(e,t)=>{o("country",t),o("state",""),n(t)},variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:a("message:rpm_ProgramCountryHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]})]}),(0,Gt.jsxs)(Eu,{mb:3,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_City")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"city",name:"city",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:a("message:rpm_ProgramCityHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"city",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_ProgramCity")})})})]}),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(Eu,{display:"flex",justifyContent:"space-between",alignItems:"center",px:1,borderRadius:"8px",children:(0,Gt.jsx)(uO,{label:a("rpm_defaultProgram"),control:(0,Gt.jsx)(Hz,{as:jC,checked:t.def,type:"checkbox",sx:{padding:"8px"},id:"reading_reminder_enabled",name:"reading_reminder_enabled",onChange:()=>o("def",!t.def)})})})})]}),(0,Gt.jsxs)(df,{item:!0,md:6,xs:12,sm:12,children:[(0,Gt.jsxs)(Eu,{mb:3,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_facility_type")}),(0,Gt.jsx)(Hz,{as:Dw,fullWidth:!0,className:"select-custom-field",size:"small",id:"facility_type",name:"facility_type",variant:"outlined",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"19px"},children:(0,Gt.jsx)(Yx,{title:a("message:rpm_FacilityProgramHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:Od.map(e=>(0,Gt.jsx)($m,{value:null===e||void 0===e?void 0:e.value,children:a("rpm_".concat(null===e||void 0===e?void 0:e.name))},null===e||void 0===e?void 0:e.value))}),(0,Gt.jsx)(Xz,{name:"facility_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_facility_type")})})})]}),(0,Gt.jsxs)(Eu,{mb:3,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_Address")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"address",name:"address",color:"primary",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:a("message:rpm_AddressHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})})]}),(0,Gt.jsxs)(Eu,{mb:3,children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:a("rpm_State")}),(0,Gt.jsxs)(Eu,{className:"autocomplete",sx:{position:"relative"},children:[(0,Gt.jsx)(Hz,{component:$K,size:"small",id:"state",optionId:"isoCode",name:"state",options:i,valueKey:"isoCode",nameKey:"name",dependent:!0,variant:"outlined",margin:"normal",fullWidth:!0}),(0,Gt.jsx)(Yx,{title:a("message:rpm_ProgramStateHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",sx:{position:"absolute",right:"0.875rem",top:"0.25rem"},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})]}),(0,Gt.jsx)(Xz,{name:"state",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_ProgramState")})})})]})]})]})})]})}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:()=>s(-1),sx:{marginRight:"10px"},children:a("rpm_Cancel")}),(0,Gt.jsx)(Vp,{variant:"contained",type:"submit",sx:{marginLeft:"0px"},children:a("rpm_Save")})]})]})})}})},nAe=e=>{var t,n,r;let{addNotifications:o,notifications:a}=e;const{t:s}=vg(),l=so(),c={days:null===a||void 0===a||null===(t=a.follow_up_notification)||void 0===t?void 0:t.follow_up_day,time:sa().utc(null===a||void 0===a||null===(n=a.follow_up_notification)||void 0===n?void 0:n.follow_up_time,"hh:mm a").toDate(),isEditable:null===a||void 0===a||null===(r=a.follow_up_notification)||void 0===r?void 0:r.send_follow_up_reminder_flag};return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Iz,{onSubmit:e=>{o(e)},initialValues:c,enableReinitialize:!0,children:e=>{let{values:t,setFieldValue:n}=e;return(0,Gt.jsxs)(Gt.Fragment,{children:[" ",(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:"20px",p:"0 10px"},className:"fieldSizing",children:[(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(uO,{control:(0,Gt.jsx)(rCe,{checked:t.isEditable,onChange:()=>n("isEditable",!t.isEditable)}),label:"Enable to edit the information",fontSize:14}),(0,Gt.jsxs)(df,{container:!0,spacing:2,mt:1,children:[(0,Gt.jsx)(df,{item:!0,md:6,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:"Days in Advance"}),(0,Gt.jsxs)(Hz,{as:Dw,fullWidth:!0,size:"small",id:"days",name:"days",variant:"outlined",disabled:!t.isEditable,children:[(0,Gt.jsx)($m,{value:1,children:"1"}),(0,Gt.jsx)($m,{value:2,children:"2"}),(0,Gt.jsx)($m,{value:3,children:"3"}),(0,Gt.jsx)($m,{value:4,children:"4"})]})]})}),(0,Gt.jsx)(df,{item:!0,md:6,children:(0,Gt.jsxs)(Eu,{position:"relative",children:[(0,Gt.jsx)(Ym,{variant:"body1",component:"p",fontWeight:"h6.fontWeight",sx:{flex:.4,marginBottom:"4px"},fontSize:14,children:"Time of the day"}),(0,Gt.jsx)(TT,{dateAdapter:jI,children:(0,Gt.jsx)(Hz,{as:nwe,size:"small",id:"time",name:"time",value:null===t||void 0===t?void 0:t.time,onChange:e=>n("time",e),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)({onKeyDown:e=>e.preventDefault(),fullWidth:!0},e)),disabled:!t.isEditable})}),(0,Gt.jsx)(Eu,{position:"absolute",top:"43px",right:"10px",sx:{opacity:"0.8"}})]})})]})]}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:()=>l(-1),sx:{marginRight:"10px"},children:s("rpm_Cancel")}),(0,Gt.jsx)(Vp,{variant:"contained",sx:{marginLeft:"0px"},type:"submit",children:s("rpm_Save")})]})]})})]})}})})},rAe=e=>{var t;let{goalList:n,toggleGoal:r,handleSaveGoals:i,handleCancelGoals:o,selectedGoals:a}=e;const{t:s}=vg();return(0,Gt.jsxs)(aH,{variant:"outlined",sx:{mb:2,p:2},children:[(0,Gt.jsx)(Ym,{fontSize:14,sx:{mb:1},children:"Select Goals"}),(0,Gt.jsx)(Eu,{sx:{display:"flex",flexWrap:"wrap",gap:1,border:"1px solid #ccc",padding:"8px",borderRadius:"6px",minHeight:"46px"},children:null===(t=n||[])||void 0===t?void 0:t.map(e=>(0,Gt.jsx)(gb,{label:null===e||void 0===e?void 0:e.name,color:a.some(t=>t.id===e.id)?"primary":"default",onClick:()=>r(e),sx:{cursor:"pointer"}},null===e||void 0===e?void 0:e.id))}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(Vp,{variant:"outlined",onClick:o,sx:{mr:1},children:s("rpm_Cancel")}),(0,Gt.jsx)(Vp,{variant:"contained",onClick:i,children:s("rpm_Save")})]})]})},iAe=["children","value","index"];function oAe(e){const{children:t,value:n,index:r}=e,o=Ko(e,iAe);return(0,Gt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function aAe(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}const sAe=e=>{let{activeProgram:t,addNotifications:n,notifications:r,chips:o,getChips:a,editProgram:s,fetchStates:l,countries:c,statesRelated:d,programData:u,showConfirmModal:p,toggleConfirmModal:h,defaultProgramName:m,onContinue:f,QrCode:g,downloadQr:v,toggleQrDialog:x,qrDialog:y,goalList:b,toggleGoal:j,handleSaveGoals:w,handleCancelGoals:_,selectedGoals:C}=e;const{t:S}=vg(),[A,k]=We.useState(0),M=[{name:S("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===t||void 0===t?void 0:t.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===t||void 0===t?void 0:t.code,"/patients")},{name:S("rpm_ProgramSettings"),url:""}];return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:M})}),(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsx)(Eu,{sx:{mb:1},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:S("rpm_ProgramSettings")})}),(0,Gt.jsx)(df,{item:!0,xs:"auto",children:(0,Gt.jsx)(Vp,{variant:"contained",sx:{marginLeft:"0px"},onClick:x,children:S("rpm_ShowProgramQr")})})]})})})})]}),(0,Gt.jsxs)(Eu,{bgcolor:"white",p:2,className:"programSettings programSettings-tour-step0",children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(eU,{value:A,onChange:(e,t)=>{k(t)},variant:"scrollable",scrollButtons:"auto",allowScrollButtonsMobile:!0,sx:{minHeight:"40px","& .MuiTabs-flexContainer":{flexWrap:"nowrap"}},children:[(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:"General Information",sx:{fontWeight:"600"}},aAe(0)),{},{className:"programSettings-tour-step1"})),(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:"Goals",sx:{fontWeight:"600"}},aAe(1)),{},{className:"programSettings-tour-step3"})),(null===t||void 0===t?void 0:t.is_hospital)&&(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:"Consultation Options",sx:{fontWeight:"600"}},aAe(2)),{},{className:"programSettings-tour-step2"})),(null===t||void 0===t?void 0:t.is_hospital)&&(0,Gt.jsx)(AV,(0,i.A)((0,i.A)({label:"Notifications",sx:{fontWeight:"600"}},aAe(3)),{},{className:"programSettings-tour-step3"}))]})}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(oAe,{value:A,index:0,children:(0,Gt.jsx)(tAe,{editProgram:s,fetchStates:l,countries:c,statesRelated:d,programData:u})}),(0,Gt.jsx)(oAe,{value:A,index:1,children:(0,Gt.jsx)(rAe,{goalList:b,toggleGoal:j,handleSaveGoals:w,handleCancelGoals:_,selectedGoals:C})}),(0,Gt.jsx)(oAe,{value:A,index:2,children:(0,Gt.jsx)(QSe,{chips:o,activeProgram:t,getChips:a})}),(0,Gt.jsx)(oAe,{value:A,index:3,children:(0,Gt.jsx)(nAe,{addNotifications:n,notifications:r})})]})]}),(0,Gt.jsx)(c_,{open:y,imageUrl:g,onClose:x,programCode:null===t||void 0===t?void 0:t.program_code,downloadImage:v,downloadButton:!0,imageWidthHeight:{width:"225",height:"225"},programName:null===t||void 0===t?void 0:t.display_name,customWidth:"375px",customMarginTop:{xs:"0px",md:"-8px"}}),(0,Gt.jsx)(PU,{openModal:p,onCloseModal:h,actionFunction:()=>f(),options:{primaryText:S("message:rpm_confirmation"),secondaryText:S("message:rpm_defaultProgramConfirm",{program:m}),btn:{primaryText:S("rpm_continue"),secondaryText:S("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})},lAe=["children","value","index"];function cAe(e){const{children:t,value:n,index:r}=e,o=Ko(e,lAe);return(0,Gt.jsx)("div",(0,i.A)((0,i.A)({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o),{},{children:n===r&&t}))}function dAe(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}const uAe=e=>{let{activeProgram:t,addNotifications:n,notifications:r,chips:o,getChips:a,editProgram:s,fetchStates:l,countries:c,statesRelated:d,programData:u,showConfirmModal:p,toggleConfirmModal:h,defaultProgramName:m,onContinue:f,QrCode:g,downloadQr:v,toggleQrDialog:x,qrDialog:y,goalList:b,toggleGoal:j,handleSaveGoals:w,handleCancelGoals:_,selectedGoals:C}=e;const{t:S}=vg(),[A,k]=(Nt(),so(),We.useState(0)),M=[{name:S("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===t||void 0===t?void 0:t.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===t||void 0===t?void 0:t.code,"/patients")},{name:S("rpm_ProgramSettings"),url:""}];return(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",alignItems:"center",children:[(0,Gt.jsx)(kH,{labels:M}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:S("rpm_ProgramSettings")})]}),(0,Gt.jsx)(Eu,{display:"flex",justifyContent:"end",mb:2,children:(0,Gt.jsx)(Vp,{variant:"contained",sx:{marginLeft:"0px"},onClick:x,children:S("rpm_ShowProgramQr")})})]}),(0,Gt.jsxs)(Eu,{bgcolor:"white",p:2,className:"programSettings",children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsxs)(eU,{value:A,onChange:(e,t)=>{k(t)},sx:{minHeight:"40px"},children:[(0,Gt.jsx)(AV,(0,i.A)({label:"General Information",sx:{fontWeight:"600"}},dAe(0))),(0,Gt.jsx)(AV,(0,i.A)({label:"Goals",sx:{fontWeight:"600"}},dAe(1))),(0,Gt.jsx)(AV,(0,i.A)({label:"Consultation Options",sx:{fontWeight:"600"}},dAe(2))),(0,Gt.jsx)(AV,(0,i.A)({label:"Notifications",sx:{fontWeight:"600"}},dAe(3)))]})}),(0,Gt.jsxs)(Eu,{mt:2,children:[(0,Gt.jsx)(cAe,{value:A,index:0,children:(0,Gt.jsx)(tAe,{editProgram:s,fetchStates:l,countries:c,statesRelated:d,programData:u})}),(0,Gt.jsx)(cAe,{value:A,index:1,children:(0,Gt.jsx)(rAe,{goalList:b,toggleGoal:j,handleSaveGoals:w,handleCancelGoals:_,selectedGoals:C})}),(0,Gt.jsx)(cAe,{value:A,index:2,children:(0,Gt.jsx)(QSe,{chips:o,activeProgram:t,getChips:a})}),(0,Gt.jsx)(cAe,{value:A,index:3,children:(0,Gt.jsx)(nAe,{addNotifications:n,notifications:r})})]})]}),(0,Gt.jsx)(c_,{open:y,imageUrl:g,onClose:x,programCode:null===t||void 0===t?void 0:t.program_code,downloadImage:v,downloadButton:!0,imageWidthHeight:{width:"225",height:"225"},programName:null===t||void 0===t?void 0:t.display_name,customWidth:"unset",customMarginTop:{xs:"0px",md:"-8px"}}),(0,Gt.jsx)(PU,{openModal:p,onCloseModal:h,actionFunction:()=>f(),options:{primaryText:S("message:rpm_confirmation"),secondaryText:S("message:rpm_defaultProgramConfirm",{program:m}),btn:{primaryText:S("rpm_continue"),secondaryText:S("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}})]})},pAe=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=Ct(qd),o=Ct(Nd),a=Nt(),[s,l]=We.useState({}),[c,d]=We.useState({}),[u,p]=We.useState({}),[h,m]=We.useState([]),[f,g]=We.useState([]),[v,x]=We.useState(""),[y,b]=(0,We.useState)(!1),[j,w]=(0,We.useState)(null),{allProgramFetch:_,programPage:C}=(0,We.useContext)(j_),[S,A]=We.useState(""),[k,M]=We.useState(""),O=!("true"===ls(r,"user_principal.attributes.skip_tour[0]","")),[T,E]=We.useState(!1),[P,D]=(0,We.useState)([]),[R,N]=(0,We.useState)([]),[L,I]=(0,We.useState)([]),F=()=>{E(!T)},$=async()=>{const{data:e}=await a(Al(null===t||void 0===t?void 0:t.code));d(e[0])},B=e=>{N(t=>t.some(t=>t.id===e.id)?t.filter(t=>t.id!==e.id):[...t,e])},z=async()=>{const e={programId:null===u||void 0===u?void 0:u.id,goalIds:R.map(e=>null===e||void 0===e?void 0:e.id)};try{await a((t=e,async e=>{e(na(!0));const n=$o.getAccessToken(),r=(0,i.A)((0,i.A)({},t),{},{priority:Number(t.priority||"0"),tenant_id:null===n||void 0===n?void 0:n.accountId});try{const e="".concat(ga.WELLNESS_GOAL,"/program");return await du(e,r)}finally{e(na(!1))}})),null!==u&&void 0!==u&&u.id&&await K(null===u||void 0===u?void 0:u.id),a(Zo({subTitle:"message:rpm_GoalSelectedSuccessfully",severity:Bc}))}catch(n){a(Zo({subTitle:n.message,severity:$c}))}var t},H=()=>{N(L)},W=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await a(Xde(e,t,"RPM",e=>{var t;g(null===e||void 0===e||null===(t=e.states)||void 0===t?void 0:t.content)},()=>{}))},V=(e,t)=>{let{setErrors:n,resetForm:r}=t;null!==e&&void 0!==e&&e.def?(w({setErrors:n,resetForm:r,values:e}),U(e,{setErrors:n,resetForm:r})):q(e,{setErrors:n,resetForm:r})},U=async(e,t)=>{try{const{data:n}=await a(Rl());if(n){if(n===u.display_name)return q(e,t);x(n),b(!!n)}}catch(n){return q(e,t)}},q=async(e,n)=>{let{setErrors:r,resetForm:o}=n;const s=(0,i.A)((0,i.A)({id:null===t||void 0===t?void 0:t.id},e),{},{country:e.country,state:e.state});try{await a(jg(s)),o(),a(Zo({subTitle:"message:rpm_ProgramUpdatedSuccessfully",severity:Bc})),_(),w(null),X()}catch(l){const e=ls(l,"response.data.field_errors",{}),t=ls(l,"response.data.code","");as(e)?as(t)?a(Zo({subTitle:l.message,severity:$c})):a(Zo({subTitle:bd(t,"error:rpm_ProgramUpdateFailed"),severity:$c})):r(yd(e))}},G=async()=>{try{const{data:e}=await a(Tg(null===t||void 0===t?void 0:t.code));l(e)}catch(e){console.log(e)}},Y=async e=>{const n=(0,i.A)((0,i.A)({},s),{},{follow_up_setting:{send_follow_up_reminder_flag:e.isEditable,follow_up_day:e.days,follow_up_time:sa()(e.time).utc().format("HH:mm")}});try{await a(Og(null===t||void 0===t?void 0:t.code,n)),G(),a(Zo({subTitle:"message:rpm_SettingsSavedSuccessfully",severity:Bc}))}catch(r){console.log(r)}},Z=async()=>{try{await a(_g(null===t||void 0===t?void 0:t.program_code)),F(),a(Zo({subTitle:"message:rpm_QrDownloadedSuccessfully",severity:Bc}))}catch(e){console.log(e),F(),a(Zo({subTitle:"error:rpm_QrDownloadedFailed",severity:$c}))}},K=async e=>{const t=await a((n=e,async e=>{e(na(!0));try{const e="".concat(ga.WELLNESS_GOAL,"?programId=").concat(n),t=await cu(e,{});return null===t||void 0===t?void 0:t.data}catch(t){return t}finally{e(na(!1))}}));var n;const r=t.map(e=>({id:e._id,name:e.goal_name}));I(r),N(r)};We.useEffect(()=>{null!==u&&void 0!==u&&u.id&&K(null===u||void 0===u?void 0:u.id)},[o,null===u||void 0===u?void 0:u.id]),We.useEffect(()=>{o&&t&&(G(),$(),(async e=>{const t=await _s(null===e||void 0===e?void 0:e.image,null===e||void 0===e?void 0:e.display_name);await a(Zde((0,i.A)((0,i.A)({},C),{},{countryCode:e.country}),"RPM",n=>{let{countries:r,states:o}=n;m(r.content),g(o.content),p((0,i.A)((0,i.A)({},e),{},{image:t,country:e.country?e.country:"IN"}))},()=>{}))})(t),(()=>{if(null===t||void 0===t||!t.qr_code)return;const e="data:image/png;base64,".concat(t.qr_code);M(e)})(),(async()=>{try{const e=await a(Ive()),t=(Array.isArray(e)?e:[]).map(e=>({id:e._id,name:e.goal_name}));D(t)}catch(e){console.log(e)}})())},[o,t]),We.useEffect(()=>{a(w_({activeMenuItem:"programSettings"}))},[]);const X=()=>{b(!1)},Q=()=>q(j.values,{setErrors:j.setErrors,resetForm:j.resetForm});return(0,Gt.jsxs)("div",{children:[n>=575?(0,Gt.jsx)(sAe,{activeProgram:t,addNotifications:Y,notifications:s,chips:c,getChips:$,editProgram:V,countries:h,statesRelated:f,fetchStates:W,programData:u,defaultProgramName:v,setShowConfirmModal:b,showConfirmModal:y,toggleConfirmModal:X,onContinue:Q,downloadQr:Z,QrCode:k,toggleQrDialog:F,qrDialog:T,goalList:P,toggleGoal:B,handleSaveGoals:z,handleCancelGoals:H,selectedGoals:R}):(0,Gt.jsx)(uAe,{activeProgram:t,addNotifications:Y,notifications:s,chips:c,getChips:$,editProgram:V,countries:h,statesRelated:f,fetchStates:W,programData:u,defaultProgramName:v,setShowConfirmModal:b,showConfirmModal:y,toggleConfirmModal:X,onContinue:Q,downloadQr:Z,QrCode:k,toggleQrDialog:F,qrDialog:T,goalList:P,toggleGoal:B,handleSaveGoals:z,handleCancelGoals:H,selectedGoals:R}),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:O,path:"programSettingsTour",setRenderer:A}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:S})]})]})};const hAe=function(e){let{addNewRule:t}=e;const{t:n}=vg(),r=so(),i=[{text:"eq",sign:"=="},{text:"gt",sign:">"},{text:"gte",sign:">="},{text:"lt",sign:"<"},{text:"lte",sign:"<="}],o=e=>{const t=i.find(t=>t.text===e);return null===t||void 0===t?void 0:t.sign},a=e=>{let{name:t,rule:r,number:a}=e;return(0,Gt.jsx)(Zz,{name:t,children:e=>{var s,l,c,d;let{remove:u,push:p}=e;return(0,Gt.jsx)(df,{item:!0,md:12,children:(null===r||void 0===r||null===(s=r.when)||void 0===s||null===(l=s.cond)||void 0===l?void 0:l.length)>0&&(null===r||void 0===r||null===(c=r.when)||void 0===c||null===(d=c.cond)||void 0===d?void 0:d.map((e,r)=>(0,Gt.jsxs)(We.Fragment,{children:[(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",sx:{m:"auto",mb:2,pr:2,width:"100%",border:"1px solid #ccc",borderRadius:1},children:[(0,Gt.jsxs)(df,{item:!0,md:!0,mb:2,children:[(0,Gt.jsx)(Ym,{variant:"body1",gutterBottom:!0,children:n("rpm_Name")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"".concat(t,".").concat(r,".name"),name:"".concat(t,".").concat(r,".name"),size:"small",disabled:!0,input:(0,Gt.jsx)(Rj,{}),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:n("message:rpm_VitalNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"Util.ToInt(Data.systolic)",children:"Systolic"}),(0,Gt.jsx)($m,{value:"Util.ToInt(Data.diastolic)",children:"Diastolic"})]}),(0,Gt.jsx)(Xz,{name:"".concat(t,".").concat(r,".name"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_Name")})})})]}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Eu,{mt:1,children:o(e.op)})}),(0,Gt.jsxs)(df,{item:!0,md:!0,mb:2,sx:{display:"none"},children:[(0,Gt.jsx)(Ym,{variant:"body1",gutterBottom:!0,children:n("rpm_Operator")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Dw,id:"".concat(t,".").concat(r,".op"),name:"".concat(t,".").concat(r,".op"),size:"small",input:(0,Gt.jsx)(Rj,{}),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:n("message:rpm_VitalOperatorHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:i.map(e=>(0,Gt.jsx)($m,{value:e.text,children:e.sign},e.text))}),(0,Gt.jsx)(Xz,{name:"".concat(t,".").concat(r,".op"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_Operator")})})})]}),(0,Gt.jsxs)(df,{item:!0,md:!0,mb:2,className:"hide_num_arrow",children:[(0,Gt.jsx)(Ym,{variant:"body1",gutterBottom:!0,children:n("rpm_Value")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"".concat(t,".").concat(r,".value"),name:"".concat(t,".").concat(r,".value"),size:"small",type:"number",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:n("message:rpm_VitalValueHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"".concat(t,".").concat(r,".value"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_Value")})})})]}),(0,Gt.jsxs)(df,{item:!0,md:!0,mb:2,sx:{mt:3},children:[(0,Gt.jsx)(Kp,{color:"error",onClick:()=>u(r),sx:{display:"none"},children:(0,Gt.jsx)(cCe.A,{fontSize:"small",sx:{width:16,height:16}})}),(0,Gt.jsx)(Kp,{sx:{display:"none"},color:"primary",onClick:()=>p({name:"",value:"",op:""}),children:(0,Gt.jsx)(Sbe.A,{fontSize:"small",sx:{width:16,height:16}})})]})]}),(0,Gt.jsxs)(Eu,{maxWidth:250,mb:2,className:"d-none",children:[(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"rule.".concat(a,".when.between"),name:"rule.".concat(a,".when.between"),size:"small",input:(0,Gt.jsx)(Rj,{}),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:n("message:rpm_ConditionBetweenVitalsHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"and",children:"AND"}),(0,Gt.jsx)($m,{value:"or",children:"OR"})]}),(0,Gt.jsx)(Xz,{name:"rule.".concat(a,".when.between"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_Condition")})})})]})]},r)))})}})};return(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsx)(Iz,{initialValues:{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:[{name:"Hypertensive_Crisis",desc:"High blood pressure (Hypertensive Crisis).",salience:5,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:180,op:"gte",between:"or"},{name:"Util.ToInt(Data.diastolic)",value:120,op:"gte",between:"or"}],between:"or"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"High blood pressure (Hypertensive Crisis)"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"High blood pressure (Hypertensive Crisis)"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"High blood pressure (Hypertensive Stage 2).",salience:4,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:140,op:"gte",between:"or"},{name:"Util.ToInt(Data.diastolic)",value:90,op:"gte",between:"or"}],between:"or"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"High blood pressure (Hypertension Stage 2)"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"High blood pressure (Hypertension Stage 2)"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"High blood pressure (Hypertension Stage 1)",salience:3,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:130,op:"gte",between:"or"},{name:"Util.ToInt(Data.diastolic)",value:80,op:"gte",between:"or"}],between:"or"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"High blood pressure (Hypertension Stage 1)"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"High blood pressure (Hypertension Stage 1)"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"Elevated blood pressure",salience:2,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:120,op:"gte",between:"and"},{name:"Util.ToInt(Data.diastolic)",value:80,op:"lt",between:"and"}],between:"and"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Elevated blood pressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Elevated blood pressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"Low blood pressure",salience:1,when:{cond:[{name:"Util.ToInt(Data.systolic)",value:90,op:"lt",between:"and"},{name:"Util.ToInt(Data.diastolic)",value:60,op:"lt",between:"and"}],between:"and"},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Low blood pressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Low blood pressure"}]},{call:["Complete"]}]}]},validationSchema:vV.addRule,onSubmit:t,enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{sx:{py:1.5,bgcolor:"primary.theme.50"},title:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:n("rpm_AddNewRule")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",onClick:()=>r(-1),children:n("rpm_Back")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:n("rpm_Save")})})]})}),(0,Gt.jsx)(uH,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsxs)(df,{item:!0,xs:12,md:4,children:[(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:n("rpm_VitalType")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Dw,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,input:(0,Gt.jsx)(Rj,{}),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:n("message:rpm_VitalTypeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===cd||void 0===cd?void 0:cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:n("rpm_".concat(e.name))},e.name))}),(0,Gt.jsx)(Xz,{name:"data_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_VitalType")})})})]}),(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:n("rpm_ProcessingMode")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,input:(0,Gt.jsx)(Rj,{}),renderValue:e=>e||"Select",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:n("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"BATCH",children:"BATCH"}),(0,Gt.jsx)($m,{value:"REALTIME",children:"REALTIME"})]}),(0,Gt.jsx)(Xz,{name:"processing_mode",children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_ProcessingMode")})})})]}),"BATCH"===t.processing_mode&&(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"data_batch_size",sx:{mb:.75},children:n("rpm_BatchDataSize")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"data_batch_size",name:"data_batch_size",size:"small",type:"number"}),(0,Gt.jsx)(Xz,{name:"data_batch_size",children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_BatchDataSize")})})})]}),(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:n("rpm_ShortDescription")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"short_description",name:"short_description",size:"small",multiline:!0,rows:4,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:n("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"short_description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_ShortDescription")})})})]})]}),(0,Gt.jsx)(df,{item:!0,xs:12,md:8,children:(0,Gt.jsx)(Zz,{name:"rule",children:e=>{var r,i;let{remove:o,push:s}=e;return(0,Gt.jsxs)(Eu,{p:2,borderRadius:1,bgcolor:"primary.theme.50",sx:{maxHeight:576,overflow:"auto"},children:[(null===t||void 0===t||null===(r=t.rule)||void 0===r?void 0:r.length)>0&&(null===t||void 0===t||null===(i=t.rule)||void 0===i?void 0:i.map((e,t)=>(0,Gt.jsxs)(df,{container:!0,spacing:2,sx:{m:"auto",mb:2,pr:2,width:"100%",bgcolor:"common.white",borderRadius:1},children:[(0,Gt.jsxs)(df,{item:!0,md:6,mb:2,children:[(0,Gt.jsx)(Ym,{variant:"body1",gutterBottom:!0,children:n("rpm_RuleName")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"rule.".concat(t,".name"),name:"rule.".concat(t,".name"),size:"small",disabled:!0,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:n("message:rpm_RuleNameHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"rule.".concat(t,".name"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_RuleName")})})})]}),(0,Gt.jsxs)(df,{item:!0,md:6,mb:2,children:[(0,Gt.jsx)(Ym,{variant:"body1",gutterBottom:!0,children:n("rpm_Description")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"rule.".concat(t,".desc"),name:"rule.".concat(t,".desc"),size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:n("message:rpm_RuleDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"rule.".concat(t,".desc"),children:e=>(0,Gt.jsx)(iw,{error:!0,children:n(e,{field:n("rpm_Description")})})})]}),(0,Gt.jsx)(a,{name:"rule.".concat(t,".when.cond"),rule:e,number:t}),(0,Gt.jsx)(df,{item:!0,mb:2,sx:{display:"none"},children:(0,Gt.jsx)(Kp,{color:"error",onClick:()=>o(t),children:(0,Gt.jsx)(cCe.A,{fontSize:"small",sx:{width:16,height:16}})})})]},t))),(0,Gt.jsx)(Vp,{sx:{display:"none"},disableElevation:!0,variant:"contained",color:"primary",onClick:()=>s({name:"",desc:"",when:{cond:[{name:"",value:"",op:""}],between:""}}),children:"Add More Rule"})]})}})})]})})]})})})}},"editor_formik")})})};function mAe(e){let{exRuleArr:t,ruleData:n,addNewRule:r,activeProgram:o,pulseExRuleArr:a}=e;const{t:s}=vg(),l=null===n||void 0===n?void 0:n.short_description.split("/"),c={data_type:null!==n&&void 0!==n&&n.data_type?null===n||void 0===n?void 0:n.data_type:"",processing_mode:null!==n&&void 0!==n&&n.processing_mode?null===n||void 0===n?void 0:n.processing_mode:"",data_batch_size:null!==n&&void 0!==n&&n.data_batch_size?null===n||void 0===n?void 0:n.data_batch_size:"",short_description:null!==n&&void 0!==n&&n.short_description?l[0]:"",rule:null!==n&&void 0!==n&&n.rule?null===n||void 0===n?void 0:n.rule:""},d=((()=>{let e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{name:t.name,desc:t.desc,when:{cond:t.data,between:t.data.map(e=>e.between)[0]||""}}))})})(),[{name:s("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===o||void 0===o?void 0:o.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients")},{name:s("rpm_Rules"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/rules")},{name:s("rpm_".concat(null===n||void 0===n?void 0:n.data_type)),url:""}]),u=[{id:"stage",align:"left"},{id:"from1",label:"From",align:"left"},{id:"to1",label:"To",align:"left"},{id:"from2",label:"From",align:"left",format:e=>e.toLocaleString("en-US")},{id:"to2",label:"To",align:"left",format:e=>e.toLocaleString("en-US")}];return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:d})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsx)(Iz,{initialValues:ta()(n)?{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:'rule HighSystolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.systolic) >= 180\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertensive Crisis)");\n          Retract("HighSystolic_Stage3");\n\n  }\n\n  rule HighDiastolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.diastolic) >= 120\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertensive Crisis)");\n          Retract("HighDiastolic_Stage3");\n  }\n\n  rule HighSystolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.systolic) >= 140 && Util.ToInt(Data.systolic) <= 179\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 2)");\n          Retract("HighSystolic_Stage2");\n  }\n\n  rule HighDiastolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.diastolic) >= 90 && Util.ToInt(Data.diastolic) <= 119\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 2)");\n          Retract("HighDiastolic_Stage2");\n  }\n\n  rule HighSystolic {\n      when\n          Util.ToInt(Data.systolic) >= 130 &&\n  Util.ToInt(Data.systolic) <= 139\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 1)");\n         Retract("HighSystolic");\n  }\n\n  rule HighDiastolic {\n      when\n          Util.ToInt(Data.diastolic) >= 80 &&\n  Util.ToInt(Data.diastolic) <= 89\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 1)");\n          Retract("HighDiastolic");\n  }\n\n  rule ElevatedBloodPressure {\n      when\n          Util.ToInt(Data.systolic) >= 120 &&\n  Util.ToInt(Data.systolic) <= 129 &&\n  Util.ToInt(Data.diastolic) < 80\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Elevated blood\n  pressure");\n          Complete();\n  }\n\n  rule CheckLowBP salience 1 {\n      when\n          Util.ToInt(Data.systolic) < 90 &&\n  Util.ToInt(Data.diastolic) < 60\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Low blood\n  pressure");\n          Alerts.Add("bp", "diastolic", Data.diastolic, "Low blood\n  pressure");\n          Complete();\n  }'}:c,validationSchema:vV.addRule,onSubmit:r,enableReinitialize:!0,children:e=>{var r,i,o,l,c,d,p,h,m,f,g,v,x,y,b,j,w,_,C,S;let{values:A}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",children:ta()(n)?s("rpm_AddNewRule"):s("rpm_ViewRule")})}),ta()(n)&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:s("rpm_Save")})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:s("rpm_VitalType")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,Gt.jsx)(Rj,{}),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:s("message:rpm_VitalTypeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[null===cd||void 0===cd?void 0:cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:s("rpm_".concat(e.name))},e.name)),(0,Gt.jsx)($m,{value:"bp.pulse",children:s("rpm_bp")})]}),(0,Gt.jsx)(Xz,{name:"data_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:s(e,{field:s("rpm_VitalType")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:s("rpm_ProcessingMode")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,Gt.jsx)(Rj,{}),renderValue:e=>e||"Select",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:s("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"BATCH",children:"BATCH"}),(0,Gt.jsx)($m,{value:"REALTIME",children:"REALTIME"})]}),(0,Gt.jsx)(Xz,{name:"processing_mode",children:e=>(0,Gt.jsx)(iw,{error:!0,children:s(e,{field:s("rpm_ProcessingMode")})})})]})}),"BATCH"===A.processing_mode&&(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"data_batch_size",sx:{mb:.75},children:s("rpm_BatchDataSize")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"data_batch_size",name:"data_batch_size",size:"small",disabled:!ta()(n)}),(0,Gt.jsx)(Xz,{name:"data_batch_size",children:e=>(0,Gt.jsx)(iw,{error:!0,children:s(e,{field:s("rpm_BatchDataSize")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:s("rpm_ShortDescription")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"short_description",name:"short_description",size:"small",disabled:!ta()(n),endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:s("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"short_description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:s(e,{field:s("rpm_ShortDescription")})})})]})}),"bp"===A.data_type&&(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(Eu,{sx:{fontWeight:700},children:s("rpm_BloodPressureRule")}),(0,Gt.jsx)(PC,{sx:{borderRadius:2,mt:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsxs)(cS,{children:[(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:s("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:s("rpm_Systolic")}),(0,Gt.jsx)(rC,{align:"center",colSpan:3,children:s("rpm_Diastolic")}),(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:s("rpm_BpRange(Sys/Dia)")})]}),(0,Gt.jsx)(K_,{className:"inner_head",sx:{"& .MuiTableCell-head:first-of-type":{display:"none"},"& .MuiTableCell-head":{border:1,borderColor:"#ddd"},bgcolor:"primary.theme.50"},children:u.map(e=>(0,Gt.jsx)(rC,{align:"center",style:{top:57,minWidth:e.minWidth},colSpan:"1",children:e.label},e.id))})]}),(0,Gt.jsxs)(nS,{children:[null===t||void 0===t?void 0:t.map((e,n)=>{var r,i,o,a,l,c,d,u,p,h,m,f,g,v;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:s("rpm_".concat(e.name))}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===n&&t[n].data[0].value,!(0===n||n===t.length-1)&&e.data[0].value,n===t.length-1&&"-"]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===n?"-":!(n===t.length-1)&&(null===(r=t[n-1])||void 0===r||null===(i=r.data[0])||void 0===i?void 0:i.value)-1,n===t.length-1&&(null===e||void 0===e||null===(o=e.data[0])||void 0===o?void 0:o.value)]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===n&&t[n].data[1].value,!(0===n||n===t.length-1||3===n)&&e.data[1].value,(n===t.length-1||3===n)&&"-"]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[0===n?"-":!(n===t.length-1)&&(null===(a=t[n-1])||void 0===a||null===(l=a.data[1])||void 0===l?void 0:l.value)-1,n===t.length-1&&(null===e||void 0===e||null===(c=e.data[1])||void 0===c?void 0:c.value)]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[0===n&&"".concat(t[n].data[0].value," & Above"),!(0===n||n===t.length-1)&&"".concat(null===(d=t[n])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value,"\n                                                      -\n                                                      ").concat((null===(p=t[n-1])||void 0===p||null===(h=p.data[0])||void 0===h?void 0:h.value)-1),n===t.length-1&&"Below or ".concat(e.data[0].value)," / ",0===n&&"".concat(t[n].data[1].value," & Above"),!(0===n||n===t.length-1||3===n)&&"".concat(null===(m=t[n])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value,"\n                                                      -\n                                                      ").concat((null===(g=t[n-1])||void 0===g||null===(v=g.data[1])||void 0===v?void 0:v.value)-1),(n===t.length-1||3===n)&&"Below or ".concat(e.data[1].value)]})]},e.salience)}),!ta()(t)&&(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normal",children:s("rpm_NormalPressure")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(r=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===r||null===(i=r.data[0])||void 0===i?void 0:i.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(o=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===o||null===(l=o.data[0])||void 0===l?void 0:l.value)-1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(c=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===c||null===(d=c.data[1])||void 0===d?void 0:d.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(p=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===p||null===(h=p.data[1])||void 0===h?void 0:h.value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===(m=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===m||null===(f=m.data[0])||void 0===f?void 0:f.value)+1," "," - ",(null===(g=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===g||null===(v=g.data[0])||void 0===v?void 0:v.value)-1," "," / ",(null===(x=t[(null===t||void 0===t?void 0:t.length)-1])||void 0===x||null===(y=x.data[1])||void 0===y?void 0:y.value)+1," "," - ",(null===(b=t[(null===t||void 0===t?void 0:t.length)-2])||void 0===b||null===(j=b.data[1])||void 0===j?void 0:j.value)-1]})]})]})]})})]})}),"bp"===A.data_type&&(0,Gt.jsx)(df,{item:!0,xs:12,md:6,children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(Eu,{sx:{fontWeight:700},children:s("rpm_PulseRule")}),(0,Gt.jsx)(PC,{sx:{borderRadius:2,mt:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsx)(cS,{children:(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:"6px"}},children:[(0,Gt.jsx)(rC,{align:"center",children:s("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",children:s("rpm_From")}),(0,Gt.jsx)(rC,{align:"center",children:s("rpm_To")}),(0,Gt.jsx)(rC,{align:"center",children:s("rpm_Range")})]})}),(0,Gt.jsxs)(nS,{children:[null===a||void 0===a?void 0:a.map((e,t)=>{var n,r,i,o;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",className:"tableColor ".concat(e.name),children:s("rpm_".concat(e.name))}),(0,Gt.jsx)(rC,{align:"center",children:t==a.length-1?"-":e.data[0].value}),(0,Gt.jsx)(rC,{align:"center",children:0===t?"-":t!==a.length-1?(null===(n=a[t-1])||void 0===n||null===(r=n.data)||void 0===r?void 0:r[0].value)-1:a[1].data[0].value}),(0,Gt.jsxs)(rC,{align:"center",children:[t==a.length-1?"Below or ":e.data[0].value,!(0===t||1===t)&&"-",0===t?" & Above":t!==a.length-1?(null===(i=a[t-1])||void 0===i||null===(o=i.data)||void 0===o?void 0:o[0].value)-1:a[1].data[0].value]})]},e.salience)}),!ta()(t)&&(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",className:"tableColor normal",children:s("rpm_NormalPulse")}),(0,Gt.jsx)(rC,{align:"center",children:(null===(w=a[1])||void 0===w?void 0:w.data[0].value)+1}),(0,Gt.jsx)(rC,{align:"center",children:(null===(_=a[0])||void 0===_?void 0:_.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",children:[(null===(C=a[1])||void 0===C?void 0:C.data[0].value)+1," ","-"," ",(null===(S=a[0])||void 0===S?void 0:S.data[0].value)-1]})]})]})]})})]})})]})})]})})})}},"editor_formik")})}),!1]})}mAe.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],activeProgram:{},pulseExRuleArr:[]};const fAe=mAe;function gAe(e){let{glucoseExRuleArr:t,glucoseRuleData:n,addNewRule:r,activeProgram:o}=e;const{t:a}=vg(),s={data_type:null!==n&&void 0!==n&&n.data_type?null===n||void 0===n?void 0:n.data_type:"",processing_mode:null!==n&&void 0!==n&&n.processing_mode?null===n||void 0===n?void 0:n.processing_mode:"",data_batch_size:null!==n&&void 0!==n&&n.data_batch_size?null===n||void 0===n?void 0:n.data_batch_size:"",short_description:null!==n&&void 0!==n&&n.short_description?null===n||void 0===n?void 0:n.short_description:"",rule:null!==n&&void 0!==n&&n.rule?null===n||void 0===n?void 0:n.rule:""},l=((()=>{let e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{name:t.name,desc:t.desc,when:{cond:t.data,between:t.data.map(e=>e.between)[0]||""}}))})})(),[{name:a("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===o||void 0===o?void 0:o.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/patients")},{name:a("rpm_Rules"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===o||void 0===o?void 0:o.code,"/rules")},{name:a("rpm_".concat(null===n||void 0===n?void 0:n.data_type)),url:""}]);return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:l})}),(0,Gt.jsx)(df,{container:!0,spacing:2,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:12,lg:12,children:(0,Gt.jsx)(Iz,{initialValues:ta()(n)?{data_type:"",processing_mode:"",data_batch_size:"",short_description:"",rule:'rule HighSystolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.systolic) >= 180\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertensive Crisis)");\n          Retract("HighSystolic_Stage3");\n\n  }\n\n  rule HighDiastolic_Stage3 salience 5 {\n      when\n          Util.ToInt(Data.diastolic) >= 120\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertensive Crisis)");\n          Retract("HighDiastolic_Stage3");\n  }\n\n  rule HighSystolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.systolic) >= 140 && Util.ToInt(Data.systolic) <= 179\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 2)");\n          Retract("HighSystolic_Stage2");\n  }\n\n  rule HighDiastolic_Stage2 salience 4 {\n      when\n          Util.ToInt(Data.diastolic) >= 90 && Util.ToInt(Data.diastolic) <= 119\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 2)");\n          Retract("HighDiastolic_Stage2");\n  }\n\n  rule HighSystolic {\n      when\n          Util.ToInt(Data.systolic) >= 130 &&\n  Util.ToInt(Data.systolic) <= 139\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "High blood pressure\n   (Hypertension Stage 1)");\n         Retract("HighSystolic");\n  }\n\n  rule HighDiastolic {\n      when\n          Util.ToInt(Data.diastolic) >= 80 &&\n  Util.ToInt(Data.diastolic) <= 89\n      then\n          Alerts.Add("bp", "diastolic", Data.diastolic, "High blood\n  pressure (Hypertension Stage 1)");\n          Retract("HighDiastolic");\n  }\n\n  rule ElevatedBloodPressure {\n      when\n          Util.ToInt(Data.systolic) >= 120 &&\n  Util.ToInt(Data.systolic) <= 129 &&\n  Util.ToInt(Data.diastolic) < 80\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Elevated blood\n  pressure");\n          Complete();\n  }\n\n  rule CheckLowBP salience 1 {\n      when\n          Util.ToInt(Data.systolic) < 90 &&\n  Util.ToInt(Data.diastolic) < 60\n      then\n          Alerts.Add("bp", "systolic", Data.systolic, "Low blood\n  pressure");\n          Alerts.Add("bp", "diastolic", Data.diastolic, "Low blood\n  pressure");\n          Complete();\n  }'}:s,validationSchema:vV.addRule,onSubmit:r,enableReinitialize:!0,children:e=>{var r,i,o,s,l,c,d,u,p;let{values:h}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(Wz,{children:(0,Gt.jsxs)(aH,{variant:"outlined",children:[(0,Gt.jsx)(WH,{title:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",gutterBottom:!0,component:"h5",sx:{marginBottom:"0"},children:ta()(n)?a("rpm_AddNewRule"):a("rpm_ViewRule")})}),ta()(n)&&(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{type:"submit",variant:"contained",color:"primary",disableElevation:!0,children:a("rpm_Save")})})})]}),sx:{py:1.5,bgcolor:"primary.theme.50"}}),(0,Gt.jsx)(uH,{children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:a("rpm_VitalType")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,disabled:!ta()(n),input:(0,Gt.jsx)(Rj,{}),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:a("message:rpm_VitalTypeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[null===cd||void 0===cd?void 0:cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:a("rpm_".concat(e.name))},e.name)),(0,Gt.jsx)($m,{value:"bp.pulse",children:a("rpm_bp")})]}),(0,Gt.jsx)(Xz,{name:"data_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_VitalType")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:4,children:(0,Gt.jsxs)(Eu,{mb:2,children:[(0,Gt.jsx)(qj,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:a("rpm_ShortDescription")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"short_description",name:"short_description",size:"small",disabled:!ta()(n),multiline:!0,endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:a("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"short_description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:a(e,{field:a("rpm_ShortDescription")})})})]})}),"glucose"==h.data_type&&(0,Gt.jsx)(df,{item:!0,xs:12,md:12,children:(0,Gt.jsx)(Eu,{mb:2,children:(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(PC,{sx:{borderRadius:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsx)(cS,{children:(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:a("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:a("rpm_Activity")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:a("rpm_From")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:a("rpm_To")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:a("rpm_Range")})]})}),(0,Gt.jsxs)(nS,{children:[(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:a("rpm_normal")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor fasting",children:(0,Gt.jsx)(XO,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,Gt.jsx)("strong",{children:a("rpm_fasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(r=t[2])||void 0===r?void 0:r.data[0].value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(i=t[1])||void 0===i?void 0:i.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===(o=t[2])||void 0===o?void 0:o.data[0].value)+1," - ",(null===(s=t[1])||void 0===s?void 0:s.data[0].value)-1]})]}),(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",borderBottom:2,borderBottomColor:"#bbb",p:.5}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:a("rpm_normal")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor nonfasting",children:(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,Gt.jsx)("strong",{children:a("rpm_nonfasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(l=t[5])||void 0===l?void 0:l.data[0].value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(c=t[4])||void 0===c?void 0:c.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===(d=t[5])||void 0===d?void 0:d.data[0].value)+1," - ",(null===(u=t[4])||void 0===u?void 0:u.data[0].value)-1]})]}),null===t||void 0===t||null===(p=t.slice(0,6))||void 0===p?void 0:p.map((e,n)=>{var r,i,o,s,l,c,d,u,p,h,m,f;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:a("rpm_".concat(e.name.toLowerCase()))}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat("eq"==e.data[(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1].op?"fasting":"nonfasting"),children:"eq"==e.data[(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.length)-1].op?(0,Gt.jsx)(XO,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,Gt.jsx)("strong",{children:a("rpm_fasting")})}):(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,Gt.jsx)("strong",{children:a("rpm_nonfasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"-":e.data[0].value}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:"DiabetesFasting"==e.name||"DiabetesPP"===e.name?"-":2===n?(null===(o=t[t.length-2])||void 0===o?void 0:o.data[0].value)-1:5===n?(null===(s=t[t.length-1])||void 0===s?void 0:s.data[0].value)-1:6===n?(null===(l=t[n-5])||void 0===l?void 0:l.data[0].value)-1:7===n?(null===(c=t[n-3])||void 0===c?void 0:c.data[0].value)-1:(null===(d=t[n-1])||void 0===d?void 0:d.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:["HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"Below or ":e.data[0].value,"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name||"DiabetesFasting"==e.name||"DiabetesPP"==e.name?"  ":" - ","DiabetesFasting"==e.name||"DiabetesPP"===e.name?" & Above":2===n?(null===(u=t[t.length-2])||void 0===u?void 0:u.data[0].value)-1:5===n?(null===(p=t[t.length-1])||void 0===p?void 0:p.data[0].value)-1:6===n?(null===(h=t[n-5])||void 0===h?void 0:h.data[0].value)-1:7===n?(null===(m=t[n-3])||void 0===m?void 0:m.data[0].value)-1:(null===(f=t[n-1])||void 0===f?void 0:f.data[0].value)-1]})]},e.salience)})]})]})})})})})]})})]})})})}},"editor_formik")})}),!1]})}gAe.defaultProps={addNewRule:()=>{},glucoseRuleData:{},rulesHeadCell:[],activeProgram:{},glucoseExRuleArr:[]};const vAe=gAe;function xAe(e){let{ruleData:t,addNewRule:n,rulesHeadCell:r,activeProgram:o,pulseRuleData:a,glucoseRuleData:s}=e;const{ruleId:l}=lo(),[c,d]=We.useState(null),[u,p]=We.useState(null),[h,m]=We.useState(null),[f,g]=We.useState(null),[v,x]=We.useState(null),[y,b]=We.useState(null),j=[{text:"and",sign:"&&"},{text:"or",sign:"||"},{text:"eq",sign:"=="},{text:"not",sign:"!="},{text:"gt",sign:">"},{text:"gte",sign:">="},{text:"lt",sign:"<"},{text:"lte",sign:"<="},{text:"bor",sign:"|"},{text:"band",sign:"&"},{text:"plus",sign:"+"},{text:"minus",sign:"-"},{text:"div",sign:"/"},{text:"mul",sign:"*"},{text:"mod",sign:"%"}],w=e=>{const t=j.find(t=>t.text===e);return null===t||void 0===t?void 0:t.sign},_=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t},C=e=>{var t;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{container:!0,spacing:1.5,sx:{"& .sign":{"& span:last-child":{display:"none"}}},children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((t,n)=>{var r;return(0,Gt.jsxs)(df,{item:!0,className:(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1===n?"sign":"",children:[(0,Gt.jsx)(Eu,{component:"span",children:null===t||void 0===t?void 0:t.name})," ",(0,Gt.jsx)(Eu,{component:"span",children:w(null===t||void 0===t?void 0:t.op)})," ",(0,Gt.jsx)(Eu,{component:"span",children:null===t||void 0===t?void 0:t.value})," ",(0,Gt.jsx)(Eu,{component:"span",children:w(null===t||void 0===t?void 0:t.between)})]},n)})})})};return We.useEffect(()=>{ta()(t)||d(JSON.parse(null===t||void 0===t?void 0:t.rule))},[t]),We.useEffect(()=>{ta()(s)||m(JSON.parse(null===s||void 0===s?void 0:s.rule))},[s]),We.useEffect(()=>{ta()(a)||p(JSON.parse(null===a||void 0===a?void 0:a.rule))},[a]),We.useEffect(()=>{(()=>{const e=[];null===c||void 0===c||c.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:_(t)}))}),x(e)})()},[c]),We.useEffect(()=>{(async()=>{const e=[];await(null===h||void 0===h?void 0:h.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:_(t)}))})),g(e)})()},[h]),We.useEffect(()=>{(()=>{const e=[];null===u||void 0===u||u.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:_(t)}))}),b(e)})()},[u]),We.useEffect(()=>{w()},[v]),"add"===l?(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(hAe,{addNewRule:n})}):(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[!ta()(v)&&(0,Gt.jsx)(fAe,{exRuleArr:v,ruleData:t,rulesHeadCell:r,getVitalsValue:C,activeProgram:o,pulseRuleData:a,pulseExRuleArr:y}),!ta()(f)&&(0,Gt.jsx)(vAe,{glucoseExRuleArr:f,glucoseRuleData:s,rulesHeadCell:r,getVitalsValue:C,activeProgram:o})]})}xAe.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],activeProgram:{},pulseRuleData:{},glucoseRuleData:{}};const yAe=xAe;const bAe=function(e){var t;let{activeProgram:n}=e;const r=Nt(),o=Ct(Nd),{t:a}=vg(),s=so(),{enqueueSnackbar:l}=hi(),{ruleId:c}=lo(),[d,u]=We.useState(null),[p,h]=We.useState(null),[m,f]=We.useState(null),[g,v]=We.useState(null),x=e=>{const t=[];return null===e||void 0===e||e.forEach(e=>{t.push((0,i.A)((0,i.A)({},e),{},{name:e.name,desc:e.desc,when:y(e)}))}),t},y=e=>{let t={};return e.when.between?t[e.when.between]=e.when.cond.map(e=>({[e.op]:[e.name,parseInt(e.value)]})):t[e.when.cond[0].op]=[e.when.cond[0].name,parseInt(e.when.cond[0].value)],t},b=[{id:"level",label:a("rpm_Level"),isSort:!1,sortProperty:"level"},{id:"condition",label:a("rpm_Condition"),isSort:!1,sortProperty:"condition"},{id:"description",label:a("rpm_Description"),isSort:!1,sortProperty:"description"}];return We.useEffect(()=>{o&&"add"!==c&&!as(n)&&(async()=>{const{data:e}=await r(kg(null===n||void 0===n?void 0:n.code,c));"bp"==e.data_type&&u(e),"glucose"==e.data_type&&h(e)})()},[o,c,n]),We.useEffect(()=>{as(g)||as(n)||(async()=>{const{data:e}=await r(kg(null===n||void 0===n?void 0:n.code,null===g||void 0===g?void 0:g.id));f(e)})()},[o,g]),We.useEffect(()=>{o&&"add"!==c&&!as(n)&&(async()=>{try{const{data:e}=await r(Cg(null===n||void 0===n?void 0:n.code,{per_page:999})),{content:t}=e||{},i=null===t||void 0===t?void 0:t.find(e=>"bp.pulse"===e.data_type);v(i)}catch(e){r(Zo({subTitle:e.message,severity:$c}))}})()},[o,n]),We.useEffect(()=>{r(w_({activeMenuItem:"rules_program"}))},[n]),as(n)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsx)(Gt.Fragment,{children:as(n)||null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showViewRuleBtn?(0,Gt.jsx)(yAe,{addNewRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,o=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(x(t))});try{await r(Sg(null===n||void 0===n?void 0:n.code,o)),l(a("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),s(-1)}catch(c){l(c.message,{variant:"error"})}},ruleData:d,rulesHeadCell:b,glucoseRuleData:p,activeProgram:n,pulseRuleData:m}):(0,Gt.jsx)(__,{})})};function jAe(e){var t,n,r,o,a,s,l,c,d,u,p,h,m,f,g,v;let{handleInitialValues:x}=e;const{t:y}=vg(),[b,j]=We.useState([]),w=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{as(x)||(()=>{const e=[];null===x||void 0===x||x.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:w(t)}))}),j(e)})()},[x]),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(PC,{sx:{borderRadius:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsxs)(cS,{children:[(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:y("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:y("rpm_Systolic")}),(0,Gt.jsx)(rC,{align:"center",colSpan:3,children:y("rpm_Diastolic")}),(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:y("rpm_BpRange(Sys/Dia)")})]}),(0,Gt.jsx)(K_,{className:"inner_head",sx:{"& .MuiTableCell-head:first-of-type":{display:"none"},"& .MuiTableCell-head":{border:1,borderColor:"#ddd"},bgcolor:"primary.theme.50"},children:[{id:"stage",align:"left"},{id:"from1",label:"From",align:"left"},{id:"to1",label:"To",align:"left"},{id:"from2",label:"From",align:"left"},{id:"to2",label:"To",align:"left"}].map(e=>(0,Gt.jsx)(rC,{align:"center",style:{top:57,minWidth:e.minWidth},colSpan:"1",children:y("rpm_".concat(e.label))},e.id))})]}),(0,Gt.jsxs)(nS,{children:[null===b||void 0===b?void 0:b.map((e,t)=>{var n,r,i,o,a,s,l,c,d,u,p,h,m,f;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",padding:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:y("rpm_".concat(e.name))}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===t&&b[t].data[0].value,!(0===t||t===b.length-1)&&e.data[0].value,t===b.length-1&&"-"]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===t?"-":!(t===b.length-1)&&(null===(n=b[t-1])||void 0===n||null===(r=n.data[0])||void 0===r?void 0:r.value)-1,t===b.length-1&&(null===e||void 0===e||null===(i=e.data[0])||void 0===i?void 0:i.value)]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"1",children:[0===t&&b[t].data[1].value,!(0===t||t===b.length-1||3===t)&&e.data[1].value,(t===b.length-1||3===t)&&"-"]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[0===t?"-":!(t===b.length-1)&&(null===(o=b[t-1])||void 0===o||null===(a=o.data[1])||void 0===a?void 0:a.value)-1,t===b.length-1&&(null===e||void 0===e||null===(s=e.data[1])||void 0===s?void 0:s.value)]}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[0===t&&"".concat(b[t].data[0].value," & Above"),!(0===t||t===b.length-1)&&"".concat(null===(l=b[t])||void 0===l||null===(c=l.data[0])||void 0===c?void 0:c.value,"\n                        -\n                        ").concat((null===(d=b[t-1])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value)-1),t===b.length-1&&"Below or ".concat(e.data[0].value)," / ",0===t&&"".concat(b[t].data[1].value," & Above"),!(0===t||t===b.length-1||3===t)&&"".concat(null===(p=b[t])||void 0===p||null===(h=p.data[1])||void 0===h?void 0:h.value,"\n                        -\n                        ").concat((null===(m=b[t-1])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value)-1),(t===b.length-1||3===t)&&"Below or ".concat(e.data[1].value)]})]},e.salience)}),!as(b)&&(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normal",children:y("rpm_NormalPressure")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(t=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===t||null===(n=t.data[0])||void 0===n?void 0:n.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(r=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===r||null===(o=r.data[0])||void 0===o?void 0:o.value)-1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"1",children:(null===(a=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===a||null===(s=a.data[1])||void 0===s?void 0:s.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===(l=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===l||null===(c=l.data[1])||void 0===c?void 0:c.value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===(d=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===d||null===(u=d.data[0])||void 0===u?void 0:u.value)+1," "," - ",(null===(p=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===p||null===(h=p.data[0])||void 0===h?void 0:h.value)-1," "," / ",(null===(m=b[(null===b||void 0===b?void 0:b.length)-1])||void 0===m||null===(f=m.data[1])||void 0===f?void 0:f.value)+1," "," - ",(null===(g=b[(null===b||void 0===b?void 0:b.length)-2])||void 0===g||null===(v=g.data[1])||void 0===v?void 0:v.value)-1]})]})]})]})})})}const wAe=(0,We.memo)(jAe);const _Ae=function(e){let{tags:t,diastolic:n,setDiastolic:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),d=(0,We.useRef)(null),[u,p]=We.useState(["CheckLowBP"]),h=e=>{const t=e.currentTarget.attributes["data-id"].value;u.includes(t)?p(u.filter(e=>e!==t)):p(()=>[t])},m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=d.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const u=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",u),window.addEventListener("pointerup",u)},f=e=>{let{tag:t,width:n,onSystolicSliderSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"20%"},onClick:h,"data-id":t.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:t.name}),(0,Gt.jsx)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s||2===s?"Below or ".concat(n):5===s?" ".concat(n," & Above"):6===s?n:" ".concat(a+1," - ").concat(n)}),!o&&u.includes(t.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(_xe,{ref:d,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onSystolicSliderSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mt:.5,mb:3},children:c("rpm_DiastolicRange")})]})};const CAe=function(e){let{tags:t,fastingRange:n,setFastingRange:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),[d,u]=We.useState(["Hypoglycemia"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onFastingRangeSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"25%"},onClick:p,"data-id":t.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:t.name}),(0,Gt.jsx)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(n):3===s?" ".concat(n," & Above"):" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mb:.5},children:c("rpm_fasting")}),(0,Gt.jsx)(_xe,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onFastingRangeSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))})]})};const SAe=function(e){let{tags:t,ppRange:n,setPPRange:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),[d,u]=We.useState(["Hypoglycemia"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onPPRangeSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"25%"},onClick:p,"data-id":t.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:t.name}),(0,Gt.jsxs)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:[" ",0===s?"Below or ".concat(n):3===s?" ".concat(n," & Above"):" ".concat(a+1," - ").concat(n)]}),!o&&d.includes(t.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(_xe,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onPPRangeSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))}),(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mt:.5,mb:3},children:c("rpm_nonfasting")})]})};const AAe=function(e){let{styles:t,fastingRange:n,setFastingRange:r,getPercentage:i,limitNumberWithinRange:o,nearestN:a,ppRange:s,setPPRange:l,glucoseTags:c,setGlucoseTags:d}=e;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(CAe,{tags:c,setTags:d,fastingRange:n,setFastingRange:r,getPercentage:i,limitNumberWithinRange:o,nearestN:a,styles:t}),(0,Gt.jsx)(Eu,{my:.5}),(0,Gt.jsx)(SAe,{tags:c,setTags:d,ppRange:s,setPPRange:l,getPercentage:i,limitNumberWithinRange:o,nearestN:a,styles:t})]})};const kAe=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m;let{handleInitialValues:f}=e;const{t:g}=vg(),[v,x]=We.useState(null),y=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{(()=>{const e=[];null===f||void 0===f||f.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:y(t)}))}),x(e)})()},[f]),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(PC,{sx:{borderRadius:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsx)(cS,{children:(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:g("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",rowSpan:2,colSpan:2,children:g("rpm_Activity")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:g("rpm_From")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:g("rpm_To")}),(0,Gt.jsx)(rC,{align:"center",colSpan:2,children:g("rpm_Range")})]})}),(0,Gt.jsxs)(nS,{children:[(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:g("rpm_normalfasting")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor fasting",children:(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,Gt.jsx)("strong",{children:g("rpm_fasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(t=v[2])||void 0===t||null===(n=t.data[0])||void 0===n?void 0:n.value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(r=v[1])||void 0===r||null===(o=r.data[0])||void 0===o?void 0:o.value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===v||void 0===v||null===(a=v[2])||void 0===a||null===(s=a.data[0])||void 0===s?void 0:s.value)+1," "," - ",(null===v||void 0===v||null===(l=v[1])||void 0===l||null===(c=l.data[0])||void 0===c?void 0:c.value)-1]})]}),(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",borderBottom:2,borderBottomColor:"#bbb",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor normalGlucose",children:g("rpm_normalpp")}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor nonfasting",children:(0,Gt.jsx)(XO,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,Gt.jsx)("strong",{children:g("rpm_nonfasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(d=v[5])||void 0===d?void 0:d.data[0].value)+1}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:(null===v||void 0===v||null===(u=v[4])||void 0===u?void 0:u.data[0].value)-1}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:[(null===v||void 0===v||null===(p=v[5])||void 0===p?void 0:p.data[0].value)+1," "," - ",(null===v||void 0===v||null===(h=v[4])||void 0===h?void 0:h.data[0].value)-1]})]})]}),null===v||void 0===v||null===(m=v.slice(0,6))||void 0===m?void 0:m.map((e,t)=>{var n,r,i,o;return(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat(e.name),children:g("rpm_".concat(e.name.toLowerCase()))}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",className:"tableColor ".concat("eq"==e.data[(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.length)-1].op?"fasting":"nonfasting"),children:"eq"==e.data[(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1].op?(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.fastingBg",color:"customClr.fastingText"}),children:(0,Gt.jsx)("strong",{children:g("rpm_fasting")})}):(0,Gt.jsx)(XO,{icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)},bgcolor:"customClr.nonfastingBg",color:"customClr.nonfastingText"}),children:(0,Gt.jsx)("strong",{children:g("rpm_nonfasting")})})}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:"HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"-":e.data[0].value}),(0,Gt.jsx)(rC,{align:"center",colSpan:"2",children:0===t||3===t?"-":e.data[(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.length)-2].value}),(0,Gt.jsxs)(rC,{align:"center",colSpan:"2",children:["HypoglycemiaFasting"==e.name||"HypoglycemiaPP"==e.name?"Below":e.data[0].value," ","-"," ","DiabetesFasting"==e.name||"DiabetesPP"==e.name?"Above":e.data[(null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.length)-2].value]})]},e.salience)})]})]})})})};const MAe=function(e){let{tags:t,pulse:n,setPulse:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),[d,u]=We.useState(["LowPulse"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onPulseSliderSelect:r,noSliderButton:o,rangeIndex:a,previousWidth:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"33%"},onClick:p,"data-id":t.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:t.name}),(0,Gt.jsxs)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:[" ",0===a?"Below or ".concat(n):1===a?" ".concat(s+1," - ").concat(n):" ".concat(n," & Above")]}),!o&&d.includes(t.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mb:1.5},children:c("rpm_PulseRange")}),(0,Gt.jsx)(_xe,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onPulseSliderSelect:e=>m(e,r),rangeIndex:r,nextWidth:n[r+1],previousWidth:n[r-1]},r)},r))})]})};const OAe=function(e){let{handleInitialValues:t,pulse:n}=e;const{t:r}=vg(),[o,a]=We.useState([]),s=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{as(t)||(()=>{const e=[];null===t||void 0===t||t.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:s(t)}))}),a(e)})()},[t]),(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(PC,{sx:{borderRadius:2,mt:2},children:(0,Gt.jsxs)(kC,{children:[(0,Gt.jsx)(cS,{children:(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-head":{border:1,borderColor:"#ddd",fontWeight:"600",bgcolor:"primary.theme.50",padding:.5}},children:[(0,Gt.jsx)(rC,{align:"center",children:r("rpm_Stages")}),(0,Gt.jsx)(rC,{align:"center",children:r("rpm_From")}),(0,Gt.jsx)(rC,{align:"center",children:r("rpm_To")}),(0,Gt.jsx)(rC,{align:"center",children:r("rpm_Range")})]})}),(0,Gt.jsxs)(nS,{children:[null===o||void 0===o?void 0:o.map((e,t)=>(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",className:"tableColor ".concat(e.name),children:r("rpm_".concat(e.name))}),(0,Gt.jsxs)(rC,{align:"center",children:[0===t&&o[t].data[0].value,!(0===t||t===o.length-1)&&o[t+1].data[0].value+1,t==o.length-1&&"-"]}),(0,Gt.jsx)(rC,{align:"center",children:0===t?"-":e.data[0].value}),(0,Gt.jsxs)(rC,{align:"center",children:[0===t&&"".concat(o[t].data[0].value," & Above"),!(0===t||t===o.length-1)&&o[t+1].data[0].value+1+"-"+o[t].data[0].value,t==o.length-1&&"Below or ".concat(e.data[0].value)]})]},e.salience)),!as(o)&&(0,Gt.jsxs)(K_,{sx:{"& .MuiTableCell-body":{border:1,borderColor:"#ddd",p:1}},children:[(0,Gt.jsx)(rC,{align:"center",className:"tableColor normal",children:r("rpm_NormalPulse")}),(0,Gt.jsx)(rC,{align:"center",children:n[0]+1}),(0,Gt.jsx)(rC,{align:"center",children:n[1]}),(0,Gt.jsxs)(rC,{align:"center",children:[n[0]+1," - ",n[1]]})]})]})]})})})};const TAe=function(e){let{tags:t,systolic:n,setSystolic:r,getPercentage:o,limitNumberWithinRange:a,nearestN:s,styles:l}=e;const{t:c}=vg(),[d,u]=We.useState(["CheckLowBP"]),p=e=>{const t=e.currentTarget.attributes["data-id"].value;d.includes(t)?u(d.filter(e=>e!==t)):u(()=>[t])},h=(0,We.useRef)(null),m=(e,t)=>{e.stopPropagation(),document.body.style.cursor="ew-resize";const i=e.pageX,l=h.current.offsetWidth,c=e=>{e.stopPropagation();const c=(e.touches?e.touches[0].pageX:e.pageX)-i,d=n[t]+n[t+1],u=s(1,o(l,c)),p=n.slice(),h=p[t],m=a(h+u,0,d);if(p[t]=m,m<10)return!1;r(p)};window.addEventListener("pointermove",c),window.addEventListener("touchmove",c);const d=e=>{e.stopPropagation(),document.body.style.cursor="initial",window.removeEventListener("pointermove",c),window.removeEventListener("touchmove",c)};window.addEventListener("touchend",d),window.addEventListener("pointerup",d)},f=e=>{let{tag:t,width:n,onSystolicSliderSelect:r,noSliderButton:o,previousWidth:a,rangeIndex:s}=e;return(0,Gt.jsx)(_xe,{className:"tag",style:l.tag,sx:{background:t.color,width:o?"30px":"20%"},onClick:p,"data-id":t.id,children:(0,Gt.jsxs)(_xe,{children:[(0,Gt.jsx)(Ym,{style:l.tagText,children:t.name}),(0,Gt.jsx)(Ym,{style:(0,i.A)((0,i.A)({},l.tagText),{},{fontSize:12}),children:0===s?"Below or ".concat(n):5===s?" ".concat(n," & Above"):6===s?n:" ".concat(a+1," - ").concat(n)}),!o&&d.includes(t.id.toString())?(0,Gt.jsx)(Yx,{title:"Drag to adjust",children:(0,Gt.jsxs)(_xe,{className:"slider-button",style:l.sliderButton,onPointerDown:r,children:[(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{transform:"rotate(180deg)",position:"relative",left:"6px"}}),(0,Gt.jsx)(wxe.A,{fontSize:"small",sx:{position:"relative",right:"6px"}})]})}):!o&&(0,Gt.jsx)(Yx,{title:"Click to unlock",children:(0,Gt.jsx)(_xe,{className:"slider-button",style:l.sliderButton,children:(0,Gt.jsx)(jxe.A,{fontSize:"small"})})})]})})};return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Ym,{variant:"body1",fontWeight:600,sx:{mb:.5},children:c("rpm_SystolicRange")}),(0,Gt.jsx)(_xe,{ref:h,sx:{width:"100%",display:"flex",backgroundColor:"transparent",flexDirection:"row"},children:t.map((e,r)=>(0,Gt.jsx)(We.Fragment,{children:(0,Gt.jsx)(f,{width:n[r],noSliderButton:r===t.length-1,tag:e,onSystolicSliderSelect:e=>m(e,r),previousWidth:n[r-1],nextWidth:n[r+1],rangeIndex:r},r)},r))})]})};const EAe=function(e){var t,n,r,o,a,s,l,c,d,u,p,h,m;let{addNewRule:f,addNewRuleGlucose:g,activeProgram:v,addNewPulseRule:x}=e;const y=Ct(Id),b=[{id:"CheckLowBP",name:"Low blood pressure",color:null===Lde||void 0===Lde||null===(t=Lde.palette)||void 0===t?void 0:t.amber[400]},{id:"NormalBP",name:"Normal blood pressure",color:null===Lde||void 0===Lde||null===(n=Lde.palette)||void 0===n?void 0:n.green[400]},{id:"ElevatedBloodPressure",name:"Elevated blood pressure",color:null===Lde||void 0===Lde||null===(r=Lde.palette)||void 0===r?void 0:r.orange[300]},{id:"Hypertension_Stage1",name:"Hypertension Stage 1",color:null===Lde||void 0===Lde||null===(o=Lde.palette)||void 0===o?void 0:o.orange[600]},{id:"Hypertensive_Stage2",name:"Hypertensive Stage 2",color:null===Lde||void 0===Lde||null===(a=Lde.palette)||void 0===a?void 0:a.red[400]},{id:"Hypertensive_Crisis",name:"Hypertensive Crisis",color:null===Lde||void 0===Lde||null===(s=Lde.palette)||void 0===s?void 0:s.red[600]},{id:"extra_space",name:"More Space",color:"white"}],j=[{id:"Bradycardia",name:"Bradycardia",color:null===Lde||void 0===Lde||null===(l=Lde.palette)||void 0===l?void 0:l.amber[400]},{id:"NormalPulse",name:"Normal pulse",color:null===Lde||void 0===Lde||null===(c=Lde.palette)||void 0===c?void 0:c.green[400]},{id:"Tachycardia",name:"Tachycardia",color:null===Lde||void 0===Lde||null===(d=Lde.palette)||void 0===d?void 0:d.red[400]},{id:"extra_space",name:"More Space",color:"white"}],w=[{id:"Hypoglycemia",name:"Hypoglycemia(Low)",color:null===Lde||void 0===Lde||null===(u=Lde.palette)||void 0===u?void 0:u.red[200]},{id:"Normal",name:"Normal",color:null===Lde||void 0===Lde||null===(p=Lde.palette)||void 0===p?void 0:p.green[300]},{id:"Pre-diabetes",name:"Pre-diabetes",color:null===Lde||void 0===Lde||null===(h=Lde.palette)||void 0===h?void 0:h.orange[300]},{id:"Diabetes",name:"Diabetes",color:null===Lde||void 0===Lde||null===(m=Lde.palette)||void 0===m?void 0:m.red[300]},{id:"extra_space",name:"More Space",color:"white"}],{t:_}=vg(),C=Nt(),[S,A]=(so(),(0,We.useState)([90,119,129,139,179,180,500])),[k,M]=(0,We.useState)([60,78,79,89,119,120,500]),[O,T]=(0,We.useState)([60,129,130,500]),[E,P]=(0,We.useState)(b),[D,R]=(0,We.useState)(w),[N,L]=We.useState([]),[I,F]=(0,We.useState)([]),[$,B]=(0,We.useState)([70,99,125,126,500]),[z,H]=(0,We.useState)([95,140,199,200,500]),[W,V]=We.useState([]),[U,q]=We.useState({open:!1,data:[]}),G=e=>{q((0,i.A)((0,i.A)({},U),{},{open:!U.open,data:e}))},[Y,Z]=(0,We.useState)([]),[K,X]=(0,We.useState)([]),[Q,J]=(0,We.useState)(j),[ee,te]=(0,We.useState)(""),ne=(e,t)=>t/e*100,re=(e,t,n)=>Math.min(Math.max(e,t),n),ie=(e,t)=>Math.ceil(t/e)*e,oe={data_type:"bp",processing_mode:"REALTIME",data_batch_size:"",short_description:"",rule:[{name:"Hypertensive_Crisis",desc:"Hypertensive_CrisisDesc",salience:6,when:{or:[{gte:["Util.ToInt(Data.systolic)",S[5]]},{gte:["Util.ToInt(Data.diastolic)",k[5]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertensive_Crisis"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertensive_Crisis"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"Hypertensive_Stage2Desc",salience:5,when:{or:[{gte:["Util.ToInt(Data.systolic)",S[3]+1]},{gte:["Util.ToInt(Data.diastolic)",k[3]+1]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertensive_Stage2"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertensive_Stage2"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"Hypertension_Stage1Desc",salience:4,when:{or:[{gte:["Util.ToInt(Data.systolic)",S[2]+1]},{gte:["Util.ToInt(Data.diastolic)",k[2]+1]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"Hypertension_Stage1"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"Hypertension_Stage1"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"ElevatedBloodPressureDesc",salience:3,when:{and:[{gte:["Util.ToInt(Data.systolic)",S[1]+1]},{lte:["Util.ToInt(Data.diastolic)",k[2]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"ElevatedBloodPressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"ElevatedBloodPressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"CheckLowBPDesc",salience:2,when:{or:[{lte:["Util.ToInt(Data.systolic)",S[0]]},{lte:["Util.ToInt(Data.diastolic)",k[0]]}]},then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{obj:"Data.systolic"},{const:"CheckLowBP"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{obj:"Data.diastolic"},{const:"CheckLowBP"}]},{call:["Complete"]}]}]},ae={data_type:"pulse",processing_mode:"",data_batch_size:"",short_description:"",rule:[{name:"Tachycardia",desc:"TachycardiaDesc",salience:2,when:{gte:["Util.ToInt(Data.pulse)",O[2]]},then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{obj:"Data.pulse"},{const:"tachycardia"}]},{call:["Complete"]}]},{name:"Bradycardia",desc:"BradycardiaDesc",salience:1,when:{lte:["Util.ToInt(Data.pulse)",O[0]]},then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{obj:"Data.pulse"},{const:"bradycardia"}]},{call:["Complete"]}]}]},se={data_type:"glucose",processing_mode:"REALTIME",data_batch_size:"",short_description:"",rule:[{name:"DiabetesFasting",desc:"DiabetesFastingDesc",salience:8,when:{and:[{gte:["Util.ToInt(Data.glucose)",$[3]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"diabetes"}]},{call:["Complete"]}]},{name:"PrediabetesFasting",desc:"PrediabetesFastingDesc",salience:7,when:{and:[{gte:["Util.ToInt(Data.glucose)",$[1]+1]},{lte:["Util.ToInt(Data.glucose)",$[2]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"prediabetes"}]},{call:["Complete"]}]},{name:"HypoglycemiaFasting",desc:"HypoglycemiaFastingDesc",salience:6,when:{and:[{lte:["Util.ToInt(Data.glucose)",$[0]]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"hypoglycemia"}]},{call:["Complete"]}]},{name:"DiabetesPP",desc:"DiabetesDescPP",salience:5,when:{and:[{gte:["Util.ToInt(Data.glucose)",z[3]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"diabetes"}]},{call:["Complete"]}]},{name:"PrediabetesPP",desc:"PrediabetesDescPP",salience:4,when:{and:[{gte:["Util.ToInt(Data.glucose)",z[1]+1]},{lte:["Util.ToInt(Data.glucose)",z[2]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"prediabetes"}]},{call:["Complete"]}]},{name:"HypoglycemiaPP",desc:"HypoglycemiaDescPP",salience:3,when:{and:[{lte:["Util.ToInt(Data.glucose)",z[0]]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Alerts.Add",{const:"glucose"},{obj:"Data.activity"},{obj:"Data.glucose"},{const:"hypoglycemia"}]},{call:["Complete"]}]},{name:"NormalFasting",desc:"NormalFastingDesc",salience:2,when:{and:[{gte:["Util.ToInt(Data.glucose)",$[0]+1]},{lte:["Util.ToInt(Data.glucose)",$[2]-1]},{eq:["Data.activityType",'"fasting"']}]},then:[{call:["Complete"]}]},{name:"NormalPP",desc:"NormalPPDesc",salience:1,when:{and:[{gte:["Util.ToInt(Data.glucose)",z[0]+1]},{lte:["Util.ToInt(Data.glucose)",z[2]-1]},{not:["Data.activityType",'"fasting"']}]},then:[{call:["Complete"]}]}]},le={tag:{height:55,paddingLeft:20,paddingRight:20,textAlign:"center",position:"relative",borderRightWidth:".1em",borderRightStyle:"solid",borderRightColor:"white",boxSizing:"border-box",borderLeftWidth:".1em",borderLeftStyle:"solid",borderLeftColor:"white",cursor:"pointer",borderRadius:"0",display:"flex",alignItems:"center",justifyContent:"center"},tagText:{fontSize:"0.675rem",color:"white",fontWeight:700,userSelect:"none",display:"block",overflow:"hidden"},sliderButton:{width:"2em",height:"2em",backgroundColor:"white",position:"absolute",borderRadius:"2em",right:"calc(-1.1em)",top:0,display:"flex",justifyContent:"center",alignItems:"center",bottom:0,margin:"auto",zIndex:10,cursor:"ew-resize",userSelect:"none"}},ce=[{name:_("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:_("rpm_Rules"),url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/rules")},{name:_("rpm_AddNewRule"),url:""}],de=()=>"bp"===ee?oe:"glucose"===ee?se:oe;return We.useEffect(()=>{(()=>{let e=null===b||void 0===b?void 0:b.map(e=>e.id),t=null===j||void 0===j?void 0:j.map(e=>e.id),n=null===w||void 0===w?void 0:w.map(e=>e.id),r=[],i=[];S.forEach((t,n)=>{t+1>S[n+1]&&r.push({name:"Systolic",rule:e[n+1],value:[t+1,S[n+1]]})}),k.forEach((t,n)=>{t+1>k[n+1]&&r.push({name:"Diastolic",rule:e[n+1],value:[t+1,k[n+1]]})}),O.forEach((e,n)=>{e+1>O[n+1]&&r.push({name:"Pulse",rule:t[n+1],value:[e+1,O[n+1]]})}),$.forEach((e,t)=>{e+1>$[t+1]&&i.push({name:"Fasting",rule:n[t+1],value:[e+1,$[t+1]]})}),z.forEach((e,t)=>{e+1>z[t+1]&&i.push({name:"Non Fasting",rule:n[t+1],value:[e+1,z[t+1]]})}),V(r),L(i)})()},[S,k,O,$,z]),We.useEffect(()=>{de()},[ee]),We.useEffect(()=>{"bp"===ee&&(F(oe.rule),X(ae.rule))},[ee,S,k,O]),We.useEffect(()=>{"glucose"===ee&&Z(se.rule)},[ee,$,z]),We.useEffect(()=>{te("bp");const e={activeMenuItem:"rules",breadcrumb:ce};as(v)||C(w_(e))},[v]),(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(Iz,{initialValues:de(),validationSchema:vV.addRule,onSubmit:async e=>{const t="".concat(e.short_description,"/").concat(sa()().valueOf()),n=[{name:"Hypertensive_Crisis",desc:"Hypertensive_CrisisDesc",salience:6,when:bs({or:[{gte:["Util.ToInt(Data[0].values.systolic)",S[5]]},{gte:["Util.ToInt(Data[0].values.diastolic)",k[5]]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"Hypertensive_Crisis"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"Hypertensive_Crisis"}]},{call:["Complete"]}]},{name:"Hypertensive_Stage2",desc:"Hypertensive_Stage2Desc",salience:5,when:bs({or:[{gte:["Util.ToInt(Data[0].values.systolic)",S[3]+1]},{gte:["Util.ToInt(Data[0].values.diastolic)",k[3]+1]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"Hypertensive_Stage2"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"Hypertensive_Stage2"}]},{call:["Complete"]}]},{name:"Hypertension_Stage1",desc:"Hypertension_Stage1Desc",salience:4,when:bs({or:[{gte:["Util.ToInt(Data[0].values.systolic)",S[2]+1]},{gte:["Util.ToInt(Data[0].values.diastolic)",k[2]+1]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"Hypertension_Stage1"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"Hypertension_Stage1"}]},{call:["Complete"]}]},{name:"ElevatedBloodPressure",desc:"ElevatedBloodPressureDesc",salience:3,when:bs({and:[{gte:["Util.ToInt(Data[0].values.systolic)",S[1]+1]},{lte:["Util.ToInt(Data[0].values.diastolic)",k[2]]}]},"and","and",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"ElevatedBloodPressure"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"ElevatedBloodPressure"}]},{call:["Complete"]}]},{name:"CheckLowBP",desc:"CheckLowBPDesc",salience:2,when:bs({or:[{lte:["Util.ToInt(Data[0].values.systolic)",S[0]]},{lte:["Util.ToInt(Data[0].values.diastolic)",k[0]]}]},"and","or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"bp"},{const:"systolic"},{plus:js("systolic",e.data_batch_size)},{const:"CheckLowBP"}]},{call:["Alerts.Add",{const:"bp"},{const:"diastolic"},{plus:js("diastolic",e.data_batch_size)},{const:"CheckLowBP"}]},{call:["Complete"]}]}],r=[{name:"Tachycardia",desc:"TachycardiaDesc",salience:2,when:Cs({gte:["Util.ToInt(Data[0].values.pulse)",O[2]]},"or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{plus:js("pulse",e.data_batch_size)},{const:"tachycardia"}]},{call:["Complete"]}]},{name:"Bradycardia",desc:"BradycardiaDesc",salience:1,when:Cs({lte:["Util.ToInt(Data[0].values.pulse)",O[0]]},"or",e.data_batch_size),then:[{call:["Alerts.Add",{const:"pulse"},{const:"pulse"},{plus:js("pulse",e.data_batch_size)},{const:"bradycardia"}]},{call:["Complete"]}]}];"bp"===e.data_type&&(as(W)?(await f((0,i.A)((0,i.A)({},e),{},{short_description:t,rule:"BATCH"!==e.processing_mode?I:n})),await x((0,i.A)((0,i.A)({},e),{},{short_description:t,rule:"BATCH"!==e.processing_mode?K:r}))):G(W)),"glucose"===e.data_type&&(as(N)?g((0,i.A)((0,i.A)({},e),{},{rule:Y})):G(N))},enableReinitialize:!0,children:e=>{let{values:t}=e;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Wz,{children:[(0,Gt.jsxs)(Eu,{sx:{mb:2.5},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",children:[(0,Gt.jsx)(kH,{labels:ce}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{marginBottom:"0",display:{xs:"block",sm:"block",md:"none"}},children:_("rpm_AddNewRule")})]}),(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",sx:{display:{xs:"none",sm:"none",md:"block"}},children:_("rpm_AddNewRule")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(CT,{loading:y,variant:"contained",color:"primary",disableElevation:!0,type:"submit",children:_("rpm_Save")})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{placement:"top","aria-label":"Reset",title:"Reset",children:(0,Gt.jsx)(Vp,{variant:"outlined",color:"primary",disableElevation:!0,onClick:()=>{A([90,119,129,139,179,180,500]),M([60,78,79,89,119,120,500]),B([70,99,125,126,500]),H([95,140,199,200,500]),T([60,129,130,500]),P(b),J(j)},style:{minWidth:"40px"},className:"resetBackupButton",children:(0,Gt.jsx)(xxe.A,{fontSize:"small"})})})})]})]}),(0,Gt.jsx)(aH,{variant:"outlined",children:(0,Gt.jsxs)(uH,{sx:{p:2.5},children:[(0,Gt.jsxs)(df,{container:!0,spacing:1,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:1,children:[(0,Gt.jsx)(qj,{htmlFor:"data_type",required:!0,sx:{mb:.75},children:_("rpm_VitalType")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Dw,id:"data_type",name:"data_type",size:"small",displayEmpty:!0,input:(0,Gt.jsx)(Rj,{}),onChange:e=>te(e.target.value),endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:_("message:rpm_VitalTypeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:null===cd||void 0===cd?void 0:cd.map(e=>(0,Gt.jsx)($m,{value:e.value,children:_("rpm_".concat(e.name))},e.name))}),(0,Gt.jsx)(Xz,{name:"data_type",children:e=>(0,Gt.jsx)(iw,{error:!0,children:_(e,{field:_("rpm_VitalType")})})})]})}),"glucose"!==t.data_type&&(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:1,children:[(0,Gt.jsx)(qj,{htmlFor:"processing_mode",required:!0,sx:{mb:.75},children:_("rpm_ProcessingMode")}),(0,Gt.jsxs)(Hz,{fullWidth:!0,as:Dw,id:"processing_mode",name:"processing_mode",size:"small",displayEmpty:!0,input:(0,Gt.jsx)(Rj,{}),renderValue:e=>e||"Select",endAdornment:(0,Gt.jsx)(H_,{position:"end",sx:{position:"absolute",right:"28px"},children:(0,Gt.jsx)(Yx,{title:_("message:rpm_ProcessingModeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})}),children:[(0,Gt.jsx)($m,{value:"BATCH",disabled:!0,children:"BATCH"}),(0,Gt.jsx)($m,{value:"REALTIME",children:"REALTIME"})]}),(0,Gt.jsx)(Xz,{name:"processing_mode",children:e=>(0,Gt.jsx)(iw,{error:!0,children:_(e,{field:_("rpm_ProcessingMode")})})})]})}),"BATCH"===t.processing_mode&&(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:1,className:"hide_num_arrow",children:[(0,Gt.jsx)(qj,{htmlFor:"data_batch_size",sx:{mb:.75},required:!0,children:_("rpm_BatchDataSize")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"data_batch_size",name:"data_batch_size",size:"small",type:"number",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:_("message:rpm_BatchDataSizeHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"data_batch_size",children:e=>(0,Gt.jsx)(iw,{error:!0,children:_(e,{field:_("rpm_BatchDataSize")})})})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:3,children:(0,Gt.jsxs)(Eu,{mb:1,children:[(0,Gt.jsx)(qj,{htmlFor:"short_description",required:!0,sx:{mb:.75},children:_("rpm_ShortDescription")}),(0,Gt.jsx)(Hz,{fullWidth:!0,as:Rj,id:"short_description",name:"short_description",size:"small",endAdornment:(0,Gt.jsx)(H_,{position:"end",children:(0,Gt.jsx)(Yx,{title:_("message:rpm_ShortDescriptionHelp"),placement:"top",children:(0,Gt.jsx)(Kp,{size:"small",disableRipple:!0,sx:{p:0},children:(0,Gt.jsx)(JO.A,{fontSize:"small"})})})})}),(0,Gt.jsx)(Xz,{name:"short_description",children:e=>(0,Gt.jsx)(iw,{error:!0,children:_(e,{field:_("rpm_ShortDescription")})})})]})})]}),"bp"===t.data_type&&(0,Gt.jsxs)(df,{container:!0,spacing:.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(TAe,{tags:E,setTags:P,systolic:S,setSystolic:A,getPercentage:ne,limitNumberWithinRange:re,nearestN:ie,styles:le})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(_Ae,{tags:E,setTags:P,diastolic:k,setDiastolic:M,getPercentage:ne,limitNumberWithinRange:re,nearestN:ie,styles:le})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(wAe,{handleInitialValues:I,systolic:S,diastolic:k})})]}),"glucose"===t.data_type&&(0,Gt.jsxs)(df,{container:!0,spacing:.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(AAe,{styles:le,fastingRange:$,setFastingRange:B,ppRange:z,setPPRange:H,addNewRuleGlucose:g,getPercentage:ne,limitNumberWithinRange:re,nearestN:ie,glucoseTags:D,setGlucoseTags:R})}),(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(kAe,{handleInitialValues:Y})})]})]})}),"bp"===t.data_type&&(0,Gt.jsx)(aH,{variant:"outlined",sx:{mt:2.5},children:(0,Gt.jsx)(uH,{sx:{p:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:7,children:(0,Gt.jsx)(MAe,{tags:Q,setTags:J,pulse:O,setPulse:T,getPercentage:ne,limitNumberWithinRange:re,nearestN:ie,styles:le})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:5,children:(0,Gt.jsx)(OAe,{handleInitialValues:K,pulse:O})})]})})})]})})}},"editor_formik")}),(0,Gt.jsx)(Exe,{openModal:U,onCloseModal:()=>G([])})]})};function PAe(e){let{ruleData:t,addNewRule:n,rulesHeadCell:r,activeProgram:o,addNewRuleGlucose:a,addNewPulseRule:s}=e;const{ruleId:l}=lo(),[c,d]=We.useState(null),[u,p]=We.useState(null),h=[{text:"and",sign:"&&"},{text:"or",sign:"||"},{text:"eq",sign:"=="},{text:"not",sign:"!="},{text:"gt",sign:">"},{text:"gte",sign:">="},{text:"lt",sign:"<"},{text:"lte",sign:"<="},{text:"bor",sign:"|"},{text:"band",sign:"&"},{text:"plus",sign:"+"},{text:"minus",sign:"-"},{text:"div",sign:"/"},{text:"mul",sign:"*"},{text:"mod",sign:"%"}],m=e=>{const t=h.find(t=>t.text===e);return null===t||void 0===t?void 0:t.sign},f=e=>{const t=[],n=Object.keys(null===e||void 0===e?void 0:e.when);return null===e||void 0===e||e.when[n[0]].forEach(r=>{let i=Object.keys(r);var o,a,s,l,c,d;"0"!==i[0]?i[0]&&t.push({name:null!==(o=r[i[0]])&&void 0!==o&&o[0]?null===(a=r[i[0]])||void 0===a?void 0:a[0]:null,value:null!==(s=r[i[0]])&&void 0!==s&&s[1]?null===(l=r[i[0]])||void 0===l?void 0:l[1]:null,op:i[0],between:n[0]}):t.push({name:null===e||void 0===e||null===(c=e.when[n[0]])||void 0===c?void 0:c[0],value:null===e||void 0===e||null===(d=e.when[n[0]])||void 0===d?void 0:d[1],op:n[0]?n[0]:null})}),t};return We.useEffect(()=>{ta()(t)||d(JSON.parse(null===t||void 0===t?void 0:t.rule))},[t]),We.useEffect(()=>{(()=>{const e=[];null===c||void 0===c||c.forEach(t=>{e.push((0,i.A)((0,i.A)({},t),{},{data:f(t)}))}),p(e)})()},[c]),We.useEffect(()=>{m()},[u]),"add"===l?(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:(0,Gt.jsx)(EAe,{activeProgram:o,addNewRule:n,addNewRuleGlucose:a,addNewPulseRule:s})}):(0,Gt.jsx)(Eu,{sx:{width:"100%"},children:ta()(u)?"...Loading":(0,Gt.jsx)(fAe,{exRuleArr:u,ruleData:t,rulesHeadCell:r,getVitalsValue:e=>{var t;return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsx)(df,{container:!0,spacing:1.5,sx:{"& .sign":{"& span:last-child":{display:"none"}}},children:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((t,n)=>{var r;return(0,Gt.jsxs)(df,{item:!0,className:(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.length)-1===n?"sign":"",children:[(0,Gt.jsx)(Eu,{component:"span",children:null===t||void 0===t?void 0:t.name})," ",(0,Gt.jsx)(Eu,{component:"span",children:m(null===t||void 0===t?void 0:t.op)})," ",(0,Gt.jsx)(Eu,{component:"span",children:null===t||void 0===t?void 0:t.value})," ",(0,Gt.jsx)(Eu,{component:"span",children:m(null===t||void 0===t?void 0:t.between)})]},n)})})})}})})}PAe.defaultProps={addNewRule:()=>{},ruleData:{},rulesHeadCell:[],activeProgram:{},addNewRuleGlucose:()=>{}};const DAe=PAe;const RAe=function(e){var t;let{activeProgram:n}=e;const r=Nt(),o=Ct(Nd),{t:a}=vg(),s=so(),{enqueueSnackbar:l}=hi(),{ruleId:c}=lo(),[d,u]=We.useState(null),p=[{id:"bp_level",label:a("rpm_BpLevel"),isSort:!0,sortProperty:"bp_level"},{id:"vital",label:a("rpm_Vital"),isSort:!1,sortProperty:"vital"},{id:"action",label:a("rpm_Actions"),isSort:!1,sortProperty:"action"}];return We.useEffect(()=>{o&&"add"!==c&&!as(n)&&(async()=>{const{data:e}=await r(kg(null===n||void 0===n?void 0:n.code,c));u(e)})()},[o,c,n]),We.useEffect(()=>{r(w_({activeMenuItem:"rules_program"}))},[n]),as(n)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsx)(Gt.Fragment,{children:as(n)||null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showAddRuleBtn?(0,Gt.jsx)(DAe,{addNewRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,o=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(Sg(null===n||void 0===n?void 0:n.code,o)),l(a("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),s(-1)}catch(c){const e=ls(c,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_err_rule_already_exist"),severity:$c}))}},addNewPulseRule:async e=>{const t=null===e||void 0===e?void 0:e.rule,o=(0,i.A)((0,i.A)({},e),{},{data_type:"bp.pulse",execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(Sg(null===n||void 0===n?void 0:n.code,o)),l(a("message:rpm_RuleCreatedSuccessfully"),{variant:"success"})}catch(s){const e=ls(s,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_err_rule_already_exist"),severity:$c}))}},ruleData:d,rulesHeadCell:p,editButton:e=>(0,Gt.jsx)(Yx,{title:a("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),activeProgram:n,addNewRuleGlucose:async e=>{const t=null===e||void 0===e?void 0:e.rule,o=(0,i.A)((0,i.A)({},e),{},{execution_engine:"JSON",rule:JSON.stringify(t)});try{await r(Sg(null===n||void 0===n?void 0:n.code,o)),l(a("message:rpm_RuleCreatedSuccessfully"),{variant:"success"}),s(-1)}catch(c){const e=ls(c,"response.data.code","");as(e)?r(Zo({subTitle:"error:rpm_RuleCreatedFailed",severity:$c})):r(Zo({subTitle:bd(e,"error:rpm_err_rule_already_exist"),severity:$c}))}}}):(0,Gt.jsx)(__,{})})};function NAe(e){let{userData:t,ruleList:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,rulesHeadCell:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchRuleList:h,pageDetails:m,viewButton:f,deleteButton:g,activeProgram:v,setHeadcells:x,settingModal:y,initialHeadcells:b,handleSettingModalToggle:j,handleStatus:w,handleDefaultRule:_,isRuleActive:C,isGlucoseRuleActive:S,handleDefaultModalToggle:A}=e;const{t:k}=vg(),M=so(),O=[{name:k("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:k("rpm_Rules"),url:""}],T=e=>{const t=null===e||void 0===e?void 0:e.data_type,r=n.filter(e=>e.data_type===t).filter(e=>!0===e.status).length;return!1===(null===e||void 0===e?void 0:e.default_rule)||!0===e.status&&1===r};return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:O})}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:k("rpm_Rules")})}),(null===t||void 0===t?void 0:t.showAddRuleBtn)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>M("add/new"),className:(null===t||void 0===t?void 0:t.showAddRuleBtn)&&"programrules-tour-step0",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:k("rpm_AddRule")})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:k("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:j,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),!1]})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(EM,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:n,headCells:null===l||void 0===l?void 0:l.filter(e=>b.includes(e.id)),dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.filter(e=>"bp.pulse"!==e.data_type).map(e=>{const n=e.short_description.split("/");return(0,Gt.jsxs)(K_,{hover:!0,selected:c.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),b.includes("vital_type")&&(0,Gt.jsxs)(rC,{children:["bp"===e.data_type&&(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",k("rpm_".concat(e.data_type))]})}),"glucose"===e.data_type&&(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",k("rpm_".concat(e.data_type))]})}),"bp.pulse"===e.data_type&&(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Ym,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",k("rpm_".concat(e.data_type))]})})]}),b.includes("processing_mode")&&(0,Gt.jsx)(rC,{children:e.processing_mode}),b.includes("batch_size")&&(0,Gt.jsx)(rC,{children:e.data_batch_size?e.data_batch_size:"NA"}),b.includes("short_description")&&(0,Gt.jsx)(rC,{children:n[0]}),b.includes("updated_at")&&(0,Gt.jsx)(rC,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),b.includes("status")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(rCe,{checked:!cs(null===e||void 0===e?void 0:e.status)&&(null===e||void 0===e?void 0:e.status),onChange:t=>w(t,e),disabled:T(e),inputProps:{"aria-label":"controlled"}})}),b.includes("defaultRule")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Xj,{margin:"dense",children:(0,Gt.jsxs)(Dw,{variant:"outlined",size:"small",value:null!==(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.default_rule),onChange:t=>{t.target.value&&C&&"bp"===e.data_type||t.target.value&&S&&"glucose"===e.data_type?A(t,e):_({e:t,row:e})},children:[(0,Gt.jsx)($m,{value:!0,children:"Yes"}),(0,Gt.jsx)($m,{value:!1,children:"No"})]})})}),b.includes("action")&&(0,Gt.jsxs)(rC,{children:[(null===t||void 0===t?void 0:t.showViewRuleBtn)&&f(e),(null===t||void 0===t?void 0:t.showDeleteRuleBtn)&&g(e)]})]},e.id)})}),(0,Gt.jsx)(IO,{pageDetails:m,fetchListFunction:h}),(0,Gt.jsx)(fO,{open:y,allHeadCells:l,initialHeadcells:b,setHeadcells:x,onClose:j})]})]})})]})}NAe.defaultProps={userData:{},rulesHeadCell:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",ruleList:[],fetchRuleList:()=>{},viewButton:()=>{},deleteButton:()=>{},activeProgram:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},handleStatus:()=>{},handleDefaultRule:()=>{},handleDefaultModalToggle:()=>{},isRuleActive:!1,isGlucoseRuleActive:!1};const LAe=NAe;function IAe(e){let{userData:t,ruleList:n,order:r,orderBy:i,setOrder:o,setOrderBy:a,dataParameter:s,rulesHeadCell:l,checkState:c,onCheck:d,isSelection:u,nodata:p,fetchRuleList:h,pageDetails:m,viewButton:f,deleteButton:g,activeProgram:v,setHeadcells:x,settingModal:y,initialHeadcells:b,handleSettingModalToggle:j,handleStatus:w,handleDefaultRule:_,isRuleActive:C,isGlucoseRuleActive:S,handleDefaultModalToggle:A}=e;const{t:k}=vg(),M=so(),O=[{name:k("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===v||void 0===v?void 0:v.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===v||void 0===v?void 0:v.code,"/patients")},{name:k("rpm_Rules"),url:""}],T=e=>{const t=null===e||void 0===e?void 0:e.data_type,r=n.filter(e=>e.data_type===t).filter(e=>!0===e.status).length;return!1===(null===e||void 0===e?void 0:e.default_rule)||!0===e.status&&1===r};return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",alignItems:"center",children:[(0,Gt.jsx)(kH,{labels:O}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",sx:{marginBottom:"0"},children:k("rpm_Rules")})]}),(0,Gt.jsx)(df,{container:!0,spacing:2.5,children:(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(null===t||void 0===t?void 0:t.showAddRuleBtn)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsxs)(Vp,{variant:"contained",color:"primary",disableElevation:!0,onClick:()=>M("add/new"),className:(null===t||void 0===t?void 0:t.showAddRuleBtn)&&"programrules-tour-step0",children:[(0,Gt.jsx)(oue.A,{}),(0,Gt.jsx)(Ym,{component:"span",className:"hideOnMobile",children:k("rpm_AddRule")})]})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:k("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:j,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),!1]})}),(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsx)(EM,{order:r,orderBy:i,setOrder:o,setOrderBy:a,data:n,headCells:null===l||void 0===l?void 0:l.filter(e=>b.includes(e.id)),dataParameter:s,selected:c,setSelected:d,isSelection:u,noDataImage:p,fetchList:h,pageDetails:m,skeletonVrows:6,className:"theme_scroll",children:null===n||void 0===n?void 0:n.filter(e=>"bp.pulse"!==e.data_type).map(e=>{const n=e.short_description.split("/");return(0,Gt.jsxs)(K_,{hover:!0,selected:c.includes(e.id.toString()),sx:{"&:last-child td, &:last-child th":{border:0}},children:[u&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:d,checked:c.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),b.includes("vital_type")&&(0,Gt.jsxs)(rC,{children:["bp"===e.data_type&&(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Ym,{color:"customClr.bp",fontWeight:600,component:"span",fontSize:14,children:[" ",k("rpm_".concat(e.data_type))]})}),"glucose"===e.data_type&&(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Ym,{color:"customClr.glucose",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",k("rpm_".concat(e.data_type))]})}),"bp.pulse"===e.data_type&&(0,Gt.jsx)(Lo,{className:"linkClr",to:e.id,children:(0,Gt.jsxs)(Ym,{color:"customClr.pulse",fontWeight:600,component:"span",fontSize:14,sx:{textDecoration:"underline"},children:[" ",k("rpm_".concat(e.data_type))]})})]}),b.includes("processing_mode")&&(0,Gt.jsx)(rC,{children:e.processing_mode}),b.includes("batch_size")&&(0,Gt.jsx)(rC,{children:e.data_batch_size?e.data_batch_size:"NA"}),b.includes("short_description")&&(0,Gt.jsx)(rC,{children:n[0]}),b.includes("updated_at")&&(0,Gt.jsx)(rC,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),b.includes("status")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(rCe,{checked:!cs(null===e||void 0===e?void 0:e.status)&&(null===e||void 0===e?void 0:e.status),onChange:t=>w(t,e),disabled:T(e),inputProps:{"aria-label":"controlled"}})}),b.includes("defaultRule")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsx)(Xj,{margin:"dense",children:(0,Gt.jsxs)(Dw,{variant:"outlined",size:"small",value:null!==(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.default_rule),onChange:t=>{t.target.value&&C&&"bp"===e.data_type||t.target.value&&S&&"glucose"===e.data_type?A(t,e):_({e:t,row:e})},children:[(0,Gt.jsx)($m,{value:!0,children:"Yes"}),(0,Gt.jsx)($m,{value:!1,children:"No"})]})})}),b.includes("action")&&(0,Gt.jsxs)(rC,{children:[(null===t||void 0===t?void 0:t.showViewRuleBtn)&&f(e),(null===t||void 0===t?void 0:t.showDeleteRuleBtn)&&g(e)]})]},e.id)})}),(0,Gt.jsx)(IO,{pageDetails:m,fetchListFunction:h}),(0,Gt.jsx)(fO,{open:y,allHeadCells:l,initialHeadcells:b,setHeadcells:x,onClose:j})]})]})})]})}IAe.defaultProps={userData:{},rulesHeadCell:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",ruleList:[],fetchRuleList:()=>{},viewButton:()=>{},deleteButton:()=>{},activeProgram:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},handleStatus:()=>{},handleDefaultRule:()=>{},handleDefaultModalToggle:()=>{},isRuleActive:!1,isGlucoseRuleActive:!1};const FAe=IAe,$Ae=["content"];const BAe=function(e){var t;let{activeProgram:n}=e;const r=window.innerWidth,o=Nt(),a=so(),s=P_(BA().breakpoints.down("sm")),l=Ct(Nd),c=Ct(qd),d=!("true"===ls(c,"user_principal.attributes.skip_tour[0]","")),{t:u}=vg(),{enqueueSnackbar:p}=hi(),[h,m]=We.useState(""),[f,g]=(0,We.useState)("desc"),[v,x]=(0,We.useState)("updated_at"),[y,b]=We.useState(null),[j,w]=(0,We.useState)([]),[_,C]=We.useState(""),[S,A]=(0,We.useState)((0,i.A)({},Fc)),[k,M]=We.useState({open:!1,data:{}}),[O,T]=We.useState({open:!1,data:{}}),E=e=>{M((0,i.A)((0,i.A)({},k),{},{open:!k.open,data:e}))},P=s?["vital_type","action"]:["vital_type","processing_mode","batch_size","short_description","updated_at","status","defaultRule","action"],D=null===y||void 0===y?void 0:y.some(e=>"bp"===e.data_type&&(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.status)),R=null===y||void 0===y?void 0:y.some(e=>"glucose"===e.data_type&&e.data_type&&(null===e||void 0===e?void 0:e.default_rule)&&(null===e||void 0===e?void 0:e.status)),N=(e,t)=>{T((0,i.A)((0,i.A)({},O),{},{open:!O.open,data:{e:e,row:t}}))},L=async(e,t)=>{const r=y.map(r=>{if(r.id===t.id){const s={programId:null===n||void 0===n?void 0:n.code,ruleId:t.id,status:e.target.checked,defaultRule:null===t||void 0===t?void 0:t.default_rule};if(("glucose"===t.data_type||"bp"===t.data_type)&&(o(Ag(s)).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)}),"bp"===t.data_type)){var a;const e=null===(a=y.find(e=>"bp.pulse"===e.data_type&&e.short_description===t.short_description))||void 0===a?void 0:a.id;e&&o(Ag((0,i.A)((0,i.A)({},s),{},{ruleId:e}))).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)})}return(0,i.A)((0,i.A)({},r),{},{status:e.target.checked})}return r});b(r)},I=async e=>{let{e:t,row:r}=e;if(t.target.value){const e=null===y||void 0===y?void 0:y.map(e=>{if(e.id===r.id){const s={programId:null===n||void 0===n?void 0:n.code,ruleId:r.id,status:t.target.value,defaultRule:t.target.value};if(("glucose"===r.data_type||"bp"===r.data_type)&&(o(Ag(s)).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)}),"bp"===r.data_type)){var a;const e=null===(a=y.find(e=>"bp.pulse"===e.data_type&&e.short_description===r.short_description))||void 0===a?void 0:a.id;e&&o(Ag((0,i.A)((0,i.A)({},s),{},{ruleId:e}))).then(()=>{window.location.reload()}).catch(e=>{console.error("Error:",e)})}return(0,i.A)((0,i.A)({},e),{},{default_rule:t.target.value,status:t.target.value})}return e});b(e)}else o(Zo({subTitle:"At least one rule per vital must remain active at the program-level.",severity:$c}))},[F,$]=We.useState(!1),[B,z]=We.useState(as($o.getProgramRulesHeadcells())?P:$o.getProgramRulesHeadcells()),H=function(e){z(e),$o.setProgramRulesHeadcells(e)},W=()=>{$(!F)},V=e=>{if(Array.isArray(e))return w(e.map(e=>e.toString()));const t=e.target.name;j.includes(t)?w(j.filter(e=>e!==t)):w(e=>[...e,t])},U=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_;try{const{data:t}=await o(Cg(null===n||void 0===n?void 0:n.code,(0,i.A)((0,i.A)({sort_by:v,sort_order:f},S),{},{q:e}))),r=t||{},{content:a}=r,s=Ko(r,$Ae);b(a),A(e=>(0,i.A)((0,i.A)({},e),{},{last_page:s.last_page,current_page:s.current_page,from:s.from,per_page:s.per_page,to:s.to,total:s.total}))}catch(t){const e=ls(t,"response.data.code","");as(e)?o(Zo({subTitle:"error:rpm_ERR_NOT_FOUND",severity:$c})):o(Zo({subTitle:bd(e,"error:rpm_NotFound"),severity:$c}))}},q=e=>(0,Gt.jsx)(Yx,{title:u("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),G=e=>(0,Gt.jsx)(Yx,{title:u("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>a(e.id),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),Y=e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",onClick:()=>E(e),disabled:(null===e||void 0===e?void 0:e.default_rule)&&!0,children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})});We.useEffect(()=>{H(P)},[s]),We.useEffect(()=>{l&&!as(n)&&U()},[l,n]),We.useEffect(()=>{o(w_({activeMenuItem:"rules_program"}))},[n]);const Z=[{id:"vital_type",label:u("rpm_Vitals"),isSort:!0,sortProperty:"vital_type"},{id:"processing_mode",label:u("rpm_ProcessingMode"),isSort:!1,sortProperty:"processing_mode"},{id:"batch_size",label:u("rpm_BatchSize"),isSort:!1,sortProperty:"batch_size"},{id:"short_description",label:u("rpm_ShortDescription"),isSort:!1,sortProperty:"short_description"},{id:"updated_at",label:u("rpm_DateModified"),isSort:!1,sortProperty:"updated_at"},{id:"status",label:u("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"defaultRule",label:u("rpm_DefaultRule"),isSort:!1,sortProperty:"defaultRule"},{id:"action",label:u("rpm_Actions"),isSort:!1,sortProperty:"action"}];return as(n)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[as(n)||null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.showRuleList?r>=575?(0,Gt.jsx)(LAe,{userData:null===n||void 0===n?void 0:n.permissions,order:f,orderBy:v,setOrder:g,setOrderBy:x,searchText:_,setSearchText:C,dataParameter:"id",checkState:j,onCheck:V,isSelection:!1,nodata:D_,rulesHeadCell:Z,ruleList:y,fetchRuleList:U,pageDetails:S,editButton:q,viewButton:G,deleteButton:Y,activeProgram:n,setHeadcells:H,settingModal:F,initialHeadcells:B,handleSettingModalToggle:W,handleStatus:L,handleDefaultRule:I,isRuleActive:D,isGlucoseRuleActive:R,handleDefaultModalToggle:N}):(0,Gt.jsx)(FAe,{userData:null===n||void 0===n?void 0:n.permissions,order:f,orderBy:v,setOrder:g,setOrderBy:x,searchText:_,setSearchText:C,dataParameter:"id",checkState:j,onCheck:V,isSelection:!1,nodata:D_,rulesHeadCell:Z,ruleList:y,fetchRuleList:U,pageDetails:S,editButton:q,viewButton:G,deleteButton:Y,activeProgram:n,setHeadcells:H,settingModal:F,initialHeadcells:B,handleSettingModalToggle:W,handleStatus:L,handleDefaultRule:I,isRuleActive:D,isGlucoseRuleActive:R,handleDefaultModalToggle:N}):(0,Gt.jsx)(__,{}),(0,Gt.jsx)(PU,{openModal:k.open,onCloseModal:E,actionFunction:()=>(async(e,t)=>{const n={programId:e,ruleId:null===t||void 0===t?void 0:t.id,data_type:null===t||void 0===t?void 0:t.data_type};try{if(("glucose"===t.data_type||"bp"===t.data_type)&&(await o(Mg(n)),"bp"===t.data_type)){const e=y.find(e=>"bp.pulse"===e.data_type&&e.short_description===t.short_description);e&&o(Mg((0,i.A)((0,i.A)({},n),{},{ruleId:null===e||void 0===e?void 0:e.id,data_type:null===e||void 0===e?void 0:e.data_type})))}U(),M((0,i.A)((0,i.A)({},k),{},{open:!k.open})),p(u("message:rpm_DeleteRuleSuccess"),{variant:"success"})}catch(r){p(r.message,{variant:"error"})}})(null===n||void 0===n?void 0:n.code,null===k||void 0===k?void 0:k.data),dataName:"",options:{primaryText:u("message:rpm_DeleteTitle"),secondaryText:u("message:rpm_DeleteBodyText"),btn:{primaryText:u("rpm_Delete"),secondaryText:u("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(PU,{openModal:O.open,onCloseModal:N,actionFunction:()=>I(null===O||void 0===O?void 0:O.data),dataName:"",options:{primaryText:u("message:rpm_DefaultRuleTitle"),secondaryText:u("message:rpm_DefautRuleBodyText"),btn:{primaryText:u("rpm_Yes"),secondaryText:u("rpm_No"),primaryColor:"success",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(AZ,{isTour:d,path:"programRulesTour",setRenderer:m}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:h})]})};n(56603),n(68859),n(28575),n(90198);var zAe=n(51869),HAe=n(6217),WAe=n.n(HAe);function VAe(e){let{templateData:t,getTemplateDetail:n,handleChange:r}=e;const{t:i}=vg();return as(t)?"No Template":(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(Eu,{mt:{xs:1,sm:0},display:"flex",alignItems:"center",justifyContent:{xs:"flex-start",sm:"flex-start",md:"flex-end",lg:"flex-end"},flexWrap:{xs:"wrap",sm:"wrap",md:"nowrap"}}),(0,Gt.jsxs)(df,{container:!0,spacing:3,mb:1,children:[(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,md:6,children:(0,Gt.jsxs)(Eu,{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",flexDirection:"row",tabIndex:0,children:[(0,Gt.jsx)(Ym,{component:"h6",variant:"subtitle2",children:i("rpm_ModifiedBy")+":"}),(0,Gt.jsxs)(Eu,{ml:1,component:"span",fontWeight:900,fontSize:14,children:[null===t||void 0===t?void 0:t.updated_by,", ",null===t||void 0===t?void 0:t.updated_at]})]})}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,md:6,children:(0,Gt.jsxs)(Eu,{width:"100%",display:"flex",alignItems:"center",justifyContent:{xs:"flex-start",sm:"flex-end"},flexDirection:"row",tabIndex:0,children:[(0,Gt.jsx)(Ym,{component:"h6",variant:"subtitle2",children:i("rpm_Created_By")+":"}),(0,Gt.jsxs)(Eu,{ml:1,component:"span",fontWeight:900,fontSize:14,children:[t.created_by,", ",t.created_at]})]})})]}),(0,Gt.jsx)(Eu,{width:"100%",my:1,children:(0,Gt.jsx)(zAe.Ay,{style:{width:"100%"},fullWidth:!0,autoFocus:!0,mode:"html",theme:"solarized_dark",fontSize:16,id:"root",name:"root",onChange:r,value:null===t||void 0===t?void 0:t.template,tabSize:2,onLoad:e=>{WAe().beautify(e.session)}})}),(0,Gt.jsx)(Eu,{display:"flex",alignItems:"center",justifyContent:{xs:"flex-start",sm:"flex-end",md:"flex-end"},pt:{xs:1,sm:1,md:1},pb:1,width:"100%",children:(0,Gt.jsx)(ZCe,{mdUp:!0,children:(0,Gt.jsx)(Vp,{className:"custom-default-button text-transform-none",size:"large",variant:"contained",disableElevation:!0,onClick:n,children:i("reset")})})})]})}VAe.defaultProps={copyTemplateText:()=>{},downloadTemplateText:()=>{},getTemplateDetail:()=>{},readFile:()=>{},handleChange:()=>{},templateData:{}};const UAe=VAe,qAe=e=>{let{templateData:t,getConsultationTemplate:n,handleChange:r,activeProgram:i,updateTemplate:o}=e;const a=so(),s=[{name:we("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===i||void 0===i?void 0:i.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===i||void 0===i?void 0:i.code,"/patients")},{name:we("rpm_ConsultationTemplate"),url:""}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:s})}),(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsx)(Eu,{sx:{mb:1},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",sx:{mb:2},children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:we("rpm_ConsultationTemplate")})})})})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsxs)(Eu,{mb:3,textAlign:"right",children:[(0,Gt.jsx)(Vp,{variant:"outlined",style:{marginRight:"10px"},color:"primary",onClick:()=>a(-1),children:we("rpm_Cancel")}),(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",onClick:o,children:we("rpm_Save")})]})})]})]}),(0,Gt.jsx)(Eu,{bgcolor:"white",p:2,sx:{boxShadow:"0 0 9px 0 #0000000a",borderRadius:"8px"},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",p:2,pr:0,children:(0,Gt.jsx)(UAe,{templateData:t,getTemplateDetail:n,handleChange:r})})})]})})},GAe=e=>{let{templateData:t,getConsultationTemplate:n,handleChange:r,activeProgram:i,updateTemplate:o}=e;const a=so(),s=[{name:we("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===i||void 0===i?void 0:i.display_name,url:"".concat(Lc.DOCTOR.PROGRAM,"/").concat(null===i||void 0===i?void 0:i.code,"/patients")},{name:we("rpm_ConsultationTemplate"),url:""}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{children:[(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",alignItems:"baseline",children:[(0,Gt.jsx)(kH,{labels:s}),(0,Gt.jsx)(Ym,{variant:"h6",component:"h6",children:we("rpm_ConsultationTemplate")})]}),(0,Gt.jsx)(df,{container:!0,children:(0,Gt.jsx)(df,{item:!0,xs:12,md:!0,children:(0,Gt.jsxs)(Eu,{mb:3,textAlign:"right",children:[(0,Gt.jsx)(Vp,{variant:"outlined",style:{marginRight:"10px"},color:"primary",onClick:()=>a(-1),children:we("rpm_Cancel")}),(0,Gt.jsx)(Vp,{color:"primary",disableElevation:!0,variant:"contained",type:"submit",onClick:o,children:we("rpm_Save")})]})})})]}),(0,Gt.jsx)(Eu,{bgcolor:"white",p:2,sx:{boxShadow:"0 0 9px 0 #0000000a",borderRadius:"8px"},children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",p:2,pr:0,children:(0,Gt.jsx)(UAe,{templateData:t,getTemplateDetail:n,handleChange:r})})})]})})},YAe=e=>{let{activeProgram:t}=e;const n=window.innerWidth,r=Ct(Nd),o=Nt(),[a,s]=We.useState({}),l=We.useRef(a),c=async e=>{const{data:t}=await o((e=>async t=>{t(na(!0));try{const t="".concat(xa,"/-/YOURPAL/consultation_notes.html?prefix=").concat(e),n=await cu(t,{});return Dg(n.data),n}catch(n){return n}finally{t(na(!1))}})(e));console.log(t),s(t)},d=async()=>{await o(((e,t)=>async n=>{n(na(!0));const r="".concat(xa,"/-/YOURPAL/consultation_notes.html?prefix=").concat(t);try{const t=await uu(r,e);return n(Zo({subTitle:"message:rpm_TemplateUpdatedSuccessfully",severity:Bc})),Dg(t.data),t}catch(i){return i}finally{n(na(!1))}})(a,null===t||void 0===t?void 0:t.code))},u=e=>{as(a)||(s((0,i.A)((0,i.A)({},a),{},{template:e})),l.current=(0,i.A)((0,i.A)({},a),{},{template:e}))};return We.useEffect(()=>{r&&t&&c(null===t||void 0===t?void 0:t.code)},[r,t]),We.useEffect(()=>{o(w_({activeMenuItem:"templates"}))},[]),(0,Gt.jsx)("div",{children:n>=575?(0,Gt.jsx)(qAe,{activeProgram:t,templateData:a,getConsultationTemplate:c,handleChange:u,updateTemplate:d}):(0,Gt.jsx)(GAe,{activeProgram:t,templateData:a,getConsultationTemplate:c,handleChange:u,updateTemplate:d})})};function ZAe(e){let{userList:t,order:n,orderBy:r,setOrder:i,setOrderBy:o,searchText:a,setSearchText:s,dataParameter:l,userHead:c,checkState:d,onCheck:u,isSelection:p,nodata:h,fetchUserList:m,pageDetails:f,setHeadcells:g,settingModal:v,initialHeadcells:x,handleSettingModalToggle:y,toggleRoles:b}=e;const{t:j}=vg(),w=[{name:j("rpm_RPM"),url:Lc.PATIENT},{name:j("rpm_Providers"),url:""}];return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",children:[(0,Gt.jsx)(kH,{labels:w}),(0,Gt.jsx)(Eu,{sx:{display:{xs:"block",sm:"none"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:j("rpm_Providers")})})]}),(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(df,{container:!0,spacing:2,alignItems:"center",children:(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Eu,{sx:{display:{xs:"none",sm:"block"}},children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:j("rpm_Providers")})})})})}),(0,Gt.jsxs)(df,{container:!0,spacing:2.5,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,justifyContent:"space-between",children:[(0,Gt.jsx)(df,{item:!0,xs:12,md:5,lg:4,className:"staff-tour-step1",children:(0,Gt.jsx)(MZ,{fetchListFunction:m,searchText:a,setSearchText:s,pageDetails:f,searchInField:!0,placeHolder:"Search by username and email"})}),(0,Gt.jsx)(df,{item:!0,xs:12,md:7,lg:8,container:!0,spacing:2,justifyContent:"flex-end",children:(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:j("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:y,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})})})]})}),(0,Gt.jsxs)(df,{item:!0,xs:12,children:[(0,Gt.jsx)(Eu,{children:(0,Gt.jsx)(EM,{order:n,orderBy:r,setOrder:i,setOrderBy:o,data:t,headCells:null===c||void 0===c?void 0:c.filter(e=>x.includes(e.id)),dataParameter:l,selected:d,setSelected:u,isSelection:p,noDataImage:h,fetchList:m,pageDetails:f,skeletonVrows:6,className:"theme_scroll",children:null===t||void 0===t?void 0:t.map(e=>{return(0,Gt.jsxs)(K_,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[p&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:u,checked:d.includes(e.id.toString()),name:e.id.toString(),color:"primary"})}),x.includes("username")&&(0,Gt.jsx)(rC,{children:e.username}),x.includes("full_name")&&(0,Gt.jsx)(rC,{width:"25%",children:e.first_name+" "+e.last_name}),x.includes("email")&&(0,Gt.jsx)(rC,{children:e.email}),x.includes("status")&&(0,Gt.jsx)(rC,{children:(t=e.active,t?(0,Gt.jsx)(XO,{severity:"success",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Active"})}):(0,Gt.jsx)(XO,{severity:"error",icon:!1,sx:e=>({py:0,px:1,display:"inline-flex",fontSize:e.spacing(1.5),"& .MuiAlert-message":{p:e.spacing(.5,0)}}),children:(0,Gt.jsx)("strong",{children:"Inactive"})}))}),x.includes("created_at")&&(0,Gt.jsx)(rC,{children:sa()(e.created_at).format("DD MMM YYYY hh:mm A")}),x.includes("action")&&(0,Gt.jsx)(rC,{children:b(e)})]},e.id);var t})})}),(0,Gt.jsx)(IO,{pageDetails:f,fetchListFunction:m}),(0,Gt.jsx)(fO,{open:v,allHeadCells:c,initialHeadcells:x,setHeadcells:g,onClose:y})]})]})]})})}ZAe.defaultProps={userHead:[],pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},searchText:"",setSearchText:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",userList:[],fetchUserList:()=>{},viewButton:()=>{},deleteButton:()=>{},filterByProgram:0,onProgramChange:()=>{},programList:[],onApplyFilter:()=>{},onResetFilter:()=>{},userData:{},initialHeadcells:[],setHeadcells:()=>{},settingModal:!1,handleSettingModalToggle:()=>{},assignProviders:()=>{},toggleRoles:()=>{},allPrograms:[]};const KAe=ZAe,XAe=["content"];const QAe=function(e){let{activeProgram:t}=e;const n=Nt(),{programId:r,patientId:o}=lo(),{t:a}=vg(),{userData:s}=(0,We.useContext)(Zg),l=Ct(qd),c=!("true"===ls(l,"user_principal.attributes.skip_tour[0]","")),{programList:d}=(0,We.useContext)(j_),u=Ct(Nd),[p,h]=(0,We.useState)("desc"),[m,f]=(0,We.useState)("updated_at"),[g,v]=We.useState(""),[x,y]=We.useState(null),[b,j]=(0,We.useState)([]),[w,_]=(0,We.useState)((0,i.A)({},Fc)),[C,S]=We.useState(""),[A,k]=We.useState(!1),[M,O]=We.useState([]),[T,E]=We.useState({}),[P,D]=We.useState(as($o.getProvidersHeadCells())?["username","full_name","email","status","created_at","action"]:$o.getProvidersHeadCells()),R=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;const t=(0,i.A)((0,i.A)({q:e},w),{},{sort_by:m,sort_order:p,programId:r});try{const{data:e}=await n(Lg(t)),r=e||{},{content:o}=r,a=Ko(r,XAe);y(o),_(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(o){const e=ls(o,"response.data.code","");as(e)?n(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:$c})):n(Zo({subTitle:bd(e,"error:rpm_FetchUsersFailed"),severity:$c}))}},N=async()=>{const e={programUrn:null===t||void 0===t?void 0:t.urn};try{const{data:t}=await n(Hs(e));O(t)}catch(r){const e=ls(r,"response.data.code","");as(e)?n(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:$c})):n(Zo({subTitle:bd(e,"error:rpm_FetchUsersFailed"),severity:$c}))}},L=async e=>{const r=null===M||void 0===M?void 0:M.some(t=>(null===t||void 0===t?void 0:t.provider_urn)===e&&(null===t||void 0===t?void 0:t.patient_urn)===(null===T||void 0===T?void 0:T.urn)),i={patient_urn:null===T||void 0===T?void 0:T.urn,program_urn:null===t||void 0===t?void 0:t.urn,provider_urn:e,key:r?"UNASSIGN":"ASSIGN"};try{const{data:e}=await n(Ws(i));as(e)||(n(Zo({subTitle:a(r?"rpm_providerUnassignSuccess":"rpm_providerAssignment"),severity:Bc})),N())}catch(o){const e=ls(o,"response.data.code","");as(e)?n(Zo({subTitle:"error:rpm_providerAssignFailed",severity:$c})):n(Zo({subTitle:bd(e,"error:rpm_providerAssignFailed"),severity:$c}))}};We.useEffect(()=>{u&&!as(s)&&r&&o&&(R(),(async()=>{const{data:e}=await n(qs(r,o));E(e)})())},[u,p,m,s,r,o]),We.useEffect(()=>{u&&!as(t)&&N()},[t,u]),We.useEffect(()=>{n(w_({activeMenuItem:"all_patients"}))},[]);const I=[{id:"username",label:a("rpm_UserName"),isSort:!0,sortProperty:"username"},{id:"full_name",label:a("rpm_FullName"),isSort:!1,sortProperty:"full_name"},{id:"email",label:a("rpm_Email"),isSort:!0,sortProperty:"email"},{id:"status",label:a("rpm_Status"),isSort:!1,sortProperty:"status"},{id:"created_at",label:a("rpm_CreatedAt"),isSort:!0,sortProperty:"created_at"},{id:"action",label:a("rpm_Actions"),isSort:!1,sortProperty:"action"}];return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(KAe,{order:p,orderBy:m,setOrder:h,setOrderBy:f,searchText:g,setSearchText:v,dataParameter:"id",checkState:b,onCheck:e=>{if(Array.isArray(e))return j(e.map(e=>e.toString()));const t=e.target.name;b.includes(t)?j(b.filter(e=>e!==t)):j(e=>[...e,t])},isSelection:!1,nodata:D_,userHead:I,userList:x,fetchUserList:R,pageDetails:w,programList:d,userData:s,setHeadcells:function(e){D(e),$o.setProvidersHeadCells(e)},settingModal:A,initialHeadcells:P,handleSettingModalToggle:()=>{k(!A)},toggleRoles:e=>{const t=null===M||void 0===M?void 0:M.some(t=>(null===t||void 0===t?void 0:t.provider_urn)===(null===e||void 0===e?void 0:e.urn)&&(null===t||void 0===t?void 0:t.patient_urn)===(null===T||void 0===T?void 0:T.urn));return(0,Gt.jsx)(Vp,{"data-id":e.id,color:t?"error":"primary",variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(BZ.A,{}),onClick:()=>L(e.urn),children:a(t?"rpm_Unassign":"rpm_Assign")})},assignProviders:L}),!as(s)&&(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(AZ,{isTour:c,path:"staffTour",setRenderer:S}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:C})]})]})},JAe=e=>{let{open:t,onClose:n,onAssign:r,patientList:o,selectedPatient:a,setSelectedPatient:s,selectedProvider:l,setSelectedProvider:c,userList:d,fetchPatientListSuggestions:u}=e;const{t:p}=vg(),h=ss((e,t)=>{null!==t&&void 0!==t&&t.trim()&&e({patientName:t})},500);return(0,We.useEffect)(()=>{t&&(s(null),c(null),u({patientName:""}))},[t]),(0,Gt.jsxs)(Kw,{open:t,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,Gt.jsx)(n_,{children:p("rpm_AssignPatients")||"Assign Patient"}),(0,Gt.jsx)(s_,{dividers:!0,children:(0,Gt.jsxs)(df,{container:!0,spacing:2,children:[(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,children:(0,Gt.jsx)(Gb,{options:o||[],getOptionLabel:e=>{var t;return e&&(e.name||[e.first_name,e.last_name].filter(Boolean).join(" ")||(null===(t=e.patient_urn)||void 0===t?void 0:t.split("/").pop())||e.id)||""},value:a,onChange:(e,t,n)=>{if("clear"===n)return s(null),void u({patientName:""});s(t)},onInputChange:(e,t)=>(e=>{h(u,e)})(t),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{label:p("rpm_SelectPatient")||"Select Patient",variant:"outlined",size:"small",fullWidth:!0}))})}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:6,children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"provider",name:"provider",options:d||[],isOptionEqualToValue:(e,t)=>(null===e||void 0===e?void 0:e.id)===(null===t||void 0===t?void 0:t.id),getOptionLabel:e=>e?"".concat(e.first_name||""," ").concat(e.last_name||"").trim():"",renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:"".concat(t.first_name," ").concat(t.last_name)})),value:l,onChange:(e,t)=>c(t),renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{label:p("rpm_SelectProvider")||"Select Provider",variant:"outlined",size:"small",fullWidth:!0}))})})]})}),(0,Gt.jsxs)(iO,{children:[(0,Gt.jsx)(Vp,{onClick:n,children:p("rpm_Cancel")||"Cancel"}),(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",onClick:()=>{r("ASSIGN"),n()},disabled:!a||!l,children:p("rpm_Assign")||"Assign"})]})]})};JAe.defaultProps={onAssign:()=>{},patientList:[],selectedPatient:null,setSelectedPatient:()=>{},selectedProvider:null,setSelectedProvider:()=>{},userList:[],fetchPatientListSuggestions:()=>{}};const eke=JAe;function tke(e){let{fetchAssignmentList:t,assignment:n,activeProgram:r,devicesList:o,order:a,orderBy:s,setOrder:l,setOrderBy:c,dataParameter:d,initialHeadcells:u,headCellsItems:p,setHeadcells:h,checkState:m,onCheck:f,isSelection:g,nodata:v,fetchPatientList:x,pageDetails:y,multiDeletePatient:b,moreMenu:j,openFilter:w,patientModalOpen:_,viewMode:C,settingModal:S,handlePatientModalToggle:A,handleSettingModalToggle:k,addNewPatient:M,setSearchDevice:O,filterState:T,setFilterState:E,patientCourseCell:P,states:D,countries:R,fetchStates:N,patientSuggestions:L,fetchPatientListSuggestions:I,fetchAllPatients:F,handleViewPatientModalToggle:$,patientViewModalOpen:B,allPatients:z,setAllPatients:H,newHeadCellsItems:W,fetchAllPatientsListSuggestions:V,allpatientSuggestions:U,addButton:q,newFilterState:G,setNewFilterState:Y,newPageDetails:Z,userList:K,setUserParams:X,deleteListItem:Q,patientList:J,assignedProviders:ee,selectedPatient:te,setSelectedPatient:ne,selectedProvider:re,setSelectedProvider:ie,onAssign:oe,assignModalOpen:ae,onCloseAssignmentPopUp:se,openAssignmentPopUp:le}=e;const{t:ce}=vg(),de=[{name:ce("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===r||void 0===r?void 0:r.display_name,url:""}],ue=null===n||void 0===n?void 0:n.map(e=>[...e.assignments]);return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsx)(Eu,{mb:2.5,children:(0,Gt.jsx)(kH,{labels:de})}),(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:!0,children:(0,Gt.jsx)(Ym,{variant:"h5",component:"h5",children:ce("rpm_Assignments")||"Assignments"})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",onClick:le,children:ce("rpm_Assign")||"Assign"})})]})}),(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(mr,{in:w,children:(0,Gt.jsx)(Uu,{elevation:0,sx:{p:1},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:12,sm:4,children:(0,Gt.jsx)(Eu,{className:"assigment-filter",children:(0,Gt.jsx)(bue,{pageDetails:y,fetchListFunction:x,filterState:T,setFilterState:E,patientSuggestions:L,fetchPatientListSuggestions:I,placeholder:"Search by name or phone number",helpText:"Enter name of the user"})})}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:4,children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"username",name:"username",options:as(K)?[]:K,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>e?"".concat(e.first_name||""," ").concat(e.last_name||"").trim():"",renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:"".concat(t.first_name," ").concat(t.last_name)})),onChange:(e,t)=>{E((0,i.A)((0,i.A)({},T),{},{provider_urn:null===t||void 0===t?void 0:t.urn}))},onInputChange:(e,t)=>{X(t||"")},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:ce("rpm_SearchProvider")+"..."}))})}),(0,Gt.jsxs)(df,{item:!0,sm:4,xs:2,justifyContent:"flex-end",children:["list"===C&&(0,Gt.jsx)(df,{item:!0,textAlign:"right",children:(0,Gt.jsx)(Yx,{title:ce("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto"},size:"small",color:"primary",onClick:k,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),m.length>0&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:ce("rpm_Delete"),children:(0,Gt.jsx)(Kp,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>b(m,{}),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})})})}),null!==ue&&void 0!==ue&&ue.length?(0,Gt.jsx)(EM,{order:a,orderBy:s,setOrder:l,setOrderBy:c,data:null===ue||void 0===ue?void 0:ue.flat(),headCells:p.filter(e=>u.includes(e.id)),dataParameter:d,selected:m,setSelected:f,isSelection:g,noDataImage:v,fetchList:x,pageDetails:y,skeletonVrows:6,className:"theme_scroll",children:((null===ue||void 0===ue?void 0:ue.flat())||[]).map(e=>(0,Gt.jsxs)(K_,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[g&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:f,checked:m.includes(e.id.toString()),name:e.id,color:"primary"})}),u.includes("client_name")&&(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&e.client_name?(0,Gt.jsx)(Lo,{className:"linkClr",children:e.client_name}):(0,Gt.jsx)(Ym,{className:"linkClr",children:"NA"})}),u.includes("provider_name")&&(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&e.provider_name?(0,Gt.jsx)(Lo,{className:"linkClr",children:null===e||void 0===e?void 0:e.provider_name}):(0,Gt.jsx)(Ym,{className:"linkClr",children:"NA"})}),u.includes("assigned_date")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Lo,{children:[" ",new Date(null===e||void 0===e?void 0:e.assigned_date).toLocaleDateString("en-GB")]})}),P(e),u.includes("actions")&&(0,Gt.jsx)(rC,{children:Q(e)})]},e.id))}):(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",height:"486px",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"},alt:"No Data Found"})})})]}),(0,Gt.jsx)(IO,{pageDetails:y,fetchListFunction:t}),j,(0,Gt.jsx)(LSe,{activeProgram:r,openModal:B,onCloseModal:$,fetchAllPatients:F,order:a,orderBy:s,setOrder:l,setOrderBy:c,dataParameter:d,initialHeadcells:u,onCheck:f,nodata:v,allPatients:z,headCellsItems:p,checkState:m,newHeadCellsItems:W,newFilterState:G,setNewFilterState:Y,fetchAllPatientsListSuggestions:V,allpatientSuggestions:U,addButton:q,newPageDetails:Z,setAllPatients:H,fetchListFunction:!0}),(0,Gt.jsx)(TSe,{activeProgram:r,openModal:_,onCloseModal:A,addNewPatient:M,devicesList:o,setSearchDevice:O,states:D,countries:R,fetchStates:N}),(0,Gt.jsx)(fO,{open:S,allHeadCells:p,initialHeadcells:u,setHeadcells:h,onClose:k}),(0,Gt.jsx)(eke,{open:ae,onClose:se,onAssign:oe,patientList:J,assignedProviders:ee,selectedPatient:te,setSelectedPatient:ne,selectedProvider:re,setSelectedProvider:ie,userList:K,fetchPatientListSuggestions:x})]})}tke.defaultProps={headCellsItems:[],initialHeadcells:[],setHeadcells:()=>{},pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientList:[],devicesList:[],fetchPatientList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},multiDeletePatient:()=>{},patientCount:{},flag:"",programList:[],setSearchDevice:()=>{},getNonCompliants:()=>{},getPatientVitals:()=>{},getPatientActiveCourse:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},fetchProgramScheduleList:()=>{},patientCourseCell:()=>{},programSchedule:[],states:[],countries:[],fetchStates:()=>{},patientSuggestions:[],fetchPatientListSuggestions:()=>{},fetchAllPatients:()=>{},handleViewPatientModalToggle:()=>{},allPatients:[],fetchAllPatientsListSuggestions:()=>{},allpatientSuggestions:[],addButton:()=>{},newFilterState:{},setNewFilterState:()=>{},setAllPatients:()=>{},newPageDetails:{},userList:[],setUserParams:()=>{},fetchAssignmentList:()=>{},onProgramChange:()=>{},toggleRoles:()=>{},deleteListItem:()=>{},assignedProviders:[],selectedPatient:null,setSelectedPatient:()=>{},selectedProvider:null,setSelectedProvider:()=>{},onAssign:()=>{},assignModalOpen:!1,onCloseAssignmentPopUp:()=>{},openAssignmentPopUp:()=>{}};const nke=tke;function rke(e){var t,n;let{fetchAssignmentList:r,assignment:o,activeProgram:a,devicesList:s,order:l,orderBy:c,setOrder:d,setOrderBy:u,dataParameter:p,initialHeadcells:h,headCellsItems:m,setHeadcells:f,checkState:g,onCheck:v,isSelection:x,nodata:y,fetchPatientList:b,pageDetails:j,multiDeletePatient:w,moreMenu:_,openFilter:C,patientModalOpen:S,viewMode:A,settingModal:k,handlePatientModalToggle:M,handleSettingModalToggle:O,addNewPatient:T,setSearchDevice:E,filterState:P,setFilterState:D,patientCourseCell:R,states:N,countries:L,fetchStates:I,patientSuggestions:F,fetchPatientListSuggestions:$,fetchAllPatients:B,handleViewPatientModalToggle:z,patientViewModalOpen:H,allPatients:W,setAllPatients:V,newHeadCellsItems:U,fetchAllPatientsListSuggestions:q,allpatientSuggestions:G,addButton:Y,newFilterState:Z,setNewFilterState:K,newPageDetails:X,userList:Q,setUserParams:J,deleteListItem:ee,patientList:te,assignedProviders:ne,selectedPatient:re,setSelectedPatient:ie,selectedProvider:oe,setSelectedProvider:ae,assignModalOpen:se,onAssign:le,onCloseAssignmentPopUp:ce,openAssignmentPopUp:de}=e;const{t:ue}=vg(),pe=[{name:ue("rpm_RPM"),url:Lc.DOCTOR.PROGRAM},{name:null===a||void 0===a?void 0:a.display_name,url:""}],he=null===o||void 0===o?void 0:o.map(e=>[...e.assignments]);return(0,Gt.jsxs)(Eu,{sx:{width:"100%"},children:[(0,Gt.jsxs)(Eu,{mb:2.5,display:"flex",alignItems:"center",children:[(0,Gt.jsx)(kH,{labels:pe}),(0,Gt.jsx)(Ym,{variant:"h6",gutterBottom:!0,component:"h6",sx:{marginBottom:"0"},children:ue("rpm_Patients")})]}),(0,Gt.jsx)(Eu,{sx:{mb:2.5},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(null===a||void 0===a||null===(t=a.permissions)||void 0===t?void 0:t.showAllPatientListText)&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Lo,{onClick:z,className:(null===a||void 0===a||null===(n=a.permissions)||void 0===n?void 0:n.showAllPatientListText)&&"patients-tour-step1",children:(0,Gt.jsx)(Ym,{color:"customClr.bp",fontWeight:500,component:"span",fontSize:14,children:ue("rpm_ViewAllPatient")})})}),(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Vp,{variant:"contained",color:"primary",onClick:de,children:ue("rpm_Assign")||"Assign"})})]})}),(0,Gt.jsxs)(df,{container:!0,children:[(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(mr,{in:C,children:(0,Gt.jsx)(Uu,{elevation:0,sx:{p:1},children:(0,Gt.jsxs)(df,{container:!0,spacing:2,alignItems:"center",children:[(0,Gt.jsx)(df,{item:!0,xs:12,sm:4,children:(0,Gt.jsx)(Eu,{className:"assigment-filter",children:(0,Gt.jsx)(bue,{pageDetails:j,fetchListFunction:b,filterState:P,setFilterState:D,patientSuggestions:F,fetchPatientListSuggestions:$,placeholder:"Search by name or phone number",helpText:"Enter name of the user"})})}),(0,Gt.jsx)(df,{item:!0,xs:12,sm:4,children:(0,Gt.jsx)(Gb,{fullWidth:!0,size:"small",margin:"dense",id:"username",name:"username",options:as(Q)?[]:Q,isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionLabel:e=>e?"".concat(e.first_name||""," ").concat(e.last_name||"").trim():"",renderOption:(e,t)=>(0,We.createElement)(Eu,(0,i.A)((0,i.A)({component:"li"},e),{},{key:t.id}),(0,Gt.jsx)(Ym,{variant:"body1",component:"p",children:"".concat(t.first_name," ").concat(t.last_name)})),onChange:(e,t)=>{D((0,i.A)((0,i.A)({},P),{},{provider_urn:null===t||void 0===t?void 0:t.urn}))},onInputChange:(e,t)=>{J(t||"")},renderInput:e=>(0,Gt.jsx)($w,(0,i.A)((0,i.A)({},e),{},{placeholder:ue("rpm_SearchProvider")+"..."}))})}),(0,Gt.jsxs)(df,{item:!0,sm:4,xs:2,justifyContent:"flex-end",children:["list"===A&&(0,Gt.jsx)(df,{item:!0,textAlign:"right",children:(0,Gt.jsx)(Yx,{title:ue("rpm_TableCellSetting"),children:(0,Gt.jsx)(Yg,{sx:{boxShadow:"none",width:32,height:32,minHeight:"auto",zIndex:0},size:"small",color:"primary",onClick:O,children:(0,Gt.jsx)(N_.A,{fontSize:"small",sx:{width:16,height:16}})})})}),g.length>0&&(0,Gt.jsx)(df,{item:!0,children:(0,Gt.jsx)(Yx,{title:ue("rpm_Delete"),children:(0,Gt.jsx)(Kp,{color:"error",sx:{bgcolor:"red.50"},onClick:()=>w(g,{}),children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})})})})]})]})})})}),null!==he&&void 0!==he&&he.length?(0,Gt.jsx)(EM,{order:l,orderBy:c,setOrder:d,setOrderBy:u,data:null===he||void 0===he?void 0:he.flat(),headCells:m.filter(e=>h.includes(e.id)),dataParameter:p,selected:g,setSelected:v,isSelection:x,noDataImage:y,fetchList:b,pageDetails:j,skeletonVrows:6,className:"theme_scroll",children:((null===he||void 0===he?void 0:he.flat())||[]).map(e=>(0,Gt.jsxs)(K_,{hover:!0,sx:{"&:last-child td, &:last-child th":{border:0}},children:[x&&(0,Gt.jsx)(rC,{padding:"checkbox",children:(0,Gt.jsx)(jC,{onChange:v,checked:g.includes(e.id.toString()),name:e.id,color:"primary"})}),h.includes("client_name")&&(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&e.client_name?(0,Gt.jsx)(Lo,{className:"linkClr",children:e.client_name}):(0,Gt.jsx)(Ym,{className:"linkClr",children:"NA"})}),h.includes("provider_name")&&(0,Gt.jsx)(rC,{children:null!==e&&void 0!==e&&e.provider_name?(0,Gt.jsx)(Lo,{className:"linkClr",children:null===e||void 0===e?void 0:e.provider_name}):(0,Gt.jsx)(Ym,{className:"linkClr",children:"NA"})}),h.includes("assigned_date")&&(0,Gt.jsx)(rC,{children:(0,Gt.jsxs)(Lo,{children:[" ",new Date(null===e||void 0===e?void 0:e.assigned_date).toLocaleDateString("en-GB")]})}),R(e),h.includes("actions")&&(0,Gt.jsx)(rC,{children:ee(e)})]},e.id))}):(0,Gt.jsx)(df,{item:!0,xs:12,children:(0,Gt.jsx)(Eu,{py:6,bgcolor:"#fff",border:"1px solid rgba(0, 0, 0, 0.12)",borderRadius:"4px",height:"486px",children:(0,Gt.jsx)("img",{src:D_,style:{display:"block",margin:"auto",width:"100%",maxWidth:"300px",height:"auto"},alt:"No Data Found"})})})]}),(0,Gt.jsx)(IO,{pageDetails:j,fetchListFunction:r}),_,(0,Gt.jsx)(LSe,{activeProgram:a,openModal:H,onCloseModal:z,fetchAllPatients:B,order:l,orderBy:c,setOrder:d,setOrderBy:u,dataParameter:p,initialHeadcells:h,onCheck:v,nodata:y,allPatients:W,headCellsItems:m,checkState:g,newHeadCellsItems:U,newFilterState:Z,setNewFilterState:K,fetchAllPatientsListSuggestions:q,allpatientSuggestions:G,addButton:Y,newPageDetails:X}),(0,Gt.jsx)(TSe,{activeProgram:a,openModal:S,onCloseModal:M,addNewPatient:T,devicesList:s,setSearchDevice:E,states:N,countries:L,fetchStates:I}),(0,Gt.jsx)(fO,{open:k,allHeadCells:m,initialHeadcells:h,setHeadcells:f,onClose:O}),(0,Gt.jsx)(eke,{open:se,onClose:ce,onAssign:le,patientList:te,assignedProviders:ne,selectedPatient:re,setSelectedPatient:ie,selectedProvider:oe,setSelectedProvider:ae,userList:Q,fetchPatientListSuggestions:b})]})}rke.defaultProps={headCellsItems:[],initialHeadcells:[],setHeadcells:()=>{},pageDetails:{},order:"",orderBy:"",setOrder:()=>{},setOrderBy:()=>{},dataParameter:"",checkState:"",onCheck:()=>{},isSelection:"",nodata:"",patientList:[],devicesList:[],fetchPatientList:()=>{},editButton:()=>{},viewButton:()=>{},deleteButton:()=>{},multiDeletePatient:()=>{},patientCount:{},flag:"",programList:[],setSearchDevice:()=>{},getNonCompliants:()=>{},getPatientVitals:()=>{},getPatientActiveCourse:()=>{},showFilterColor:"",setShowFilterColor:()=>{},filterState:{},setFilterState:()=>{},fetchProgramScheduleList:()=>{},patientCourseCell:()=>{},programSchedule:[],states:[],countries:[],fetchStates:()=>{},patientSuggestions:[],fetchPatientListSuggestions:()=>{},fetchAllPatients:()=>{},handleViewPatientModalToggle:()=>{},allPatients:[],fetchAllPatientsListSuggestions:()=>{},allpatientSuggestions:[],addButton:()=>{},newFilterState:{},setNewFilterState:()=>{},setAllPatients:()=>{},newPageDetails:{},userList:[],setUserParams:()=>{},fetchAssignmentList:()=>{},onProgramChange:()=>{},toggleRoles:()=>{},deleteListItem:()=>{},assignedProviders:[],selectedPatient:null,setSelectedPatient:()=>{},selectedProvider:null,setSelectedProvider:()=>{},onAssign:()=>{},openAssignmentPopUp:()=>{},onCloseAssignmentPopUp:()=>{},assignModalOpen:!1};const ike=rke,oke=["content"],ake=["content"];const ske=function(e){var t,n,r,o,a,s,l,c,d;let{activeProgram:u}=e;const p=window.innerWidth,h=Nt(),m=Ct(Nd),f=Ct(qd),g=!("true"===ls(f,"user_principal.attributes.skip_tour[0]","")),{t:v}=vg(),x=so(),{enqueueSnackbar:y}=hi(),{programList:b}=(0,We.useContext)(j_),{programId:j}=lo(),{query:w}=vs(),[_,C]=(We.useRef([]),We.useRef(null),(0,We.useState)("desc")),[S,A]=(0,We.useState)("created_at"),[k,M]=We.useState(null),[O,T]=We.useState(null),[E,P]=We.useState(null),[D,R]=We.useState(null),[N,L]=(0,We.useState)([]),[I,F]=We.useState(""),[$,B]=We.useState(""),[z,H]=We.useState(!1),W=Boolean(D),[V,U]=(0,We.useState)((0,i.A)({},Fc)),[q,G]=(0,We.useState)((0,i.A)({},Fc)),[Y,Z]=We.useState(null),[K,X]=We.useState(null),[Q,J]=(0,We.useState)({}),[ee,te]=We.useState({open:!1,data:{}}),ne=$o.getPatientTableView(),re=ne.patientTableView?ne.patientTableView:"list",[ie,oe]=We.useState(!0),[ae,se]=We.useState(!1),[le,ce]=We.useState(!1),[de,ue]=We.useState(re),[pe,he]=We.useState(!1),[me,fe]=We.useState([]),[ge,ve]=We.useState("ALL"),[xe,ye]=We.useState(""),[be,je]=We.useState(!1),[we,_e]=(0,We.useState)([]),[Ce,Se]=(0,We.useState)([]),[Ae,ke]=We.useState(null),[Me,Oe]=We.useState({patientName:"",urn:"",provider_urn:""}),[Te,Ee]=We.useState({patientName:"",userMobile:""}),[Pe,De]=We.useState([]),[Re,Ne]=We.useState([]),[Le,Ie]=We.useState(null),[Fe,$e]=We.useState({programName:""}),Be=P_(BA().breakpoints.down("sm")),[ze,He]=(0,We.useState)(null),[Ve,Ue]=We.useState([]),[qe,Ge]=We.useState({}),Ye=["client_name","provider_name","assigned_date","actions"],[Ze,Ke]=We.useState(null),[Xe,Qe]=We.useState(null),[Je,et]=We.useState(!1),[tt,nt]=(0,We.useState)(new Map),rt=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{q:""};await h(Xde(e,t,"RPM",e=>{let{states:t}=e;_e(t.content)},()=>{}))},it=[{id:"client_name",label:v("rpm_ClientName"),isSort:!0,sortProperty:"client_name"},{id:"provider_name",label:v("rpm_ProviderName"),isSort:!0,sortProperty:"provider_name"},{id:"assigned_date",label:v("rpm_AssignedDate"),isSort:!0,sortProperty:"assigned_date"},{id:"actions",label:v("rpm_Actions"),isSort:!1,sortProperty:"actions"}],ot=[{id:"client_name",label:v("rpm_ClientName"),isSort:!0,sortProperty:"client_name"},{id:"provider_name",label:v("rpm_ProviderName"),isSort:!0,sortProperty:"provider_name"},{id:"assigned_date",label:v("rpm_AssignedDate"),isSort:!0,sortProperty:"assigned_date"},{id:"actions",label:v("rpm_Actions"),isSort:!1,sortProperty:"actions"}],at=()=>{H(!z)},[st,lt]=We.useState(ta()($o.getAssignmentCells())?Ye:$o.getAssignmentCells()),ct=function(e){lt(e),$o.setAssignmentCells(e)},dt=e=>{if(Array.isArray(e))return L(e.map(e=>e.toString()));const t=e.target.name;N.includes(t)?L(N.filter(e=>e!==t)):L(e=>[...e,t])},ut=e=>{const t=e.currentTarget.attributes["data-id"].value,n=e.currentTarget.attributes["data-name"].value,r=e.currentTarget.attributes["data-lname"].value,i=e.currentTarget.attributes["data-tenant"].value;R({id:t,first_name:n,last_name:r,tenantId:i,position:e.currentTarget})},pt=()=>{R({})},ht=e=>{ee.open,te((0,i.A)((0,i.A)({},ee),{},{open:!ee.open,data:e}))},mt=e=>(0,Gt.jsx)(Vp,{color:"error",variant:"contained",disableElevation:!0,startIcon:(0,Gt.jsx)(BZ.A,{}),onClick:()=>ht(e),children:v("rpm_Unassign")}),ft=async(e,t)=>{let n={};var r,i;"ASSIGN"==e?n={patient_urn:null===Ze||void 0===Ze?void 0:Ze.urn,program_urn:null===u||void 0===u?void 0:u.urn,provider_urn:null===Xe||void 0===Xe?void 0:Xe.urn,key:e}:n={patient_urn:null===t||void 0===t||null===(r=t.data)||void 0===r?void 0:r.client_urn,program_urn:null===u||void 0===u?void 0:u.urn,provider_urn:null===t||void 0===t||null===(i=t.data)||void 0===i?void 0:i.provider_urn,key:"UNASSIGN"};let o=!0;for(const[u,p]of tt){var a;if(u===(null===(a=n)||void 0===a?void 0:a.provider_urn)){var s;const e=p.indexOf(null===(s=n)||void 0===s?void 0:s.patient_urn);if(-1!==e){var l;if("ASSIGN"===(null===(l=n)||void 0===l?void 0:l.key))return h(Zo({subTitle:"Client is already assigned",severity:$c})),void(o=!1);p.splice(e,1),o=!0}else{var c;p.push(null===(c=n)||void 0===c?void 0:c.patient_urn),o=!0}}}if(tt.has(n.provider_urn)||tt.set(n.provider_urn,[n.patient_urn]),o)try{const{data:e}=await h(Ws(n));ta()(e)||h(Zo({subTitle:v("rpm_providerAssignSuccess"),severity:Bc})),xt(),te({open:!1}),Ke(null),Qe(null)}catch(d){const e=ls(d,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_providerAssignFailed",severity:$c})):h(Zo({subTitle:bd(e,"error:rpm_providerAssignFailed"),severity:$c}))}},gt=()=>{et(!1),Ke(null),Qe(null)},vt=()=>{et(!0)},xt=async()=>{let e=[{key:"PATIENT_URN",value:Me.urn?Me.urn:""},{key:"PROVIDER_URN",value:Me.provider_urn?Me.provider_urn:""},{key:"PROGRAM_URN",value:null!==u&&void 0!==u&&u.urn?null===u||void 0===u?void 0:u.urn:""}];try{const{data:t}=await h((e=>async t=>{t(na(!0));try{const t="".concat(ca.provider,"/list?page=").concat(e.current_page||"","&perPage=").concat(e.per_page||"");return await du(t,{filters:[...e.filter]})}catch(n){return n}finally{t(na(!1))}})((0,i.A)((0,i.A)({},V),{},{filter:yt(e)}))),{content:n}=t,r=Ko(t,ake);U(e=>(0,i.A)((0,i.A)({},e),{},{last_page:r.last_page,current_page:r.current_page,from:r.from,per_page:r.per_page,to:r.to,total:r.total}));const o=null===n||void 0===n?void 0:n.map(e=>[...e.assignments]),a=new Map;o.flat().forEach(e=>{a.has(e.provider_urn)||a.set(e.provider_urn,[]),a.get(e.provider_urn).push(e.client_urn)}),tt.clear(),nt(new Map(a)),Z(n)}catch(t){return t}},yt=e=>e.filter(e=>!("PATIENT_URN"===e.key&&!Me.urn)&&!("PROVIDER_URN"===e.key&&!Me.provider_urn));var bt;We.useEffect(()=>{u&&((async()=>{const e={programUrn:null===u||void 0===u?void 0:u.urn};try{const{data:t}=await h(Hs(e));Ue(t)}catch(t){const e=ls(t,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:$c})):h(Zo({subTitle:bd(e,"error:rpm_FetchUsersFailed"),severity:$c}))}})(),xt())},[m,u,Me.urn,Me.provider_urn,V.current_page]),We.useEffect(()=>{!async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={},n=(0,i.A)((0,i.A)({q:e},V),{},{sort_by:S,sort_order:_});t=(0,i.A)((0,i.A)({},n),{},{programId:null===u||void 0===u?void 0:u.code});try{const{data:e}=await h(Lg(t)),n=e||{},{content:r}=n;Ko(n,oke),ke(r)}catch(r){const e=ls(r,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_FetchUsersFailed",severity:$c})):h(Zo({subTitle:bd(e,"error:rpm_FetchUsersFailed"),severity:$c}))}}($||"")},[$,m,u,Me.urn,Me.provider_urn,V.current_page]),bt=Pe,We.Fragment,st.includes("client_name")&&(ta()(bt)||bt.map((e,t)=>{var n;return null===e||void 0===e||null===(n=e.assignments)||void 0===n?void 0:n.map((e,n)=>(0,Gt.jsx)(Ym,{variant:"body2",mt:.5,children:(null===e||void 0===e?void 0:e.client_name)||"NA"},"".concat(t,"-").concat(n)))})),st.includes("provider_name")&&(ta()(bt)||bt.map((e,t)=>{var n;return null===e||void 0===e||null===(n=e.assignments)||void 0===n?void 0:n.map((e,n)=>{var r;return(0,Gt.jsx)(Ym,{variant:"body2",mt:.5,children:(null===e||void 0===e||null===(r=e.provider_name)||void 0===r?void 0:r.trim())||"NA"},"".concat(t,"-").concat(n))})})),st.includes("assigned_date")&&(ta()(bt)||bt.map((e,t)=>{var n;return null===e||void 0===e||null===(n=e.assignments)||void 0===n?void 0:n.map((e,n)=>(0,Gt.jsx)(Eu,{mt:.5,children:null!==e&&void 0!==e&&e.assigned_date?new Date(e.assigned_date).toLocaleString():"NA"},"".concat(t,"-").concat(n)))}));const jt=async e=>{try{const{data:t}=await h(Bs((0,i.A)((0,i.A)({sort_by:S,sort_order:_},V),{},{filterState:e,program_code:null===u||void 0===u?void 0:u.code}))),{content:n}=t||{},r=e=>{const t=null===n||void 0===n?void 0:n.map(t=>(0,i.A)((0,i.A)({},t),{},{course_info:ta()(e[t.id])?[]:e[t.id]})),r=null===t||void 0===t?void 0:t.map(e=>(0,i.A)((0,i.A)({},e),{},{course_name:e.course_info.map(e=>e.course_name),course_vital:e.course_info.map(e=>e.vital_name),course_status:e.course_info.map(e=>e.status)}));M(r)};await _t(n,r)}catch(t){return t}},wt=async e=>{if(null!==e&&void 0!==e&&e.patientName){if(null!==e&&void 0!==e&&e.patientName.trim())try{const{data:t}=await h(Bs((0,i.A)((0,i.A)({sort_by:S,sort_order:_,filterState:e,program_code:null===u||void 0===u?void 0:u.code},V),{},{current_page:1}))),{content:n}=t||{};T(n)}catch(t){return t}}else T([]),jt()},_t=async(e,t)=>{const n=null===e||void 0===e?void 0:e.map(e=>e.id);try{const{data:e}=await h(Us({patientIds:n,programCode:null===u||void 0===u?void 0:u.code}));J(e),t(e)}catch(r){return r}},St=()=>{ae?(Se([]),_e([]),se(!ae)):kt()},At=()=>{ce(!le)},kt=async()=>{await h(Zde(V,"RPM",e=>{let{countries:t,states:n}=e;Se(t.content),_e(n.content),se(!ae)},()=>{}))},Mt=()=>{he(!pe)},Ot=()=>{oe(!ie)},Tt=(e,t)=>{var n;return(null===(n=e.alerts)||void 0===n?void 0:n.findIndex(e=>e.data_name===t))>=0},Et=async(e,t)=>{let{setErrors:n}=t;const r=(0,i.A)((0,i.A)({},e),{},{profile:{gender:null!==e&&void 0!==e&&e.gender?null===e||void 0===e?void 0:e.gender:"",adr_country_name:null!==e&&void 0!==e&&e.country?null===e||void 0===e?void 0:e.country:"",adr_state_name:null!==e&&void 0!==e&&e.state?null===e||void 0===e?void 0:e.state:"",adr_city:null!==e&&void 0!==e&&e.city?null===e||void 0===e?void 0:e.city:"",adr_address1:null!==e&&void 0!==e&&e.address?null===e||void 0===e?void 0:e.address:""},mobile:null!==e&&void 0!==e&&e.mobile?"".concat(null===e||void 0===e?void 0:e.country_code).concat(null===e||void 0===e?void 0:e.mobile):""});try{const{data:e}=await h($s(null===u||void 0===u?void 0:u.code,r));h(Zo({subTitle:"message:rpm_PatientCreatedSuccessfully",severity:Bc})),x("".concat(null===e||void 0===e?void 0:e.id,"/courses")),jt(),se(!1)}catch(o){const e=ls(o,"response.data.field_errors",{}),t=ls(o,"response.data.code","");ta()(e)?ta()(t)?h(Zo({subTitle:"error:rpm_patient_not_created",severity:$c})):h(Zo({subTitle:bd(t,"error:rpm_err_mobile_number_already_exist"),severity:$c})):n(yd(e))}},Pt=e=>(0,Gt.jsx)(Yx,{title:v("rpm_Edit"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>console.log(e),children:(0,Gt.jsx)(Zl,{fontSize:"small",sx:{width:16,height:16}})})}),Dt=e=>(0,Gt.jsx)(Yx,{title:v("rpm_view"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,color:"primary",onClick:()=>x("".concat(e.id,"/dashboard")),children:(0,Gt.jsx)(Kl,{fontSize:"small",sx:{width:16,height:16}})})}),Rt=e=>(0,Gt.jsx)(Kp,{"data-id":e.id,color:"error",disabled:!0,children:(0,Gt.jsx)(Ql,{fontSize:"small",sx:{width:16,height:16}})}),Lt=e=>{var t;return(0,Gt.jsx)(Yx,{title:v("rpm_MoreOption"),children:(0,Gt.jsx)(Kp,{"data-id":e.id,"data-name":e.first_name,"data-lname":e.last_name,"data-tenant":e.tenant_id,onClick:ut,size:"small","aria-controls":W?"account-menu":void 0,"aria-haspopup":"true","aria-expanded":W?"true":void 0,color:"primary",disabled:!(null!==u&&void 0!==u&&null!==(t=u.permissions)&&void 0!==t&&t.showViewPatientBtn),children:(0,Gt.jsx)(Iu.A,{})})})},It=(0,Gt.jsxs)(km,{id:"account-menu",anchorEl:ta()(D)?null:D.position,open:!ta()(D),onClose:pt,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5,width:"200px","& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,bgcolor:"background.paper",transform:"translateY(-50%) rotate(45deg)",zIndex:0},"& .MuiMenuItem-root":{fontSize:"0.875rem",py:1.5}}},transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},children:[(null===u||void 0===u||null===(t=u.permissions)||void 0===t?void 0:t.showViewPatientBtn)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/dashboard")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)($l,{fontSize:"small",color:"primary"})}),v("rpm_medicalCharts")]}))(D),(null===u||void 0===u||null===(n=u.permissions)||void 0===n?void 0:n.showMedicalHistoryList)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/history")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(Bl,{fontSize:"small",color:"primary"})}),v("rpm_medicalHistory")]}))(D),(null===u||void 0===u||null===(r=u.permissions)||void 0===r?void 0:r.showCourseList)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/courses")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(Il,{fontSize:"small",color:"primary"})}),v("rpm_patientCourses")]}))(D),(null===u||void 0===u||null===(o=u.permissions)||void 0===o?void 0:o.showPatientRuleList)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/rules")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(Wl,{fontSize:"small",color:"primary"})}),v("rpm_patientRules")]}))(D),(null===u||void 0===u||null===(a=u.permissions)||void 0===a?void 0:a.showPrescriptionNoteList_showNoteList)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/notes/doctor-note")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(Hl,{fontSize:"small",color:"primary"})}),v("rpm_Notes")]}))(D),(null===u||void 0===u||null===(s=u.permissions)||void 0===s?void 0:s.showViewPatientBtn)&&(e=>(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>x("".concat(e.id,"/details")),children:[(0,Gt.jsx)(rv,{children:(0,Gt.jsx)(zl,{fontSize:"small",color:"primary"})}),v("rpm_personalDetails")]}))(D),(null===u||void 0===u||null===(l=u.permissions)||void 0===l?void 0:l.isAdmin)&&(0,Gt.jsxs)($m,{sx:{fontWeight:"500"},onClick:()=>H(!z),children:[(0,Gt.jsx)(rv,{sx:{pl:"5px"},children:(0,Gt.jsx)(vc,{fontSize:"small",color:"primary"})}),v("rpm_TransferProgram")]}),(null===u||void 0===u||null===(c=u.permissions)||void 0===c?void 0:c.showDeletePatientBtn)&&mt(D)]}),Ft=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Me;const t=(0,i.A)({sort_by:S,sort_order:_},V);try{const{data:n}=await h(Vxe(null===u||void 0===u?void 0:u.code,t,e)),{content:r}=n||{};fe(r)}catch(n){}};return We.useEffect(()=>{ct(Ye)},[Be]),We.useEffect(()=>{!m||ta()(u)||w||jt()},[m,_,S,u]),We.useEffect(()=>{m&&!ta()(u)&&Ft()},[m,u]),We.useEffect(()=>{h(w_({activeMenuItem:"assignments"}))},[u]),ta()(u)?(0,Gt.jsx)(Uu,{variant:"outlined",sx:{px:2.5,py:6,display:"flex",height:"320px"},children:(0,Gt.jsx)(Eu,{alignSelf:"center",sx:{mx:"auto"},children:(0,Gt.jsx)(vT,{color:"primary"})})}):(0,Gt.jsxs)(Gt.Fragment,{children:[ta()(u)||null!==u&&void 0!==u&&null!==(d=u.permissions)&&void 0!==d&&d.showPatientList?p>=575?(0,Gt.jsx)(nke,{fetchAssignmentList:xt,assignment:Y,userData:null===u||void 0===u?void 0:u.permissions,programList:b,activeProgram:u,devicesList:E,patientList:k,order:_,orderBy:S,setOrder:C,setOrderBy:A,initialHeadcells:st,setHeadcells:ct,headCellsItems:ot,dataParameter:"id",checkState:N,onCheck:dt,isSelection:!1,nodata:D_,fetchPatientList:jt,pageDetails:V,editButton:Pt,viewButton:Dt,deleteButton:Rt,moreOptions:Lt,moreMenu:It,patientModalOpen:ae,settingModal:pe,openFilter:ie,viewMode:de,handlePatientModalToggle:St,handleViewPatientModalToggle:At,handleSettingModalToggle:Mt,handleOpenFilter:Ot,getReadingColor:Tt,addNewPatient:Et,flag:ge,setSearchDevice:ye,showFilterColor:be,setShowFilterColor:je,filterState:Me,setFilterState:Oe,programSchedule:me,fetchProgramScheduleList:Ft,patientAllVitals:Q,states:we,countries:Ce,fetchStates:rt,fetchPatientListSuggestions:wt,patientSuggestions:O,patientViewModalOpen:le,allPatients:Re,setAllPatients:Ne,newHeadCellsItems:it,allpatientSuggestions:K,newFilterState:Te,setNewFilterState:Ee,newPageDetails:q,userList:Ae,setUserParams:B,toggleRoles:ht,deleteListItem:mt,assignedProviders:Ve,selectedPatient:Ze,setSelectedPatient:Ke,selectedProvider:Xe,setSelectedProvider:Qe,onAssign:ft,assignModalOpen:Je,onCloseAssignmentPopUp:gt,openAssignmentPopUp:vt}):(0,Gt.jsx)(ike,{fetchAssignmentList:xt,assignment:Y,userData:null===u||void 0===u?void 0:u.permissions,programList:b,activeProgram:u,devicesList:E,patientList:k,order:_,orderBy:S,setOrder:C,setOrderBy:A,initialHeadcells:st,setHeadcells:ct,headCellsItems:ot,dataParameter:"id",checkState:N,onCheck:dt,isSelection:!1,nodata:D_,fetchPatientList:jt,pageDetails:V,editButton:Pt,viewButton:Dt,deleteButton:Rt,moreOptions:Lt,moreMenu:It,patientModalOpen:ae,settingModal:pe,openFilter:ie,viewMode:de,handlePatientModalToggle:St,handleViewPatientModalToggle:At,handleSettingModalToggle:Mt,handleOpenFilter:Ot,getReadingColor:Tt,addNewPatient:Et,flag:ge,setSearchDevice:ye,showFilterColor:be,setShowFilterColor:je,filterState:Me,setFilterState:Oe,programSchedule:me,fetchProgramScheduleList:Ft,patientAllVitals:Q,states:we,countries:Ce,fetchStates:rt,fetchPatientListSuggestions:wt,patientSuggestions:O,patientViewModalOpen:le,allPatients:Re,setAllPatients:Ne,newHeadCellsItems:it,fetchAllPatientsListSuggestions:async e=>{const t=(0,i.A)((0,i.A)({sort_by:S,sort_order:_,newFilterState:e,program_code:null===u||void 0===u?void 0:u.code},q),{},{current_page:1});if(e.patientName){if(null!==e&&void 0!==e&&e.patientName.trim())try{const{data:e}=await h(zs(j,t)),{content:n}=e||{};X(n)}catch(n){}}else X([])},allpatientSuggestions:K,newFilterState:Te,setNewFilterState:Ee,newPageDetails:q,userList:Ae,setUserParams:B,toggleRoles:ht,deleteListItem:mt,assignedProviders:Ve,selectedPatient:Ze,setSelectedPatient:Ke,selectedProvider:Xe,setSelectedProvider:Qe,assignModalOpen:Je,onAssign:ft,openAssignmentPopUp:vt,onCloseAssignmentPopUp:gt}):(0,Gt.jsx)(__,{}),(0,Gt.jsx)(PU,{openModal:ee.open,onCloseModal:ht,actionFunction:()=>ft("UNASSIGN",ee),dataName:"",options:{primaryText:v("message:rpm_UnassignTitle"),secondaryText:v("message:rpm_UnassignBody"),btn:{primaryText:v("rpm_Unassign"),secondaryText:v("rpm_Cancel"),primaryColor:"error",secondaryColor:"primary"},btnSwap:!0}}),(0,Gt.jsx)(HSe,{openModal:z,onCloseModal:at,patientInfo:D,activeProgram:u,allPrograms:Pe,setTransferProgram:Ie,transferPatient:async e=>{try{await h(El(u,Le,e)),h(Zo({subTitle:"message:rpm_PatientTransferedSuccessfully",severity:Bc})),at(),pt(),jt()}catch(t){const e=ls(t,"response.data.code","");ta()(e)?h(Zo({subTitle:"error:rpm_PatientTransferFailed",severity:$c})):h(Zo({subTitle:bd(e,"error:rpm_PatientTransferFailed"),severity:$c}))}},disabledButton:!Le,setSearchProgram:$e}),(0,Gt.jsx)(AZ,{isTour:g,path:"allPatientsTour",setRenderer:F}),(0,Gt.jsx)("input",{type:"hidden",id:"rerenderer",value:I})]})};const lke=function(){const e=Nt(),t=lo(),n=Ct(Nd),r=Ct(Gd),{userData:i}=(0,We.useContext)(Zg),[o,a]=We.useState(null);return We.useEffect(()=>{!n||as(r)||as(t)||(async()=>{const e=null===r||void 0===r?void 0:r.find(e=>e.code===t.programId);a(e)})()},[n,r,window.location.pathname]),We.useEffect(()=>{const t={sideBar:!0,listItems:S_(i).concat(k_(null===o||void 0===o?void 0:o.permissions,o)),heading:{name:null===o||void 0===o?void 0:o.display_name,city:null===o||void 0===o?void 0:o.city},activeProgram:o};e(w_(t))},[i,o]),(0,Gt.jsxs)(ko,{children:[(0,Gt.jsx)(So,{path:"dashboard",element:(0,Gt.jsx)(vSe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"patientstatus",element:(0,Gt.jsx)(ySe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"patients",element:(0,Gt.jsx)(YSe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"/assignments",element:(0,Gt.jsx)(ske,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"providers/:patientId",element:(0,Gt.jsx)(QAe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"rules",element:(0,Gt.jsx)(BAe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"rules/:ruleId",element:(0,Gt.jsx)(bAe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"templates",element:(0,Gt.jsx)(_Ce,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"templates/:templateId",element:(0,Gt.jsx)(XSe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"templates/add-template",element:(0,Gt.jsx)(TCe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"templates/edit-template/:templateId",element:(0,Gt.jsx)(TCe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"rules/:ruleId/new",element:(0,Gt.jsx)(RAe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"course",element:(0,Gt.jsx)(ICe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"course/add",element:(0,Gt.jsx)(rSe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"course/:scheduleId/:edit",element:(0,Gt.jsx)(rSe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"course/:scheduleId/mandate/:type",element:(0,Gt.jsx)(rSe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"course/:scheduleId",element:(0,Gt.jsx)(XCe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"/followups",element:(0,Gt.jsx)(kSe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"/programsettings",element:(0,Gt.jsx)(pAe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"/notifications",element:(0,Gt.jsx)(wSe,{activeProgram:o})}),(0,Gt.jsx)(So,{path:"/consultation-templates",element:(0,Gt.jsx)(YAe,{activeProgram:o})})]})};const cke=function(){return(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(ko,{children:[(0,Gt.jsx)(So,{path:"/program/:programId/*",element:(0,Gt.jsx)(lke,{})}),(0,Gt.jsx)(So,{path:"/*",element:(0,Gt.jsx)(uxe,{})}),(0,Gt.jsx)(So,{path:"/program/:programId/patients/:patientId/*",element:(0,Gt.jsx)(vCe,{})})]})})},dke=["content"];const uke=function(){const e=Nt(),t=Ct(Ld),n=Ct(Fd),{enqueueSnackbar:r}=hi(),{t:o}=vg(),{userData:a}=(0,We.useContext)(Zg),s=Ct(Nd),[l,c]=We.useState(null),[d,u]=We.useState(null),[p,h]=We.useState({open:!1,data:""}),[m,f]=We.useState((0,i.A)({},Fc)),g=e=>{let t=[];return null===e||void 0===e||e.forEach(e=>{t.push((0,i.A)((0,i.A)({},e),{},{permissions:jd(a,e.code)}))}),t},v=async t=>{try{const{data:n}=await e(wg(m,t)),r=n||{},{content:o}=r,a=Ko(r,dke);c(o),f(e=>(0,i.A)((0,i.A)({},e),{},{last_page:a.last_page,current_page:a.current_page,from:a.from,per_page:a.per_page,to:a.to,total:a.total}))}catch(n){console.log(n)}},x=async()=>{try{const{data:t}=await e(async e=>{e(na(!0));try{const e="".concat(la.program,"/list"),t=await cu(e,{});return oa()(t,"data.content",[]).forEach(e=>yg(e)),t}catch(t){return t}finally{e(na(!1))}});u(t)}catch(t){console.log(t)}};return We.useEffect(()=>{as(l)||as(a)||g(l)},[l,a]),We.useEffect(()=>{as(d)||as(a)||e({type:Yo,payload:g(d)})},[d,a]),We.useEffect(()=>{s&&(v(),x())},[s]),We.useEffect(()=>{as(n)||r(o(n.subTitle),{variant:n.severity})},[n]),(0,Gt.jsx)(Gt.Fragment,{children:(0,Gt.jsxs)(j_.Provider,{value:{programList:g(l),programFetch:v,programPage:m,allProgramFetch:x},children:[(0,Gt.jsxs)(Eu,{sx:{display:"flex",minHeight:"100%"},children:[(0,Gt.jsx)(x_,{headerData:t}),(0,Gt.jsxs)(Eu,{component:"main",sx:{flexGrow:1,padding:"20px 15px",maxWidth:"100%",bgcolor:"grey.100",overflow:"auto",height:"100vh"},className:"MobileHidden",children:[(null===t||void 0===t?void 0:t.headerBar)&&(0,Gt.jsx)(f_,{}),(0,Gt.jsx)(cke,{})]})]}),(0,Gt.jsx)(b_,{open:null===p||void 0===p?void 0:p.open,link:null===p||void 0===p?void 0:p.data,onClose:()=>h({open:!1,data:""})})]})})};const pke=function(){return(0,Gt.jsxs)(ko,{children:[(0,Gt.jsx)(So,{path:"/",element:(0,Gt.jsx)(Co,{to:"/login"}),replace:!0}),(0,Gt.jsx)(So,{path:"/login",element:(0,Gt.jsx)(xu,{})}),(0,Gt.jsx)(So,{path:"/legal/*",element:(0,Gt.jsx)(cg,{})}),(0,Gt.jsx)(So,{path:"/rpm/*",element:(0,Gt.jsx)(uke,{})}),(0,Gt.jsx)(So,{path:"/notfound",element:(0,Gt.jsx)(xg,{})}),(0,Gt.jsx)(So,{path:"*",element:(0,Gt.jsx)(Co,{to:"/notfound"})})]})};const hke=class{constructor(e,t,n){var r=this;this.setAuthTokenFromLocalStorage=async()=>{if(this.isUnauthRouteLogin())return;const e=this.getTokenFromUrl();if(e){const t=this.getAccountDataFromToken(e);this.setBasics({accessToken:e.accessToken,accountId:t.accountId,refreshToken:t.refreshToken,expiresIn:e.expiresIn,userName:t.userName,tokenType:t.tokenType}),this.refreshTokenHandler(!0,e.expiresIn)}else this.refreshTokenHandler();this.setStorageListner()},this.tokenLoop=null,this.refreshTokenHandler=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:600;try{if(e)r.tokenLoop=setTimeout(r.refreshTokenHandler,1e3*parseInt(t)-2e4);else{const{refreshToken:e,accountId:t,userName:n,tokenType:i}=JSON.parse(localStorage.getItem("auth_data"))||{};if(!e)throw new Error;const o={method:"POST",headers:{"Content-Type":"application/json"},body:""},a="".concat(r.baseUrl,"/authgateway/api/token?grant_type=refresh_token&client_id=").concat(t,"&refresh_token=").concat(e),s=await fetch(a,o),l=await s.json();r.setBasics({accessToken:l.access_token,accountId:t,userName:n,tokenType:i,refreshToken:l.refresh_token,expiresIn:l.expires_in}),r.tokenLoop=setTimeout(r.refreshTokenHandler,1e3*parseInt(l.expires_in)-2e4)}}catch(n){r.store.dispatch(Qd()),clearTimeout(r.tokenLoop),console.log(n),window.location.pathname.includes("login")||(window.location="/login")}},this.mapAuth=e=>({accessToken:e.accessToken,refreshToken:e.refreshToken,tokenType:e.tokenType,accountId:e.accountId,userName:e.userName}),this.setBasics=e=>{this.setAxiosBase({Authorization:"Bearer ".concat(e.accessToken),"X-Cw-Tenant-Id":e.accountId});const t=this.mapAuth(e);localStorage.setItem("auth_data",JSON.stringify(t)),this.loginAction(t)(this.store.dispatch)},this.isUnauthRouteLogin=function(){return"/"===window.location.pathname||window.location.pathname.includes("forgotpassword")||window.location.pathname.includes("passwordreset")||window.location.pathname.includes("legal")},this.getAccountDataFromToken=e=>{const t=_a(e.accessToken);return{refreshToken:e.refreshToken,accountId:t.iss,tokenType:t.typ,userName:t.sub}},this.getTokenFromUrl=()=>{const e=location.hash.substr(1);if(!e)return;let t=e.split("&");return!t[0]||t[0].includes("error")?"":{accessToken:t[0].split("=")[1],expiresIn:t[1].split("=")[1],refreshToken:t[2].split("=")[1]}},this.setStorageListner=()=>{window.addEventListener("storage",e=>{if("auth_data"!==e.key)return;const t=JSON.parse(e.newValue);if(null===t||void 0===t||!t.accessToken)return void(window.location.pathname.includes("login")||(this.logout(),window.location="/login"));this.setAxiosBase({Authorization:"Bearer ".concat(t.accessToken),"X-CW-Tenant-Id":t.accountId});const n=this.mapAuth(t);this.store.dispatch(this.loginAction(n))})},this.loginAction=e=>t=>t({type:"LOGIN",data:e}),this.setAxiosBase=e,this.store=t,this.baseUrl=n}};n(51627);function mke(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"===typeof i?i(n,r,e):t(i)}}}}var fke=mke();fke.withExtraArgument=mke;const gke=fke,vke={isLoggedIn:!1};const xke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vke,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Yd:return(0,i.A)((0,i.A)({},e),{},{isLoggedIn:!0},t.data);case"REFRESH":return(0,i.A)((0,i.A)({},e),{},{isLoggedIn:!0});case Zd:return{isLoggedIn:!1};case"FORGOTPASSWORD":return(0,i.A)((0,i.A)({},e),{},{isLoggedIn:!1});default:return e}},yke={token:localStorage.getItem("managementToken"),refresh:localStorage.getItem("managementRefreshToken"),isAuthenticated:null,isLoading:!0,user:null};const bke={},jke={auth:xke,services:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SERVICES"===t.type?t.data:e},managementAuth:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yke,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"USER_LOADING":return(0,i.A)((0,i.A)({},e),{},{isLoading:!0});case"USER_LOADED":return(0,i.A)((0,i.A)({},e),{},{isAuthenticated:!0,isLoading:!1});case"LOGIN_SUCCESS":{const{access_token:n,refresh_token:r}=t.payload;return localStorage.setItem("managementToken",n),localStorage.setItem("managementRefreshToken",r),(0,i.A)((0,i.A)({},e),{},{token:n,refresh:r,user:t.payload,isAuthenticated:!0,isLoading:!1})}case"LOGOUT_SUCCESS":case"AUTH_ERROR":case"LOGIN_FAILED":return localStorage.removeItem("managementToken"),localStorage.removeItem("managementRefreshToken"),(0,i.A)((0,i.A)({},e),{},{token:null,user:null,isAuthenticated:!1,isLoading:!1});default:return e}},user:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bke,t=arguments.length>1?arguments[1]:void 0;return t.type===Kd?t.data:e}};let wke={patientTab:0};const _ke={activeVitalTab:"null",vitals:{bp:{course:[]},glucose:{course:[]}}},Cke={email_notification:{reading_reminder:!1,missed_mandate:!1,non_compliant_user:!1},push_notification:{reading_reminder:!1,missed_mandate:!1,non_compliant_user:!1}},Ske=[],Ake={headerData:{pageTitle:"",sideBar:!0,headerBar:!0,listItems:[],activeMenuItem:"",sidebarOpen:!1,heading:{},isBreadcrumb:!0,course:{},course_glucose:{},filterDate:{},complianceStatus:"",activeProgram:{}}};const kke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ake,t=arguments.length>1?arguments[1]:void 0;const n=Object.assign({},e.headerData);return t.type===zo?(Object.keys(t.payload).map(e=>{n[e]=t.payload[e]}),(0,i.A)((0,i.A)({},e),{},{headerData:n})):e},Mke={patientTableView:"list",ui_tab:{patientTab:0}},Oke=ta()($o.getPatientTableView())?$o.setPatientTableView(Mke):$o.getPatientTableView(),Tke=(0,Rue.HY)((0,i.A)((0,i.A)({},jke),{},{app:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===Bo?(0,i.A)((0,i.A)({},e),t.data):e},header:kke,loader:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.type===Wo?t.data:e},ui_tab:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.A)({},wke),t=arguments.length>1?arguments[1]:void 0;return t.type===Ho?(0,i.A)((0,i.A)({},e),t.data):e},appUI:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oke,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Uo:case Ho:return(0,i.A)((0,i.A)({},e),t.data);default:return e||Mke}},message:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.type===Vo?t.data:e},dashboard:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_ke,t=arguments.length>1?arguments[1]:void 0;const n=Object.assign({},e);return t.type===qo?(Object.keys(t.payload).map(e=>{n[e]=t.payload[e]}),(0,i.A)((0,i.A)({},e),n)):e},notifications:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cke,t=arguments.length>1?arguments[1]:void 0;const n=t.payload;return t.type===Go?{notificationData:n}:e},Programs:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ske,t=arguments.length>1?arguments[1]:void 0;const n=t.payload;return t.type===Yo?{programData:n}:e}}));let Eke=null;Eke=(0,Rue.Tw)(gke);const Pke=(0,Rue.Yl)(Tke,{},Eke);const Dke=function(){const e=Nt(),t=Ct(Nd),[n,r]=We.useState({});return(0,We.useEffect)(()=>{var t,n,r,i,o,a,s,l;(e=>{ou=Qo().create(),hu(e)})(Pke);const c=null===(t=window)||void 0===t||null===(n=t.rootConfig)||void 0===n?void 0:n.__SERVICE_URL__,d=null===(r=window)||void 0===r||null===(i=r.rootConfig)||void 0===i?void 0:i.__REDIRECT_BASE__,u=null===(o=window)||void 0===o||null===(a=o.rootConfig)||void 0===a?void 0:a.__LOGIN_URL__,p=null===(s=window)||void 0===s||null===(l=s.rootConfig)||void 0===l?void 0:l.__DEFAULT_TENANT__;lu({baseURL:c}),$o.setUrl({baseURL:c,redirectBase:d,loginURL:u,defaultTenant:p}),e((e=>t=>{t({type:Bo,data:e})})({baseURL:c,redirectBase:d,loginURL:u,defaultTenant:p}));const h=new hke(lu,Pke,u);h.setAuthTokenFromLocalStorage()},[]),(0,We.useEffect)(()=>{t&&(async()=>{try{const t=await e(Jd());r(t)}catch(t){console.log(t.message)}})()},[t]),(0,Gt.jsx)(yn,{theme:Lde,children:(0,Gt.jsxs)(pi,{maxSnack:5,anchorOrigin:{horizontal:"right",vertical:"bottom"},preventDuplicate:!0,children:[(0,Gt.jsx)(tn,{}),(0,Gt.jsx)(Do,{children:(0,Gt.jsx)(Zg.Provider,{value:{userData:n},children:(0,Gt.jsx)(pke,{})})})]})})},Rke=e=>{e&&e instanceof Function&&n.e(453).then(n.bind(n,46453)).then(t=>{let{getCLS:n,getFID:r,getFCP:i,getLCP:o,getTTFB:a}=t;n(e),r(e),i(e),o(e),a(e)})};lt.createRoot(document.getElementById("root")).render((0,Gt.jsx)(Et,{store:Pke,children:(0,Gt.jsx)(Dke,{})})),Rke()})()})();
//# sourceMappingURL=main.688312a8.js.map